1 #This file is generated by ModuleSync, do not edit.
3 source ENV['GEM_SOURCE'] || "https://rubygems.org"
5 # Determines what type of gem is requested based on place_or_version.
6 def gem_type(place_or_version)
7 if place_or_version =~ /^git:/
9 elsif place_or_version =~ /^file:/
16 # Find a location or specific version for a gem. place_or_version can be a
17 # version, which is most often used. It can also be git, which is specified as
18 # `git://somewhere.git#branch`. You can also use a file source location, which
19 # is specified as `file://some/location/on/disk`.
20 def location_for(place_or_version, fake_version = nil)
21 if place_or_version =~ /^(git[:@][^#]*)#(.*)/
22 [fake_version, { :git => $1, :branch => $2, :require => false }].compact
23 elsif place_or_version =~ /^file:\/\/(.*)/
24 ['>= 0', { :path => File.expand_path($1), :require => false }]
26 [place_or_version, { :require => false }]
30 # Used for gem conditionals
31 supports_windows = false
34 gem 'puppet-lint', :require => false
35 gem 'metadata-json-lint', :require => false, :platforms => 'ruby'
36 gem 'puppet_facts', :require => false
37 gem 'puppet-blacksmith', '>= 3.4.0', :require => false, :platforms => 'ruby'
38 gem 'puppetlabs_spec_helper', '>= 1.2.1', :require => false
39 gem 'rspec-puppet', '>= 2.3.2', :require => false
40 gem 'rspec-puppet-facts', :require => false, :platforms => 'ruby'
41 gem 'mocha', '< 1.2.0', :require => false
42 gem 'simplecov', :require => false, :platforms => 'ruby'
43 gem 'parallel_tests', '< 2.10.0', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
44 gem 'parallel_tests', :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.0.0')
45 gem 'rubocop', '0.41.2', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
46 gem 'rubocop', :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.0.0')
47 gem 'rubocop-rspec', '~> 1.6', :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.3.0')
48 gem 'pry', :require => false
49 gem 'json_pure', '<= 2.0.1', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
52 group :system_tests do
53 gem 'beaker', *location_for(ENV['BEAKER_VERSION'] || '~> 2.20') if supports_windows
54 gem 'beaker', *location_for(ENV['BEAKER_VERSION']) if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.3.0') and ! supports_windows
55 gem 'beaker', *location_for(ENV['BEAKER_VERSION'] || '< 3') if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.3.0') and ! supports_windows
56 gem 'beaker-pe', :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.3.0')
57 gem 'beaker-rspec', *location_for(ENV['BEAKER_RSPEC_VERSION'] || '>= 3.4') if ! supports_windows
58 gem 'beaker-rspec', *location_for(ENV['BEAKER_RSPEC_VERSION'] || '~> 5.1') if supports_windows
59 gem 'beaker-puppet_install_helper', :require => false
60 gem 'master_manipulator', :require => false
61 gem 'beaker-hostgenerator', *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'])
62 gem 'beaker-abs', *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1')
65 gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'])
67 # Only explicitly specify Facter/Hiera if a version has been specified.
68 # Otherwise it can lead to strange bundler behavior. If you are seeing weird
69 # gem resolution behavior, try setting `DEBUG_RESOLVER` environment variable
70 # to `1` and then run bundle install.
71 gem 'facter', *location_for(ENV['FACTER_GEM_VERSION']) if ENV['FACTER_GEM_VERSION']
72 gem 'hiera', *location_for(ENV['HIERA_GEM_VERSION']) if ENV['HIERA_GEM_VERSION']
75 # Evaluate Gemfile.local if it exists
76 if File.exists? "#{__FILE__}.local"
77 eval(File.read("#{__FILE__}.local"), binding)
80 # Evaluate ~/.gemfile if it exists
81 if File.exists?(File.join(Dir.home, '.gemfile'))
82 eval(File.read(File.join(Dir.home, '.gemfile')), binding)