diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-04-01 06:29:32 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-04-01 06:29:32 +0000 |
commit | d08f838c0e4d626a1b78c7799e0cad878ce4943c (patch) | |
tree | 4912c4fcf6ee7da1b0c1635ae16e344985a95d48 /railties/bin | |
parent | 237cc945bb82c3428b85646fe1688fe61d4cc535 (diff) | |
download | rails-d08f838c0e4d626a1b78c7799e0cad878ce4943c.tar.gz rails-d08f838c0e4d626a1b78c7799e0cad878ce4943c.tar.bz2 rails-d08f838c0e4d626a1b78c7799e0cad878ce4943c.zip |
Added -f/--freeze option to rails command for freezing the application to the Rails version it was generated with [DHH] Fixed rake rails:freeze:gems (closes #4518) [benji@silverinsanity.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4115 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/bin')
-rwxr-xr-x | railties/bin/rails | 5 |
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 |