beaker 7.0.0 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a52a04e5317c78954859cef26c1988cf66a832ad0f62de9d78c69ffbe23c108c
4
- data.tar.gz: 4de10d9e282aaa62986410393d440278c5821d042505436131ba5d6ac92a2fdd
3
+ metadata.gz: 7aac904257f5f7c3605a6139a432f9768a1bf33a476f8069d66566853b31cee4
4
+ data.tar.gz: f853066d6563fa82c6e4fc8c66167ac200c6aad5ca49d15b1269771f4d1fd036
5
5
  SHA512:
6
- metadata.gz: 155935fc22c9dd129c5c54c6179709b330048f85f6048aa4f67430b61402bbdc1934856138f23e159aaa40c306024208b7ad18ca9d9628df9c17326b20725e31
7
- data.tar.gz: 92508f324729fde5238743beabd46b89c98921d5bd28321240ae73aebb06690cceae28db7a403ed4f385812353f650e01a82d6a67d35592d82673f6b6d7322bc
6
+ metadata.gz: 63c3f7bc55be648f3dd630065c2db6669a6740c9cdfc5da7bae529587403fc0b7d64edbdc9665c364616cfc47a9eb2a9fc8502693fa8b132e06dd66fb1f7f216
7
+ data.tar.gz: 6818daa647d74f067e1ed8c21ef98ae92bd42f69539e864f708e2a51d40e3d1f9d68c82a76517662758d04db18fd37a67287c3d339192d8244f50a2bfe2bcbae
@@ -15,7 +15,7 @@ jobs:
15
15
  name: Build the gem
16
16
  runs-on: ubuntu-24.04
17
17
  steps:
18
- - uses: actions/checkout@v4
18
+ - uses: actions/checkout@v5
19
19
  - name: Install Ruby
20
20
  uses: ruby/setup-ruby@v1
21
21
  with:
@@ -7,13 +7,16 @@ on:
7
7
  branches:
8
8
  - master
9
9
 
10
+ permissions:
11
+ contents: read
12
+
10
13
  jobs:
11
14
  rubocop_and_matrix:
12
15
  runs-on: ubuntu-24.04
13
16
  outputs:
14
17
  ruby: ${{ steps.ruby.outputs.versions }}
15
18
  steps:
16
- - uses: actions/checkout@v4
19
+ - uses: actions/checkout@v5
17
20
  - name: Install Ruby ${{ matrix.ruby }}
18
21
  uses: ruby/setup-ruby@v1
19
22
  with:
@@ -35,7 +38,7 @@ jobs:
35
38
  env:
36
39
  BEAKER_HYPERVISOR: docker
37
40
  steps:
38
- - uses: actions/checkout@v4
41
+ - uses: actions/checkout@v5
39
42
  - name: Install Ruby ${{ matrix.ruby }}
40
43
  uses: ruby/setup-ruby@v1
41
44
  with:
data/.rubocop.yml CHANGED
@@ -22,7 +22,7 @@ Naming/FileName:
22
22
  Naming/MethodParameterName:
23
23
  MinNameLength: 1
24
24
 
25
- Naming/PredicateName:
25
+ Naming/PredicatePrefix:
26
26
  Enabled: false
27
27
 
