beaker_puppet_helpers 1.6.0 → 2.0.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: 4777b9a142a72ada934c3c3b35e71eac3056bc6a5ee9d32ff38ce65a1fdcb93f
4
- data.tar.gz: c3dc1c395a6c6451a8830042e6de3c38c34267fe8093e9d26f51b06c6d635d73
3
+ metadata.gz: d218d5ad4ee763da0b629fbadedb93ca724a100c73ee6439d5421bbc1f94eadb
4
+ data.tar.gz: 1339a28edb3a3208823b1eef7b4e347c027fcc5a8343219db2144a9bac643036
5
5
  SHA512:
6
- metadata.gz: 2851c412f57ae3d9360da61c4bfdfae1cf07e17581816315dad43049217940043c52c6ff7b0c101cb822372d83add43353b14a49396aa95621e03c722a079da8
7
- data.tar.gz: 5063b4158507a07c786a3be963cf56857972d0847f752a3df874bd8f9e60fc94a1b5cc95536c34fae95844f56de97d5863b79c71b861a0eed2b164e74022ce5b
6
+ metadata.gz: f8176a75aa669f7cd620c16c7f350b8483fb601307a431edd9806fe16668254fa3eda110038c56922f1e84d30c83df2c7238fd285cc565eece7bda6ee8ac2d7d
7
+ data.tar.gz: 468e019343afc503d231d5cbce64786d4b94568547b8b73a2373e42a4d6a88f4e478a9f3637b4c5638ce0a742721fd648ab408485a19619e5d58657cd0b1c84b
@@ -11,10 +11,10 @@ jobs:
11
11
  if: github.repository_owner == 'voxpupuli'
12
12
  steps:
13
13
  - uses: actions/checkout@v4
14
- - name: Install Ruby 3.3
14
+ - name: Install Ruby 3.4
15
15
  uses: ruby/setup-ruby@v1
16
16
  with:
17
- ruby-version: '3.3'
17
+ ruby-version: '3.4'
18
18
  bundler: 'none'
19
19
  - name: Build gem
20
20
  run: gem build --strict --verbose *.gemspec
@@ -11,30 +11,29 @@ env:
11
11
  BUNDLE_WITHOUT: release
12
12
 
13
13
  jobs:
14
- rubocop:
14
+ rubocop_and_matrix:
15
15
  runs-on: ubuntu-latest
16
- name: Rubocop
16
+ outputs:
17
+ ruby: ${{ steps.ruby.outputs.versions }}
17
18
  steps:
18
19
  - uses: actions/checkout@v4
19
20
  - name: Install Ruby ${{ matrix.ruby }}
20
21
  uses: ruby/setup-ruby@v1
21
22
  with:
22
- ruby-version: "3.3"
23
+ ruby-version: "3.4"
23
24
  bundler-cache: true
24
25
  - name: Rubocop
25
26
  run: bundle exec rake rubocop
27
+ - id: ruby
28
+ uses: voxpupuli/ruby-version@v1
26
29
 
27
30
  build:
28
- runs-on: ubuntu-20.04
31
+ runs-on: ubuntu-latest
32
+ needs: rubocop_and_matrix
29
33
  strategy:
30
34
  fail-fast: false
31
35
  matrix:
32
- ruby:
33
- - "3.3"
34
- - "3.2"
35
- - "3.1"
36
- - "3.0"
37
- - "2.7"
36
+ ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }}
38
37
  name: Ruby ${{ matrix.ruby }}
39
38
  steps:
40
39
  - uses: actions/checkout@v4
@@ -52,7 +51,6 @@ jobs:
52
51
 
53
52
  tests:
54
53
  needs:
55
- - rubocop
56
54
  - build
57
55
  runs-on: ubuntu-latest
58
56
  name: Test suite
data/CHANGELOG.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [2.0.0](https://github.com/voxpupuli/beaker_puppet_helpers/tree/2.0.0) (2025-03-18)
6
+
7
+ [Full Changelog](https://github.com/voxpupuli/beaker_puppet_helpers/compare/1.6.0...2.0.0)
8
+
9
+ **Breaking changes:**
10
+
11
+ - Drop support for nightly repos [\#57](https://github.com/voxpupuli/beaker_puppet_helpers/pull/57) ([bastelfreak](https://github.com/bastelfreak))
12
+
13
+ **Implemented enhancements:**
14
+
15
+ - Implement OpenVox support [\#56](https://github.com/voxpupuli/beaker_puppet_helpers/pull/56) ([bastelfreak](https://github.com/bastelfreak))
16
+ - CI: Use voxpupuli/ruby-version@v1 / Add Ruby 3.4 support [\#58](https://github.com/voxpupuli/beaker_puppet_helpers/pull/58) ([bastelfreak](https://github.com/bastelfreak))
17
+
5
18
  ## [1.6.0](https://github.com/voxpupuli/beaker_puppet_helpers/tree/1.6.0) (2024-12-11)
6
19
 
7
20
  [Full Changelog](https://github.com/voxpupuli/beaker_puppet_helpers/compare/1.5.0...1.6.0)
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'beaker_puppet_helpers'
5
- s.version = '1.6.0'
5
+ s.version = '2.0.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'
@@ -18,4 +18,7 @@ Gem::Specification.new do |s|
18
18
  # Run time dependencies
19
19
  s.add_dependency 'beaker', '>= 5.8.1', '< 7'
20
20
  s.add_dependency 'puppet-modulebuilder', '>= 0.3', '< 3'
21
+ # we need to declare both dependencies explicitly on Ruby 3.4+
22
+ s.add_dependency 'base64', '~> 0.2.0'
23
+ s.add_dependency 'benchmark', '~> 0.4.0'
21
24
  end
@@ -7,13 +7,17 @@ module BeakerPuppetHelpers
7
7
  class InstallUtils
8
8
  # @api private
9
9
  REPOS = {
10
- release: {
11
- apt: 'https://apt.puppet.com',
12
- yum: 'https://yum.puppet.com',
10
+ openvox: {
11
+ release: {
12
+ apt: 'https://apt.voxpupuli.org/',
13
+ yum: 'https://yum.voxpupuli.org/',
14
+ },
13
15
  },
14
- nightly: {
15
- apt: 'https://nightlies.puppet.com/apt',
16
- yum: 'https://nightlies.puppet.com/yum',
16
+ puppet: {
17
+ release: {
18
+ apt: 'https://apt.puppet.com',
19
+ yum: 'https://yum.puppet.com',
20
+ },
17
21
  },
18
22
  }.freeze
19
23
 
@@ -24,17 +28,18 @@ module BeakerPuppetHelpers
24
28
  #
25
29
  # @param [Beaker::Host] host
26
30
  # A host to act upon.
31
+ #
27
32
  # @param [String] collection
28
33
  # The collection to install. The default (puppet) is the latest
29
- # available version.
30
- # @param [Boolean] nightly
31
- # Whether to install nightly or release packages
34
+ # available version. Can also be openvox7, puppet8 and others.
35
+ # Method is called from beaker_install_helpers
32
36
  #
33
37
  # @note This method only works on redhat-like and debian-like hosts. There
34
38
  # are no official Puppet releases for other platforms.
35
39
  #
36
- def self.install_puppet_release_repo_on(host, collection = 'puppet', nightly: false)
37
- repos = REPOS[nightly ? :nightly : :release]
40
+ def self.install_puppet_release_repo_on(host, collection = 'puppet')
41
+ requirement_name = collection.gsub(/\d+/, '')
42
+ repos = REPOS[requirement_name.to_sym][:release]
38
43
 
39
44
  variant, version, _arch = host['packaging_platform'].split('-', 3)
40
45
 
@@ -56,7 +61,8 @@ module BeakerPuppetHelpers
56
61
  url = "#{repos[:yum]}/#{collection}-release-#{variant}-#{version}.noarch.rpm"
57
62
  host.install_package(url)
58
63
  when 'debian', 'ubuntu'
59
- url = "#{repos[:apt]}/#{collection}-release-#{host['platform'].codename}.deb"
64
+ relname = (requirement_name == 'openvox') ? "#{variant}#{version}" : host['platform'].codename
65
+ url = "#{repos[:apt]}/#{collection}-release-#{relname}.deb"
60
66
  wget_on(host, url) do |filename|
61
67
  host.install_package(filename)
62
68
  end
@@ -69,6 +75,28 @@ module BeakerPuppetHelpers
69
75
  end
70
76
  end
71
77
 
78
+ # Determine if we need the Perforce or OpenVox Package name
79
+ #
80
+ # @param [Beaker::Host] host
81
+ # The host to act on
82
+ # @param [Boolean] prefer_aio
83
+ # Whether to prefer AIO packages or OS packages
84
+ # @param implementation
85
+ # If we are on OpenVox or Perforce
86
+ # @return [String] the package name
87
+ def self.package_name(host, prefer_aio: true, implementation: 'openvox')
88
+ case implementation
89
+ when 'openvox'
90
+ openvox_package_name
91
+ when 'puppet'
92
+ puppet_package_name(host, prefer_aio: prefer_aio)
93
+ when 'none'
94
+ 'puppet'
95
+ else
96
+ raise StandardError, "Unknown requirement '#{implementation}'"
97
+ end
98
+ end
99
+
72
100
  # Determine the Puppet package name
73
101
  #
74
102
  # @param [Beaker::Host] host
@@ -93,6 +121,13 @@ module BeakerPuppetHelpers
93
121
  end
94
122
  end
95
123
 
124
+ # Determine the openvox package name
125
+ #
126
+ # @return [String] The openvox package name
127
+ def self.openvox_package_name
128
+ 'openvox-agent'
129
+ end
130
+
96
131
  # @param [Beaker::Host] host
97
132
  # The host to act on
98
133
  # @api private
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker_puppet_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-12-11 00:00:00.000000000 Z
10
+ date: 2025-03-18 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: beaker
@@ -50,6 +49,34 @@ dependencies:
50
49
  - - "<"
51
50
  - !ruby/object:Gem::Version
52
51
  version: '3'
52
+ - !ruby/object:Gem::Dependency
53
+ name: base64
54
+ requirement: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - "~>"
57
+ - !ruby/object:Gem::Version
58
+ version: 0.2.0
59
+ type: :runtime
60
+ prerelease: false
61
+ version_requirements: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - "~>"
64
+ - !ruby/object:Gem::Version
65
+ version: 0.2.0
66
+ - !ruby/object:Gem::Dependency
67
+ name: benchmark
68
+ requirement: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - "~>"
71
+ - !ruby/object:Gem::Version
72
+ version: 0.4.0
73
+ type: :runtime
74
+ prerelease: false
75
+ version_requirements: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: 0.4.0
53
80
  description: For use for the Beaker acceptance testing tool
54
81
  email:
55
82
  - voxpupuli@groups.io
@@ -85,7 +112,6 @@ homepage: https://github.com/voxpupuli/beaker_puppet_helpers
85
112
  licenses:
86
113
  - Apache-2.0
87
114
  metadata: {}
88
- post_install_message:
89
115
  rdoc_options: []
90
116
  require_paths:
91
117
  - lib
@@ -103,8 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
129
  - !ruby/object:Gem::Version
104
130
  version: '0'
105
131
  requirements: []
106
- rubygems_version: 3.5.22
107
- signing_key:
132
+ rubygems_version: 3.6.2
108
133
  specification_version: 4
109
134
  summary: Beaker's Puppet DSL Extension Helpers
110
135
  test_files: []