Permalink
Browse files

Use new hash syntax in generated Gemfile

  • Loading branch information...
1 parent c0a7038 commit 5eb32af28b16cf8d26ce291232239892154227d4 @oscardelben oscardelben committed May 2, 2012
Showing with 14 additions and 14 deletions.
  1. +14 −14 railties/lib/rails/generators/app_base.rb
@@ -137,24 +137,24 @@ def comment_if(value)
def rails_gemfile_entry
if options.dev?
<<-GEMFILE.strip_heredoc
- gem 'rails', :path => '#{Rails::Generators::RAILS_DEV_PATH}'
- gem 'journey', :github => 'rails/journey'
- gem 'arel', :github => 'rails/arel'
- gem 'active_record_deprecated_finders', :github => 'rails/active_record_deprecated_finders'
+ gem 'rails', path: '#{Rails::Generators::RAILS_DEV_PATH}'
+ gem 'journey', github: 'rails/journey'
+ gem 'arel', github: 'rails/arel'
+ gem 'active_record_deprecated_finders', github: 'rails/active_record_deprecated_finders'
GEMFILE
elsif options.edge?
<<-GEMFILE.strip_heredoc
- gem 'rails', :github => 'rails/rails'
- gem 'journey', :github => 'rails/journey'
- gem 'arel', :github => 'rails/arel'
- gem 'active_record_deprecated_finders', :github => 'rails/active_record_deprecated_finders'
+ gem 'rails', github: 'rails/rails'
+ gem 'journey', github: 'rails/journey'
+ gem 'arel', github: 'rails/arel'
+ gem 'active_record_deprecated_finders', github: 'rails/active_record_deprecated_finders'
GEMFILE
else
<<-GEMFILE.strip_heredoc
gem 'rails', '#{Rails::VERSION::STRING}'
# Bundle edge Rails instead:
- # gem 'rails', :github => 'rails/rails'
+ # gem 'rails', github: 'rails/rails'
GEMFILE
end
end
@@ -194,9 +194,9 @@ def assets_gemfile_entry
# Gems used only for assets and not required
# in production environments by default.
group :assets do
- gem 'sprockets-rails', :git => 'https://github.com/rails/sprockets-rails.git'
- gem 'sass-rails', :git => 'https://github.com/rails/sass-rails.git'
- gem 'coffee-rails', :git => 'https://github.com/rails/coffee-rails.git'
+ gem 'sprockets-rails', github: 'rails/sprockets-rails'
+ gem 'sass-rails', github: 'rails/sass-rails'
+ gem 'coffee-rails', github: 'rails/coffee-rails'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
#{javascript_runtime_gemfile_entry}
@@ -208,7 +208,7 @@ def assets_gemfile_entry
# Gems used only for assets and not required
# in production environments by default.
group :assets do
- gem 'sprockets-rails', :git => 'https://github.com/rails/sprockets-rails.git'
+ gem 'sprockets-rails', github: 'rails/sprockets-rails'
gem 'sass-rails', '~> 4.0.0.beta'
gem 'coffee-rails', '~> 4.0.0.beta'
@@ -230,7 +230,7 @@ def javascript_runtime_gemfile_entry
if defined?(JRUBY_VERSION)
"gem 'therubyrhino'\n"
else
- "# gem 'therubyracer', :platform => :ruby\n"
+ "# gem 'therubyracer', platform: :ruby\n"
end
end

6 comments on commit 5eb32af

Contributor

dmitriy-kiriyenko replied May 2, 2012

Wow, I was unaware about that :github option in bundler. Is it Rails-specific or in Bundler? Can't find it in bundler documentation.

Member

sikachu replied May 2, 2012

Member

drogus replied May 2, 2012

@sikachu: it works with 1.1.x, if it's only 1.2 I would not use it here :)

Member

sikachu replied May 2, 2012

Member

drogus replied May 2, 2012

I mean, here: 17f2958

Contributor

oscardelben replied May 2, 2012

@sikachu well, it's mind: :blown, see commit message!

Please sign in to comment.