forked from puppetlabs-toy-chest/puppetlabs-mount_providers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGemfile
24 lines (21 loc) · 910 Bytes
/
Gemfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
source "https://rubygems.org"
group :tests do
gem 'rake', '~> 10.0'
gem 'puppetlabs_spec_helper', ['>= 2.9.0', '< 3.0.0']
gem 'codecov', '~> 0.1.10'
gem 'simplecov-console', '~> 0.4.2'
end
# Find a location or specific version for a gem. place_or_version can be a
# version, which is most often used. It can also be git, which is specified as
# `git://somewhere.git#branch`. You can also use a file source location, which
# is specified as `file://some/location/on/disk`.
def location_for(place_or_version, fake_version = nil)
if place_or_version =~ /^((?:git|https)[:@][^#]*)#(.*)/
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
elsif place_or_version =~ /^file:\/\/(.*)/
['>= 0', { :path => File.expand_path($1), :require => false }]
else
[place_or_version, { :require => false }]
end
end
gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'])