rspec-puppet-facts 5.4.0 → 6.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 +4 -4
- data/.github/dependabot.yml +14 -14
- data/.github/workflows/release.yml +4 -4
- data/.github/workflows/test.yml +2 -4
- data/.rubocop.yml +3 -0
- data/.rubocop_todo.yml +1 -5
- data/CHANGELOG.md +23 -0
- data/Gemfile +1 -10
- data/README.md +10 -4
- data/Rakefile +4 -29
- data/ext/puppet_agent_facter_versions.json +13 -0
- data/lib/rspec-puppet-facts/version.rb +1 -1
- data/rspec-puppet-facts.gemspec +5 -4
- metadata +17 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f3eec925e92c1024c4a10e558be21c02d0914f65fe07eea7e655f1097e23d92
|
4
|
+
data.tar.gz: aaf9c29db081dcf002654bf2d264b6aaa41306552c4ebb60040a00d6f0cdd20b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56bff0fbbc8b40ea9b66c49fd9ccd590606cb70ae4a49483e7646ebb188ee2943e94d826bcd4553f8809c05dcc8db720db60b76c979dd2bb5906f0a0a8397f76
|
7
|
+
data.tar.gz: 070fca80879de208a1cf4f455926ab8479029b819064ad8f796b37ecc86893beb780dfe0f185e2336f025652bf46efda933fc169ce9f1e65552002fba893b06a
|
data/.github/dependabot.yml
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
version: 2
|
2
2
|
updates:
|
3
|
-
# raise PRs for gem updates
|
4
|
-
- package-ecosystem: bundler
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
# raise PRs for gem updates
|
4
|
+
- package-ecosystem: bundler
|
5
|
+
directory: "/"
|
6
|
+
schedule:
|
7
|
+
interval: daily
|
8
|
+
time: "13:00"
|
9
|
+
open-pull-requests-limit: 10
|
10
10
|
|
11
|
-
# Maintain dependencies for GitHub Actions
|
12
|
-
- package-ecosystem: github-actions
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
11
|
+
# Maintain dependencies for GitHub Actions
|
12
|
+
- package-ecosystem: github-actions
|
13
|
+
directory: "/"
|
14
|
+
schedule:
|
15
|
+
interval: daily
|
16
|
+
time: "13:00"
|
17
|
+
open-pull-requests-limit: 10
|
@@ -15,7 +15,7 @@ jobs:
|
|
15
15
|
permissions:
|
16
16
|
contents: write # clone repo and create release
|
17
17
|
steps:
|
18
|
-
- uses: actions/checkout@
|
18
|
+
- uses: actions/checkout@v5
|
19
19
|
- name: Install Ruby
|
20
20
|
uses: ruby/setup-ruby@v1
|
21
21
|
with:
|
@@ -49,7 +49,7 @@ jobs:
|
|
49
49
|
packages: write # publish to rubygems.pkg.github.com
|
50
50
|
steps:
|
51
51
|
- name: Download gem from GitHub cache
|
52
|
-
uses: actions/download-artifact@
|
52
|
+
uses: actions/download-artifact@v5
|
53
53
|
with:
|
54
54
|
name: gem-artifact
|
55
55
|
- name: Publish gem to GitHub packages
|
@@ -64,7 +64,7 @@ jobs:
|
|
64
64
|
id-token: write # rubygems.org authentication
|
65
65
|
steps:
|
66
66
|
- name: Download gem from GitHub cache
|
67
|
-
uses: actions/download-artifact@
|
67
|
+
uses: actions/download-artifact@v5
|
68
68
|
with:
|
69
69
|
name: gem-artifact
|
70
70
|
- uses: rubygems/configure-rubygems-credentials@v1.0.0
|
@@ -82,7 +82,7 @@ jobs:
|
|
82
82
|
- release-to-rubygems
|
83
83
|
steps:
|
84
84
|
- name: Download gem from GitHub cache
|
85
|
-
uses: actions/download-artifact@
|
85
|
+
uses: actions/download-artifact@v5
|
86
86
|
with:
|
87
87
|
name: gem-artifact
|
88
88
|
- name: Install Ruby
|
data/.github/workflows/test.yml
CHANGED
@@ -19,7 +19,7 @@ jobs:
|
|
19
19
|
outputs:
|
20
20
|
ruby: ${{ steps.ruby.outputs.versions }}
|
21
21
|
steps:
|
22
|
-
- uses: actions/checkout@
|
22
|
+
- uses: actions/checkout@v5
|
23
23
|
- name: Install Ruby ${{ matrix.ruby }}
|
24
24
|
uses: ruby/setup-ruby@v1
|
25
25
|
with:
|
@@ -39,7 +39,7 @@ jobs:
|
|
39
39
|
matrix:
|
40
40
|
ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }}
|
41
41
|
steps:
|
42
|
-
- uses: actions/checkout@
|
42
|
+
- uses: actions/checkout@v5
|
43
43
|
- name: Install Ruby ${{ matrix.ruby }}
|
44
44
|
uses: ruby/setup-ruby@v1
|
45
45
|
with:
|
@@ -47,8 +47,6 @@ jobs:
|
|
47
47
|
bundler-cache: true
|
48
48
|
- name: Run unit tests
|
49
49
|
run: bundle exec rake spec
|
50
|
-
- name: Test against Puppet component versions
|
51
|
-
run: bundle exec rake puppet_versions:test
|
52
50
|
- name: Test gem build
|
53
51
|
run: gem build --strict --verbose *.gemspec
|
54
52
|
|
data/.rubocop.yml
CHANGED
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.
|
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
|
@@ -34,10 +34,6 @@ RSpec/LeakyConstantDeclaration:
|
|
34
34
|
RSpec/MessageSpies:
|
35
35
|
EnforcedStyle: receive
|
36
36
|
|
37
|
-
# Offense count: 4
|
38
|
-
RSpec/MultipleExpectations:
|
39
|
-
Max: 2
|
40
|
-
|
41
37
|
# Offense count: 48
|
42
38
|
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
|
43
39
|
# SupportedStyles: always, named_only
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,28 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [6.0.0](https://github.com/voxpupuli/rspec-puppet-facts/tree/6.0.0) (2025-09-27)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/voxpupuli/rspec-puppet-facts/compare/5.4.0...6.0.0)
|
6
|
+
|
7
|
+
**Breaking changes:**
|
8
|
+
|
9
|
+
- Require Ruby 3.2 or newer [\#224](https://github.com/voxpupuli/rspec-puppet-facts/pull/224) ([bastelfreak](https://github.com/bastelfreak))
|
10
|
+
- CI: Dont validate puppet\_agent\_facter\_versions.json anymore [\#223](https://github.com/voxpupuli/rspec-puppet-facts/pull/223) ([bastelfreak](https://github.com/bastelfreak))
|
11
|
+
- Switch from facter to openfact [\#219](https://github.com/voxpupuli/rspec-puppet-facts/pull/219) ([bastelfreak](https://github.com/bastelfreak))
|
12
|
+
|
13
|
+
**Implemented enhancements:**
|
14
|
+
|
15
|
+
- puppet\_agent\_facter\_versions: Add OpenVox/OpenFact versions [\#228](https://github.com/voxpupuli/rspec-puppet-facts/pull/228) ([bastelfreak](https://github.com/bastelfreak))
|
16
|
+
- FacterDB: Allow 4.x [\#222](https://github.com/voxpupuli/rspec-puppet-facts/pull/222) ([dependabot[bot]](https://github.com/apps/dependabot))
|
17
|
+
|
18
|
+
**Fixed bugs:**
|
19
|
+
|
20
|
+
- Fix dependabot configuration [\#226](https://github.com/voxpupuli/rspec-puppet-facts/pull/226) ([bastelfreak](https://github.com/bastelfreak))
|
21
|
+
|
22
|
+
**Merged pull requests:**
|
23
|
+
|
24
|
+
- README: Fix upstream documentation link to metadata [\#225](https://github.com/voxpupuli/rspec-puppet-facts/pull/225) ([giacomd](https://github.com/giacomd))
|
25
|
+
|
3
26
|
## [5.4.0](https://github.com/voxpupuli/rspec-puppet-facts/tree/5.4.0) (2025-06-11)
|
4
27
|
|
5
28
|
[Full Changelog](https://github.com/voxpupuli/rspec-puppet-facts/compare/5.3.1...5.4.0)
|
data/Gemfile
CHANGED
@@ -4,19 +4,10 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org'
|
|
4
4
|
|
5
5
|
gemspec
|
6
6
|
|
7
|
-
gem 'facter', ENV.fetch('FACTER_GEM_VERSION', nil), require: false
|
8
|
-
|
9
7
|
group :release, optional: true do
|
10
8
|
gem 'faraday-retry', '~> 2.1', require: false
|
11
9
|
gem 'github_changelog_generator', '~> 1.16.4', require: false
|
12
10
|
end
|
13
11
|
|
14
|
-
|
15
|
-
# puppet on Ruby 3.3 / 3.4 has some missing dependencies
|
16
|
-
gem 'base64', '~> 0.2' if RUBY_VERSION >= '3.4'
|
17
|
-
gem 'puppet', '>= 7', '< 9'
|
18
|
-
gem 'racc', '~> 1.8' if RUBY_VERSION >= '3.3'
|
19
|
-
else
|
20
|
-
gem 'openvox'
|
21
|
-
end
|
12
|
+
gem 'openvox'
|
22
13
|
gem 'syslog', '~> 0.3' if RUBY_VERSION >= '3.4'
|
data/README.md
CHANGED
@@ -44,7 +44,7 @@ include RspecPuppetFacts
|
|
44
44
|
|
45
45
|
## Specifying the supported operating systems
|
46
46
|
|
47
|
-
To determine which facts to run your tests against, `rspec-puppet-facts` checks your module's `metadata.json` to find out what operating systems your module supports. The `metadata.json` file is located in the root of your module. To learn more about this file, see Puppet's [metadata](https://
|
47
|
+
To determine which facts to run your tests against, `rspec-puppet-facts` checks your module's `metadata.json` to find out what operating systems your module supports. The `metadata.json` file is located in the root of your module. To learn more about this file, see Puppet's [metadata](https://help.puppet.com/core/current/Content/PuppetCore/modules_metadata.htm) documentation.
|
48
48
|
|
49
49
|
By default, `rspec-puppet-facts` provides the facts only for `x86_64` architecture. However, you can override this default and the supported operating system list by passing a hash to `on_supported_os` in your tests. This hash must contain either or both of the following keys:
|
50
50
|
|
@@ -572,9 +572,15 @@ When no facts are available for the specific facter/operating system combination
|
|
572
572
|
## Maintenance
|
573
573
|
|
574
574
|
This gem uses information about puppet AIO component versions to build/test.
|
575
|
-
They are stored at `ext/puppet_agent_facter_versions.json`.
|
576
|
-
|
577
|
-
|
575
|
+
They are stored at `ext/puppet_agent_facter_versions.json`.
|
576
|
+
|
577
|
+
In the past we used `bundle exec rake puppet_versions:update` to update the file and `puppet_versions:test` to validate it.
|
578
|
+
This relied on information from the puppet forge.
|
579
|
+
With the 6.0.0 release we're switching to openvox.
|
580
|
+
The file is currently maintained by hand, because openvox doesn't offer an API yet to map agent releases to openfact releases.
|
581
|
+
It got also renamed from `ext/puppet_agent_facter_versions.json` -> `ext/openvox_agent_facter_versions.json`.
|
582
|
+
|
583
|
+
**`ext/openvox_agent_facter_versions.json`now lists a mapping of openvox releases to openfact releases**
|
578
584
|
|
579
585
|
## License
|
580
586
|
|
data/Rakefile
CHANGED
@@ -21,39 +21,14 @@ end
|
|
21
21
|
namespace :puppet_versions do
|
22
22
|
desc 'updates the vendored list of puppet versions & components'
|
23
23
|
task :update do
|
24
|
-
|
25
|
-
|
26
|
-
require 'uri'
|
27
|
-
require 'json'
|
28
|
-
|
29
|
-
uri = URI.parse('https://forgeapi.puppet.com/private/versions/puppet-agent')
|
30
|
-
http = Net::HTTP.new(uri.host, uri.port)
|
31
|
-
http.use_ssl = uri.scheme == 'https'
|
32
|
-
|
33
|
-
request = Net::HTTP::Get.new(uri.request_uri)
|
34
|
-
response = http.request(request)
|
35
|
-
raise unless response.is_a?(Net::HTTPSuccess)
|
36
|
-
|
37
|
-
data = JSON.parse(response.body).filter_map do |_, versions|
|
38
|
-
if !versions['puppet'].nil? && !versions['facter'].nil?
|
39
|
-
[versions['puppet'], versions['facter']]
|
40
|
-
end
|
41
|
-
end
|
42
|
-
data.sort_by! { |puppet, _facter| Gem::Version.new(puppet) }.reverse!
|
43
|
-
|
44
|
-
File.write(PUPPET_VERSIONS_PATH, "#{JSON.pretty_generate(data.to_h)}\n")
|
24
|
+
warn 'The rake task is disabled since the 6.0.0 Release. Please see the README.md'
|
25
|
+
exit 1
|
45
26
|
end
|
46
27
|
|
47
28
|
desc 'runs all tests and verifies vendored component list'
|
48
29
|
task :test do
|
49
|
-
|
50
|
-
|
51
|
-
output = `git status --porcelain #{PUPPET_VERSIONS_PATH}`
|
52
|
-
unless output.strip.empty?
|
53
|
-
warn "#{PUPPET_VERSIONS_PATH} is out of date."
|
54
|
-
warn 'Run the puppet_versions:update task to update it and commit the changes.'
|
55
|
-
raise
|
56
|
-
end
|
30
|
+
warn 'The rake task is disabled since the 6.0.0 Release. Please see the README.md'
|
31
|
+
exit 1
|
57
32
|
end
|
58
33
|
end
|
59
34
|
|
@@ -1,4 +1,17 @@
|
|
1
1
|
{
|
2
|
+
"8.23.1": "5.1.0",
|
3
|
+
"8.23.0": "5.1.0",
|
4
|
+
"8.22.1": "5.0.0",
|
5
|
+
"8.19.2": "4.11.0",
|
6
|
+
"8.19.1": "4.11.0",
|
7
|
+
"8.19.0": "4.11.0",
|
8
|
+
"8.18.1": "4.11.0",
|
9
|
+
"8.17.0": "4.11.0",
|
10
|
+
"8.16.0": "4.11.0",
|
11
|
+
"8.15.0": "4.11.0",
|
12
|
+
"8.14.0": "4.11.0",
|
13
|
+
"8.13.0": "4.11.0",
|
14
|
+
"8.12.1": "4.11.0",
|
2
15
|
"8.12.0": "4.12.0",
|
3
16
|
"8.11.0": "4.11.0",
|
4
17
|
"8.10.0": "4.10.0",
|
data/rspec-puppet-facts.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.description = 'Contains facts from many Facter version on many Operating Systems'
|
14
14
|
s.licenses = 'Apache-2.0'
|
15
15
|
|
16
|
-
s.required_ruby_version = '>= 2.
|
16
|
+
s.required_ruby_version = '>= 3.2.0'
|
17
17
|
|
18
18
|
s.files = `git ls-files`.split("\n")
|
19
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
@@ -23,9 +23,10 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.add_development_dependency 'rspec', '~> 3.12'
|
24
24
|
s.add_development_dependency 'yard', '~> 0.9.34'
|
25
25
|
|
26
|
-
s.add_development_dependency 'voxpupuli-rubocop', '~>
|
26
|
+
s.add_development_dependency 'voxpupuli-rubocop', '~> 4.2.0'
|
27
27
|
|
28
28
|
s.add_dependency 'deep_merge', '~> 1.2'
|
29
|
-
|
30
|
-
s.add_dependency 'facterdb', '
|
29
|
+
|
30
|
+
s.add_dependency 'facterdb', '>= 3.1', '< 5.0'
|
31
|
+
s.add_dependency 'openfact', '~> 5.0'
|
31
32
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-puppet-facts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vox Pupuli
|
@@ -77,14 +77,14 @@ dependencies:
|
|
77
77
|
requirements:
|
78
78
|
- - "~>"
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version:
|
80
|
+
version: 4.2.0
|
81
81
|
type: :development
|
82
82
|
prerelease: false
|
83
83
|
version_requirements: !ruby/object:Gem::Requirement
|
84
84
|
requirements:
|
85
85
|
- - "~>"
|
86
86
|
- !ruby/object:Gem::Version
|
87
|
-
version:
|
87
|
+
version: 4.2.0
|
88
88
|
- !ruby/object:Gem::Dependency
|
89
89
|
name: deep_merge
|
90
90
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,33 +100,39 @@ dependencies:
|
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '1.2'
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
|
-
name:
|
103
|
+
name: facterdb
|
104
104
|
requirement: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
|
+
- - ">="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '3.1'
|
106
109
|
- - "<"
|
107
110
|
- !ruby/object:Gem::Version
|
108
|
-
version: '5'
|
111
|
+
version: '5.0'
|
109
112
|
type: :runtime
|
110
113
|
prerelease: false
|
111
114
|
version_requirements: !ruby/object:Gem::Requirement
|
112
115
|
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '3.1'
|
113
119
|
- - "<"
|
114
120
|
- !ruby/object:Gem::Version
|
115
|
-
version: '5'
|
121
|
+
version: '5.0'
|
116
122
|
- !ruby/object:Gem::Dependency
|
117
|
-
name:
|
123
|
+
name: openfact
|
118
124
|
requirement: !ruby/object:Gem::Requirement
|
119
125
|
requirements:
|
120
126
|
- - "~>"
|
121
127
|
- !ruby/object:Gem::Version
|
122
|
-
version: '
|
128
|
+
version: '5.0'
|
123
129
|
type: :runtime
|
124
130
|
prerelease: false
|
125
131
|
version_requirements: !ruby/object:Gem::Requirement
|
126
132
|
requirements:
|
127
133
|
- - "~>"
|
128
134
|
- !ruby/object:Gem::Version
|
129
|
-
version: '
|
135
|
+
version: '5.0'
|
130
136
|
description: Contains facts from many Facter version on many Operating Systems
|
131
137
|
email:
|
132
138
|
- voxpupuli@groups.io
|
@@ -167,14 +173,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
167
173
|
requirements:
|
168
174
|
- - ">="
|
169
175
|
- !ruby/object:Gem::Version
|
170
|
-
version: 2.
|
176
|
+
version: 3.2.0
|
171
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
172
178
|
requirements:
|
173
179
|
- - ">="
|
174
180
|
- !ruby/object:Gem::Version
|
175
181
|
version: '0'
|
176
182
|
requirements: []
|
177
|
-
rubygems_version: 3.6.
|
183
|
+
rubygems_version: 3.6.9
|
178
184
|
specification_version: 4
|
179
185
|
summary: Standard facts fixtures for Puppet
|
180
186
|
test_files: []
|