2016-05-28 16:04:13 -04:00
|
|
|
require "rails/command"
|
2015-12-06 08:23:28 -05: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",
|
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
|
|
|
|
2016-05-28 16:04:13 -04:00
|
|
|
Rails::Command.invoke command, ARGV
|