1
+ #This file is generated by ModuleSync, do not edit.
2
+
1
3
source ENV [ 'GEM_SOURCE' ] || "https://rubygems.org"
2
4
3
5
# Determines what type of gem is requested based on place_or_version.
@@ -25,6 +27,9 @@ def location_for(place_or_version, fake_version = nil)
25
27
end
26
28
end
27
29
30
+ # Used for gem conditionals
31
+ supports_windows = true
32
+
28
33
# The following gems are not included by default as they require DevKit on Windows.
29
34
# You should probably include them in a Gemfile.local or a ~/.gemfile
30
35
#gem 'pry' #this may already be included in the gemfile
36
41
#end
37
42
38
43
group :development do
39
- gem 'rake' , :require => false
40
- gem 'rspec' , '~>3.0' , :require => false
41
- gem 'puppet-lint' , :require => false
42
- gem 'puppetlabs_spec_helper' , '~>0.10.3' , :require => false
43
- gem 'puppet_facts' , :require => false
44
- gem 'mocha' , '~>0.10.5' , :require => false
45
- gem 'pry' , :require => false
44
+ gem 'rake' , :require => false
45
+ gem 'rspec' , '~>3.0' , :require => false
46
+ gem 'puppet-lint' , :require => false
47
+ gem 'puppetlabs_spec_helper' , '~>0.10.3' , :require => false
48
+ gem 'puppet_facts' , :require => false
49
+ gem 'mocha' , '~>0.10.5' , :require => false
50
+ gem 'pry' , :require => false
51
+ gem 'json_pure' , '<= 2.0.1' , :require => false if Gem ::Version . new ( RUBY_VERSION ) < Gem ::Version . new ( '2.0.0' )
46
52
end
47
53
48
54
group :system_tests do
49
55
gem 'beaker' , *location_for ( ENV [ 'BEAKER_VERSION' ] || '~> 2.20' )
50
- gem 'master_manipulator' , '~> 1.2' , :require => false
51
- gem 'beaker-windows' , '~> 0.6' , :require => false
52
- gem 'beaker-hostgenerator' , '~> 0.6' , :require => false
56
+ gem 'master_manipulator' , '~> 1.2' , :require => false
57
+ gem 'beaker-windows' , '~> 0.6' , :require => false
58
+ gem 'beaker-hostgenerator' , '~> 0.6' , :require => false
53
59
end
54
60
55
- # The recommendation is for PROJECT_GEM_VERSION, although there are older ways
56
- # of referencing these. Add them all for compatibility reasons. We'll remove
57
- # later when no issues are known. We'll prefer them in the right order.
58
- puppetversion = ENV [ 'PUPPET_GEM_VERSION' ] || ENV [ 'GEM_PUPPET_VERSION' ] || ENV [ 'PUPPET_LOCATION' ] || '>= 0'
59
- gem 'puppet' , *location_for ( puppetversion )
60
-
61
- # json_pure 2.0.2 added a requirement on ruby >= 2. We pin to json_pure 2.0.1
62
- # if using ruby 1.x
63
- gem 'json_pure' , '<=2.0.1' , :require => false if RUBY_VERSION =~ /^1\. /
61
+ gem 'puppet' , *location_for ( ENV [ 'PUPPET_GEM_VERSION' ] )
64
62
65
63
# Only explicitly specify Facter/Hiera if a version has been specified.
66
64
# Otherwise it can lead to strange bundler behavior. If you are seeing weird
67
65
# gem resolution behavior, try setting `DEBUG_RESOLVER` environment variable
68
66
# to `1` and then run bundle install.
69
- facterversion = ENV [ 'FACTER_GEM_VERSION' ] || ENV [ 'GEM_FACTER_VERSION' ] || ENV [ 'FACTER_LOCATION' ]
70
- gem "facter" , *location_for ( facterversion ) if facterversion
71
- hieraversion = ENV [ 'HIERA_GEM_VERSION' ] || ENV [ 'GEM_HIERA_VERSION' ] || ENV [ 'HIERA_LOCATION' ]
72
- gem "hiera" , *location_for ( hieraversion ) if hieraversion
67
+ gem 'facter' , *location_for ( ENV [ 'FACTER_GEM_VERSION' ] ) if ENV [ 'FACTER_GEM_VERSION' ]
68
+ gem 'hiera' , *location_for ( ENV [ 'HIERA_GEM_VERSION' ] ) if ENV [ 'HIERA_GEM_VERSION' ]
73
69
74
70
# For Windows dependencies, these could be required based on the version of
75
71
# Puppet you are requiring. Anything greater than v3.5.0 is going to have
76
72
# Windows-specific dependencies dictated by the gem itself. The other scenario
77
73
# is when you are faking out Puppet to use a local file path / git path.
78
74
explicitly_require_windows_gems = false
79
- puppet_gem_location = gem_type ( puppetversion )
75
+ puppet_gem_location = gem_type ( ENV [ 'PUPPET_GEM_VERSION' ] )
80
76
# This is not a perfect answer to the version check
81
- if puppet_gem_location != :gem || puppetversion < ' 3.5.0'
77
+ if puppet_gem_location != :gem || ( Gem :: Version . correct? ( ENV [ 'PUPPET_GEM_VERSION' ] ) && Gem :: Requirement . new ( '< 3.5.0') . satisfied_by? ( Gem :: Version . new ( ENV [ 'PUPPET_GEM_VERSION' ] ) ) )
82
78
if Gem ::Platform . local . os == 'mingw32'
83
79
explicitly_require_windows_gems = true
84
80
end
85
-
86
81
if puppet_gem_location == :gem
87
82
# If facterversion hasn't been specified and we are
88
83
# looking for a Puppet Gem version less than 3.5.0, we
89
84
# need to ensure we get a good Facter for specs.
90
- gem "facter" , ">= 1.6.11" , "<= 1.7.5" , :require => false unless facterversion
85
+ gem "facter" , ">= 1.6.11" , "<= 1.7.5" , :require => false unless ENV [ 'FACTER_GEM_VERSION' ]
91
86
# If hieraversion hasn't been specified and we are
92
87
# looking for a Puppet Gem version less than 3.5.0, we
93
88
# need to ensure we get a good Hiera for specs.
94
- gem "hiera" , ">= 1.0.0" , "<= 1.3.0" , :require => false unless hieraversion
89
+ gem "hiera" , ">= 1.0.0" , "<= 1.3.0" , :require => false unless ENV [ 'HIERA_GEM_VERSION' ]
95
90
end
96
91
end
97
92
@@ -117,14 +112,17 @@ if explicitly_require_windows_gems
117
112
gem "win32-dir" , "~> 0.3" , "<= 0.4.9" , :require => false
118
113
gem "win32console" , "1.3.2" , :require => false if RUBY_VERSION =~ /^1\. /
119
114
115
+ # sys-admin was removed in Puppet 3.7.0+, and doesn't compile
116
+ # under Ruby 2.3 - so restrict it to Ruby 1.x
117
+ gem "sys-admin" , "1.5.6" , :require => false if RUBY_VERSION =~ /^1\. /
118
+
120
119
# Puppet less than 3.7.0 requires these.
121
120
# Puppet 3.5.0+ will control the actual requirements.
122
121
# These are listed in formats that work with all versions of
123
122
# Puppet from 3.0.0 to 3.6.x. After that, these were no longer used.
124
123
# We do not want to allow newer versions than what came out after
125
124
# 3.6.x to be used as they constitute some risk in breaking older
126
125
# functionality. So we set these to exact versions.
127
- gem "sys-admin" , "1.5.6" , :require => false
128
126
gem "win32-api" , "1.4.8" , :require => false
129
127
gem "win32-taskscheduler" , "0.2.2" , :require => false
130
128
gem "windows-api" , "0.4.3" , :require => false
0 commit comments