aboutsummaryrefslogtreecommitdiffstats
path: root/railties/bin/rails
diff options
context:
space:
mode:
Diffstat (limited to 'railties/bin/rails')
-rwxr-xr-xrailties/bin/rails5
1 files changed, 5 insertions, 0 deletions
diff --git a/railties/bin/rails b/railties/bin/rails
index 5c03eed58f..d83f5b8b8e 100755
--- a/railties/bin/rails
+++ b/railties/bin/rails
@@ -4,8 +4,13 @@ Signal.trap("INT") { puts; exit }
require File.dirname(__FILE__) + '/../lib/rails/version'
abort "Rails #{Rails::VERSION::STRING}" if %w(--version -v).include? ARGV.first
+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 \ No newline at end of file