Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
oops, need older rubygems to work
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Feb 6, 2014
1 parent 089cb44 commit 22a1acc
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ end
namespace :spec do
desc "Ensure spec dependencies are installed"
task :deps do
sh "gem update --system 2.2.0" # 2.2.1 and 2.2.2 can't install RSpec 3
{"rdiscount" => "~> 1.6", "ronn" => "~> 0.7.3", "rspec" => "~> 3.0.beta"}.each do |name, version|
sh "#{Gem.ruby} -S gem list -i '^#{name}$' -v '#{version}' || " \
"#{Gem.ruby} -S gem install #{name} -v '#{version}' --no-ri --no-rdoc"
Expand All @@ -40,14 +39,19 @@ namespace :spec do
namespace :travis do
task :deps do
# Give the travis user a name so that git won't fatally error
system("sudo sed -i 's/1000::/1000:Travis:/g' /etc/passwd")
system "sudo sed -i 's/1000::/1000:Travis:/g' /etc/passwd"
# Strip secure_path so that RVM paths transmit through sudo -E
system("sudo sed -i '/secure_path/d' /etc/sudoers")
system "sudo sed -i '/secure_path/d' /etc/sudoers"
# Install groff for the ronn gem
system("sudo apt-get install groff -y")
# Downgrade Rubygems on 1.8 to avoid https://github.com/rubygems/rubygems/issues/784
sh "sudo apt-get install groff -y"
if RUBY_VERSION < '1.9'
system("gem update --system 2.1.11")
# Downgrade Rubygems on 1.8 so Ronn can be required
# https://github.com/rubygems/rubygems/issues/784
sh "gem update --system 2.1.14"
else
# Downgrade Rubygems so RSpec 3 can be instaled
# https://github.com/rubygems/rubygems/issues/813
sh "gem update --system 2.2.0"
end
# Install the other gem deps, etc.
Rake::Task["spec:deps"].invoke
Expand Down

0 comments on commit 22a1acc

Please sign in to comment.