voxpupuli-test 5.6.0 → 5.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/voxpupuli/test/facts.rb +6 -5
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d82af1d68ba0cf36c75871954e1551b1f080941e64c5ce19d252db7341c43cf9
4
- data.tar.gz: 785e1da4dfb430c80d01086c0db622ea9c6130dac7b7c614be97524281b34fb0
3
+ metadata.gz: 4ed0fad470e31284805b25d230978285df868d43b2277431f2c99d0e0f4a96bc
4
+ data.tar.gz: 2fdfcbd04079e81d5fa01db6ba99464a02c919b43c6234114e9be1de04f53446
5
5
  SHA512:
6
- metadata.gz: eafc1b509037c65627898594c1d41ad9fc4922e69a27833b28e0c761eff1f2242e29a6dafec7f4c502e482e8da3f1f2d2ac0d8557d7db06d22ab0b6a75ab4cfe
7
- data.tar.gz: 354f8b3d4434216b594e5cda1f48538065cb524a51706205bf8a2b5c36963643cb40d292f5bb84ffa6c809f453091939006f9a320af45b02586c152bb7c8a690
6
+ metadata.gz: 0bd07f289f7dc3697c3de48500c8c265867d55609ebb04c97af2001ccda53cc540a0673fb9a9f1cd42e8461866df6e7c9116efbfab45ae3126bd758cc38b8f1d
7
+ data.tar.gz: 27a3c794f8d0d1d501b5f964dac0d6442d15599bb53a6e8385c488840390e47ba6205e803a7c93e85bfc7bd9b888297ae9a3f1e857a251f69e61d5e580552f80
@@ -51,7 +51,7 @@ def add_facts_for_metadata(metadata)
51
51
  metadata['dependencies'].each do |dependency|
52
52
  case normalize_module_name(dependency['name'])
53
53
  when 'camptocamp/systemd', 'puppet/systemd'
54
- add_custom_fact :systemd, ->(os, facts) { facts['service_provider'] == 'systemd' }
54
+ add_custom_fact :systemd, ->(_os, facts) { facts['service_provider'] == 'systemd' }
55
55
  when 'puppetlabs/stdlib'
56
56
  add_stdlib_facts
57
57
  end
@@ -70,8 +70,9 @@ def add_stdlib_facts
70
70
 
71
71
  # Rough conversion of grepping in the puppet source:
72
72
  # grep defaultfor lib/puppet/provider/service/*.rb
73
- add_custom_fact :service_provider, ->(os, facts) do
74
- case facts[:osfamily].downcase
73
+ add_custom_fact :service_provider, ->(_os, facts) do
74
+ os = RSpec.configuration.facterdb_string_keys ? facts['os'] : facts[:os]
75
+ case os['family'].downcase
75
76
  when 'archlinux'
76
77
  'systemd'
77
78
  when 'darwin'
@@ -85,9 +86,9 @@ def add_stdlib_facts
85
86
  when 'openbsd'
86
87
  'openbsd'
87
88
  when 'redhat'
88
- facts[:operatingsystemmajrelease].to_i >= 7 ? 'systemd' : 'redhat'
89
+ os['release']['major'].to_i >= 7 ? 'systemd' : 'redhat'
89
90
  when 'suse'
90
- facts[:operatingsystemmajrelease].to_i >= 12 ? 'systemd' : 'redhat'
91
+ os['release']['major'].to_i >= 12 ? 'systemd' : 'redhat'
91
92
  when 'windows'
92
93
  'windows'
93
94
  else
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voxpupuli-test
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.6.0
4
+ version: 5.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-01 00:00:00.000000000 Z
11
+ date: 2023-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake