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.
- checksums.yaml +4 -4
- data/lib/voxpupuli/test/facts.rb +6 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ed0fad470e31284805b25d230978285df868d43b2277431f2c99d0e0f4a96bc
|
4
|
+
data.tar.gz: 2fdfcbd04079e81d5fa01db6ba99464a02c919b43c6234114e9be1de04f53446
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bd07f289f7dc3697c3de48500c8c265867d55609ebb04c97af2001ccda53cc540a0673fb9a9f1cd42e8461866df6e7c9116efbfab45ae3126bd758cc38b8f1d
|
7
|
+
data.tar.gz: 27a3c794f8d0d1d501b5f964dac0d6442d15599bb53a6e8385c488840390e47ba6205e803a7c93e85bfc7bd9b888297ae9a3f1e857a251f69e61d5e580552f80
|
data/lib/voxpupuli/test/facts.rb
CHANGED
@@ -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, ->(
|
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, ->(
|
74
|
-
|
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
|
-
|
89
|
+
os['release']['major'].to_i >= 7 ? 'systemd' : 'redhat'
|
89
90
|
when 'suse'
|
90
|
-
|
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.
|
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-
|
11
|
+
date: 2023-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|