From 5252f5c1c96001795d3e723ad8e48117e34c045b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 15 Jan 2010 13:39:56 +0100 Subject: Bundle automatically if --dev or --edge is given as option. --- railties/lib/rails/generators/rails/app/app_generator.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'railties/lib/rails/generators') diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index ba3eb67fe0..d58d245168 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -168,12 +168,14 @@ module Rails::Generators raise Error, "The template [#{rails_template}] could not be loaded. Error: #{e}" end + def bundle_if_dev_or_edge + run "gem bundle" if dev_or_edge? + end + protected attr_accessor :rails_template def set_default_accessors! - app_name # Cache app name - self.rails_template = case options[:template] when /^http:\/\// options[:template] -- cgit v1.2.3