2017-08-14 13:08:09 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-05-28 16:04:13 -04:00
|
|
|
module Rails
|
|
|
|
module Command
|
2016-10-28 14:44:58 -04:00
|
|
|
class NewCommand < Base # :nodoc:
|
2017-02-26 07:05:13 -05:00
|
|
|
no_commands do
|
|
|
|
def help
|
|
|
|
Rails::Command.invoke :application, [ "--help" ]
|
|
|
|
end
|
2016-05-28 16:04:13 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def perform(*)
|
2018-08-22 14:26:06 -04:00
|
|
|
say "Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first.\n"
|
|
|
|
say "Type 'rails' for help."
|
2016-05-28 16:04:13 -04:00
|
|
|
exit 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|