2014-03-05 21:43:58 +01:00
|
|
|
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
|
|
|
|
|
2014-03-11 17:21:37 +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-11-10 20:56:40 +01:00
|
|
|
group :development, :unit_tests do
|
2014-03-25 17:46:53 +01:00
|
|
|
gem 'rake', '~> 10.1.0', :require => false
|
2015-02-12 20:19:53 +01:00
|
|
|
gem 'rspec', '~> 3.1.0', :require => false
|
2014-03-05 21:43:58 +01:00
|
|
|
gem 'rspec-puppet', :require => false
|
2015-05-05 14:30:54 +02:00
|
|
|
gem 'mocha', :require => false
|
2014-03-05 21:43:58 +01:00
|
|
|
gem 'puppetlabs_spec_helper', :require => false
|
|
|
|
gem 'puppet-lint', :require => false
|
2015-06-01 13:21:59 +02:00
|
|
|
gem 'metadata-json-lint', :require => false
|
2014-03-05 21:43:58 +01:00
|
|
|
gem 'pry', :require => false
|
|
|
|
gem 'simplecov', :require => false
|
2014-11-10 20:56:40 +01:00
|
|
|
end
|
|
|
|
|
2015-03-05 23:12:57 +01:00
|
|
|
beaker_version = ENV['BEAKER_VERSION']
|
2015-03-24 23:07:42 +01:00
|
|
|
beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
|
2014-11-10 20:56:40 +01:00
|
|
|
group :system_tests do
|
2015-03-05 23:12:57 +01:00
|
|
|
if beaker_version
|
2015-03-24 23:07:42 +01:00
|
|
|
gem 'beaker', *location_for(beaker_version)
|
2015-03-05 23:12:57 +01:00
|
|
|
end
|
2015-03-24 23:07:42 +01:00
|
|
|
if beaker_rspec_version
|
|
|
|
gem 'beaker-rspec', *location_for(beaker_rspec_version)
|
|
|
|
else
|
|
|
|
gem 'beaker-rspec', :require => false
|
|
|
|
end
|
|
|
|
gem 'serverspec', :require => false
|
2014-03-05 21:43:58 +01:00
|
|
|
end
|
|
|
|
|
2015-02-12 20:43:34 +01:00
|
|
|
facterversion = ENV['GEM_FACTER_VERSION'] || ENV['FACTER_GEM_VERSION']
|
|
|
|
if facterversion
|
|
|
|
gem 'facter', *location_for(facterversion)
|
|
|
|
else
|
|
|
|
gem 'facter', :require => false
|
|
|
|
end
|
|
|
|
|
|
|
|
puppetversion = ENV['GEM_PUPPET_VERSION'] || ENV['PUPPET_GEM_VERSION']
|
2014-03-11 17:21:37 +01:00
|
|
|
if puppetversion
|
|
|
|
gem 'puppet', *location_for(puppetversion)
|
2014-03-05 21:43:58 +01:00
|
|
|
else
|
|
|
|
gem 'puppet', :require => false
|
|
|
|
end
|
|
|
|
|
|
|
|
# vim:ft=ruby
|