cem_acpt 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4936d14749b4fc458a1eb938299c091e45c28c69a838efe947edb1510a10f151
4
- data.tar.gz: 52b205f0be2bffa478a474c50bd0686e4ba32f2cec69d710b2a89ecde94c45c3
3
+ metadata.gz: 1c774f50c327fab457a1047b30f5155cbe3afb8d55c630ddeb0525dde147304b
4
+ data.tar.gz: 134d1d6cdb6b9de6b7d77a8e634aad01809b2b9fbeb7ddd72f283b32cbcdc292
5
5
  SHA512:
6
- metadata.gz: 96d81ee34960856f0accf22efec6aa3a12f34abf6b9137c43f886102d8a210eca2e907ff2cd2d0d01f6ce37026f9bf6b70c1ba07fd495ff3ad247ae6c3f713fb
7
- data.tar.gz: 46a2f685ede232a010f26e8968666011c8ddfdf690f26df1fc11d3aa3e062d021db56df42854964a8b114b2a2d046127c47dba9b1f87334dd18160aeb2ff7367
6
+ metadata.gz: 65d80bccfc97735e653a01d067efac47c292c432ffd8ade7d4257d89b8a6553a7e5a3b8a3d762e9687c0f2695af0a7cbd9337baef6c6afd65ab2baf0d4c221f4
7
+ data.tar.gz: 3dd0bf49d2d71ca3a18150c1182d0a2b8255981be71653e86e8d1a19bfd4b190348bfce153d244bb6dc35cd0f0b6f2db9edf8d5f8b8f7b40f3231869994ecf25
@@ -15,14 +15,22 @@ jobs:
15
15
  tests:
16
16
  name: RSpec tests
17
17
  runs-on: ubuntu-20.04
18
+ strategy:
19
+ matrix:
20
+ ruby:
21
+ - 2.7
22
+ - 3.2
18
23
  steps:
19
24
  - name: Checkout Source
20
25
  uses: actions/checkout@v3
21
26
 
27
+ - name: Delete Gemfile.lock
28
+ run: rm -f Gemfile.lock
29
+
22
30
  - name: Set up Ruby
23
31
  uses: ruby/setup-ruby@v1
24
32
  with:
25
- ruby-version: 3.2
33
+ ruby-version: ${{ matrix.ruby }}
26
34
  bundler-cache: true
27
35
 
28
36
  - name: Run RSpec
data/Gemfile.lock CHANGED
@@ -1,17 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cem_acpt (0.6.0)
4
+ cem_acpt (0.6.1)
5
5
  async-http (>= 0.60, < 0.70)
6
6
  bcrypt_pbkdf (>= 1.0, < 2.0)
7
- concurrent-ruby (>= 1.1, < 2.0)
8
7
  deep_merge (>= 1.2, < 2.0)
9
8
  ed25519 (>= 1.2, < 2.0)
10
- net-ssh (>= 7.1, < 7.2)
11
- parallel (~> 1.22)
12
9
  puppet-modulebuilder (>= 0.0.1)
13
10
  ruby-terraform (~> 1.7)
14
- serverspec (~> 2.42)
15
11
 
16
12
  GEM
17
13
  remote: https://rubygems.org/
@@ -52,11 +48,6 @@ GEM
52
48
  open4 (~> 1.3)
53
49
  method_source (1.0.0)
54
50
  minitar (0.9)
55
- multi_json (1.15.0)
56
- net-scp (4.0.0)
57
- net-ssh (>= 2.6.5, < 8.0.0)
58
- net-ssh (7.1.0)
59
- net-telnet (0.1.1)
60
51
  open4 (1.3.4)
61
52
  parallel (1.22.1)
62
53
  parser (3.2.1.1)
@@ -88,9 +79,6 @@ GEM
88
79
  rspec-expectations (3.12.2)
89
80
  diff-lcs (>= 1.2.0, < 2.0)
90
81
  rspec-support (~> 3.12.0)
91
- rspec-its (1.3.0)
92
- rspec-core (>= 3.0.0)
93
- rspec-expectations (>= 3.0.0)
94
82
  rspec-mocks (3.12.4)