28
28
  RSpec/DescribeClass:
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config --no-auto-gen-timestamp`
3
- # using RuboCop version 1.75.8.
3
+ # using RuboCop version 1.79.2.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -43,16 +43,10 @@ Lint/NonAtomicFileOperation:
43
43
  Exclude:
44
44
  - 'acceptance/tests/base/dsl/helpers/host_helpers/archive_file_from_test.rb'
45
45
 
46
- # Offense count: 26
47
- Lint/ShadowingOuterLocalVariable:
46
+ # Offense count: 1
47
+ Lint/UselessOr:
48
48
  Exclude:
49
- - 'lib/beaker/dsl/helpers/host_helpers.rb'
50
- - 'lib/beaker/dsl/helpers/web_helpers.rb'
51
- - 'lib/beaker/dsl/wrappers.rb'
52
- - 'lib/beaker/host/pswindows/exec.rb'
53
- - 'lib/beaker/host/unix/pkg.rb'
54
- - 'lib/beaker/host_prebuilt_steps.rb'
55
- - 'lib/beaker/perf.rb'
49
+ - 'lib/beaker/test_suite_result.rb'
56
50
 
57
51
  # Offense count: 5
58
52
  # This cop supports unsafe autocorrection (--autocorrect-all).
@@ -100,6 +94,25 @@ Naming/MemoizedInstanceVariableName:
100
94
  - 'lib/beaker/host.rb'
101
95
  - 'lib/beaker/options/presets.rb'
102
96
 
97
+ # Offense count: 22
98
+ # Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
99
+ # AllowedMethods: call
100
+ # WaywardPredicates: nonzero?
101
+ Naming/PredicateMethod:
102
+ Exclude:
103
+ - 'lib/beaker/dsl/helpers/host_helpers.rb'
104
+ - 'lib/beaker/dsl/roles.rb'
105
+ - 'lib/beaker/host/freebsd/pkg.rb'
106
+ - 'lib/beaker/host/mac/pkg.rb'
107
+ - 'lib/beaker/host/pswindows/exec.rb'
108
+ - 'lib/beaker/host/pswindows/pkg.rb'
109
+ - 'lib/beaker/host/unix.rb'
110
+ - 'lib/beaker/host/unix/exec.rb'
111
+ - 'lib/beaker/host/unix/pkg.rb'
112
+ - 'lib/beaker/host/windows/exec.rb'
113
+ - 'lib/beaker/host/windows/pkg.rb'
114
+ - 'lib/beaker/ssh_connection.rb'
115
+
103
116
  # Offense count: 4
104
117
  # Configuration parameters: MinSize.
105
118
  Performance/CollectionLiteralInLoop:
@@ -310,9 +323,9 @@ Security/Open:
310
323
  Exclude:
311
324
  - 'lib/beaker/dsl/helpers/web_helpers.rb'
312
325
 
313
- # Offense count: 105
326
+ # Offense count: 104
314
327
  # This cop supports safe autocorrection (--autocorrect).
315
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
328
+ # Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
316
329
  # URISchemes: http, https
317
330
  Layout/LineLength:
318
331
  Max: 225
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## [7.0.1](https://github.com/voxpupuli/beaker/tree/7.0.1) (2025-08-14)
4
+
5
+ [Full Changelog](https://github.com/voxpupuli/beaker/compare/7.0.0...7.0.1)
6
+
7
+ **Fixed bugs:**
8
+
9
+ - Update verify\_host\_key usage to :never, fixes deprecation warning [\#1945](https://github.com/voxpupuli/beaker/pull/1945) ([silug](https://github.com/silug))
10
+ - Merge ssh settings [\#1944](https://github.com/voxpupuli/beaker/pull/1944) ([silug](https://github.com/silug))
11
+
3
12
  ## [7.0.0](https://github.com/voxpupuli/beaker/tree/7.0.0) (2025-08-07)
4
13
 
5
14
  [Full Changelog](https://github.com/voxpupuli/beaker/compare/6.8.1...7.0.0)
data/beaker.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
  s.add_development_dependency 'fakefs', '>= 2.4', '< 4'
23
23
  s.add_development_dependency 'rake', '~> 13.0'
24
24
  s.add_development_dependency 'rspec', '~> 3.0'
25
- s.add_development_dependency 'voxpupuli-rubocop', '~> 4.1.0'
25
+ s.add_development_dependency 'voxpupuli-rubocop', '~> 4.2.0'
26
26
 
27
27
  # Run time dependencies
28
28
  # Required for Ruby 3.3+ support
@@ -257,7 +257,7 @@ Values already included in Beaker as defaults for required arguments.
257
257
  :run_in_parallel => [],
258
258
  :ssh => {
259
259
  :config => false,
260
- :verify_host_key => false,
260
+ :verify_host_key => :never,
261
261
  :auth_methods => ["publickey"],
262
262
  :port => 22,
263
263
  :forward_agent => true,
@@ -26,7 +26,7 @@ The log will then read as:
26
26
  _snip_
27
27
  ```
28
28
  pe-centos6 20:19:16$ echo hello!
