From 0fabaa5f07d52feed34b6d58b586ee937752578c Mon Sep 17 00:00:00 2001 From: Ashley Penney Date: Mon, 10 Mar 2014 14:56:12 -0700 Subject: Readd location_for location_for is used in Jenkins to transform a passed in git repo into something usable by bundler. --- Gemfile | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- cgit v1.2.3