95
83
  diff-lcs (>= 1.2.0, < 2.0)
96
84
  rspec-support (~> 3.12.0)
@@ -111,17 +99,6 @@ GEM
111
99
  ruby-terraform (1.7.0)
112
100
  immutable-struct (~> 2.4)
113
101
  lino (~> 3.0)
114
- serverspec (2.42.2)
115
- multi_json
116
- rspec (~> 3.0)
117
- rspec-its
118
- specinfra (~> 2.72)
119
- sfl (2.3)
120
- specinfra (2.85.0)
121
- net-scp
122
- net-ssh (>= 2.7)
123
- net-telnet (= 0.1.1)
124
- sfl
125
102
  timers (4.3.5)
126
103
  traces (0.9.1)
127
104
  unicode-display_width (2.4.2)
data/cem_acpt.gemspec CHANGED
@@ -26,17 +26,13 @@ Gem::Specification.new do |spec|
26
26
  spec.bindir = 'exe'
27
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
28
  spec.require_paths = ['lib']
29
- #spec.platform = Gem::Platform.local
29
+ # spec.platform = Gem::Platform.local
30
30
  spec.add_runtime_dependency 'async-http', '>= 0.60', '< 0.70'
31
- spec.add_runtime_dependency 'concurrent-ruby', '>= 1.1', '< 2.0'
31
+ spec.add_runtime_dependency 'bcrypt_pbkdf', '>= 1.0', '< 2.0'
32
32
  spec.add_runtime_dependency 'deep_merge', '>= 1.2', '< 2.0'
33
33
  spec.add_runtime_dependency 'ed25519', '>= 1.2', '< 2.0'
34
- spec.add_runtime_dependency 'bcrypt_pbkdf', '>= 1.0', '< 2.0'
35
- spec.add_runtime_dependency 'net-ssh', '>= 7.1', '< 7.2'
36
- spec.add_runtime_dependency 'parallel', '~> 1.22'
37
34
  spec.add_runtime_dependency 'puppet-modulebuilder', '>= 0.0.1'
38
35
  spec.add_runtime_dependency 'ruby-terraform', '~> 1.7'
39
- spec.add_runtime_dependency 'serverspec', '~> 2.42'
40
36
  spec.add_development_dependency 'pry'
41
37
  spec.add_development_dependency 'rubocop'
42
38
  end
@@ -118,10 +118,6 @@ module CemAcpt
118
118
  end
119
119
  alias to_h config
120
120
 
121
- def user_config_dir
122
- @user_config_dir ||= @config.dget('user_config.dir')
123
- end
124
-
125
121
  def explain
126
122
  explanation = {}
127
123
  %i[defaults env_vars user_config config_from_file options].each do |source|
@@ -297,6 +293,7 @@ module CemAcpt
297
293
 
298
294
  conf_file = find_option('config_file')
299
295
  return {} if conf_file.nil? || conf_file.empty?
296
+
300
297
  unless conf_file
301
298
  warn "Invalid config_file type '#{conf_file.class}'. Must be a String."
302
299
  return {}
@@ -321,11 +318,19 @@ module CemAcpt
321
318
  def load_config_file(config_file)
322
319
  return {} if config_file.nil? || config_file.empty? || !File.exist?(File.expand_path(config_file))
323
320
 
324
- loaded = YAML.safe_load_file(File.expand_path(config_file), permitted_classes: [Regexp])
321
+ loaded = load_yaml(config_file)
325
322
  loaded.format!
326
323
  loaded
327
324
  end
328
325
 
326
+ def load_yaml(config_file)
327
+ if YAML.respond_to?(:safe_load_file) # Ruby 3.0+
328
+ YAML.safe_load_file(File.expand_path(config_file), permitted_classes: [Regexp])
329
+ else
330
+ YAML.safe_load(File.read(File.expand_path(config_file)), permitted_classes: [Regexp])
331
+ end
332
+ end
333
+
329
334
  def validate_config!
330
335
  @config.each do |key, _value|
331
336
  warn "Unknown config key: #{key}" unless KEYS.include?(key)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CemAcpt
4
- VERSION = '0.6.0'
4
+ VERSION = '0.6.1'
5
5
  end
data/lib/cem_acpt.rb CHANGED
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'cem_acpt/config'
4
- require_relative 'cem_acpt/logging'
5
- require_relative 'cem_acpt/test_runner'
6
- require_relative 'cem_acpt/version'
7
-
8
3
  module CemAcpt
4
+ require_relative 'cem_acpt/config'
5
+ require_relative 'cem_acpt/logging'
6
+ require_relative 'cem_acpt/test_runner'
7
+ require_relative 'cem_acpt/version'
8
+
9
9
  class << self
10
10
  include CemAcpt::Logging
11
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cem_acpt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - puppetlabs
@@ -31,12 +31,12 @@ dependencies:
31
31
  - !ruby/object:Gem::Version
32
32
  version: '0.70'
33
33
  - !ruby/object:Gem::Dependency
34
- name: concurrent-ruby
34
+ name: bcrypt_pbkdf
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '1.1'
39
+ version: '1.0'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
42
  version: '2.0'
@@ -46,7 +46,7 @@ dependencies:
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: '1.1'
49
+ version: '1.0'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
52
  version: '2.0'
@@ -90,60 +90,6 @@ dependencies:
90
90
  - - "<"
91
91
  - !ruby/object:Gem::Version
92
92
  version: '2.0'
93
- - !ruby/object:Gem::Dependency
94
- name: bcrypt_pbkdf
95
- requirement: !ruby/object:Gem::Requirement
96
- requirements:
97
- - - ">="
98
- - !ruby/object:Gem::Version
99
- version: '1.0'
100
- - - "<"
101
- - !ruby/object:Gem::Version
102
- version: '2.0'
103
- type: :runtime
104
- prerelease: false
105
- version_requirements: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - ">="
108
- - !ruby/object:Gem::Version
109
- version: '1.0'
110
- - - "<"
111
- - !ruby/object:Gem::Version
112
- version: '2.0'
113
- - !ruby/object:Gem::Dependency
114
- name: net-ssh
115
- requirement: !ruby/object:Gem::Requirement
116
- requirements:
117
- - - ">="
118
- - !ruby/object:Gem::Version
119
- version: '7.1'
120
- - - "<"
121
- - !ruby/object:Gem::Version
122
- version: '7.2'
123
- type: :runtime
124
- prerelease: false
125
- version_requirements: !ruby/object:Gem::Requirement
126
- requirements:
127
- - - ">="
128
- - !ruby/object:Gem::Version
129
- version: '7.1'
130
- - - "<"
131
- - !ruby/object:Gem::Version
132
- version: '7.2'
133
- - !ruby/object:Gem::Dependency
134
- name: parallel
135
- requirement: !ruby/object:Gem::Requirement
136
- requirements:
137
- - - "~>"
138
- - !ruby/object:Gem::Version
139
- version: '1.22'
140
- type: :runtime
141
- prerelease: false
142
- version_requirements: !ruby/object:Gem::Requirement
143
- requirements:
144
- - - "~>"
145
- - !ruby/object:Gem::Version
146
- version: '1.22'
147
93
  - !ruby/object:Gem::Dependency
148
94
  name: puppet-modulebuilder
149
95
  requirement: !ruby/object:Gem::Requirement
@@ -172,20 +118,6 @@ dependencies:
172
118
  - - "~>"
173
119
  - !ruby/object:Gem::Version
174
120
  version: '1.7'
175
- - !ruby/object:Gem::Dependency
176
- name: serverspec
177
- requirement: !ruby/object:Gem::Requirement
178
- requirements:
179
- - - "~>"
180
- - !ruby/object:Gem::Version
181
- version: '2.42'
182
- type: :runtime
183
- prerelease: false
184
- version_requirements: !ruby/object:Gem::Requirement
185
- requirements:
186
- - - "~>"
187
- - !ruby/object:Gem::Version
188
- version: '2.42'
189
121
  - !ruby/object:Gem::Dependency
190
122
  name: pry
191
123
  requirement: !ruby/object:Gem::Requirement