Skip to content

Commit 09cb9e9

Browse files
authored
Merge pull request #166 from bastelfreak/rel300
Release 3.0.0
2 parents f20625d + c61c713 commit 09cb9e9

File tree

4 files changed

+64
-15
lines changed

4 files changed

+64
-15
lines changed

CHANGELOG.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,63 @@
11
# Changelog
22

3+
## [3.0.0](https://github.com/voxpupuli/rspec-puppet-facts/tree/3.0.0) (2024-03-23)
4+
5+
[Full Changelog](https://github.com/voxpupuli/rspec-puppet-facts/compare/2.0.5...3.0.0)
6+
7+
**symbolized facts deprecation**
8+
9+
With the release of rspec-puppet-facts 4.0.0 we will remove support for symbolized facts. At the moment people typically use this in their unit files:
10+
11+
```ruby
12+
case facts[:os]['name']
13+
when 'Archlinux'
14+
context 'on Archlinux' do
15+
it { is_expected.to contain_package('borg') }
16+
end
17+
when 'Ubuntu'
18+
```
19+
20+
For history reasons the first level of facts were symbols. You will have to update it to strings with the 4.0.0 release:
21+
22+
```ruby
23+
case facts['os']['name']
24+
when 'Archlinux'
25+
context 'on Archlinux' do
26+
it { is_expected.to contain_package('borg') }
27+
end
28+
when 'Ubuntu'
29+
```
30+
31+
32+
**Breaking changes:**
33+
34+
- Use facterdb\_string\_keys configuration option for custom facts [\#157](https://github.com/voxpupuli/rspec-puppet-facts/pull/157) ([jordanbreen28](https://github.com/jordanbreen28))
35+
- Do not query for the exact facter version [\#151](https://github.com/voxpupuli/rspec-puppet-facts/pull/151) ([ekohl](https://github.com/ekohl))
36+
- Drop Ruby 2.4/2.5/2.6 support [\#149](https://github.com/voxpupuli/rspec-puppet-facts/pull/149) ([bastelfreak](https://github.com/bastelfreak))
37+
38+
**Implemented enhancements:**
39+
40+
- Add Ruby 3.3 support [\#169](https://github.com/voxpupuli/rspec-puppet-facts/pull/169) ([bastelfreak](https://github.com/bastelfreak))
41+
- gemspec: Add version constraints & CI: Build gem in strict mode [\#165](https://github.com/voxpupuli/rspec-puppet-facts/pull/165) ([bastelfreak](https://github.com/bastelfreak))
42+
- update puppet agent components [\#164](https://github.com/voxpupuli/rspec-puppet-facts/pull/164) ([bastelfreak](https://github.com/bastelfreak))
43+
- Add merge facts option to add\_custom\_fact [\#160](https://github.com/voxpupuli/rspec-puppet-facts/pull/160) ([jordanbreen28](https://github.com/jordanbreen28))
44+
- Collect facts iteratively [\#152](https://github.com/voxpupuli/rspec-puppet-facts/pull/152) ([ekohl](https://github.com/ekohl))
45+
- Use Hash.to\_h to construct a new hash [\#150](https://github.com/voxpupuli/rspec-puppet-facts/pull/150) ([ekohl](https://github.com/ekohl))
46+
- Add Ruby 3.2 support [\#148](https://github.com/voxpupuli/rspec-puppet-facts/pull/148) ([bastelfreak](https://github.com/bastelfreak))
47+
48+
**Merged pull requests:**
49+
50+
- Update voxpupuli-rubocop requirement from ~\> 2.4.0 to ~\> 2.6.0 [\#168](https://github.com/voxpupuli/rspec-puppet-facts/pull/168) ([dependabot[bot]](https://github.com/apps/dependabot))
51+
- github\_changelog\_generator: Apply best practices [\#163](https://github.com/voxpupuli/rspec-puppet-facts/pull/163) ([bastelfreak](https://github.com/bastelfreak))
52+
- Gemfile: Add faraday as github\_changelog\_generator dep [\#162](https://github.com/voxpupuli/rspec-puppet-facts/pull/162) ([bastelfreak](https://github.com/bastelfreak))
53+
- voxpupuli-rubocop: Pin to patch version [\#161](https://github.com/voxpupuli/rspec-puppet-facts/pull/161) ([bastelfreak](https://github.com/bastelfreak))
54+
- Update voxpupuli-rubocop requirement from ~\> 1.3 to ~\> 2.0 [\#156](https://github.com/voxpupuli/rspec-puppet-facts/pull/156) ([dependabot[bot]](https://github.com/apps/dependabot))
55+
- CI: add dummy job to depend on [\#155](https://github.com/voxpupuli/rspec-puppet-facts/pull/155) ([bastelfreak](https://github.com/bastelfreak))
56+
- migrate to voxpupuli-rubocop [\#154](https://github.com/voxpupuli/rspec-puppet-facts/pull/154) ([bastelfreak](https://github.com/bastelfreak))
57+
- Update rubocop requirement from ~\> 1.48.1 to ~\> 1.54.1 [\#153](https://github.com/voxpupuli/rspec-puppet-facts/pull/153) ([dependabot[bot]](https://github.com/apps/dependabot))
58+
- Introduce RuboCop and fix various cops [\#146](https://github.com/voxpupuli/rspec-puppet-facts/pull/146) ([ekohl](https://github.com/ekohl))
59+
- Update puppet agent components [\#145](https://github.com/voxpupuli/rspec-puppet-facts/pull/145) ([bastelfreak](https://github.com/bastelfreak))
60+
361
## [2.0.5](https://github.com/voxpupuli/rspec-puppet-facts/tree/2.0.5) (2022-04-22)
462

563
[Full Changelog](https://github.com/voxpupuli/rspec-puppet-facts/compare/2.0.4...2.0.5)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ rspec-puppet-facts
1010
[![Donated by Camptocamp](https://img.shields.io/badge/donated%20by-camptocamp-fb7047.svg)](#transfer-notice)
1111

1212
Based on an original idea from [apenney](https://github.com/apenney/puppet_facts/),
13-
this gem provides a method of running your [rspec-puppet](https://github.com/rodjek/rspec-puppet)
13+
this gem provides a method of running your [rspec-puppet](https://github.com/puppetlabs/rspec-puppet)
1414
tests against the facts for all your supported operating systems (provided by
1515
[facterdb](https://github.com/voxpupuli/facterdb)).
1616
This simplifies unit testing because you don't need to specify the facts yourself.
@@ -532,7 +532,7 @@ ENV['FACTERDB_SEARCH_PATHS'] = custom_facts
532532
```
533533
## Running your tests
534534

535-
For most cases, there is no change to how you run your tests. Running `rake spec` will run all the tests against the facts for all the supported operating systems. If you are developing a module using the [Puppet Development Kit](https://puppet.com/docs/pdk/1.x/pdk_install.html), `pdk test unit` will run all your tests against the supported operating systems listed in `metadata.json`.
535+
For most cases, there is no change to how you run your tests. Running `rake spec` will run all the tests against the facts for all the supported operating systems. If you are developing a module using the [Puppet Development Kit](https://puppet.com/docs/pdk/3.x/pdk_install.html), `pdk test unit` will run all your tests against the supported operating systems listed in `metadata.json`.
536536

537537
If you want to run the tests against the facts for specific operating systems, you can provide a filter in the `SPEC_FACTS_OS` environment variable and only the supported operating systems whose name starts with the specified filter will be used.
538538

Rakefile

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ rescue LoadError
5454
else
5555
require 'rubygems'
5656
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
57-
config.exclude_labels = %w{duplicate question invalid wontfix wont-fix skip-changelog}
57+
config.exclude_labels = %w{duplicate question invalid wontfix wont-fix skip-changelog github_actions}
5858
config.user = 'voxpupuli'
5959
config.project = 'rspec-puppet-facts'
6060
gem_version = Gem::Specification.load("#{config.project}.gemspec").version
@@ -63,16 +63,7 @@ else
6363
end
6464

6565
begin
66-
require 'rubocop/rake_task'
66+
require 'voxpupuli/rubocop/rake'
6767
rescue LoadError
68-
# RuboCop is an optional group
69-
else
70-
RuboCop::RakeTask.new(:rubocop) do |task|
71-
# These make the rubocop experience maybe slightly less terrible
72-
task.options = ['--display-cop-names', '--display-style-guide', '--extra-details']
73-
# Use Rubocop's Github Actions formatter if possible
74-
if ENV['GITHUB_ACTIONS'] == 'true'
75-
task.formatters << 'github'
76-
end
77-
end
68+
# the voxpupuli-rubocop gem is optional
7869
end

lib/rspec-puppet-facts/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ module RspecPuppetFacts
22
# This module contains the current version constant
33
module Version
44
# The current version of this gem
5-
STRING = '2.0.5'
5+
STRING = '3.0.0'
66
end
77
end

0 commit comments

Comments
 (0)