Ensure Gemfile retains facilities for Jenkins.
This commit is contained in:
parent
0bf470a71b
commit
3feb846cf4
1 changed files with 14 additions and 2 deletions
16
Gemfile
16
Gemfile
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue