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
46
- gem 'yard' , :require => false
44
+ gem 'puppet-lint' , :require => false
45
+ gem 'metadata-json-lint' , :require => false
46
+ gem 'puppet_facts' , :require => false
47
+ gem 'puppet-blacksmith' , '>= 3.4.0' , :require => false , :platforms => 'ruby'
48
+ gem 'puppetlabs_spec_helper' , '>= 1.2.1' , :require => false
49
+ gem 'rspec-puppet' , '>= 2.3.2' , :require => false
50
+ gem 'rspec-puppet-facts' , :require => false
51
+ gem 'mocha' , '< 1.2.0' , :require => false
52
+ gem 'simplecov' , :require => false
53
+ gem 'parallel_tests' , '< 2.10.0' , :require => false if Gem ::Version . new ( RUBY_VERSION ) < Gem ::Version . new ( '2.0.0' )
54
+ gem 'parallel_tests' , :require => false if Gem ::Version . new ( RUBY_VERSION ) >= Gem ::Version . new ( '2.0.0' )
55
+ gem 'rubocop' , '0.41.2' , :require => false if Gem ::Version . new ( RUBY_VERSION ) < Gem ::Version . new ( '2.0.0' )
56
+ gem 'rubocop' , :require => false if Gem ::Version . new ( RUBY_VERSION ) >= Gem ::Version . new ( '2.0.0' )
57
+ gem 'rubocop-rspec' , '~> 1.6' , :require => false if Gem ::Version . new ( RUBY_VERSION ) >= Gem ::Version . new ( '2.3.0' )
58
+ gem 'pry' , :require => false
59
+ gem 'json_pure' , '<= 2.0.1' , :require => false if Gem ::Version . new ( RUBY_VERSION ) < Gem ::Version . new ( '2.0.0' )
60
+ gem 'yard' , :require => false
47
61
end
48
62
49
63
group :system_tests do
50
- gem 'beaker-rspec' , *location_for ( ENV [ 'BEAKER_RSPEC_VERSION' ] || '~> 5.1' )
51
- gem 'beaker' , *location_for ( ENV [ 'BEAKER_VERSION' ] || '~> 2.20' )
52
- gem 'beaker-puppet_install_helper' , :require => false
64
+ gem 'beaker' , *location_for ( ENV [ 'BEAKER_VERSION' ] || '~> 2.20' ) if supports_windows
65
+ gem 'beaker' , *location_for ( ENV [ 'BEAKER_VERSION' ] ) if Gem ::Version . new ( RUBY_VERSION ) >= Gem ::Version . new ( '2.3.0' ) and ! supports_windows
66
+ gem 'beaker' , *location_for ( ENV [ 'BEAKER_VERSION' ] || '< 3' ) if Gem ::Version . new ( RUBY_VERSION ) < Gem ::Version . new ( '2.3.0' ) and ! supports_windows
67
+ gem 'beaker-pe' , :require => false if Gem ::Version . new ( RUBY_VERSION ) >= Gem ::Version . new ( '2.3.0' )
68
+ gem 'beaker-rspec' , *location_for ( ENV [ 'BEAKER_RSPEC_VERSION' ] || '>= 3.4' ) if ! supports_windows
69
+ gem 'beaker-rspec' , *location_for ( ENV [ 'BEAKER_RSPEC_VERSION' ] || '~> 5.1' ) if supports_windows
70
+ gem 'beaker-puppet_install_helper' , :require => false
71
+ gem 'master_manipulator' , :require => false
72
+ gem 'beaker-hostgenerator' , *location_for ( ENV [ 'BEAKER_HOSTGENERATOR_VERSION' ] )
53
73
end
54
74
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\. /
75
+ gem 'puppet' , *location_for ( ENV [ 'PUPPET_GEM_VERSION' ] )
64
76
65
77
# Only explicitly specify Facter/Hiera if a version has been specified.
66
78
# Otherwise it can lead to strange bundler behavior. If you are seeing weird
67
79
# gem resolution behavior, try setting `DEBUG_RESOLVER` environment variable
68
80
# 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
81
+ gem 'facter' , *location_for ( ENV [ 'FACTER_GEM_VERSION' ] ) if ENV [ 'FACTER_GEM_VERSION' ]
82
+ gem 'hiera' , *location_for ( ENV [ 'HIERA_GEM_VERSION' ] ) if ENV [ 'HIERA_GEM_VERSION' ]
73
83
74
84
# For Windows dependencies, these could be required based on the version of
75
85
# Puppet you are requiring. Anything greater than v3.5.0 is going to have
76
86
# Windows-specific dependencies dictated by the gem itself. The other scenario
77
87
# is when you are faking out Puppet to use a local file path / git path.
78
88
explicitly_require_windows_gems = false
79
- puppet_gem_location = gem_type ( puppetversion )
89
+ puppet_gem_location = gem_type ( ENV [ 'PUPPET_GEM_VERSION' ] )
80
90
# This is not a perfect answer to the version check
81
- if puppet_gem_location != :gem || puppetversion < ' 3.5.0'
91
+ 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
92
if Gem ::Platform . local . os == 'mingw32'
83
93
explicitly_require_windows_gems = true
84
94
end
85
-
86
95
if puppet_gem_location == :gem
87
96
# If facterversion hasn't been specified and we are
88
97
# looking for a Puppet Gem version less than 3.5.0, we
89
98
# need to ensure we get a good Facter for specs.
90
- gem "facter" , ">= 1.6.11" , "<= 1.7.5" , :require => false unless facterversion
99
+ gem "facter" , ">= 1.6.11" , "<= 1.7.5" , :require => false unless ENV [ 'FACTER_GEM_VERSION' ]
91
100
# If hieraversion hasn't been specified and we are
92
101
# looking for a Puppet Gem version less than 3.5.0, we
93
102
# need to ensure we get a good Hiera for specs.
94
- gem "hiera" , ">= 1.0.0" , "<= 1.3.0" , :require => false unless hieraversion
103
+ gem "hiera" , ">= 1.0.0" , "<= 1.3.0" , :require => false unless ENV [ 'HIERA_GEM_VERSION' ]
95
104
end
96
105
end
97
106
@@ -117,14 +126,17 @@ if explicitly_require_windows_gems
117
126
gem "win32-dir" , "~> 0.3" , "<= 0.4.9" , :require => false
118
127
gem "win32console" , "1.3.2" , :require => false if RUBY_VERSION =~ /^1\. /
119
128
129
+ # sys-admin was removed in Puppet 3.7.0+, and doesn't compile
130
+ # under Ruby 2.3 - so restrict it to Ruby 1.x
131
+ gem "sys-admin" , "1.5.6" , :require => false if RUBY_VERSION =~ /^1\. /
132
+
120
133
# Puppet less than 3.7.0 requires these.
121
134
# Puppet 3.5.0+ will control the actual requirements.
122
135
# These are listed in formats that work with all versions of
123
136
# Puppet from 3.0.0 to 3.6.x. After that, these were no longer used.
124
137
# We do not want to allow newer versions than what came out after
125
138
# 3.6.x to be used as they constitute some risk in breaking older
126
139
# functionality. So we set these to exact versions.
127
- gem "sys-admin" , "1.5.6" , :require => false
128
140
gem "win32-api" , "1.4.8" , :require => false
129
141
gem "win32-taskscheduler" , "0.2.2" , :require => false
130
142
gem "windows-api" , "0.4.3" , :require => false
0 commit comments