2014-02-12 01:34:43 +01:00
|
|
|
source ENV['GEM_SOURCE'] || "https://rubygems.org"
|
2013-04-03 00:23:36 +02:00
|
|
|
|
2015-01-14 19:19:02 +01:00
|
|
|
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
|
|
|
|
|
2014-12-08 19:23:27 +01:00
|
|
|
group :development, :unit_tests do
|
2014-06-26 02:23:22 +02:00
|
|
|
gem 'rake', :require => false
|
|
|
|
gem 'rspec-puppet', :require => false
|
|
|
|
gem 'puppetlabs_spec_helper', :require => false
|
|
|
|
gem 'puppet-lint', :require => false
|
|
|
|
gem 'simplecov', :require => false
|
2014-12-08 19:23:27 +01:00
|
|
|
gem 'puppet_facts', :require => false
|
2014-12-09 07:52:17 +01:00
|
|
|
gem 'json', :require => false
|
2014-12-08 19:23:27 +01:00
|
|
|
end
|
|
|
|
|
2015-01-14 19:19:02 +01:00
|
|
|
beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
|
2014-12-08 19:23:27 +01:00
|
|
|
group :system_tests do
|
2015-01-14 19:19:02 +01:00
|
|
|
if beaker_rspec_version
|
|
|
|
gem 'beaker-rspec', *location_for(beaker_rspec_version)
|
|
|
|
else
|
|
|
|
gem 'beaker-rspec', :require => false
|
|
|
|
end
|
2014-12-08 19:23:27 +01:00
|
|
|
gem 'serverspec', :require => false
|
2013-07-15 17:49:22 +02:00
|
|
|
end
|
2013-04-03 00:23:36 +02:00
|
|
|
|
2014-06-30 19:57:55 +02:00
|
|
|
if facterversion = ENV['FACTER_GEM_VERSION']
|
2015-01-14 19:19:02 +01:00
|
|
|
gem 'facter', *location_for(facterversion)
|
2014-06-30 19:57:55 +02:00
|
|
|
else
|
|
|
|
gem 'facter', :require => false
|
2013-07-15 17:49:22 +02:00
|
|
|
end
|
2013-04-03 00:23:36 +02:00
|
|
|
|
|
|
|
if puppetversion = ENV['PUPPET_GEM_VERSION']
|
2015-01-14 19:19:02 +01:00
|
|
|
gem 'puppet', *location_for(puppetversion)
|
2013-07-15 17:49:22 +02:00
|
|
|
else
|
|
|
|
gem 'puppet', :require => false
|
2013-04-03 00:23:36 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
# vim:ft=ruby
|