puppet_metadata 1.6.0 → 1.7.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: a0aff2535944de382ab5adfa1a57a84fab5baae9e2992368b9eded89224c7a47
4
- data.tar.gz: bb47a9cc7523ddb152d272413b9ea34d4383aa973a9ea20f34f62f77ac2ac78e
3
+ metadata.gz: 84ccd8d78af5d735e6735899b40218eea3a9130a579da935d643c73d334f7b26
4
+ data.tar.gz: 7082daa99f74d07e3260031c52c012a80ab4ca2ddf758b809601fb55038e0783
5
5
  SHA512:
6
- metadata.gz: eda06d30d5d6b81014c029540e3218dfe45dd9accf87baf8dd00bf86eb4f4988eb567191e8081fc1f9add553f5b4a14ef4456e0e9c0d7a06cbbc1d2a5981baa3
7
- data.tar.gz: d9a0d73a76400eff536c5b2bfc86fb1e2d2d447aa46238cf18b9874c11cb11c28a98ecd5a5dca7e1606cf9bcfa9df5d91b566521db16aed09485646872150524
6
+ metadata.gz: 385184c72e2d69f6069e6ae311d5a5c39254a4c8440ceb48ae688b751efd43f1b9f0c367d565e5f77acdeb4c35fac6aa000f40db182b0609e591d795b2cd7d2f
7
+ data.tar.gz: d5547151b04c76cbbf650f0987b02203e31a3b1f274991aedc117247d3889a4b643d069bd3cb96682b2a9a13205295217e28e8fe73981fc7280eadde249de4f0
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![Release](https://github.com/voxpupuli/puppet_metadata/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/puppet_metadata/actions/workflows/release.yml)
7
7
  [![RubyGem Version](https://img.shields.io/gem/v/puppet_metadata.svg)](https://rubygems.org/gems/puppet_metadata)
8
8
  [![RubyGem Downloads](https://img.shields.io/gem/dt/puppet_metadata.svg)](https://rubygems.org/gems/puppet_metadata)
9
- [![Donated by Ewoud Kohl van Wijngaarden](https://img.shields.io/badge/donated%20by-Ewoud%20Kohl%20van%20Wijngaarden-fb7047.svg)](#copyright)
9
+ [![Donated by Ewoud Kohl van Wijngaarden](https://img.shields.io/badge/donated%20by-Ewoud%20Kohl%20van%20Wijngaarden-fb7047.svg)](#transfer-notice)
10
10
 
11
11
  The gem intends to provide an abstraction over Puppet's metadata.json file. Its API allow easy iteration over its illogical data structures.
12
12
 
@@ -6,9 +6,16 @@ module PuppetMetadata
6
6
  #
7
7
  # @see https://endoflife.software/operating-systems
8
8
  class OperatingSystem
9
+ # please add new OSes sorted alphabetically
10
+
9
11
  # The EOL dates for the various operating systems
10
12
  # @see .eol_date
11
13
  EOL_DATES = {
14
+ # https://almalinux.org/ FAQ at the bottom
15
+ 'AlmaLinux' => {
16
+ '9' => nil,
17
+ '8' => '2029-05-31',
18
+ },
12
19
  # https://endoflife.software/operating-systems/linux/centos
13
20
  'CentOS' => {
14
21
  '9' => nil, # EOL Date is not yet announced.
@@ -73,8 +80,8 @@ module PuppetMetadata
73
80
  },
74
81
  # https://endoflife.software/operating-systems/unix-like-bsd/freebsd
75
82
  'FreeBSD' => {
76
- '13' => nil,
77
- '12' => nil,
83
+ '13' => '2026-01-31',
84
+ '12' => '2024-06-30',
78
85
  '11' => '2021-09-30',
79
86
  '10' => '2018-10-31',
80
87
  '9' => '2016-12-31',
@@ -94,6 +101,11 @@ module PuppetMetadata
94
101
  '4' => '2012-02-29',
95
102
  '3' => '2010-10-31',
96
103
  },
104
+ # https://endoflife.date/rocky-linux
105
+ 'Rocky' => {
106
+ '9' => nil,
107
+ '8' => '2029-05-31',
108
+ },
97
109
  # https://endoflife.software/operating-systems/linux/ubuntu
98
110
  'Ubuntu' => {
99
111
  '22.04' => '2027-04-15',
@@ -176,12 +188,13 @@ module PuppetMetadata
176
188
  end
177
189
 
178
190
  # Return an array of all Operating System versions that aren't EoL
179
- # @param String operatingsystem The operating system
191
+ # @param [String] operatingsystem The operating system
180
192
  # @return [Array] All Operating System versions that aren't EoL today
181
193
  def supported_releases(operatingsystem)
182
194
  releases = EOL_DATES[operatingsystem]
183
195
  today = Date.today
184
- releases.compact.select {|release, eol_date| Date.parse(eol_date) > today}.keys.sort
196
+ releases.select { |release, eol_date| !eol_date || Date.parse(eol_date) > today }.keys.
197
+ sort_by { |release| Gem::Version.new(release) }
185
198
  end
186
199
  end
187
200
  end
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: 1.6.0
4
+ version: 1.7.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: 2022-06-22 00:00:00.000000000 Z
12
+ date: 2022-06-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: metadata-json-lint