2015-12-06 08:23:28 -05:00
|
|
|
ARGV << '--help' if ARGV.empty?
|
|
|
|
|
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",
|
2014-12-30 04:17:30 -05:00
|
|
|
"r" => "runner",
|
2015-11-13 19:58:51 -05:00
|
|
|
"t" => "test"
|
2010-04-29 02:39:44 -04:00
|
|
|
}
|
|
|
|
|
2015-12-06 08:23:28 -05:00
|
|
|
command = ARGV.shift
|
|
|
|
command = aliases[command] || command
|
2010-04-29 02:39:44 -04:00
|
|
|
|
2015-12-06 08:23:28 -05:00
|
|
|
require 'rails/command'
|
2015-11-30 16:33:33 -05:00
|
|
|
require 'rails/commands/dev_cache'
|
2010-02-03 12:49:47 -05:00
|
|
|
|
2015-12-06 08:23:28 -05:00
|
|
|
Rails::Command.run(command, ARGV)
|