Ensure Gemfile retains facilities for Jenkins.

This commit is contained in:
Ashley Penney 2014-03-11 09:21:37 -07:00
parent 0bf470a71b
commit 3feb846cf4

16
Gemfile
View file

@ -1,5 +1,15 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
def location_for(place, fake_version = nil)
if place =~ /^(git[:@][^#]*)#(.*)/
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
elsif place =~ /^file:\/\/(.*)/
['>= 0', { :path => File.expand_path($1), :require => false }]
else
[place, { :require => false }]
end
end
group :development, :test do
gem 'rake', :require => false
gem 'rspec-puppet', :require => false
@ -15,8 +25,10 @@ group :development, :test do
gem 'beaker-rspec', :require => false
end
if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion, :require => false
ENV['GEM_PUPPET_VERSION'] ||= ENV['PUPPET_GEM_VERSION']
puppetversion = ENV['GEM_PUPPET_VERSION']
if puppetversion
gem 'puppet', *location_for(puppetversion)
else
gem 'puppet', :require => false
end