beaker_puppet_helpers 1.3.0 → 1.4.0

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: 860333658bb4763948199ffd7f44aa8d63f91f82e1433237e173646a7f846946
4
- data.tar.gz: ab16c43125a9ad5a07bd3f84e0e48897fb759b0a79c2be4af36601126dd09942
3
+ metadata.gz: b001b9c348f8e6b21b1fb495af1163b6da37668267f3335cd43ef5227d47a7e1
4
+ data.tar.gz: 04ee8755335878f1e0f36905a403c38a971223e8ab3225efb2ae22d441b9fa97
5
5
  SHA512:
6
- metadata.gz: 3e80f94672298bb94adf4aea463aa2dcfa0271d36a6e6e9916964cac8ba0944229888b7bf5c2cc9be42829ef19df8829caf28e1b3dd8dd0060f999d12be077de
7
- data.tar.gz: 0360e4c00279e81aa205ca1933fbaa00288d3dc549b0f97ef247fd2990994cb5b2b9fadb73d6b7f531becf918ded29d6641a5bc4d55aed4807c10e51cb779f05
6
+ metadata.gz: 589ffd7e3989e29e1b593d7ece8b01e38763830ce14675fbcdc3aa54301a93eafe552150127c3ea0b0967334b3fbdc1bb8e3c71472292d2d7acf9ddaa9df7eac
7
+ data.tar.gz: f213200034c144418780365b1dbee9f4e3cc6b5179fda3efe28ca00f298ef7a1cc65194698e85da6226a42cdf007beefdc8c7bf02293af23271854fde253edfa
data/.gitignore CHANGED
@@ -11,3 +11,4 @@ junit/
11
11
  tmp/
12
12
  vendor/
13
13
  .vendor/
14
+ .bundle/
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2023-05-05 18:42:04 UTC using RuboCop version 1.50.2.
3
+ # on 2024-05-28 10:04:32 UTC using RuboCop version 1.63.5.
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
@@ -11,13 +11,13 @@
11
11
  RSpec/ExampleLength:
12
12
  Max: 9
13
13
 
14
- # Offense count: 72
14
+ # Offense count: 77
15
15
  # Configuration parameters: .
16
16
  # SupportedStyles: have_received, receive
17
17
  RSpec/MessageSpies:
18
18
  EnforcedStyle: receive
19
19
 
20
- # Offense count: 24
20
+ # Offense count: 26
21
21
  RSpec/MultipleExpectations:
22
22
  Max: 7
23
23
 
@@ -25,3 +25,9 @@ RSpec/MultipleExpectations:
25
25
  # Configuration parameters: AllowedGroups.
26
26
  RSpec/NestedGroups:
27
27
  Max: 4
