diff options
author | José Valim <jose.valim@gmail.com> | 2011-07-01 15:21:08 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-07-01 15:21:08 -0300 |
commit | d74e1b1ac5dd69f090a8b9637ca2502d5226d3c8 (patch) | |
tree | fcdb11e73aaa7f85b3d7bfcda5a1a035022eaf57 /railties/lib | |
parent | 3da608e0b48b44d695d4727c3dc2a8022fdbddd7 (diff) | |
download | rails-d74e1b1ac5dd69f090a8b9637ca2502d5226d3c8.tar.gz rails-d74e1b1ac5dd69f090a8b9637ca2502d5226d3c8.tar.bz2 rails-d74e1b1ac5dd69f090a8b9637ca2502d5226d3c8.zip |
Add assets_gemfile_entry.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 10 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/Gemfile | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index c8847f0159..bbdd000ad9 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -198,6 +198,16 @@ module Rails end end + def assets_gemfile_entry + <<-GEMFILE.strip_heredoc + group :assets do + gem 'sass-rails', :git => 'git://github.com/rails/sass-rails' + gem 'coffee-rails', :git => 'git://github.com/rails/coffee-rails' + gem 'uglifier' + end + GEMFILE + end + def javascript_gemfile_entry "gem '#{options[:javascript]}-rails'" unless options[:skip_javascript] end diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile b/railties/lib/rails/generators/rails/app/templates/Gemfile index d45430e6ac..88eea40b1b 100644 --- a/railties/lib/rails/generators/rails/app/templates/Gemfile +++ b/railties/lib/rails/generators/rails/app/templates/Gemfile @@ -9,11 +9,7 @@ source 'http://rubygems.org' # Gems used only for assets and not required # in production environments by default. -group :assets do - gem 'sass-rails', :git => 'git://github.com/rails/sass-rails' - gem 'coffee-rails', :git => 'git://github.com/rails/coffee-rails' - gem 'uglifier' -end +<%= assets_gemfile_entry %> <%= javascript_gemfile_entry %> |