summaryrefslogtreecommitdiff
path: root/Gemfile
diff options
context:
space:
mode:
authorAshley Penney <ashley.penney@puppetlabs.com>2014-03-11 09:21:37 -0700
committerAshley Penney <ashley.penney@puppetlabs.com>2014-03-11 09:21:37 -0700
commit3feb846cf41d53a6ca7c0f4ea420df56c687a2ec (patch)
tree985e42e12c045ed065a1b0b6e3b84c726fb67c9b /Gemfile
parent0bf470a71b8e6476645fb241faef12e30b2193ac (diff)
Ensure Gemfile retains facilities for Jenkins.
Diffstat (limited to 'Gemfile')
-rw-r--r--Gemfile16
1 files changed, 14 insertions, 2 deletions
diff --git a/Gemfile b/Gemfile
index 3d6d5ea..4604d1b 100644
--- a/Gemfile
+++ b/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