diff options
author | José Valim <jose.valim@gmail.com> | 2011-12-17 12:51:38 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-12-17 12:58:11 +0100 |
commit | 8de96949e9d3d8f0902486df343ad88401c028fd (patch) | |
tree | a36ed1a364e416c4dedb17860c895b160f6c0f92 /railties/lib/rails | |
parent | 1bfed9efb39f4a8eff2867bb1d8b9e19ecc8ca02 (diff) | |
download | rails-8de96949e9d3d8f0902486df343ad88401c028fd.tar.gz rails-8de96949e9d3d8f0902486df343ad88401c028fd.tar.bz2 rails-8de96949e9d3d8f0902486df343ad88401c028fd.zip |
Use gem versions of sass-rails and coffee-rails.
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 0bd39cb2cd..197b692469 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -194,16 +194,32 @@ module Rails def assets_gemfile_entry return if options[:skip_sprockets] - <<-GEMFILE.strip_heredoc.gsub(/^[ \t]*$/, '') - # 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.git' - gem 'coffee-rails', :git => 'git://github.com/rails/coffee-rails.git' - #{"gem 'therubyrhino'\n" if defined?(JRUBY_VERSION)} - gem 'uglifier', '>= 1.0.3' - end - GEMFILE + + gemfile = if options.dev? || options.edge? + <<-GEMFILE + # 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.git' + gem 'coffee-rails', :git => 'git://github.com/rails/coffee-rails.git' + #{"gem 'therubyrhino'\n" if defined?(JRUBY_VERSION)} + gem 'uglifier', '>= 1.0.3' + end + GEMFILE + else + <<-GEMFILE + # Gems used only for assets and not required + # in production environments by default. + group :assets do + gem 'sass-rails', '~> 3.2.0' + gem 'coffee-rails', '~> 3.2.0' + #{"gem 'therubyrhino'\n" if defined?(JRUBY_VERSION)} + gem 'uglifier', '>= 1.0.3' + end + GEMFILE + end + + gemfile.strip_heredoc.gsub(/^[ \t]*$/, '') end def javascript_gemfile_entry |