From: Ashley Penney Date: Mon, 10 Mar 2014 21:56:12 +0000 (-0700) Subject: Readd location_for X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=0fabaa5f07d52feed34b6d58b586ee937752578c;p=puppet-stdlib.git Readd location_for location_for is used in Jenkins to transform a passed in git repo into something usable by bundler. --- diff --git a/Gemfile b/Gemfile index 3d6d5ea..876beab 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