2017-08-14 13:08:09 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-06-30 00:55:31 -04:00
|
|
|
require_relative "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
|
|
|
|
2017-06-30 00:55:31 -04:00
|
|
|
require_relative "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
|
|
|
|
2017-06-30 00:55:31 -04:00
|
|
|
require_relative "command"
|
2016-05-28 16:04:13 -04:00
|
|
|
|
2016-08-06 13:15:47 -04:00
|
|
|
if ARGV.first == "plugin"
|
2010-10-15 10:46:31 -04:00
|
|
|
ARGV.shift
|
2016-05-28 16:04:13 -04:00
|
|
|
Rails::Command.invoke :plugin, ARGV
|
2010-10-15 10:46:31 -04:00
|
|
|
else
|
2016-05-28 16:04:13 -04:00
|
|
|
Rails::Command.invoke :application, ARGV
|
2010-10-15 10:46:31 -04:00
|
|
|
end
|