Gemfile 1.94 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 21 22
  # Add test-unit for ruby 2.2+ support (has been removed from stdlib)
  gem 'test-unit'

23 24 25 26 27
  # Pinning for Ruby 1.9.3 support
  gem 'json_pure', '~> 1.8'
  # Pinning for Ruby < 2.2.0 support
  gem 'activesupport', '~> 4.2'

28 29 30
  # addressable 2.5 requires public_suffix, which requires ruby 2.
  gem 'addressable', '< 2.5.0'

31
  # Pinning to work-around an incompatiblity with 2.14 in puppetlabs_spec_helper
32
  gem 'rspec', '~> 3.1'
33
  gem 'puppetlabs_spec_helper', '0.10.3', :require => false
34

35 36 37
  # docker-api 1.32.0 requires ruby 2.0.0
  gem 'docker-api', '1.31.0'

38 39 40 41 42 43
  case puppet_branch
  when "latest"
    gem 'puppet', ">= #{oldest_supported_puppet}", :require => false
  when "oldest"
    gem 'puppet', oldest_supported_puppet, :require => false
  else
44
    gem 'puppet', :git => 'https://github.com/puppetlabs/puppet.git',
45 46
      :branch => puppet_branch, :require => false
  end
47

48
  gem 'mocha', '~> 1.0'
49 50
end

51 52 53 54 55 56 57 58 59 60 61 62
# This is a workaround for a bug in bundler, where it likes to look at ruby
# version deps regardless of what groups you want or not. This lets us
# conditionally shortcut evaluation entirely.
if ENV['NO_ACCEPTANCE'] != 'true'
  group :acceptance do
    if beaker_version
      #use the specified version
      gem 'beaker', *location_for(beaker_version)
    else
      # use the pinned version
      gem 'beaker', '~> 3.4'
    end
63
  end
64 65
  gem 'beaker-hostgenerator', '0.8.2'
  gem 'beaker-abs', *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.2')
66
end