aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2012-01-12 21:58:25 -0500
committerGuillermo Iguaran <guilleiguaran@gmail.com>2012-01-12 21:58:25 -0500
commit94bcdd60eaecd81e243731ac62af56b68f91b9fe (patch)
treeef3bbed20e22d8207c4e69fac478283944a26b35 /railties/lib/rails/generators
parent31472ba6328e1be5f7390840d00e67862510c2e2 (diff)
downloadrails-94bcdd60eaecd81e243731ac62af56b68f91b9fe.tar.gz
rails-94bcdd60eaecd81e243731ac62af56b68f91b9fe.tar.bz2
rails-94bcdd60eaecd81e243731ac62af56b68f91b9fe.zip
Add therubyracer gem commented in default Gemfile
Diffstat (limited to 'railties/lib/rails/generators')
-rw-r--r--railties/lib/rails/generators/app_base.rb16
1 files changed, 14 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb
index 046b8f3925..d3420a6a3c 100644
--- a/railties/lib/rails/generators/app_base.rb
+++ b/railties/lib/rails/generators/app_base.rb
@@ -195,7 +195,9 @@ module Rails
group :assets do
gem 'sass-rails', :git => 'https://github.com/rails/sass-rails.git'
gem 'coffee-rails', :git => 'https://github.com/rails/coffee-rails.git'
- #{"gem 'therubyrhino'\n" if defined?(JRUBY_VERSION)}
+
+ # See https://github.com/sstephenson/execjs#readme for more supported runtimes
+ #{javascript_runtime_gemfile_entry}
gem 'uglifier', '>= 1.0.3'
end
GEMFILE
@@ -206,7 +208,9 @@ module Rails
group :assets do
gem 'sass-rails', '~> 4.0.0.beta'
gem 'coffee-rails', '~> 4.0.0.beta'
- #{"gem 'therubyrhino'\n" if defined?(JRUBY_VERSION)}
+
+ # See https://github.com/sstephenson/execjs#readme for more supported runtimes
+ #{javascript_runtime_gemfile_entry}
gem 'uglifier', '>= 1.0.3'
end
GEMFILE
@@ -219,6 +223,14 @@ module Rails
"gem '#{options[:javascript]}-rails'" unless options[:skip_javascript]
end
+ def javascript_runtime_gemfile_entry
+ if defined?(JRUBY_VERSION)
+ "gem 'therubyrhino'\n"
+ else
+ "# gem 'therubyracer'\n"
+ end
+ end
+
def bundle_command(command)
say_status :run, "bundle #{command}"