voxpupuli-test 8.1.0 → 9.0.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 +16 -5
  3. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4dd40401d3073603368776f98a93973f4a174469d47197de13fb0f767b37f3a4
4
- data.tar.gz: 8ff8722876be3395a538da16ffdbcdd280275d703e2de43b8583e7e08c533632
3
+ metadata.gz: 2f069b7c77b1b12a06412e4e12c2ecada41007a174301a6af4d96e556018709c
4
+ data.tar.gz: e92c583e9d321d6de5fd99d6ab7d5491b0399a0b8dddeb800c48e6bcc1c9ff29
5
5
  SHA512:
6
- metadata.gz: 7d31264b414af6224887a14b0ff6772daaf9f88899f5e289d5b55133e422f7597bad2d2a10c18d65887d5d16ec5069e585e852ab5e5c0ff876474c06b74ecdd4
7
- data.tar.gz: 8309011ea81518fd8704a6f36afe30278305ca77d3e4d9ce42c42f51a0566b66fd5c39eb1b310029b1ae8e9529d9e4d64f2486414f0881b20a1a85f24d18cd68
6
+ metadata.gz: d9e326670942388f36b61164dc06dd83328d2fd1fe8a1f9d4db084a081e1c341b125658bbbf83d9ac2fc22263917333b6c2aa10bd87c4daa66f09eedae05ae0a
7
+ data.tar.gz: c1557d2bf6d4df55cccbee2d75c647fb1328fb919b3dbf504d514419979c89987eaf351a643920d4b1d84d02b9fbf3b5b691d6c329b81c33d5855646d28a3f22
@@ -53,7 +53,11 @@ def add_facts_for_metadata(metadata)
53
53
  metadata['dependencies'].each do |dependency|
54
54
  case normalize_module_name(dependency['name'])
55
55
  when 'camptocamp/systemd', 'puppet/systemd'
56
- add_custom_fact :systemd, ->(_os, facts) { facts[:service_provider] == 'systemd' }
56
+ if RSpec.configuration.facterdb_string_keys
57
+ add_custom_fact 'systemd', ->(_os, facts) { facts['service_provider'] == 'systemd' }
58
+ else
59
+ add_custom_fact :systemd, ->(_os, facts) { facts[:service_provider] == 'systemd' }
60
+ end
57
61
  when 'puppetlabs/stdlib'
58
62
  add_stdlib_facts
59
63
  end
@@ -67,13 +71,20 @@ def normalize_module_name(name)
67
71
  end
68
72
 
69
73
  def add_stdlib_facts
70
- add_custom_fact :puppet_environmentpath, '/etc/puppetlabs/code/environments'
71
- add_custom_fact :puppet_vardir, '/opt/puppetlabs/puppet/cache'
72
- add_custom_fact :root_home, '/root'
74
+ if RSpec.configuration.facterdb_string_keys
75
+ add_custom_fact 'puppet_environmentpath', '/etc/puppetlabs/code/environments'
76
+ add_custom_fact 'puppet_vardir', '/opt/puppetlabs/puppet/cache'
77
+ add_custom_fact 'root_home', '/root'
78
+ else
79
+ add_custom_fact :puppet_environmentpath, '/etc/puppetlabs/code/environments'
80
+ add_custom_fact :puppet_vardir, '/opt/puppetlabs/puppet/cache'
81
+ add_custom_fact :root_home, '/root'
82
+ end
73
83
 
74
84
  # Rough conversion of grepping in the puppet source:
75
85
  # grep defaultfor lib/puppet/provider/service/*.rb
76
- add_custom_fact :service_provider, lambda { |_os, facts|
86
+ service_provider = RSpec.configuration.facterdb_string_keys ? 'service_provider' : :service_provider
87
+ add_custom_fact service_provider, lambda { |_os, facts|
77
88
  os = RSpec.configuration.facterdb_string_keys ? facts['os'] : facts[:os]
78
89
  case os['family'].downcase
79
90
  when 'archlinux', 'debian', 'redhat'
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: 8.1.0
4
+ version: 9.0.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: 2024-07-05 00:00:00.000000000 Z
11
+ date: 2024-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '2.1'
39
+ version: '3.1'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '2.1'
46
+ version: '3.1'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: metadata-json-lint
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -120,14 +120,14 @@ dependencies:
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: '4.0'
123
+ version: '5.0'
124
124
  type: :runtime
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: '4.0'
130
+ version: '5.0'
131
131
  - !ruby/object:Gem::Dependency
132
132
  name: rspec-puppet-utils
133
133
  requirement: !ruby/object:Gem::Requirement