Gemfile 1.33 KB
Newer Older
1
source ENV['GEM_SOURCE'] || "https://rubygems.org"
2
puppet_branch = ENV['PUPPET_VERSION'] || "latest"
3
oldest_supported_puppet = "4.0.0"
4 5 6 7 8 9 10 11 12 13 14
beaker_version = ENV['BEAKER_VERSION']

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
Ken Barber's avatar
Ken Barber committed
15 16

gem 'facter'
17
gem 'rake'
18

19
group :test do
20
  # Pinning to work-around an incompatiblity with 2.14 in puppetlabs_spec_helper
21
  gem 'rspec', '~> 3.1'
22
  gem 'puppetlabs_spec_helper', '0.10.3', :require => false
23

24 25 26 27 28 29 30 31 32
  case puppet_branch
  when "latest"
    gem 'puppet', ">= #{oldest_supported_puppet}", :require => false
  when "oldest"
    gem 'puppet', oldest_supported_puppet, :require => false
  else
    gem 'puppet', :git => 'git://github.com/puppetlabs/puppet.git',
      :branch => puppet_branch, :require => false
  end
33

34
  gem 'mocha', '~> 1.0'
35 36 37
end

group :acceptance do
38 39 40 41
  if beaker_version
    #use the specified version
    gem 'beaker', *location_for(beaker_version)
  else
42
    # use the pinned version
Russell Mull's avatar
Russell Mull committed
43
    gem 'beaker', '~> 2.30.1'
44
  end
45 46 47
  # This forces google-api-client to not download retirable 2.0.0 which lacks
  # ruby 1.9.x support.
  gem 'retriable', '~> 1.4'
48
end