Update stdlib
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / Gemfile
1 #This file is generated by ModuleSync, do not edit.
2
3 source ENV['GEM_SOURCE'] || "https://rubygems.org"
4
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:/
8     :git
9   elsif place_or_version =~ /^file:/
10     :file
11   else
12     :gem
13   end
14 end
15
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 }]
25   else
26     [place_or_version, { :require => false }]
27   end
28 end
29
30 # Used for gem conditionals
31 supports_windows = false
32 ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
33 minor_version = "#{ruby_version_segments[0]}.#{ruby_version_segments[1]}"
34
35 group :development do
36   gem "puppet-module-posix-default-r#{minor_version}",    :require => false, :platforms => "ruby"
37   gem "puppet-module-win-default-r#{minor_version}",      :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
38   gem "puppet-module-posix-dev-r#{minor_version}",        :require => false, :platforms => "ruby"
39   gem "puppet-module-win-dev-r#{minor_version}", '0.0.7', :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
40   gem "json_pure", '<= 2.0.1',                            :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
41   gem "fast_gettext", '1.1.0',                            :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
42   gem "fast_gettext",                                     :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
43 end
44
45 group :system_tests do
46   gem "puppet-module-posix-system-r#{minor_version}",                            :require => false, :platforms => "ruby"
47   gem "puppet-module-win-system-r#{minor_version}",                              :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
48   gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '>= 3')                  
49   gem "beaker-pe",                                                               :require => false
50   gem "beaker-rspec", *location_for(ENV['BEAKER_RSPEC_VERSION'])                
51   gem "beaker-hostgenerator", *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'])
52   gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1')        
53   gem "puppet-blacksmith", '~> 3.4',                                             :require => false
54 end
55
56 gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'])
57
58 # Only explicitly specify Facter/Hiera if a version has been specified.
59 # Otherwise it can lead to strange bundler behavior. If you are seeing weird
60 # gem resolution behavior, try setting `DEBUG_RESOLVER` environment variable
61 # to `1` and then run bundle install.
62 gem 'facter', *location_for(ENV['FACTER_GEM_VERSION']) if ENV['FACTER_GEM_VERSION']
63 gem 'hiera', *location_for(ENV['HIERA_GEM_VERSION']) if ENV['HIERA_GEM_VERSION']
64
65
66 # Evaluate Gemfile.local if it exists
67 if File.exists? "#{__FILE__}.local"
68   eval(File.read("#{__FILE__}.local"), binding)
69 end
70
71 # Evaluate ~/.gemfile if it exists
72 if File.exists?(File.join(Dir.home, '.gemfile'))
73   eval(File.read(File.join(Dir.home, '.gemfile')), binding)
74 end
75
76 # vim:ft=ruby