Skip to content

Commit

Permalink
Move Rails 3.1+ specific gems to rails version Gemfile. NUBIC#332.
Browse files Browse the repository at this point in the history
  • Loading branch information
rsutphin committed May 23, 2012
1 parent db28f52 commit d420171
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Gemfile.rails_version
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ if ENV['RAILS_VERSION']
gem 'rails', '~> 3.0.10'
when /3.1$/
gem 'rails', '~> 3.1.0'
# A JS runtime is required for Rails 3.1+
gem 'therubyracer'
when /3.2$/
gem 'rails', '~> 3.2.0'
# A JS runtime is required for Rails 3.1+
gem 'therubyracer'
else
fail "Unknown Rails version #{ENV['RAILS_VERSION']}"
end
Expand Down
3 changes: 0 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ namespace :testbed do
chdir('testbed') do
gem_file_contents = File.read('Gemfile')
gem_file_contents.sub!(/^(gem 'rails'.*)$/, %Q{# \\1\nplugin_root = File.expand_path('../..', __FILE__)\neval(File.read File.join(plugin_root, 'Gemfile.rails_version'))\ngem 'surveyor', :path => plugin_root})
if ENV['CI_RUBY'] && ENV['RAILS_VERSION'] =~ /3.1$/
gem_file_contents << %Q(\ngem 'therubyracer')
end
File.open('Gemfile', 'w'){|f| f.write(gem_file_contents) }

Bundler.with_clean_env do
Expand Down

0 comments on commit d420171

Please sign in to comment.