2016-08-06 13:15:47 -04:00
|
|
|
require "rails/app_loader"
|
2010-02-25 11:32:37 -05:00
|
|
|
|
2010-08-26 18:31:09 -04:00
|
|
|
# If we are inside a Rails application this method performs an exec and thus
|
|
|
|
# the rest of this script is not run.
|
2015-04-22 23:05:30 -04:00
|
|
|
Rails::AppLoader.exec_app
|
2010-02-25 11:32:37 -05:00
|
|
|
|
2016-08-06 13:15:47 -04:00
|
|
|
require "rails/ruby_version_check"
|
2011-01-28 22:00:48 -05:00
|
|
|
Signal.trap("INT") { puts; exit(1) }
|
2010-02-25 11:32:37 -05:00
|
|
|
|
2016-08-06 13:15:47 -04:00
|
|
|
if ARGV.first == "plugin"
|
2010-10-15 10:46:31 -04:00
|
|
|
ARGV.shift
|
2016-08-06 13:15:47 -04:00
|
|
|
require "rails/commands/plugin"
|
2010-10-15 10:46:31 -04:00
|
|
|
else
|
2016-08-06 13:15:47 -04:00
|
|
|
require "rails/commands/application"
|
2010-10-15 10:46:31 -04:00
|
|
|
end
|