Permalink
Browse files

Update lib/tasks/gems.rake

  • Loading branch information...
1 parent c38532b commit 65ef10fd5cc6ed10cf25d1deb4f52f066706d0ea Kurtis Rainbolt-Greene committed Nov 15, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/tasks/gems.rake
View
7 lib/tasks/gems.rake
@@ -12,11 +12,10 @@ namespace :moonshine do
hash
end
version = case
- when defined?(RAILS_GEM_VERSION) then RAILS_GEM_VERSION
- when Rails.respond_to?(:version) then Rails.version
+ when defined?(RAILS_GEM_VERSION) then { :version => RAILS_GEM_VERSION }
+ when Rails.respond_to?(:version) then { :version => Rails.version }
end
- version = version ? { :version => version } : {}
- gem_array << { :name => 'rails'}.merge! version
+ gem_array << { :name => 'rails'}.merge!(version || {})
config_path = File.join(Dir.pwd, 'config', 'gems.yml')
File.open( config_path, 'w' ) do |out|
YAML.dump(gem_array, out )

0 comments on commit 65ef10f

Please sign in to comment.