Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Generated apps with --dev or --edge flags depend on git versions of s…

…ass-rails and coffee-rails
  • Loading branch information...
commit f2ade6f4b0d3222d6903e44fdea5c1e341329a7a 1 parent 7f5dc98
@spastorino spastorino authored
View
12 railties/lib/rails/generators/app_base.rb
@@ -202,6 +202,18 @@ def javascript_gemfile_entry
"gem '#{options[:javascript]}-rails'" unless options[:skip_javascript]
end
+ def assets_gemfile_entry
+ <<-GEMFILE.strip_heredoc
+ # Gems used only for assets and not required
+ # in production environments by default.
+ group :assets do
+ gem 'sass-rails', #{options.dev? || options.edge? ? " :git => 'git://github.com/rails/sass-rails.git', :branch => '3-1-stable'" : " ~> 3.1.0.rc".inspect}
+ gem 'coffee-rails', #{options.dev? || options.edge? ? ":git => 'git://github.com/rails/coffee-rails.git', :branch => '3-1-stable'" : "~> 3.1.0.rc".inspect}
+ gem 'uglifier'
+ end
+ GEMFILE
+ end
+
def bundle_command(command)
say_status :run, "bundle #{command}"
View
9 railties/lib/rails/generators/rails/app/templates/Gemfile
@@ -7,14 +7,7 @@ source 'http://rubygems.org'
<%= "gem 'jruby-openssl'\n" if defined?(JRUBY_VERSION) -%>
<%= "gem 'json'\n" if RUBY_VERSION < "1.9.2" -%>
-# Gems used only for assets and not required
-# in production environments by default.
-group :assets do
- gem 'sass-rails', "~> 3.1.0.rc"
- gem 'coffee-rails', "~> 3.1.0.rc"
- gem 'uglifier'
-end
-
+<%= assets_gemfile_entry %>
<%= javascript_gemfile_entry %>
# Use unicorn as the web server
Please sign in to comment.
Something went wrong with that request. Please try again.