Skip to content

Commit 0b2587d

Browse files
committed
Release 5.0.0
1 parent bc362d9 commit 0b2587d

File tree

2 files changed

+42
-13
lines changed

2 files changed

+42
-13
lines changed

CHANGELOG.md

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## [5.0.0](https://github.com/voxpupuli/rspec-puppet-facts/tree/5.0.0) (2024-06-28)
4+
5+
[Full Changelog](https://github.com/voxpupuli/rspec-puppet-facts/compare/4.0.0...5.0.0)
6+
7+
**Breaking changes:**
8+
9+
- Switch to FacterDB 3 / drop legacy facts [\#187](https://github.com/voxpupuli/rspec-puppet-facts/pull/187) ([bastelfreak](https://github.com/bastelfreak))
10+
11+
**Fixed bugs:**
12+
13+
- handle stringified facterversion properly [\#191](https://github.com/voxpupuli/rspec-puppet-facts/pull/191) ([bastelfreak](https://github.com/bastelfreak))
14+
15+
**Merged pull requests:**
16+
17+
- Update voxpupuli-rubocop requirement from ~\> 2.7.0 to ~\> 2.8.0 [\#192](https://github.com/voxpupuli/rspec-puppet-facts/pull/192) ([dependabot[bot]](https://github.com/apps/dependabot))
18+
319
## [4.0.0](https://github.com/voxpupuli/rspec-puppet-facts/tree/4.0.0) (2024-06-10)
420

521
[Full Changelog](https://github.com/voxpupuli/rspec-puppet-facts/compare/3.0.0...4.0.0)
@@ -27,28 +43,41 @@
2743

2844
**symbolized facts deprecation**
2945

30-
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:
46+
With the release of rspec-puppet-facts 6.0.0 we will remove support for symbolized facts. At the moment people typically use this in their unit files:
3147

3248
```ruby
33-
case facts[:os]['name']
34-
when 'Archlinux'
35-
context 'on Archlinux' do
36-
it { is_expected.to contain_package('borg') }
49+
on_supported_os.each do |os, os_facts|
50+
case os_facts[:os]['name']
51+
when 'Archlinux'
52+
context 'on Archlinux' do
53+
it { is_expected.to contain_package('borg') }
54+
end
55+
when 'Ubuntu'
3756
end
38-
when 'Ubuntu'
57+
end
3958
```
4059

41-
For history reasons the first level of facts were symbols. You will have to update it to strings with the 4.0.0 release:
60+
For history reasons the first level of facts were symbols. You will have to update it to strings with the 6.0.0 release:
4261

4362
```ruby
44-
case facts['os']['name']
45-
when 'Archlinux'
46-
context 'on Archlinux' do
47-
it { is_expected.to contain_package('borg') }
63+
on_supported_os.each do |os, os_facts|
64+
case os_facts['os']['name']
65+
when 'Archlinux'
66+
context 'on Archlinux' do
67+
it { is_expected.to contain_package('borg') }
68+
end
69+
when 'Ubuntu'
4870
end
49-
when 'Ubuntu'
71+
end
5072
```
5173

74+
As an alternative you can configure the old behaviour:
75+
76+
```ruby
77+
RSpec.configure do |c|
78+
c.facterdb_string_keys = false
79+
end
80+
```
5281

5382
**Breaking changes:**
5483

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 = '4.0.0'
5+
STRING = '5.0.0'
66
end
77
end

0 commit comments

Comments
 (0)