2010-04-29 02:39:44 -04:00
|
|
|
ARGV << '--help' if ARGV.empty?
|
2005-09-29 08:33:48 -04:00
|
|
|
|
2010-04-29 02:39:44 -04:00
|
|
|
aliases = {
|
|
|
|
"g" => "generate",
|
2011-08-20 18:25:11 -04:00
|
|
|
"d" => "destroy",
|
2010-04-29 02:39:44 -04:00
|
|
|
"c" => "console",
|
|
|
|
"s" => "server",
|
2011-05-07 23:12:34 -04:00
|
|
|
"db" => "dbconsole",
|
|
|
|
"r" => "runner"
|
2010-04-29 02:39:44 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
command = ARGV.shift
|
|
|
|
command = aliases[command] || command
|
|
|
|
|
2013-06-30 22:55:33 -04:00
|
|
|
require 'rails/commands/commands_tasks'
|
2010-02-03 12:49:47 -05:00
|
|
|
|
2013-06-30 22:55:33 -04:00
|
|
|
Rails::CommandsTasks.new(ARGV).run_command!(command)
|