4
4
# This file is automatically updated as part of a puppet module baseline.
5
5
# The next baseline sync will overwrite any local changes made to this file.
6
6
# ------------------------------------------------------------------------------
7
- gem_sources = ENV . fetch ( 'GEM_SERVERS' , 'https://rubygems.org' ) . split ( / [, ]+/ )
7
+ gem_sources = ENV . fetch ( 'GEM_SERVERS' , 'https://rubygems.org' ) . split ( %r{ [, ]+} )
8
8
9
9
ENV [ 'PDK_DISABLE_ANALYTICS' ] ||= 'true'
10
10
11
11
gem_sources . each { |gem_source | source gem_source }
12
12
13
13
group :test do
14
- puppet_version = ENV [ 'PUPPET_VERSION' ] || '~> 7'
15
- major_puppet_version = puppet_version . scan ( /(\d +)(?:\. |\Z )/ ) . flatten . first . to_i
16
- gem 'rake'
17
- gem 'puppet' , puppet_version
18
- gem 'rspec'
19
- gem 'rspec-puppet'
14
+ puppet_version = ENV . fetch ( 'PUPPET_VERSION' , [ '>= 7' , '< 9' ] )
15
+ major_puppet_version = Array ( puppet_version ) . first . scan ( %r{(\d +)(?:\. |\Z )} ) . flatten . first . to_i
20
16
gem 'hiera-puppet-helper'
21
- gem 'puppetlabs_spec_helper'
22
17
gem 'metadata-json-lint'
23
- gem 'puppet-strings'
24
- gem 'puppet-lint-trailing_comma-check' , :require => false
25
- gem 'simp-rspec-puppet-facts' , ENV [ 'SIMP_RSPEC_PUPPET_FACTS_VERSION' ] || '~> 3.1'
26
- gem 'simp-rake-helpers' , ENV [ 'SIMP_RAKE_HELPERS_VERSION' ] || [ '>= 5.12.1' , '< 6' ]
27
- gem ( 'pdk' , ENV [ 'PDK_VERSION' ] || '~> 2.0' , :require => false ) if major_puppet_version > 5
28
18
gem 'pathspec' , '~> 0.2' if Gem ::Requirement . create ( '< 2.6' ) . satisfied_by? ( Gem ::Version . new ( RUBY_VERSION . dup ) )
19
+ gem ( 'pdk' , ENV . fetch ( 'PDK_VERSION' , [ '>= 2.0' , '< 4.0' ] ) , require : false ) if major_puppet_version > 5
20
+ gem 'puppet' , puppet_version
21
+ gem 'puppetlabs_spec_helper'
22
+ gem 'puppet-lint-trailing_comma-check' , require : false
23
+ gem 'puppet-strings'
24
+ gem 'rake'
25
+ gem 'rspec'
26
+ gem 'rspec-puppet'
27
+ gem 'simp-rake-helpers' , ENV . fetch ( 'SIMP_RAKE_HELPERS_VERSION' , [ '>= 5.21.0' , '< 6' ] )
28
+ gem 'simp-rspec-puppet-facts' , ENV . fetch ( 'SIMP_RSPEC_PUPPET_FACTS_VERSION' , '~> 3.7' )
29
29
end
30
30
31
31
group :development do
@@ -35,21 +35,21 @@ group :development do
35
35
end
36
36
37
37
group :system_tests do
38
+ gem 'bcrypt_pbkdf'
38
39
gem 'beaker'
39
40
gem 'beaker-rspec'
40
- gem 'simp-beaker-helpers' , ENV [ 'SIMP_BEAKER_HELPERS_VERSION' ] || [ '>= 1.28.0' , '< 2' ]
41
- gem 'bcrypt_pbkdf'
41
+ gem 'simp-beaker-helpers' , ENV . fetch ( 'SIMP_BEAKER_HELPERS_VERSION' , [ '>= 1.32.1' , '< 2' ] )
42
42
end
43
43
44
44
# Evaluate extra gemfiles if they exist
45
45
extra_gemfiles = [
46
- ENV [ 'EXTRA_GEMFILE' ] || '' ,
46
+ ENV . fetch ( 'EXTRA_GEMFILE' , '' ) ,
47
47
"#{ __FILE__ } .project" ,
48
48
"#{ __FILE__ } .local" ,
49
49
File . join ( Dir . home , '.gemfile' ) ,
50
50
]
51
51
extra_gemfiles . each do |gemfile |
52
52
if File . file? ( gemfile ) && File . readable? ( gemfile )
53
- eval ( File . read ( gemfile ) , binding )
53
+ eval ( File . read ( gemfile ) , binding ) # rubocop:disable Security/Eval
54
54
end
55
55
end
0 commit comments