Gemfile 1.53 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 23 24
  # Pinning for Ruby 1.9.3 support
  gem 'json_pure', '~> 1.8'
  # Pinning for Ruby < 2.2.0 support
  gem 'activesupport', '~> 4.2'

25
  # Pinning to work-around an incompatiblity with 2.14 in puppetlabs_spec_helper
26
  gem 'rspec', '~> 3.1'
27
  gem 'puppetlabs_spec_helper', '0.10.3', :require => false
28

29 30 31
  # docker-api 1.32.0 requires ruby 2.0.0
  gem 'docker-api', '1.31.0'

32 33 34 35 36 37 38 39 40
  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
41

42
  gem 'mocha', '~> 1.0'
43 44 45
end

group :acceptance do
46 47 48 49
  if beaker_version
    #use the specified version
    gem 'beaker', *location_for(beaker_version)
  else
50
    # use the pinned version
51
    gem 'beaker', '~> 2.50.0'
52
  end
53 54 55
  # This forces google-api-client to not download retirable 2.0.0 which lacks
  # ruby 1.9.x support.
  gem 'retriable', '~> 1.4'
56
end