beaker 7.5.0 → 7.6.0

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: 94529cfcb65f47f3444b6dafb76daf8c5c44b8dbf78639024a12cb00130e5efa
4
- data.tar.gz: 21a051b5c08dba6733b8430bac95cd549f5c9ca49db2bd1885cbea6f20b580c9
3
+ metadata.gz: a103ea29759ffc3723d465fd0f0f06803701524d48b2c602a87a1a10a59cc5ed
4
+ data.tar.gz: 79ce1b1f90e3e435c36cb48c3f2c93f36e2a0506507bdd6fc2d2d22bebc71084
5
5
  SHA512:
6
- metadata.gz: bb245478decad376a05ddbf94aba784b2c7f52aae2f58edf0c023e769f14cd381c971ec17650b78331c5f01a5efbe2fc1fe6db91326afaf610c9e1d515f607d3
7
- data.tar.gz: 6daeb0353ddb71d35a4f91dccbc199d9737060a29072648cdbf85c7c1f649231d52dc51fc7b773ee8055a29fee4d390409aa5a9d894beefb961a2775b30dcd7f
6
+ metadata.gz: 25ce805f5b3303d8a8cc828b11652fd19fb47fd36c33795ec2df9a99e7eecce41402bc6d7fc118050d5265bad087a42459fab783e0061c18c622d7a27f333bfc
7
+ data.tar.gz: d41c8a37470b9f5c4e6440437e9f2643b96410d0a4010aaba6a8549337ea0867cb53992b74a03d44987cdce910e6215318e3a9dd25d2a02432fd39819adce188
@@ -17,7 +17,7 @@ jobs:
17
17
  steps:
18
18
  - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
19
19
  - name: Install Ruby
20
- uses: ruby/setup-ruby@0dafeac902942906541bc140009cdbf32665b601 # v1.315.0
20
+ uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
21
21
  with:
22
22
  ruby-version: 'ruby'
23
23
  - name: Build gem
@@ -96,7 +96,7 @@ jobs:
96
96
  with:
97
97
  name: gem-artifact
98
98
  - name: Install Ruby
99
- uses: ruby/setup-ruby@0dafeac902942906541bc140009cdbf32665b601 # v1.315.0
99
+ uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
100
100
  with:
101
101
  ruby-version: 'ruby'
102
102
  - name: Wait for release to propagate
@@ -18,7 +18,7 @@ jobs:
18
18
  steps:
19
19
  - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
20
20
  - name: Install Ruby ${{ matrix.ruby }}
21
- uses: ruby/setup-ruby@0dafeac902942906541bc140009cdbf32665b601 # v1.315.0
21
+ uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
22
22
  with:
23
23
  ruby-version: '4.0'
24
24
  bundler-cache: true
@@ -40,7 +40,7 @@ jobs:
40
40
  steps:
41
41
  - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
42
42
  - name: Install Ruby ${{ matrix.ruby }}
43
- uses: ruby/setup-ruby@0dafeac902942906541bc140009cdbf32665b601 # v1.315.0
43
+ uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
44
44
  with:
45
45
  ruby-version: ${{ matrix.ruby }}
46
46
  bundler-cache: true
