diff options
author | José Valim <jose.valim@gmail.com> | 2009-06-17 19:31:42 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-06-19 16:11:54 +0200 |
commit | 9b82fa159a4d1f4f1e4b2932f43d76d9fc74da21 (patch) | |
tree | 5604d126b37135ef574e5250e32bca75b0df0145 /railties/lib | |
parent | b9d8fafd7eff601af7807b1f8620d0a3cacdd9d1 (diff) | |
download | rails-9b82fa159a4d1f4f1e4b2932f43d76d9fc74da21.tar.gz rails-9b82fa159a4d1f4f1e4b2932f43d76d9fc74da21.tar.bz2 rails-9b82fa159a4d1f4f1e4b2932f43d76d9fc74da21.zip |
Freeze rails when required.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/generator/actions.rb | 4 | ||||
-rw-r--r-- | railties/lib/generator/generators/app.rb | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/railties/lib/generator/actions.rb b/railties/lib/generator/actions.rb index 767a89b750..feb31b9995 100644 --- a/railties/lib/generator/actions.rb +++ b/railties/lib/generator/actions.rb @@ -226,7 +226,7 @@ module Rails # capify! # def capify! - log :capify + log :capify, "" in_root { run('capify .', false) } end @@ -237,7 +237,7 @@ module Rails # freeze! # def freeze!(args = {}) - log :freeze + log :vendor, "rails" in_root { run('rake rails:freeze:edge', false) } end diff --git a/railties/lib/generator/generators/app.rb b/railties/lib/generator/generators/app.rb index 8b22437db6..6a7edc5934 100644 --- a/railties/lib/generator/generators/app.rb +++ b/railties/lib/generator/generators/app.rb @@ -19,7 +19,6 @@ module Rails::Generators class_option :database, :type => :string, :aliases => "-d", :default => DEFAULT_DATABASE, :desc => "Preconfigure for selected database (options: #{DATABASES.join('/')})" - # TODO Make use of this option class_option :freeze, :type => :boolean, :aliases => "-f", :default => false, :desc => "Freeze Rails in vendor/rails from the gems" @@ -168,6 +167,10 @@ module Rails::Generators empty_directory "vendor/plugins" end + def freeze? + freeze! if options[:freeze] + end + protected def app_name |