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 ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
32 minor_version = "#{ruby_version_segments[0]}.#{ruby_version_segments[1]}"
34 # The following gems are not included by default as they require DevKit on Windows.
35 # You should probably include them in a Gemfile.local or a ~/.gemfile
36 #gem 'pry' #this may already be included in the gemfile
37 #gem 'pry-stack_explorer', :require => false
38 #if RUBY_VERSION =~ /^2/
45 gem "puppet-module-posix-default-r#{minor_version}", :require => false, :platforms => "ruby"
46 gem "puppet-module-win-default-r#{minor_version}", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
47 gem "puppet-module-posix-dev-r#{minor_version}", :require => false, :platforms => "ruby"
48 gem "puppet-module-win-dev-r#{minor_version}", '0.0.7', :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
49 gem "json_pure", '<= 2.0.1', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
50 gem "fast_gettext", '1.1.0', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
51 gem "fast_gettext", :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
54 group :system_tests do
55 gem "puppet-module-posix-system-r#{minor_version}", :require => false, :platforms => "ruby"
56 gem "puppet-module-win-system-r#{minor_version}", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
57 gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '>= 3')
58 gem "beaker-pe", :require => false
59 gem "beaker-rspec", *location_for(ENV['BEAKER_RSPEC_VERSION'])
60 gem "beaker-hostgenerator", *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'])
61 gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1')
62 gem "puppet-blacksmith", '~> 3.4', :require => false
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']
74 # Evaluate Gemfile.local if it exists
75 if File.exists? "#{__FILE__}.local"
76 eval(File.read("#{__FILE__}.local"), binding)
79 # Evaluate ~/.gemfile if it exists
80 if File.exists?(File.join(Dir.home, '.gemfile'))
81 eval(File.read(File.join(Dir.home, '.gemfile')), binding)