data/CHANGELOG.md CHANGED
@@ -2,9 +2,22 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [7.5.0](https://github.com/voxpupuli/beaker/tree/7.5.0) (2026-07-01)
5
+ ## [7.6.0](https://github.com/voxpupuli/beaker/tree/7.6.0) (2026-07-13)
6
6
 
7
- [Full Changelog](https://github.com/voxpupuli/beaker/compare/v7.4.1...7.5.0)
7
+ [Full Changelog](https://github.com/voxpupuli/beaker/compare/v7.5.0...7.6.0)
8
+
9
+ **Implemented enhancements:**
10
+
11
+ - Update puppet\_configprint helper [\#2008](https://github.com/voxpupuli/beaker/pull/2008) ([Sharpie](https://github.com/Sharpie))
12
+
13
+ **Fixed bugs:**
14
+
15
+ - Ensure verify\_host\_key is symbolized before use [\#2010](https://github.com/voxpupuli/beaker/pull/2010) ([Sharpie](https://github.com/Sharpie))
16
+ - Ensure .beaker dir exists before writing options [\#2009](https://github.com/voxpupuli/beaker/pull/2009) ([Sharpie](https://github.com/Sharpie))
17
+
18
+ ## [v7.5.0](https://github.com/voxpupuli/beaker/tree/v7.5.0) (2026-07-01)
19
+
20
+ [Full Changelog](https://github.com/voxpupuli/beaker/compare/v7.4.1...v7.5.0)
8
21
 
9
22
  **Implemented enhancements:**
10
23
 
data/lib/beaker/host.rb CHANGED
@@ -21,15 +21,15 @@ module Beaker
21
21
  class RebootFailure < CommandFailure; end
22
22
  class RebootWarning < StandardError; end
23
23
 
24
- # This class provides array syntax for using puppet --configprint on a host
24
+ # This class provides array syntax for using "puppet config print" on a host
25
25
  class PuppetConfigReader
26
- def initialize(host, command)
26
+ def initialize(host, section)
27
27
  @host = host
28
- @command = command
28
+ @section = section
29
29
  end
30
30
 
31
31
  def has_key?(k)
32
- cmd = PuppetCommand.new(@command, '--configprint all')
32
+ cmd = PuppetCommand.new('config', 'print', "--section=#{@section}")
33
33
  keys = @host.exec(cmd).stdout.split("\n").collect do |x|
34
34
  x[/^[^\s]+/]
35
35
  end
@@ -37,7 +37,7 @@ module Beaker
37
37
  end
38
38
 
39
39
  def [](k)
40
- cmd = PuppetCommand.new(@command, "--configprint #{k}")
40
+ cmd = PuppetCommand.new('config', 'print', "--section=#{@section}", k)
41
41
  @host.exec(cmd).stdout.strip
42
42
  end
43
43
  end
@@ -128,10 +128,11 @@ module Beaker
128
128
 
129
129
  # Returning our PuppetConfigReader here allows users of the Host
130
130
  # class to do things like `host.puppet['vardir']` to query the
131
- # 'main' section or, if they want the configuration for a
132
- # particular run type, `host.puppet('agent')['vardir']`
133
- def puppet_configprint(command = 'agent')
134
- PuppetConfigReader.new(self, command)
131
+ # 'agent' section or, if they want the configuration for a
132
+ # particular run type, `host.puppet('main')['vardir']`, or
133
+ # `host.puppet('server')['hostcert']`
134
+ def puppet_configprint(section = 'agent')
135
+ PuppetConfigReader.new(self, section)
135
136
  end
136
137
  alias puppet puppet_configprint
137
138
 
@@ -76,6 +76,12 @@ module Beaker
76
76
  end
77
77
  end
78
78
 
79
+ # Beaker stringifies options when storing them in a config file.
80
+ # net-ssh raises a fatal error if it does not get a symbol.
81
+ if ssh_opts[:verify_host_key].is_a?(String)
82
+ ssh_opts[:verify_host_key] = ssh_opts[:verify_host_key].to_sym
83
+ end
84
+
79
85
  Net::SSH.start(host, user, ssh_opts)
80
86
  rescue *RETRYABLE_EXCEPTIONS => e
81
87
  if try <= max_connection_tries
@@ -84,6 +84,7 @@ module Beaker
84
84
  options_to_write = SubcommandUtil.sanitize_options_for_save(@cli.configured_options)
85
85
 
86
86
  @cli.logger.notify 'Writing configured options to disk'
87
+ FileUtils.mkdir_p(SubcommandUtil::CONFIG_DIR)
87
88
  SubcommandUtil::SUBCOMMAND_OPTIONS.write(options_to_write.to_yaml)
88
89
  @cli.logger.notify "Options written to #{SubcommandUtil::SUBCOMMAND_OPTIONS}"
89
90
 
@@ -1,5 +1,5 @@
1
1
  module Beaker
2
2
  module Version
3
- STRING = '7.5.0'
3
+ STRING = '7.6.0'
4
4
  end
5
5
  end
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.5.0
4
+ version: 7.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet