rspec-puppet-facts 5.3.1 → 5.4.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/release.yml +41 -0
- data/.github/workflows/release.yml +80 -16
- data/.github/workflows/test.yml +16 -16
- data/.rubocop_todo.yml +5 -46
- data/CHANGELOG.md +15 -1
- data/Gemfile +11 -4
- data/Rakefile +4 -0
- data/lib/rspec-puppet-facts/version.rb +3 -1
- data/lib/rspec-puppet-facts.rb +22 -3
- data/rspec-puppet-facts.gemspec +0 -1
- data/spec/rspec_puppet_facts_spec.rb +10 -8
- data/spec/spec_helper.rb +1 -23
- metadata +4 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07be2b36fe6262cd91cba650af62eefecd8bfa35c04cce3717b4f31607d645d8
|
4
|
+
data.tar.gz: 5dea6313fdb2bd2ce0f6912e82a0cb48167d9fd7095b829b4af1ae9e3dfc89c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c786dd866dadbf503eaa4cf71a733ade1ebbe42c374652643fa016eb81aebdf3d4fc69cf8fa68bf3116d10597f0b7280c23a048e89440a9e7fcb7a923337c6c
|
7
|
+
data.tar.gz: 46db9b91fe86a560469501f866188c5a663d9af04a1b8925d91b798c4a7bfdf73c6dee618ecc8e869d7003e4cdc2b86d2f119c5428f164e38b9a66d7f0c3ccc0
|
data/.github/release.yml
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
|
3
|
+
|
4
|
+
changelog:
|
5
|
+
exclude:
|
6
|
+
labels:
|
7
|
+
- duplicate
|
8
|
+
- invalid
|
9
|
+
- modulesync
|
10
|
+
- question
|
11
|
+
- skip-changelog
|
12
|
+
- wont-fix
|
13
|
+
- wontfix
|
14
|
+
- github_actions
|
15
|
+
|
16
|
+
categories:
|
17
|
+
- title: Breaking Changes 🛠
|
18
|
+
labels:
|
19
|
+
- backwards-incompatible
|
20
|
+
|
21
|
+
- title: New Features 🎉
|
22
|
+
labels:
|
23
|
+
- enhancement
|
24
|
+
|
25
|
+
- title: Bug Fixes 🐛
|
26
|
+
labels:
|
27
|
+
- bug
|
28
|
+
- bugfix
|
29
|
+
|
30
|
+
- title: Documentation Updates 📚
|
31
|
+
labels:
|
32
|
+
- documentation
|
33
|
+
- docs
|
34
|
+
|
35
|
+
- title: Dependency Updates ⬆️
|
36
|
+
labels:
|
37
|
+
- dependencies
|
38
|
+
|
39
|
+
- title: Other Changes
|
40
|
+
labels:
|
41
|
+
- "*"
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
---
|
2
|
+
name: Gem Release
|
2
3
|
|
3
4
|
on:
|
4
5
|
push:
|
@@ -6,27 +7,90 @@ on:
|
|
6
7
|
- '*'
|
7
8
|
|
8
9
|
jobs:
|
9
|
-
release:
|
10
|
-
|
10
|
+
build-release:
|
11
|
+
# Prevent releases from forked repositories
|
11
12
|
if: github.repository_owner == 'voxpupuli'
|
13
|
+
name: Build the gem
|
14
|
+
runs-on: ubuntu-24.04
|
15
|
+
permissions:
|
16
|
+
contents: write # clone repo and create release
|
12
17
|
steps:
|
13
18
|
- uses: actions/checkout@v4
|
14
|
-
- name: Install Ruby
|
19
|
+
- name: Install Ruby
|
15
20
|
uses: ruby/setup-ruby@v1
|
16
21
|
with:
|
17
|
-
ruby-version: '
|
18
|
-
env:
|
19
|
-
BUNDLE_WITHOUT: release
|
22
|
+
ruby-version: 'ruby'
|
20
23
|
- name: Build gem
|
21
|
-
|
24
|
+
shell: bash
|
25
|
+
run: gem build --verbose *.gemspec
|
26
|
+
- name: Upload gem to GitHub cache
|
27
|
+
uses: actions/upload-artifact@v4
|
28
|
+
with:
|
29
|
+
name: gem-artifact
|
30
|
+
path: '*.gem'
|
31
|
+
retention-days: 1
|
32
|
+
compression-level: 0
|
33
|
+
- name: Create Release Page
|
34
|
+
shell: bash
|
35
|
+
env:
|
36
|
+
GH_TOKEN: ${{ github.token }}
|
37
|
+
run: gh release create ${{ github.ref_name }} --generate-notes
|
38
|
+
- name: Attach gem to GitHub Release
|
39
|
+
shell: bash
|
40
|
+
env:
|
41
|
+
GH_TOKEN: ${{ github.token }}
|
42
|
+
run: gh release upload ${{ github.ref_name }} *.gem
|
43
|
+
|
44
|
+
release-to-github:
|
45
|
+
needs: build-release
|
46
|
+
name: Release to GitHub
|
47
|
+
runs-on: ubuntu-24.04
|
48
|
+
permissions:
|
49
|
+
packages: write # publish to rubygems.pkg.github.com
|
50
|
+
steps:
|
51
|
+
- name: Download gem from GitHub cache
|
52
|
+
uses: actions/download-artifact@v4
|
53
|
+
with:
|
54
|
+
name: gem-artifact
|
55
|
+
- name: Publish gem to GitHub packages
|
56
|
+
run: GEM_HOST_API_KEY=${{ secrets.GITHUB_TOKEN }} gem push --key github --host https://rubygems.pkg.github.com/${{ github.repository_owner }} *.gem
|
57
|
+
|
58
|
+
release-to-rubygems:
|
59
|
+
needs: build-release
|
60
|
+
name: Release gem to rubygems.org
|
61
|
+
runs-on: ubuntu-24.04
|
62
|
+
environment: release # recommended by rubygems.org
|
63
|
+
permissions:
|
64
|
+
id-token: write # rubygems.org authentication
|
65
|
+
steps:
|
66
|
+
- name: Download gem from GitHub cache
|
67
|
+
uses: actions/download-artifact@v4
|
68
|
+
with:
|
69
|
+
name: gem-artifact
|
70
|
+
- uses: rubygems/configure-rubygems-credentials@v1.0.0
|
22
71
|
- name: Publish gem to rubygems.org
|
72
|
+
shell: bash
|
23
73
|
run: gem push *.gem
|
24
|
-
|
25
|
-
|
26
|
-
|
74
|
+
|
75
|
+
release-verification:
|
76
|
+
name: Check that all releases are done
|
77
|
+
runs-on: ubuntu-24.04
|
78
|
+
permissions:
|
79
|
+
contents: read # minimal permissions that we have to grant
|
80
|
+
needs:
|
81
|
+
- release-to-github
|
82
|
+
- release-to-rubygems
|
83
|
+
steps:
|
84
|
+
- name: Download gem from GitHub cache
|
85
|
+
uses: actions/download-artifact@v4
|
86
|
+
with:
|
87
|
+
name: gem-artifact
|
88
|
+
- name: Install Ruby
|
89
|
+
uses: ruby/setup-ruby@v1
|
90
|
+
with:
|
91
|
+
ruby-version: 'ruby'
|
92
|
+
- name: Wait for release to propagate
|
93
|
+
shell: bash
|
27
94
|
run: |
|
28
|
-
|
29
|
-
|
30
|
-
chmod 0600 ~/.gem/credentials
|
31
|
-
- name: Publish gem to GitHub packages
|
32
|
-
run: gem push --key github --host https://rubygems.pkg.github.com/voxpupuli *.gem
|
95
|
+
gem install rubygems-await
|
96
|
+
gem await *.gem
|
data/.github/workflows/test.yml
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
---
|
1
2
|
name: Test
|
2
3
|
|
3
4
|
on:
|
@@ -9,11 +10,14 @@ on:
|
|
9
10
|
env:
|
10
11
|
BUNDLE_WITHOUT: release
|
11
12
|
|
13
|
+
permissions:
|
14
|
+
contents: read # minimal permissions that we have to grant
|
15
|
+
|
12
16
|
jobs:
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
+
rubocop_and_matrix:
|
18
|
+
runs-on: ubuntu-24.04
|
19
|
+
outputs:
|
20
|
+
ruby: ${{ steps.ruby.outputs.versions }}
|
17
21
|
steps:
|
18
22
|
- uses: actions/checkout@v4
|
19
23
|
- name: Install Ruby ${{ matrix.ruby }}
|
@@ -23,21 +27,17 @@ jobs:
|
|
23
27
|
bundler-cache: true
|
24
28
|
- name: Run Rubocop
|
25
29
|
run: bundle exec rake rubocop
|
30
|
+
- id: ruby
|
31
|
+
uses: voxpupuli/ruby-version@v1
|
26
32
|
|
27
33
|
test:
|
28
|
-
|
34
|
+
needs: rubocop_and_matrix
|
35
|
+
name: "Ruby ${{ matrix.ruby }}"
|
36
|
+
runs-on: ubuntu-24.04
|
29
37
|
strategy:
|
30
38
|
fail-fast: false
|
31
39
|
matrix:
|
32
|
-
|
33
|
-
- ruby: '2.7'
|
34
|
-
- ruby: '3.0'
|
35
|
-
- ruby: '3.1'
|
36
|
-
- ruby: '3.2'
|
37
|
-
- ruby: '3.3'
|
38
|
-
coverage: 'yes'
|
39
|
-
env:
|
40
|
-
COVERAGE: ${{ matrix.coverage }}
|
40
|
+
ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }}
|
41
41
|
steps:
|
42
42
|
- uses: actions/checkout@v4
|
43
43
|
- name: Install Ruby ${{ matrix.ruby }}
|
@@ -54,9 +54,9 @@ jobs:
|
|
54
54
|
|
55
55
|
tests:
|
56
56
|
needs:
|
57
|
-
-
|
57
|
+
- rubocop_and_matrix
|
58
58
|
- test
|
59
|
-
runs-on: ubuntu-
|
59
|
+
runs-on: ubuntu-24.04
|
60
60
|
name: Test suite
|
61
61
|
steps:
|
62
62
|
- run: echo Test suite completed
|
data/.rubocop_todo.yml
CHANGED
@@ -1,17 +1,11 @@
|
|
1
1
|
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
#
|
2
|
+
# `rubocop --auto-gen-config --no-auto-gen-timestamp`
|
3
|
+
# using RuboCop version 1.75.8.
|
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
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count: 1
|
10
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
11
|
-
Performance/MapCompact:
|
12
|
-
Exclude:
|
13
|
-
- 'lib/rspec-puppet-facts.rb'
|
14
|
-
|
15
9
|
# Offense count: 29
|
16
10
|
# Configuration parameters: Prefixes, AllowedPatterns.
|
17
11
|
# Prefixes: when, with, without
|
@@ -19,7 +13,7 @@ RSpec/ContextWording:
|
|
19
13
|
Exclude:
|
20
14
|
- 'spec/rspec_puppet_facts_spec.rb'
|
21
15
|
|
22
|
-
# Offense count:
|
16
|
+
# Offense count: 6
|
23
17
|
# Configuration parameters: CountAsOne.
|
24
18
|
RSpec/ExampleLength:
|
25
19
|
Max: 13
|
@@ -29,14 +23,6 @@ RSpec/ExpectInHook:
|
|
29
23
|
Exclude:
|
30
24
|
- 'spec/rspec_puppet_facts_spec.rb'
|
31
25
|
|
32
|
-
# Offense count: 8
|
33
|
-
# This cop supports safe autocorrection (--autocorrect).
|
34
|
-
# Configuration parameters: EnforcedStyle.
|
35
|
-
# SupportedStyles: single_line_only, single_statement_only, disallow, require_implicit
|
36
|
-
RSpec/ImplicitSubject:
|
37
|
-
Exclude:
|
38
|
-
- 'spec/rspec_puppet_facts_spec.rb'
|
39
|
-
|
40
26
|
# Offense count: 4
|
41
27
|
RSpec/LeakyConstantDeclaration:
|
42
28
|
Exclude:
|
@@ -52,7 +38,7 @@ RSpec/MessageSpies:
|
|
52
38
|
RSpec/MultipleExpectations:
|
53
39
|
Max: 2
|
54
40
|
|
55
|
-
# Offense count:
|
41
|
+
# Offense count: 48
|
56
42
|
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
|
57
43
|
# SupportedStyles: always, named_only
|
58
44
|
RSpec/NamedSubject:
|
@@ -69,39 +55,18 @@ RSpec/StubbedMock:
|
|
69
55
|
Exclude:
|
70
56
|
- 'spec/rspec_puppet_facts_spec.rb'
|
71
57
|
|
72
|
-
# Offense count: 2
|
73
|
-
# This cop supports safe autocorrection (--autocorrect).
|
74
|
-
Rake/Desc:
|
75
|
-
Exclude:
|
76
|
-
- 'Rakefile'
|
77
|
-
|
78
|
-
# Offense count: 6
|
79
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
80
|
-
# Configuration parameters: EnforcedStyle.
|
81
|
-
# SupportedStyles: always, always_true, never
|
82
|
-
Style/FrozenStringLiteralComment:
|
83
|
-
Exclude:
|
84
|
-
- 'Gemfile'
|
85
|
-
- 'Rakefile'
|
86
|
-
- 'lib/rspec-puppet-facts.rb'
|
87
|
-
- 'lib/rspec-puppet-facts/version.rb'
|
88
|
-
- 'spec/rspec_puppet_facts_spec.rb'
|
89
|
-
- 'spec/spec_helper.rb'
|
90
|
-
|
91
58
|
# Offense count: 1
|
92
59
|
Style/MixinUsage:
|
93
60
|
Exclude:
|
94
61
|
- 'spec/spec_helper.rb'
|
95
62
|
|
96
|
-
# Offense count:
|
63
|
+
# Offense count: 1
|
97
64
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
98
65
|
# Configuration parameters: EnforcedStyle.
|
99
66
|
# SupportedStyles: literals, strict
|
100
67
|
Style/MutableConstant:
|
101
68
|
Exclude:
|
102
69
|
- 'lib/rspec-puppet-facts.rb'
|
103
|
-
- 'lib/rspec-puppet-facts/version.rb'
|
104
|
-
- 'spec/rspec_puppet_facts_spec.rb'
|
105
70
|
|
106
71
|
# Offense count: 1
|
107
72
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
@@ -112,12 +77,6 @@ Style/RedundantArgument:
|
|
112
77
|
|
113
78
|
# Offense count: 1
|
114
79
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
115
|
-
Style/RedundantSort:
|
116
|
-
Exclude:
|
117
|
-
- 'lib/rspec-puppet-facts.rb'
|
118
|
-
|
119
|
-
# Offense count: 2
|
120
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
121
80
|
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
|
122
81
|
# AllowedMethods: present?, blank?, presence, try, try!
|
123
82
|
Style/SafeNavigation:
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [5.
|
3
|
+
## [5.4.0](https://github.com/voxpupuli/rspec-puppet-facts/tree/5.4.0) (2025-06-11)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/voxpupuli/rspec-puppet-facts/compare/5.3.1...5.4.0)
|
6
|
+
|
7
|
+
**Implemented enhancements:**
|
8
|
+
|
9
|
+
- Support OpenVox [\#217](https://github.com/voxpupuli/rspec-puppet-facts/pull/217) ([bastelfreak](https://github.com/bastelfreak))
|
10
|
+
- Make Puppet a soft dependency [\#213](https://github.com/voxpupuli/rspec-puppet-facts/pull/213) ([ekohl](https://github.com/ekohl))
|
11
|
+
- Add Ruby 3.4 support / generate CI matrix dynamically [\#211](https://github.com/voxpupuli/rspec-puppet-facts/pull/211) ([bastelfreak](https://github.com/bastelfreak))
|
12
|
+
|
13
|
+
**Merged pull requests:**
|
14
|
+
|
15
|
+
- Drop unused coverage reporting [\#210](https://github.com/voxpupuli/rspec-puppet-facts/pull/210) ([bastelfreak](https://github.com/bastelfreak))
|
16
|
+
|
17
|
+
## [5.3.1](https://github.com/voxpupuli/rspec-puppet-facts/tree/5.3.1) (2025-04-29)
|
4
18
|
|
5
19
|
[Full Changelog](https://github.com/voxpupuli/rspec-puppet-facts/compare/5.3.0...5.3.1)
|
6
20
|
|
data/Gemfile
CHANGED
@@ -1,15 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
|
2
4
|
|
3
5
|
gemspec
|
4
6
|
|
5
7
|
gem 'facter', ENV.fetch('FACTER_GEM_VERSION', nil), require: false
|
6
8
|
|
7
|
-
group :release do
|
9
|
+
group :release, optional: true do
|
8
10
|
gem 'faraday-retry', '~> 2.1', require: false
|
9
11
|
gem 'github_changelog_generator', '~> 1.16.4', require: false
|
10
12
|
end
|
11
13
|
|
12
|
-
|
13
|
-
|
14
|
-
gem '
|
14
|
+
if ENV.fetch('IMPLEMENTATION', nil) == 'puppet'
|
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'
|
15
21
|
end
|
22
|
+
gem 'syslog', '~> 0.3' if RUBY_VERSION >= '3.4'
|
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
PUPPET_VERSIONS_PATH = File.join(__dir__, 'ext', 'puppet_agent_facter_versions.json')
|
2
4
|
|
3
5
|
begin
|
@@ -17,6 +19,7 @@ task :dump_commit do
|
|
17
19
|
end
|
18
20
|
|
19
21
|
namespace :puppet_versions do
|
22
|
+
desc 'updates the vendored list of puppet versions & components'
|
20
23
|
task :update do
|
21
24
|
require 'net/http'
|
22
25
|
require 'net/https'
|
@@ -41,6 +44,7 @@ namespace :puppet_versions do
|
|
41
44
|
File.write(PUPPET_VERSIONS_PATH, "#{JSON.pretty_generate(data.to_h)}\n")
|
42
45
|
end
|
43
46
|
|
47
|
+
desc 'runs all tests and verifies vendored component list'
|
44
48
|
task :test do
|
45
49
|
Rake::Task['puppet_versions:update'].invoke
|
46
50
|
|
data/lib/rspec-puppet-facts.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'facter'
|
3
4
|
require 'facterdb'
|
4
5
|
require 'json'
|
@@ -252,12 +253,23 @@ module RspecPuppetFacts
|
|
252
253
|
def self.common_facts
|
253
254
|
return @common_facts if @common_facts
|
254
255
|
|
256
|
+
# from Facter itself
|
255
257
|
@common_facts = {
|
256
|
-
puppetversion: Puppet.version,
|
257
258
|
rubysitedir: RbConfig::CONFIG['sitelibdir'],
|
258
259
|
rubyversion: RUBY_VERSION,
|
259
260
|
}
|
260
261
|
|
262
|
+
begin
|
263
|
+
require 'puppet'
|
264
|
+
rescue LoadError
|
265
|
+
warning 'Could not load Puppet'
|
266
|
+
else
|
267
|
+
# from Puppet.initialize_facts
|
268
|
+
@common_facts[:puppetversion] = Puppet.version.to_s
|
269
|
+
# from Puppet::Node::Facts#add_local_facts
|
270
|
+
@common_facts[:implementation] = Puppet.implementation if Puppet.respond_to?(:implementation)
|
271
|
+
end
|
272
|
+
|
261
273
|
@common_facts[:mco_version] = MCollective::VERSION if mcollective?
|
262
274
|
|
263
275
|
if augeas?
|
@@ -416,6 +428,13 @@ module RspecPuppetFacts
|
|
416
428
|
end
|
417
429
|
|
418
430
|
RSpec.configure do |c|
|
419
|
-
|
431
|
+
begin
|
432
|
+
require 'puppet'
|
433
|
+
rescue LoadError
|
434
|
+
puppet_version = nil
|
435
|
+
else
|
436
|
+
puppet_version = Puppet.version
|
437
|
+
end
|
438
|
+
c.add_setting :default_facter_version, default: RspecPuppetFacts.facter_version_for_puppet_version(puppet_version)
|
420
439
|
c.add_setting :facterdb_string_keys, default: false
|
421
440
|
end
|
data/rspec-puppet-facts.gemspec
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
require 'json'
|
3
5
|
require 'stringio'
|
@@ -204,7 +206,7 @@ describe RspecPuppetFacts do
|
|
204
206
|
end
|
205
207
|
|
206
208
|
it 'returns a hash' do
|
207
|
-
|
209
|
+
expect(subject).to be_a Hash
|
208
210
|
end
|
209
211
|
|
210
212
|
it 'returns supported OS' do
|
@@ -276,7 +278,7 @@ describe RspecPuppetFacts do
|
|
276
278
|
end
|
277
279
|
|
278
280
|
it 'returns a hash' do
|
279
|
-
|
281
|
+
expect(subject).to be_a Hash
|
280
282
|
end
|
281
283
|
|
282
284
|
it 'returns supported OS' do
|
@@ -639,7 +641,7 @@ describe RspecPuppetFacts do
|
|
639
641
|
end
|
640
642
|
|
641
643
|
it 'returns facts from the specified default Facter version' do
|
642
|
-
|
644
|
+
expect(subject).to match(
|
643
645
|
'centos-9-x86_64' => include(
|
644
646
|
facterversion: /\A4\.6\./,
|
645
647
|
),
|
@@ -662,7 +664,7 @@ describe RspecPuppetFacts do
|
|
662
664
|
end
|
663
665
|
|
664
666
|
it 'returns facts from a facter version matching version and below' do
|
665
|
-
|
667
|
+
expect(subject).to match(
|
666
668
|
'centos-9-x86_64' => include(
|
667
669
|
facterversion: /\A4\.[0-7]\./,
|
668
670
|
),
|
@@ -691,7 +693,7 @@ describe RspecPuppetFacts do
|
|
691
693
|
end
|
692
694
|
|
693
695
|
it 'returns facts from a facter version matching 4.6' do
|
694
|
-
|
696
|
+
expect(subject).to match('centos-9-x86_64' => include(facterversion: '4.6.1'))
|
695
697
|
end
|
696
698
|
end
|
697
699
|
|
@@ -706,7 +708,7 @@ describe RspecPuppetFacts do
|
|
706
708
|
end
|
707
709
|
|
708
710
|
it 'returns facts from a facter version matching 4.6.1' do
|
709
|
-
|
711
|
+
expect(subject).to match('centos-9-x86_64' => include(facterversion: '4.6.1'))
|
710
712
|
end
|
711
713
|
end
|
712
714
|
|
@@ -747,11 +749,11 @@ describe RspecPuppetFacts do
|
|
747
749
|
end
|
748
750
|
|
749
751
|
it 'returns CentOS facts from a facter version matching 4.5' do
|
750
|
-
|
752
|
+
expect(subject).to include('centos-9-x86_64' => include(facterversion: '4.5.2'))
|
751
753
|
end
|
752
754
|
|
753
755
|
it 'returns Debian facts from a facter version matching 4.6.1' do
|
754
|
-
|
756
|
+
expect(subject).to include('debian-12-x86_64' => include(facterversion: '4.6.1'))
|
755
757
|
end
|
756
758
|
end
|
757
759
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,26 +1,4 @@
|
|
1
|
-
|
2
|
-
require 'simplecov'
|
3
|
-
require 'simplecov-console'
|
4
|
-
require 'codecov'
|
5
|
-
rescue LoadError
|
6
|
-
else
|
7
|
-
SimpleCov.start do
|
8
|
-
track_files 'lib/**/*.rb'
|
9
|
-
|
10
|
-
add_filter '/spec'
|
11
|
-
|
12
|
-
enable_coverage :branch
|
13
|
-
|
14
|
-
# do not track vendored files
|
15
|
-
add_filter '/vendor'
|
16
|
-
add_filter '/.vendor'
|
17
|
-
end
|
18
|
-
|
19
|
-
SimpleCov.formatters = [
|
20
|
-
SimpleCov::Formatter::Console,
|
21
|
-
SimpleCov::Formatter::Codecov,
|
22
|
-
]
|
23
|
-
end
|
1
|
+
# frozen_string_literal: true
|
24
2
|
|
25
3
|
require 'rspec'
|
26
4
|
require 'rspec-puppet-facts'
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-puppet-facts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vox Pupuli
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: mime-types
|
@@ -128,26 +127,6 @@ dependencies:
|
|
128
127
|
- - "~>"
|
129
128
|
- !ruby/object:Gem::Version
|
130
129
|
version: '3.1'
|
131
|
-
- !ruby/object:Gem::Dependency
|
132
|
-
name: puppet
|
133
|
-
requirement: !ruby/object:Gem::Requirement
|
134
|
-
requirements:
|
135
|
-
- - ">="
|
136
|
-
- !ruby/object:Gem::Version
|
137
|
-
version: '7'
|
138
|
-
- - "<"
|
139
|
-
- !ruby/object:Gem::Version
|
140
|
-
version: '9'
|
141
|
-
type: :runtime
|
142
|
-
prerelease: false
|
143
|
-
version_requirements: !ruby/object:Gem::Requirement
|
144
|
-
requirements:
|
145
|
-
- - ">="
|
146
|
-
- !ruby/object:Gem::Version
|
147
|
-
version: '7'
|
148
|
-
- - "<"
|
149
|
-
- !ruby/object:Gem::Version
|
150
|
-
version: '9'
|
151
130
|
description: Contains facts from many Facter version on many Operating Systems
|
152
131
|
email:
|
153
132
|
- voxpupuli@groups.io
|
@@ -156,6 +135,7 @@ extensions: []
|
|
156
135
|
extra_rdoc_files: []
|
157
136
|
files:
|
158
137
|
- ".github/dependabot.yml"
|
138
|
+
- ".github/release.yml"
|
159
139
|
- ".github/workflows/release.yml"
|
160
140
|
- ".github/workflows/test.yml"
|
161
141
|
- ".gitignore"
|
@@ -180,7 +160,6 @@ homepage: http://github.com/voxpupuli/rspec-puppet-facts
|
|
180
160
|
licenses:
|
181
161
|
- Apache-2.0
|
182
162
|
metadata: {}
|
183
|
-
post_install_message:
|
184
163
|
rdoc_options: []
|
185
164
|
require_paths:
|
186
165
|
- lib
|
@@ -195,8 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
174
|
- !ruby/object:Gem::Version
|
196
175
|
version: '0'
|
197
176
|
requirements: []
|
198
|
-
rubygems_version: 3.
|
199
|
-
signing_key:
|
177
|
+
rubygems_version: 3.6.7
|
200
178
|
specification_version: 4
|
201
179
|
summary: Standard facts fixtures for Puppet
|
202
180
|
test_files: []
|