1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Freeze rails when required.

This commit is contained in:
José Valim 2009-06-17 19:31:42 +02:00
parent b9d8fafd7e
commit 9b82fa159a
2 changed files with 6 additions and 3 deletions

View file

@ -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

View file

@ -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