1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/lib/rails/commands/application.rb
Mikel Lindsaar 4774680405 Changing command line API from 'rails blog' to 'rails new blog'.
Also removed the limitation of not being able to call your new server any of
the rails commands (generate, server, dbconsole, console etc) as there is
no longer any ambiguity here.

http://rails.lighthouseapp.com/projects/8994/tickets/4665

Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2010-06-04 12:30:03 -05:00

18 lines
365 B
Ruby

require 'rails/version'
if %w(--version -v).include? ARGV.first
puts "Rails #{Rails::VERSION::STRING}"
exit(0)
end
if ARGV.first != "new" || ARGV.empty?
ARGV[0] = "--help"
else
ARGV.shift
end
require 'rubygems' if ARGV.include?("--dev")
require 'rails/generators'
require 'rails/generators/rails/app/app_generator'
Rails::Generators::AppGenerator.start