puppet_metadata 3.5.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6592e846ac0678664a4f88091a19002df675cbbf06d51159a0a54e9e68573ae7
4
- data.tar.gz: c5975198c75b77e682c8ce263f0b2279f77bbb2df1fb941f5809b909416cf003
3
+ metadata.gz: 5aafd856a39efeb605c0a8569b500301c0c7205716e2fe66f0baba72625b7247
4
+ data.tar.gz: 6808ed021bb4f5dc80fb2bdb8a31de09824c06e4fccb9ca8b697d25144cbdc8f
5
5
  SHA512:
6
- metadata.gz: 46c96e7c74f6f2967b0d7a9c3f0568564e5edcca10f0b57a4652edea19b33d6adad589971cb6141cbab0864eadd58a450554b540fd318bd22717d80e634f6060
7
- data.tar.gz: c7a6da54b846424e3122206c6d6908dd8e4716450c7b79e1529a96df24e376a95c77a04cb73bc40519b5e901da43e08857a061cac0687e83b20da1284ff40565
6
+ metadata.gz: a1b43e47df906018f2712fc079c294ab69fa2e83be38d135ab54dd638345c111d5a60c17493fb4f76649b7da1502d3af992f39b33ed029ce9d47ae6e8ef60918
7
+ data.tar.gz: 16665d3837d3655898fcd475095cec53b69fe84488fa3c2601fd23d0319ce5f996bfed8670dcd47e3974a2b1aaadfdbadc65625c263632312885492e5481f27e
data/README.md CHANGED
@@ -105,6 +105,41 @@ This results in the following JSON data
105
105
 
106
106
  It is also possible to specify a comma separated list of operating systems as used in `metadata.json` (`CentOS,Ubuntu`).
107
107
 
108
+ ## Work with the API
109
+
110
+ The API can be initialised like this:
111
+
112
+ ```ruby
113
+ require 'puppet_metadata'
114
+ metadata = PuppetMetadata.read('/path/to/a/metadata.json')
115
+ ```
116
+
117
+ The metadata object has several different methods that we can call
118
+
119
+ ### List all supported operating systems
120
+
121
+ ```
122
+ [9] pry(main)> metadata.operatingsystems
123
+ => {"Archlinux"=>nil, "Gentoo"=>nil, "Fedora"=>["32", "33"], "CentOS"=>["7", "8"], "RedHat"=>["7", "8"], "Ubuntu"=>["18.04"], "Debian"=>["9", "10"], "VirtuozzoLinux"=>["7"]}
124
+ [10] pry(main)>
125
+ ```
126
+
127
+ ### List supported major puppet versions
128
+
129
+ ```
130
+ [10] pry(main)> metadata.puppet_major_versions
131
+ => [6, 7]
132
+ [11] pry(main)>
133
+ ```
134
+
135
+ ### Check if an operating systems is supported
136
+
137
+ ```
138
+ [6] pry(main)> metadata.os_release_supported?('Archlinux', nil)
139
+ => true
140
+ [7] pry(main)>
141
+ ```
142
+
108
143
  ## Transfer Notice
109
144
 
110
145
  This plugin was originally authored by [Ewoud Kohl van Wijngaarden](https://github.com/ekohl).
@@ -41,6 +41,7 @@ module PuppetMetadata
41
41
  '9' => 5..7,
42
42
  '10' => 5..8,
43
43
  '11' => 6..8,
44
+ '12' => 7..8,
44
45
  },
45
46
  'Ubuntu' => {
46
47
  '14.04' => 5..6,
@@ -19,6 +19,9 @@ module PuppetMetadata
19
19
  # unit files
20
20
  PIDFILE_INCOMPATIBLE = {
21
21
  'CentOS' => ['8'],
22
+ 'AlmaLinux' => ['8'],
23
+ 'OracleLinux' => ['7', '8'],
24
+ 'Rocky' => ['8'],
22
25
  }.freeze
23
26
  class << self
24
27
  # modifies the operating system name to suit beaker-hostgenerator
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet_metadata
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-10-18 00:00:00.000000000 Z
12
+ date: 2024-03-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: metadata-json-lint
@@ -107,14 +107,14 @@ dependencies:
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 2.0.0
110
+ version: 2.5.0
111
111
  type: :development
112
112
  prerelease: false
113
113
  version_requirements: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 2.0.0
117
+ version: 2.5.0
118
118
  - !ruby/object:Gem::Dependency
119
119
  name: yard
120
120
  requirement: !ruby/object:Gem::Requirement