29
- Attempting ssh connection to pe-centos6, user: anode, opts: {:config=>false, :verify_host_key=>false, :timeout=>300, :auth_methods=>["password"], :port=>22, :forward_agent=>true, :keys=>["/Users/anode/.ssh/id_rsa"], :user_known_hosts_file=>"/Users/anode/.ssh/known_hosts", :password=>"anode", :user=>"anode"}
29
+ Attempting ssh connection to pe-centos6, user: anode, opts: {:config=>false, :verify_host_key=>:never, :timeout=>300, :auth_methods=>["password"], :port=>22, :forward_agent=>true, :keys=>["/Users/anode/.ssh/id_rsa"], :user_known_hosts_file=>"/Users/anode/.ssh/known_hosts", :password=>"anode", :user=>"anode"}
30
30
  ```
31
31
  _/snip_
32
32
 
@@ -3,6 +3,7 @@ require 'minitest/test'
3
3
  module Beaker
4
4
  module CommandFactory
5
5
  include Minitest::Assertions
6
+
6
7
  # Why do we need this accessor?
7
8
  # https://github.com/seattlerb/minitest/blob/master/lib/minitest/assertions.rb#L8-L12
8
9
  # Protocol: Nearly everything here boils up to +assert+, which
data/lib/beaker/host.rb CHANGED
@@ -141,7 +141,19 @@ module Beaker
141
141
 
142
142
  # Does this host have this key? Either as defined in the host itself, or globally?
143
143
  def [] k
144
- host_hash[k] || options[k]
144
+ if k == 'ssh' || k == :ssh
145
+ # Merge global and host-level ssh options, host-level wins
146
+ global_ssh = options[k] || {}
147
+ host_ssh = host_hash[k] || {}
148
+ # Use OptionsHash if available for deep merge
149
+ if defined?(Beaker::Options::OptionsHash)
150
+ Beaker::Options::OptionsHash.new.merge(global_ssh).merge(host_ssh)
151
+ else
152
+ global_ssh.merge(host_ssh)
153
+ end
154
+ else
155
+ host_hash[k] || options[k]
156
+ end
145
157
  end
146
158
 
147
159
  # Does this host have this key? Either as defined in the host itself, or globally?
@@ -187,7 +187,7 @@ module Beaker
187
187
  :use_fog_credentials => true,
188
188
  :ssh => {
189
189
  :config => false,
190
- :verify_host_key => false,
190
+ :verify_host_key => :never,
191
191
  :auth_methods => ["publickey"],
192
192
  :port => 22,
193
193
  :forward_agent => true,
@@ -1,5 +1,5 @@
1
1
  module Beaker
2
2
  module Version
3
- STRING = '7.0.0'
3
+ STRING = '7.0.1'
4
4
  end
5
5
  end
@@ -629,7 +629,7 @@ module Beaker
629
629
  # since were using fakefs we need to create the file and directories
630
630
  FileUtils.mkdir_p('/var/folders/v0/')
631
631
  FileUtils.touch('/var/folders/v0/centos-64-x6420150625-48025-lu3u86')
632
- rsync_args = ['source', 'target', ['-az', "-e \"ssh -F /var/folders/v0/centos-64-x6420150625-48025-lu3u86 -o 'StrictHostKeyChecking no'\"", "--exclude '.bundle'"]]
632
+ rsync_args = ['source', 'target', ['-az', "-e \"ssh -F /var/folders/v0/centos-64-x6420150625-48025-lu3u86 -p 22 -o 'StrictHostKeyChecking no'\"", "--exclude '.bundle'"]]
633
633
  expect(Rsync).to receive(:run).with(*rsync_args).and_return(Rsync::Result.new('raw rsync output', 0))
634
634
  expect(host.do_rsync_to(*args).success?).to eq(true)
635
635
  end
@@ -639,7 +639,7 @@ module Beaker
639
639
  create_files(['source'])
640
640
  args = ['source', 'target',
641
641
  { :ignore => ['.bundle'] },]
642
- rsync_args = ['source', 'target', ['-az', "-e \"ssh -o 'StrictHostKeyChecking no'\"", "--exclude '.bundle'"]]
642
+ rsync_args = ['source', 'target', ['-az', "-e \"ssh -p 22 -o 'StrictHostKeyChecking no'\"", "--exclude '.bundle'"]]
643
643
  expect(Rsync).to receive(:run).with(*rsync_args).and_return(Rsync::Result.new('raw rsync output', 0))
644
644
  expect(host.do_rsync_to(*args).success?).to eq(true)
645
645
  end
@@ -72,7 +72,7 @@
72
72
  :use_fog_credentials: true
73
73
  :ssh: !ruby/hash:Beaker::Options::OptionsHash
74
74
  :config: true
75
- :verify_host_key: false
75
+ :verify_host_key: :never
76
76
  :auth_methods: &7
77
77
  - publickey
78
78
  :port: 22
@@ -360,7 +360,7 @@
360
360
  :use_fog_credentials: true
361
361
  :ssh: !ruby/hash:Beaker::Options::OptionsHash
362
362
  :config: true
363
- :verify_host_key: false
363
+ :verify_host_key: :never
364
364
  :auth_methods: *7
365
365
  :port: 22
366
366
  :forward_agent: 'true'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0
4
+ version: 7.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
@@ -63,14 +63,14 @@ dependencies:
63
63
  requirements:
64
64
  - - "~>"
65
65
  - !ruby/object:Gem::Version
66
- version: 4.1.0
66
+ version: 4.2.0
67
67
  type: :development
68
68
  prerelease: false
69
69
  version_requirements: !ruby/object:Gem::Requirement
70
70
  requirements:
71
71
  - - "~>"
72
72
  - !ruby/object:Gem::Version
73
- version: 4.1.0
73
+ version: 4.2.0
74
74
  - !ruby/object:Gem::Dependency
75
75
  name: base64
76
76
  requirement: !ruby/object:Gem::Requirement