puppet_metadata 3.4.0 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 556224029dca3954a88bc2965c547e73976f2dfcff434ec8c4404b116c73ac8b
4
- data.tar.gz: 6f6101c35a3d4bad3a4f575dac4de02788dd454bec93a2a7a6d3328d8f576402
3
+ metadata.gz: 6592e846ac0678664a4f88091a19002df675cbbf06d51159a0a54e9e68573ae7
4
+ data.tar.gz: c5975198c75b77e682c8ce263f0b2279f77bbb2df1fb941f5809b909416cf003
5
5
  SHA512:
6
- metadata.gz: c54f5c54e35607a332ed08006c387511b089066f2b9f330a1feb89ee691cb1b4aa062f7246eb5f025a3125a7ce36122ac8fbe7f1c394e757bb2d736957dda558
7
- data.tar.gz: 9b114a9fb73bfe479a0ea425565c3b2bf98228a756a281caadb6ea262fffd1e746dfe706cac85cd6f06e4191812aa4e98e1b975209113495cb8fff146d7d47b6
6
+ metadata.gz: 46c96e7c74f6f2967b0d7a9c3f0568564e5edcca10f0b57a4652edea19b33d6adad589971cb6141cbab0864eadd58a450554b540fd318bd22717d80e634f6060
7
+ data.tar.gz: c7a6da54b846424e3122206c6d6908dd8e4716450c7b79e1529a96df24e376a95c77a04cb73bc40519b5e901da43e08857a061cac0687e83b20da1284ff40565
@@ -63,8 +63,10 @@ module PuppetMetadata
63
63
  else
64
64
  releases&.each do |release|
65
65
  majors.each do |puppet_version|
66
- if AIO.has_aio_build?(os, release, puppet_version[:value]) # rubocop:disable Style/IfUnlessModifier
66
+ if AIO.has_aio_build?(os, release, puppet_version[:value])
67
67
  yield [os, release, puppet_version]
68
+ elsif PuppetMetadata::OperatingSystem.os_release_puppet_version(os, release) == puppet_version[:value]
69
+ yield [os, release, distro_puppet_version.merge(value: puppet_version[:value])]
68
70
  end
69
71
  end
70
72
  end
@@ -32,6 +32,7 @@ module PuppetMetadata
32
32
  # https://wiki.debian.org/DebianReleases
33
33
  'Debian' => {
34
34
  # TODO: EOL is standard support, not the extended life cycle
35
+ '12' => nil, # '~2026',
35
36
  '11' => nil, # '~2024',
36
37
  '10' => nil, # '~2022',
37
38
  '9' => '2020-07-06',
@@ -206,6 +207,33 @@ module PuppetMetadata
206
207
  releases.select { |_release, eol_date| !eol_date || Date.parse(eol_date) > today }.keys
207
208
  .sort_by { |release| Gem::Version.new(release) }
208
209
  end
210
+
211
+ # Return the Puppet major version in an OS release, if any
212
+ #
213
+ # Only tracks releases without an AIO build, since that's preferred.
214
+ #
215
+ # @param [String] operatingsystem
216
+ # The operating system name
217
+ # @param [String] release
218
+ # The operating system release version
219
+ #
220
+ # @return [Optional[Integer]] The Puppet major version, if any
221
+ def os_release_puppet_version(operatingsystem, release)
222
+ case operatingsystem
223
+ when 'Debian'
224
+ case release
225
+ when '12'
226
+ 7
227
+ end
228
+ when 'Fedora'
229
+ case release
230
+ when '39', '40'
231
+ 8
232
+ when '37', '38'
233
+ 7
234
+ end
235
+ end
236
+ end
209
237
  end
210
238
  end
211
239
  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: 3.4.0
4
+ version: 3.5.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-11 00:00:00.000000000 Z
12
+ date: 2023-10-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: metadata-json-lint