28
+
29
+ # Offense count: 2
30
+ # This cop supports unsafe autocorrection (--autocorrect-all).
31
+ RSpec/ReceiveMessages:
32
+ Exclude:
33
+ - 'spec/beaker_puppet_helpers/dsl_spec.rb'
data/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.4.0](https://github.com/voxpupuli/beaker_puppet_helpers/tree/1.4.0) (2024-05-28)
6
+
7
+ [Full Changelog](https://github.com/voxpupuli/beaker_puppet_helpers/compare/1.3.0...1.4.0)
8
+
9
+ **Implemented enhancements:**
10
+
11
+ - beaker: Allow 6.x [\#47](https://github.com/voxpupuli/beaker_puppet_helpers/pull/47) ([bastelfreak](https://github.com/bastelfreak))
12
+ - Use tmpfile extension [\#3](https://github.com/voxpupuli/beaker_puppet_helpers/pull/3) ([ekohl](https://github.com/ekohl))
13
+
14
+ **Merged pull requests:**
15
+
16
+ - .gitignore: add .bundle [\#46](https://github.com/voxpupuli/beaker_puppet_helpers/pull/46) ([bastelfreak](https://github.com/bastelfreak))
17
+ - voxpupuli-rubocop: Require 2.7.0 [\#45](https://github.com/voxpupuli/beaker_puppet_helpers/pull/45) ([bastelfreak](https://github.com/bastelfreak))
18
+
5
19
  ## [1.3.0](https://github.com/voxpupuli/beaker_puppet_helpers/tree/1.3.0) (2024-05-02)
6
20
 
7
21
  [Full Changelog](https://github.com/voxpupuli/beaker_puppet_helpers/compare/1.2.1...1.3.0)
data/Gemfile CHANGED
@@ -13,7 +13,7 @@ group :development do
13
13
  end
14
14
 
15
15
  group :rubocop do
16
- gem 'voxpupuli-rubocop', '~> 1.2'
16
+ gem 'voxpupuli-rubocop', '~> 2.7.0'
17
17
  end
18
18
 
19
19
  group :test do
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'beaker_puppet_helpers'
5
- s.version = '1.3.0'
5
+ s.version = '1.4.0'
6
6
  s.authors = ['Vox Pupuli']
7
7
  s.email = ['voxpupuli@groups.io']
8
8
  s.homepage = 'https://github.com/voxpupuli/beaker_puppet_helpers'
@@ -16,6 +16,6 @@ Gem::Specification.new do |s|
16
16
  s.require_paths = ['lib']
17
17
 
18
18
  # Run time dependencies
19
- s.add_runtime_dependency 'beaker', '>= 4', '< 6'
19
+ s.add_runtime_dependency 'beaker', '>= 5.8.1', '< 7'
20
20
  s.add_runtime_dependency 'puppet-modulebuilder', '>= 0.3', '< 2'
21
21
  end
@@ -173,7 +173,7 @@ module BeakerPuppetHelpers
173
173
 
174
174
  puppet_apply_opts = host[:default_apply_opts].merge(puppet_apply_opts) if host[:default_apply_opts].respond_to? :merge
175
175
 
176
- file_path = host.tmpfile(%(apply_manifest_#{Time.now.strftime('%H%M%S%L')}.pp))
176
+ file_path = host.tmpfile(%(apply_manifest_#{Time.now.strftime('%H%M%S%L')}), '.pp')
177
177
  begin
178
178
  create_remote_file(host, file_path, "#{manifest}\n")
179
179
 
@@ -80,14 +80,14 @@ module BeakerPuppetHelpers
80
80
  case host['packaging_platform'].split('-', 3).first
81
81
  when 'debian'
82
82
  # 12 started to ship puppet-agent with puppet as a legacy package
83
- prefer_aio || host['packaging_platform'].split('-', 3)[1].to_i >= 12 ? 'puppet-agent' : 'puppet'
83
+ (prefer_aio || host['packaging_platform'].split('-', 3)[1].to_i >= 12) ? 'puppet-agent' : 'puppet'
84
84
  when /el|fedora|sles|cisco_/
85
85
  prefer_aio ? 'puppet-agent' : 'puppet'
86
86
  when /freebsd/
87
87
  'sysutils/puppet8'
88
88
  when 'ubuntu'
89
89
  # 23.04 started to ship puppet-agent with puppet as a legacy package
90
- prefer_aio || host['packaging_platform'].split('-', 3)[1].to_i >= 2304 ? 'puppet-agent' : 'puppet'
90
+ (prefer_aio || host['packaging_platform'].split('-', 3)[1].to_i >= 2304) ? 'puppet-agent' : 'puppet'
91
91
  else
92
92
  'puppet'
93
93
  end
@@ -99,8 +99,7 @@ module BeakerPuppetHelpers
99
99
  def self.wget_on(host, url)
100
100
  extension = File.extname(url)
101
101
  name = File.basename(url, extension)
102
- # Can't use host.tmpfile since we need to set an extension
103
- target = host.exec(Beaker::Command.new("mktemp -t '#{name}-XXXXXX#{extension}'")).stdout.strip
102
+ target = host.tmpfile(name, extension)
104
103
  begin
105
104
  host.exec(Beaker::Command.new("wget -O '#{target}' '#{url}'"))
106
105
  yield target
@@ -44,7 +44,7 @@ module BeakerPuppetHelpers
44
44
  source_path = builder.build
45
45
  begin
46
46
  block_on hosts do |host|
47
- target_file = host.tmpfile('puppet_module')
47
+ target_file = host.tmpfile('puppet_module', '.tar.gz')
48
48
  begin
49
49
  host.do_scp_to(source_path, target_file, {})
50
50
  install_puppet_module_via_pmt_on(host, target_file)
@@ -97,7 +97,7 @@ describe BeakerPuppetHelpers::ModuleUtils do
97
97
  expect(Puppet::Modulebuilder::Builder).to receive(:new).with('/path/to/module').and_return(builder)
98
98
  expect(builder).to receive(:build).and_return('/path/to/tarball')
99
99
 
100
- expect(host).to receive(:tmpfile).with('puppet_module').and_return('temp')
100
+ expect(host).to receive(:tmpfile).with('puppet_module', '.tar.gz').and_return('temp')
101
101
  expect(host).to receive(:do_scp_to).with('/path/to/tarball', 'temp', {})
102
102
  expect(dsl).to receive(:install_puppet_module_via_pmt_on).with(host, 'temp')
103
103
  expect(host).to receive(:rm_rf).with('temp')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker_puppet_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-02 00:00:00.000000000 Z
11
+ date: 2024-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: beaker
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4'
19
+ version: 5.8.1
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '6'
22
+ version: '7'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '4'
29
+ version: 5.8.1
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '6'
32
+ version: '7'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: puppet-modulebuilder
35
35
  requirement: !ruby/object:Gem::Requirement