Skip to content

Commit

Permalink
Merge pull request puppetlabs#71 from er0ck/fix/stable/QA-2887-Rototi…
Browse files Browse the repository at this point in the history
…ller_should_not_depend_on_Rake_11_x_for_realz

(qa-2887) rototiller should not depend on rake 11 x for realz
  • Loading branch information
samwoods1 authored Mar 31, 2017
2 parents 8299527 + 68c3035 commit b5f1f6f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 27 deletions.
12 changes: 6 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ rake_version = '>= 0.9.0'
if ENV['RAKE_VER']
rake_version = "~> #{ENV['RAKE_VER']}"
end
gem 'rake' , "#{rake_version}"
gem 'rake' , "#{rake_version}"
gem "rototiller", *location_for(ENV['TILLER_VERSION'] || '~> 0.1.0')
gem 'rspec' ,'~> 3.4.0'
gem 'rspec' ,'~> 3.4.0'

group :system_tests do
#gem 'beaker', :path => "../../beaker/"
gem 'beaker' ,'~> 2.22'
gem 'beaker' ,'~> 3.0'
gem 'beaker-hostgenerator'
gem 'public_suffix', '<= 1.4.6'
gem 'public_suffix' ,'<= 1.4.6'
gem 'nokogiri' ,'<= 1.6.9'
end

group :development do
Expand All @@ -36,7 +36,7 @@ group :development do
# restrict version to enable ruby 1.9.3
gem 'mime-types' ,'~> 2.0'
gem 'google-api-client' ,'<= 0.9.4'
gem 'activesupport' ,'< 5.0.0'
gem 'activesupport' ,'< 5.0.0'
# restrict version to enable ruby 1.9.3 <-> 2.0.0
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0.0')
gem 'public_suffix' ,'<= 1.4.6'
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ rototiller_task :acceptance => [:generate_host_config] do |t|
t.add_env({:name => 'LAYOUT', :default => 'centos7-64',
:message => 'The argument to pass to beaker-hostgenerator',
:set_env => true})
t.add_env({:name => 'RAKE_VER', :default => '11.0',
t.add_env({:name => 'RAKE_VER', :default => '12.0',
:message => 'The rake version to use when running unit and acceptance tests',
:set_env => true})

Expand Down
23 changes: 6 additions & 17 deletions acceptance/pre-suite/01_install_rototiller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
test_name 'install rototiller and rake in a bundle' do
test_name 'install rototiller' do
sut = find_only_one('agent')

`gem build rototiller.gemspec`
Expand All @@ -8,21 +8,10 @@
end
scp_to(sut, gem_name, gem_name)

rake_version = `rake --version`.split[2]
# <sigh> we need to use bundler here to avoid conflicts when installing
# older versions of rake
# holy hell, this is painful
on(sut, 'gem install --force bundler')
# fetch rake so we can install from local cache
on(sut, "gem fetch rake -v #{rake_version}")
step 'create a Gemfile using local rototiller and rake version' do
create_remote_file(sut, 'Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rake', '~> #{rake_version}'
gem 'rototiller'
GEMFILE
on(sut, 'cat Gemfile')
if ENV['RAKE_VER']
on(sut, "gem install rake --no-document --version #{ENV['RAKE_VER']}")
else
on(sut, "gem install --no-document rake")
end
# config local cache to find the two gems
on(sut, 'bundle config cache_path ./ && bundle install --local')
on(sut, "gem install --no-document ./#{gem_name}")
end
4 changes: 1 addition & 3 deletions rototiller.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ Gem::Specification.new do |s|
'README.md', 'lib/**/*', 'docs/**/*']
s.required_ruby_version = '>= 1.9.3'

#Run time dependencies
rake_version = ENV['RAKE_VER'] || '11.0'
# RAKE_VER=0.9, 10.0, 11.0
# don't use 11.0.0, which probably installs 11.0.1 which has issues
s.add_runtime_dependency 'rake', "~> #{rake_version}"
s.add_runtime_dependency 'rake'
end

0 comments on commit b5f1f6f

Please sign in to comment.