mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
e8cc4b116c
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
20 lines
No EOL
636 B
Text
Executable file
20 lines
No EOL
636 B
Text
Executable file
require File.dirname(__FILE__) + '/../lib/ruby_version_check'
|
|
Signal.trap("INT") { puts; exit }
|
|
|
|
require File.dirname(__FILE__) + '/../lib/rails/version'
|
|
if %w(--version -v).include? ARGV.first
|
|
puts "Rails #{Rails::VERSION::STRING}"
|
|
exit(0)
|
|
end
|
|
|
|
freeze = ARGV.any? { |option| %w(--freeze -f).include?(option) }
|
|
|
|
app_path = ARGV.first
|
|
|
|
require File.dirname(__FILE__) + '/../lib/rails_generator'
|
|
|
|
require 'rails_generator/scripts/generate'
|
|
Rails::Generator::Base.use_application_sources!
|
|
Rails::Generator::Scripts::Generate.new.run(ARGV, :generator => 'app')
|
|
|
|
Dir.chdir(app_path) { `rake rails:freeze:gems`; puts "froze" } if freeze |