kettle-rb 0.1.15 → 0.1.18

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: b57905e32340c298fef7280e1fba041bac38628d9604bcb2bdf4b858b8eaa313
4
- data.tar.gz: b8aa65cac62944dd44a6f22269542b7fc76dcc4fc0b4c32e72a0e3c688a5aae7
3
+ metadata.gz: 638c9c41bd338ec9c02c5b28242455a9363ffc074c9eea27d56b80f52bd3ef45
4
+ data.tar.gz: dc85a325a0656c0758f2b28c43f6ffc6d08f617a3158d3d19893f8ef9734645d
5
5
  SHA512:
6
- metadata.gz: 90c2705cd8506cb11f9f57438c670506719b69fef651bfa045ca6cc38f768b1cfe3292692e2926be064fa84351480fa7e8f47eb79aa0be577e469096bd110405
7
- data.tar.gz: 13a00bb473a8142fd90d1704c648ae994a33cae9b39e5eb46faeb2db620c906de1da30f18054ae5ac4204b2a6562ae305f8cfe61e144e4c0f5eafeedb132e169
6
+ metadata.gz: ff3a5080c2909dd76134ca64888d976b6de43c7266df8b98b90035adb587a72bd4029fb28c19d6c051ce97e515784e08bc458374b166f67d292bcf3a6eaf6bae
7
+ data.tar.gz: d48a0590cd5c61339ff4f99a7b973f1dab67338b2b88dc8512c2d2b002a77f4c4a780487091c8a2f885bb36df7ca4428c69ccf444eb1bd9f86ba6adf9870f4e0
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,44 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [0.1.18] - 2026-10-15
34
+
35
+ - TAG: [v0.1.18][0.1.18t]
36
+ - COVERAGE: 100.00% -- 362/362 lines in 10 files
37
+ - BRANCH COVERAGE: 97.62% -- 41/42 branches in 10 files
38
+ - 61.90% documented
39
+
40
+ ### Changed
41
+
42
+ - [kc] kettle-jem/prepare: updated 19 project files:
43
+ - configuration (1)
44
+ - dependencies (18)
45
+
46
+ - [kc] kettle-jem/template: updated 33 project files:
47
+ - code and tests (2)
48
+ - documentation (1)
49
+ - other (1)
50
+ - workflows (29)
51
+
52
+ ## [0.1.17] - 2026-10-10
53
+
54
+ - TAG: [v0.1.17][0.1.17t]
55
+ - COVERAGE: 100.00% -- 362/362 lines in 10 files
56
+ - BRANCH COVERAGE: 97.62% -- 41/42 branches in 10 files
57
+ - 61.90% documented
58
+
59
+ ### Changed
60
+
61
+ - [kc] kettle-jem/prepare: updated 19 project files:
62
+ - dependencies (19)
63
+
64
+ - [kc] kettle-jem/template: updated 8 project files:
65
+ - code and tests (2)
66
+ - dependencies (1)
67
+ - documentation (1)
68
+ - other (2)
69
+ - workflows (2)
70
+
33
71
  ## [0.1.15] - 2026-09-26
34
72
 
35
73
  - TAG: [v0.1.15][0.1.15t]
@@ -344,7 +382,11 @@ Please file a bug if you notice a violation of semantic versioning.
344
382
  - Add `Kettle::Rb::CompatMatrix` as the shared Ruby, engine, Rails, RuboCop,
345
383
  and RuboCop LTS compatibility source of truth for kettle-dev tooling.
346
384
 
347
- [Unreleased]: https://github.com/kettle-dev/kettle-rb/compare/v0.1.15...HEAD
385
+ [Unreleased]: https://github.com/kettle-dev/kettle-rb/compare/v0.1.18...HEAD
386
+ [0.1.18]: https://github.com/kettle-dev/kettle-rb/compare/v0.1.17...v0.1.18
387
+ [0.1.18t]: https://github.com/kettle-dev/kettle-rb/releases/tag/v0.1.18
388
+ [0.1.17]: https://github.com/kettle-dev/kettle-rb/compare/v0.1.15...v0.1.17
389
+ [0.1.17t]: https://github.com/kettle-dev/kettle-rb/releases/tag/v0.1.17
348
390
  [0.1.15]: https://github.com/kettle-dev/kettle-rb/compare/v0.1.14...v0.1.15
349
391
  [0.1.15t]: https://github.com/kettle-dev/kettle-rb/releases/tag/v0.1.15
350
392
  [0.1.14]: https://github.com/kettle-dev/kettle-rb/compare/v0.1.13...v0.1.14
data/README.md CHANGED
@@ -21,7 +21,7 @@ I've summarized my thoughts in [this blog post](https://dev.to/galtzo/hostile-ta
21
21
 
22
22
  ## 🌻 Synopsis <a href="https://discord.gg/3qme4XHNKN"><img alt="Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0" src="https://logos.galtzo.com/assets/images/galtzo-floss/avatar-128px.svg" width="8%" align="right"/></a> <a href="https://ruby-toolbox.com"><img alt="ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5" src="https://logos.galtzo.com/assets/images/ruby-lang/avatar-128px.svg" width="8%" align="right"/></a>
23
23
 
24
- `kettle-dev` is the small shared Ruby library for the kettle-dev toolchain.
24
+ `kettle-rb` is the small shared Ruby library for the kettle-dev toolchain.
25
25
 
26
26
  Its first public responsibility is `Kettle::Rb::CompatMatrix`: a single source
27
27
  of truth for Ruby engine compatibility data used by `kettle-jem`,
@@ -29,19 +29,34 @@ of truth for Ruby engine compatibility data used by `kettle-jem`,
29
29
  JRuby, and TruffleRuby versions, workflow Ruby buckets, RubyGems/Bundler
30
30
  policy, Rails appraisal hints, and RuboCop LTS selection data.
31
31
 
32
+ Its second public responsibility is `Kettle::Rb::PlatformSupport`: the
33
+ evidenced source of truth for OS-platform support claims. It names CI OS
34
+ families (`linux`, `macos`, `windows` — a fourth platform vocabulary, distinct
35
+ from Gemfile DSL platform symbols, `Gem::Platform` strings, and GitHub runner
36
+ labels), maps each family to a runner label, and records per-engine OS
37
+ support where every claim carries a citation. Data is regenerated from the
38
+ GitHub releases API and `ruby/setup-ruby` with
39
+ `rake kettle:rb:platform_support:generate`; unknown engine/OS pairs resolve
40
+ as unsupported so a missing claim can never invent CI coverage. These values
41
+ select runner labels only — they must never be passed to
42
+ `bundle lock --add-platform` or a Gemfile `platforms:` DSL without
43
+ translation.
44
+
32
45
  Use it when tooling needs to answer questions like:
33
46
 
34
47
  - Which Ruby workflow should represent this engine?
35
48
  - Which RuboCop LTS family matches a minimum supported Ruby?
36
49
  - Which `rubocop-rubyN_N` gem and rubocop-lts branch belong together?
37
50
  - Which Rails appraisal version is the newest stable target for a Ruby bucket?
51
+ - Which GitHub runner label does a CI OS family select, and which engines
52
+ are supported on that OS?
38
53
 
39
54
  ## 💡 Info you can shake a stick at
40
55
 
41
56
  | Tokens to Remember | [![Gem name][⛳️name-img]][⛳️gem-name] [![Gem namespace][⛳️namespace-img]][⛳️gem-namespace] |
42
57
  |-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
43
58
  | Works with JRuby | [![JRuby 9.2 Compat][💎jruby-9.2i]][🚎jruby-9.2-wf] [![JRuby 9.3 Compat][💎jruby-9.3i]][🚎jruby-9.3-wf] <br/> [![JRuby 9.4 Compat][💎jruby-9.4i]][🚎jruby-9.4-wf] [![JRuby 10.0 Compat][💎jruby-10.0i]][🚎jruby-10.0-wf] [![JRuby current Compat][💎jruby-c-i]][🚎10-j-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf]|
44
- | Works with Truffle Ruby | [![Truffle Ruby 22.3 Compat][💎truby-22.3i]][🚎truby-22.3-wf] [![Truffle Ruby 23.0 Compat][💎truby-23.0i]][🚎truby-23.0-wf] [![Truffle Ruby 23.1 Compat][💎truby-23.1i]][🚎truby-23.1-wf] <br/> [![Truffle Ruby 24.2 Compat][💎truby-24.2i]][🚎truby-24.2-wf] [![Truffle Ruby 25.0 Compat][💎truby-25.0i]][🚎truby-25.0-wf] [![Truffle Ruby 33.0 Compat][💎truby-33.0i]][🚎truby-33.0-wf] [![Truffle Ruby current Compat][💎truby-c-i]][🚎9-t-wf] [![Truffle Ruby HEAD Compat][💎truby-headi]][🚎3-hd-wf]|
59
+ | Works with Truffle Ruby | [![Truffle Ruby 22.3 Compat][💎truby-22.3i]][🚎truby-22.3-wf] [![Truffle Ruby 23.1 Compat][💎truby-23.1i]][🚎truby-23.1-wf] <br/> [![Truffle Ruby 24.2 Compat][💎truby-24.2i]][🚎truby-24.2-wf] [![Truffle Ruby 25.0 Compat][💎truby-25.0i]][🚎truby-25.0-wf] [![Truffle Ruby 33.0 Compat][💎truby-33.0i]][🚎truby-33.0-wf] [![Truffle Ruby current Compat][💎truby-c-i]][🚎9-t-wf]|
45
60
  | Works with MRI Ruby 4 | [![Ruby current Compat][💎ruby-c-i]][🚎11-c-wf] [![Ruby HEAD Compat][💎ruby-headi]][🚎3-hd-wf]|
46
61
  | Works with MRI Ruby 3 | [![Ruby 3.0 Compat][💎ruby-3.0i]][🚎ruby-3.0-wf] [![Ruby 3.1 Compat][💎ruby-3.1i]][🚎ruby-3.1-wf] [![Ruby 3.2 Compat][💎ruby-3.2i]][🚎ruby-3.2-wf] [![Ruby 3.3 Compat][💎ruby-3.3i]][🚎ruby-3.3-wf] [![Ruby 3.4 Compat][💎ruby-3.4i]][🚎ruby-3.4-wf]|
47
62
  | Works with MRI Ruby 2 | ![Ruby 2.0 Compat][💎ruby-2.0i] ![Ruby 2.1 Compat][💎ruby-2.1i] ![Ruby 2.2 Compat][💎ruby-2.2i] ![Ruby 2.3 Compat][💎ruby-2.3i] <br/> [![Ruby 2.4 Compat][💎ruby-2.4i]][🚎ruby-2.4-wf] [![Ruby 2.5 Compat][💎ruby-2.5i]][🚎ruby-2.5-wf] [![Ruby 2.6 Compat][💎ruby-2.6i]][🚎ruby-2.6-wf] [![Ruby 2.7 Compat][💎ruby-2.7i]][🚎ruby-2.7-wf]|
@@ -82,6 +97,23 @@ The _amazing_ test matrix is powered by the kettle-dev stack.
82
97
 
83
98
  </details>
84
99
 
100
+ ### Runtime and Platform Support
101
+
102
+ Support tiers describe what this project's CI actually exercises, not what may
103
+ work in an untested environment:
104
+
105
+ - **Parallel support**: CI runs the test suite with multiple workers available.
106
+ - **Unsupported**: the engine/platform combination is not covered by CI and is
107
+ not a project compatibility claim.
108
+
109
+ | Ruby engine/version | Linux | macOS | Windows | Notes |
110
+ |---------------------|-------|-------|---------|-------|
111
+ | MRI 3.1-3.4 | Parallel support | Unsupported | Unsupported | Versioned Ruby workflows run on Linux. |
112
+ | MRI current | Parallel support | Parallel support | Unsupported | Current Ruby workflow covers the declared OS platforms. |
113
+ | MRI head | Parallel support | Unsupported | Unsupported | CI is allowed to fail while Ruby is in development. |
114
+ | JRuby (all CI lanes) | Parallel support | Unsupported | Unsupported | Engine workflows run on Linux; macOS and Windows are not exercised by CI. |
115
+ | TruffleRuby (all CI lanes) | Parallel support | Unsupported | Unsupported | Never shipped a Windows build (zero Windows assets across 66 releases scanned 2026-10-10); setup-ruby hard-fails ([source](https://github.com/ruby/setup-ruby/blob/master/README.md)) |
116
+
85
117
  ### Federated DVCS
86
118
 
87
119
  <details markdown="1">
@@ -190,6 +222,52 @@ Kettle::Rb::CompatMatrix.rubocop_lts_branch_for_gem("rubocop-ruby3_2")
190
222
  # => "r3_2-even-v24"
191
223
  ```
192
224
 
225
+ Map a CI OS family to its GitHub runner label:
226
+
227
+ ```ruby
228
+ Kettle::Rb::PlatformSupport.os_family?("macos")
229
+ # => true
230
+
231
+ Kettle::Rb::PlatformSupport.os_family?("x86_64-linux")
232
+ # => false -- that is a Gem::Platform string, not a CI OS family
233
+
234
+ Kettle::Rb::PlatformSupport.runner_label("windows")
235
+ # => "windows-latest"
236
+
237
+ Kettle::Rb::PlatformSupport.runner_label("plan9")
238
+ # => nil
239
+ ```
240
+
241
+ Check engine support per OS family (fail-closed: unknown pairs are
242
+ unsupported, never assumed covered):
243
+
244
+ ```ruby
245
+ Kettle::Rb::PlatformSupport.engine_supports_os?("truffleruby", "windows")
246
+ # => false -- no Windows build has ever shipped (66 releases scanned)
247
+
248
+ Kettle::Rb::PlatformSupport.engine_supports_os?("jruby", "linux")
249
+ # => true
250
+
251
+ Kettle::Rb::PlatformSupport.supported_os_families("jruby")
252
+ # => ["linux", "macos", "windows"]
253
+
254
+ Kettle::Rb::PlatformSupport.supported_engines("linux")
255
+ # => ["ruby", "jruby", "truffleruby"]
256
+
257
+ entry = Kettle::Rb::PlatformSupport.engine_os_entry("truffleruby", "macos")
258
+ entry.support # => "supported"
259
+ entry.note # => "darwin-aarch64 since 22.2.0; macOS Intel removed in 34.0, ..."
260
+ entry.citation # => "https://github.com/truffleruby/truffleruby/releases/tag/graal-34.0.0"
261
+ ```
262
+
263
+ Every entry carries its evidence. Regenerate the data table from live
264
+ sources (GitHub releases API, `ruby/setup-ruby`) when a platform claim
265
+ changes:
266
+
267
+ ```console
268
+ bundle exec rake kettle:rb:platform_support:generate
269
+ ```
270
+
193
271
  ## 🦷 FLOSS Funding
194
272
 
195
273
  While kettle-dev tools are free software and will always be, the project would benefit immensely from some funding.
@@ -469,7 +547,6 @@ Thanks for RTFM. ☺️
469
547
  [🚎jruby-9.4-wf]: https://github.com/kettle-dev/kettle-rb/actions/workflows/jruby-9.4.yml
470
548
  [🚎jruby-10.0-wf]: https://github.com/kettle-dev/kettle-rb/actions/workflows/jruby-10.0.yml
471
549
  [🚎truby-22.3-wf]: https://github.com/kettle-dev/kettle-rb/actions/workflows/truffleruby-22.3.yml
472
- [🚎truby-23.0-wf]: https://github.com/kettle-dev/kettle-rb/actions/workflows/truffleruby-23.0.yml
473
550
  [🚎truby-23.1-wf]: https://github.com/kettle-dev/kettle-rb/actions/workflows/truffleruby-23.1.yml
474
551
  [🚎truby-24.2-wf]: https://github.com/kettle-dev/kettle-rb/actions/workflows/truffleruby-24.2.yml
475
552
  [🚎truby-25.0-wf]: https://github.com/kettle-dev/kettle-rb/actions/workflows/truffleruby-25.0.yml
@@ -512,13 +589,11 @@ Thanks for RTFM. ☺️
512
589
  [💎ruby-c-i]: https://img.shields.io/badge/Ruby-current-CC342D?style=for-the-badge&logo=ruby&logoColor=green
513
590
  [💎ruby-headi]: https://img.shields.io/badge/Ruby-HEAD-CC342D?style=for-the-badge&logo=ruby&logoColor=blue
514
591
  [💎truby-22.3i]: https://img.shields.io/badge/Truffle_Ruby-22.3-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
515
- [💎truby-23.0i]: https://img.shields.io/badge/Truffle_Ruby-23.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
516
592
  [💎truby-23.1i]: https://img.shields.io/badge/Truffle_Ruby-23.1-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
517
593
  [💎truby-24.2i]: https://img.shields.io/badge/Truffle_Ruby-24.2-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
518
594
  [💎truby-25.0i]: https://img.shields.io/badge/Truffle_Ruby-25.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
519
595
  [💎truby-33.0i]: https://img.shields.io/badge/Truffle_Ruby-33.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
520
596
  [💎truby-c-i]: https://img.shields.io/badge/Truffle_Ruby-current-34BCB1?style=for-the-badge&logo=ruby&logoColor=green
521
- [💎truby-headi]: https://img.shields.io/badge/Truffle_Ruby-HEAD-34BCB1?style=for-the-badge&logo=ruby&logoColor=blue
522
597
  [💎jruby-9.2i]: https://img.shields.io/badge/JRuby-9.2-FBE742?style=for-the-badge&logo=ruby&logoColor=red
523
598
  [💎jruby-9.3i]: https://img.shields.io/badge/JRuby-9.3-FBE742?style=for-the-badge&logo=ruby&logoColor=red
524
599
  [💎jruby-9.4i]: https://img.shields.io/badge/JRuby-9.4-FBE742?style=for-the-badge&logo=ruby&logoColor=red
@@ -551,7 +626,7 @@ Thanks for RTFM. ☺️
551
626
  [📌gitmoji]: https://gitmoji.dev
552
627
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
553
628
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
554
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.233-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
629
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.362-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
555
630
  [🔐security]: https://github.com/kettle-dev/kettle-rb/blob/main/SECURITY.md
556
631
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
557
632
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated by `rake kettle:rb:platform_support:generate`; do not edit by hand.
4
+ # Sources: GitHub releases API (TruffleRuby), ruby/setup-ruby windows-versions.json,
5
+ # and the documentation citation carried on each row.
6
+
7
+ module Kettle
8
+ module Rb
9
+ module PlatformSupport
10
+ GENERATED_ON = "2026-10-10"
11
+ TRUFFLERUBY_RELEASES_SCANNED = 66
12
+ RUBYINSTALLER_SERIES = ["2.0", "2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4", "4.0"].freeze
13
+ RUBYINSTALLER_ARM64_SERIES = ["3.4", "4.0"].freeze
14
+ OS_FAMILIES = ["linux", "macos", "windows"].freeze
15
+ RUNNER_ROWS = [
16
+ ["linux", "ubuntu-latest", "x86_64", "ARM64 lanes available via ubuntu-22.04-arm / ubuntu-24.04-arm / ubuntu-26.04-arm, free for public repos", "https://github.blog/changelog/2025-08-07-arm64-hosted-runners-for-public-repositories-are-now-generally-available/"],
17
+ ["macos", "macos-latest", "arm64", "Floating label; became ARM64 during the Apr-May 2024 macOS 14 migration and resolves to macOS 26 ARM64 since 2026-07-15", "https://github.com/actions/runner-images/issues/14167"],
18
+ ["windows", "windows-latest", "x64", "x64 only (Server 2025); ARM64 Windows requires the explicit windows-11-arm label", "https://github.blog/changelog/2025-08-07-arm64-hosted-runners-for-public-repositories-are-now-generally-available/"]
19
+ ].freeze
20
+ ENGINE_OS_ROWS = [
21
+ ["ruby", "linux", "supported", "All versioned MRI workflows run on Linux; aarch64-linux prebuilts ship in the ruby-builder toolcache from 2.3.5", "https://github.com/ruby/ruby-builder/releases/tag/toolcache"],
22
+ ["ruby", "macos", "supported", "macos-latest is ARM64; community prebuilts from 2.6.7 and native arm64-darwin configure.ac support from 2.7.2", "https://github.com/ruby/ruby/commit/23655e6de5ee989feb8c65c7061fe9a71579dc54"],
23
+ ["ruby", "windows", "supported", "RubyInstaller x64 since 2.0.0; ARM64 builds recorded in RUBYINSTALLER_ARM64_SERIES (from 3.4); supported series in RUBYINSTALLER_SERIES", "https://github.com/ruby/setup-ruby/blob/master/windows-versions.json"],
24
+ ["jruby", "linux", "supported", "Official, including aarch64-Linux jffi from 9.1", "https://www.jruby.org/2021-09-22/jruby-9-3-0-0.html"],
25
+ ["jruby", "macos", "supported", "Official from 9.3; arm64 jffi slice binary-verified from 9.2.18.0; requires an aarch64 JDK (Temurin 11+ or Zulu 8)", "https://github.com/jruby/jruby/releases/tag/9.2.18.0"],
26
+ ["jruby", "windows", "supported", "Official; CRuby C extensions cannot be built or used, so gems must be pure-Ruby or ship Java extensions", "https://www.jruby.org/2021-09-22/jruby-9-3-0-0.html"],
27
+ ["truffleruby", "linux", "supported", "Official; linux-aarch64 since 21.2", "https://github.com/truffleruby/truffleruby/releases"],
28
+ ["truffleruby", "macos", "supported", "darwin-aarch64 since 22.2.0; macOS Intel removed in 34.0, so macos-*-intel lanes must exclude TruffleRuby 34+", "https://github.com/truffleruby/truffleruby/releases/tag/graal-34.0.0"],
29
+ ["truffleruby", "windows", "unsupported", "Never shipped a Windows build (zero Windows assets across 66 releases scanned 2026-10-10); setup-ruby hard-fails", "https://github.com/ruby/setup-ruby/blob/master/README.md"]
30
+ ].freeze
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,244 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rubygems"
4
+
5
+ module Kettle
6
+ module Rb
7
+ module PlatformSupport
8
+ # Regenerates +lib/kettle/rb/platform_support/data.rb+ from the GitHub
9
+ # releases API (TruffleRuby) and ruby/setup-ruby's windows-versions.json.
10
+ #
11
+ # This is development tooling. It is loaded by the
12
+ # +kettle:rb:platform_support:generate+ rake task, never by
13
+ # +require "kettle/rb"+.
14
+ #
15
+ # Two claims are re-derived from the network on every run, because they
16
+ # are the ones generation depends on and they can change:
17
+ #
18
+ # - TruffleRuby Windows support: derived by scanning every TruffleRuby
19
+ # release for Windows assets. Zero assets means "unsupported", and a
20
+ # future TruffleRuby Windows build flips the row on regeneration.
21
+ # - The RubyInstaller series available on Windows, recorded as
22
+ # +RUBYINSTALLER_SERIES+ provenance for the ruby/windows claim.
23
+ #
24
+ # Every other claim is documentation-sourced and curated below with its
25
+ # citation, so an unevidenced claim cannot be expressed in the data file.
26
+ class Generator
27
+ TRUFFLERUBY_RELEASES_URL = "https://api.github.com/repos/truffleruby/truffleruby/releases?per_page=100"
28
+ WINDOWS_VERSIONS_URL = "https://raw.githubusercontent.com/ruby/setup-ruby/master/windows-versions.json"
29
+ USER_AGENT = "kettle-rb platform-support generator"
30
+ DATA_PATH = File.expand_path(File.join(File.dirname(__FILE__), "data.rb"))
31
+
32
+ # TruffleRuby assets are named e.g. +truffleruby-24.2.0-linux-amd64.tar.gz+;
33
+ # a Windows build would carry one of these tokens.
34
+ WINDOWS_ASSET_PATTERN = /windows|mingw|mswin|\.exe\z|\.msi\z/i.freeze
35
+
36
+ TRUFFLERUBY_WINDOWS_CITATION = "https://github.com/ruby/setup-ruby/blob/master/README.md"
37
+
38
+ # CI OS families: a fourth platform vocabulary, distinct from Gemfile DSL
39
+ # platform symbols (Ruby implementations), Gem::Platform strings
40
+ # (OS/architecture), and GitHub runner labels (CI hardware). These values
41
+ # select runner labels; they must never reach +bundle lock --add-platform+
42
+ # or a Gemfile +platforms:+ DSL untranslated.
43
+ OS_FAMILIES = ["linux", "macos", "windows"].freeze
44
+
45
+ # Documentation-sourced runner claims:
46
+ # [os_family, runner_label, architecture, note, citation]
47
+ RUNNER_ROWS = [
48
+ ["linux", "ubuntu-latest", "x86_64",
49
+ "ARM64 lanes available via ubuntu-22.04-arm / ubuntu-24.04-arm / ubuntu-26.04-arm, free for public repos",
50
+ "https://github.blog/changelog/2025-08-07-arm64-hosted-runners-for-public-repositories-are-now-generally-available/"],
51
+ ["macos", "macos-latest", "arm64",
52
+ "Floating label; became ARM64 during the Apr-May 2024 macOS 14 migration and resolves to macOS 26 ARM64 since 2026-07-15",
53
+ "https://github.com/actions/runner-images/issues/14167"],
54
+ ["windows", "windows-latest", "x64",
55
+ "x64 only (Server 2025); ARM64 Windows requires the explicit windows-11-arm label",
56
+ "https://github.blog/changelog/2025-08-07-arm64-hosted-runners-for-public-repositories-are-now-generally-available/"]
57
+ ].freeze
58
+
59
+ # Documentation-sourced engine support claims:
60
+ # [engine, os_family, support, note, citation]
61
+ # The truffleruby/windows row is deliberately absent: it is derived from
62
+ # the releases scan, not curated.
63
+ ENGINE_OS_ROWS = [
64
+ ["ruby", "linux", "supported",
65
+ "All versioned MRI workflows run on Linux; aarch64-linux prebuilts ship in the ruby-builder toolcache from 2.3.5",
66
+ "https://github.com/ruby/ruby-builder/releases/tag/toolcache"],
67
+ ["ruby", "macos", "supported",
68
+ "macos-latest is ARM64; community prebuilts from 2.6.7 and native arm64-darwin configure.ac support from 2.7.2",
69
+ "https://github.com/ruby/ruby/commit/23655e6de5ee989feb8c65c7061fe9a71579dc54"],
70
+ ["ruby", "windows", "supported",
71
+ "RubyInstaller x64 since 2.0.0; ARM64 builds recorded in RUBYINSTALLER_ARM64_SERIES (from 3.4); supported series in RUBYINSTALLER_SERIES",
72
+ "https://github.com/ruby/setup-ruby/blob/master/windows-versions.json"],
73
+ ["jruby", "linux", "supported",
74
+ "Official, including aarch64-Linux jffi from 9.1",
75
+ "https://www.jruby.org/2021-09-22/jruby-9-3-0-0.html"],
76
+ ["jruby", "macos", "supported",
77
+ "Official from 9.3; arm64 jffi slice binary-verified from 9.2.18.0; requires an aarch64 JDK (Temurin 11+ or Zulu 8)",
78
+ "https://github.com/jruby/jruby/releases/tag/9.2.18.0"],
79
+ ["jruby", "windows", "supported",
80
+ "Official; CRuby C extensions cannot be built or used, so gems must be pure-Ruby or ship Java extensions",
81
+ "https://www.jruby.org/2021-09-22/jruby-9-3-0-0.html"],
82
+ ["truffleruby", "linux", "supported",
83
+ "Official; linux-aarch64 since 21.2",
84
+ "https://github.com/truffleruby/truffleruby/releases"],
85
+ ["truffleruby", "macos", "supported",
86
+ "darwin-aarch64 since 22.2.0; macOS Intel removed in 34.0, so macos-*-intel lanes must exclude TruffleRuby 34+",
87
+ "https://github.com/truffleruby/truffleruby/releases/tag/graal-34.0.0"]
88
+ ].freeze
89
+
90
+ # @return [String] generation date recorded in the data file
91
+ attr_reader :generated_on
92
+
93
+ # @param options [Hash]
94
+ # @option options [#call] :truffleruby_releases_fetcher returns GitHub release hashes
95
+ # @option options [#call] :windows_versions_fetcher returns the parsed windows-versions.json
96
+ # @option options [String] :generated_on date to record
97
+ def initialize(options = {})
98
+ @truffleruby_releases_fetcher = options[:truffleruby_releases_fetcher] || method(:fetch_truffleruby_releases)
99
+ @windows_versions_fetcher = options[:windows_versions_fetcher] || method(:fetch_windows_versions)
100
+ @generated_on = options[:generated_on] || Time.now.utc.strftime("%Y-%m-%d")
101
+ end
102
+
103
+ # @return [Integer] TruffleRuby releases examined for Windows assets
104
+ def truffleruby_releases_scanned
105
+ truffleruby_releases.length
106
+ end
107
+
108
+ # @return [Integer] Windows assets found across all TruffleRuby releases
109
+ def truffleruby_windows_asset_count
110
+ truffleruby_releases.inject(0) do |count, release|
111
+ count + windows_asset_names(release).length
112
+ end
113
+ end
114
+
115
+ # @return [String] "supported" or "unsupported", derived from the scan
116
+ def truffleruby_windows_support
117
+ truffleruby_windows_asset_count.zero? ? "unsupported" : "supported"
118
+ end
119
+
120
+ # @return [Array<String>] minor series setup-ruby can install on Windows
121
+ def rubyinstaller_series
122
+ series_matching { true }
123
+ end
124
+
125
+ # @return [Array<String>] minor series with an ARM64 RubyInstaller build,
126
+ # derived from the arch keys rather than curated
127
+ def rubyinstaller_arm64_series
128
+ versions = windows_versions
129
+ series_matching do |key|
130
+ archs = versions[key]
131
+ archs.is_a?(Hash) && archs.key?("arm64")
132
+ end
133
+ end
134
+
135
+ # @return [Array<Array>] engine support rows, curated rows plus the
136
+ # derived truffleruby/windows row
137
+ def engine_os_rows
138
+ ENGINE_OS_ROWS.map(&:dup) << truffleruby_windows_row
139
+ end
140
+
141
+ # @return [String] Ruby source for +data.rb+
142
+ def render
143
+ lines = [
144
+ "# frozen_string_literal: true",
145
+ "",
146
+ "# Generated by `rake kettle:rb:platform_support:generate`; do not edit by hand.",
147
+ "# Sources: GitHub releases API (TruffleRuby), ruby/setup-ruby windows-versions.json,",
148
+ "# and the documentation citation carried on each row.",
149
+ "",
150
+ "module Kettle",
151
+ " module Rb",
152
+ " module PlatformSupport",
153
+ " GENERATED_ON = #{generated_on.inspect}",
154
+ " TRUFFLERUBY_RELEASES_SCANNED = #{truffleruby_releases_scanned.inspect}",
155
+ " RUBYINSTALLER_SERIES = #{rubyinstaller_series.inspect}.freeze",
156
+ " RUBYINSTALLER_ARM64_SERIES = #{rubyinstaller_arm64_series.inspect}.freeze",
157
+ " OS_FAMILIES = #{OS_FAMILIES.inspect}.freeze",
158
+ " RUNNER_ROWS = [",
159
+ RUNNER_ROWS.map { |row| " #{row.inspect}" }.join(",\n"),
160
+ " ].freeze",
161
+ " ENGINE_OS_ROWS = [",
162
+ engine_os_rows.map { |row| " #{row.inspect}" }.join(",\n"),
163
+ " ].freeze",
164
+ " end",
165
+ " end",
166
+ "end",
167
+ ""
168
+ ]
169
+ lines.join("\n")
170
+ end
171
+
172
+ # Writes the rendered data file.
173
+ #
174
+ # @param path [String]
175
+ # @return [String] the written path
176
+ def write(path = DATA_PATH)
177
+ File.open(path, "w") { |file| file.write(render) }
178
+ path
179
+ end
180
+
181
+ private
182
+
183
+ def truffleruby_releases
184
+ @truffleruby_releases ||= @truffleruby_releases_fetcher.call
185
+ end
186
+
187
+ def windows_versions
188
+ @windows_versions ||= @windows_versions_fetcher.call
189
+ end
190
+
191
+ def series_matching(&block)
192
+ windows_versions.keys
193
+ .select { |key| key.to_s =~ /\A\d+\.\d+\.\d+\z/ && block.call(key) }
194
+ .map { |key| key.to_s[/\A\d+\.\d+/] }
195
+ .uniq
196
+ .sort_by { |series| Gem::Version.new(series) }
197
+ end
198
+
199
+ def windows_asset_names(release)
200
+ (release["assets"] || []).map { |asset| asset["name"].to_s }.select do |name|
201
+ name =~ WINDOWS_ASSET_PATTERN
202
+ end
203
+ end
204
+
205
+ def truffleruby_windows_row
206
+ scanned = truffleruby_releases_scanned
207
+ count = truffleruby_windows_asset_count
208
+ if count.zero?
209
+ ["truffleruby", "windows", "unsupported",
210
+ "Never shipped a Windows build (zero Windows assets across #{scanned} releases scanned #{generated_on}); setup-ruby hard-fails",
211
+ TRUFFLERUBY_WINDOWS_CITATION]
212
+ else
213
+ ["truffleruby", "windows", "supported",
214
+ "#{count} Windows assets across #{scanned} releases scanned #{generated_on}",
215
+ TRUFFLERUBY_WINDOWS_CITATION]
216
+ end
217
+ end
218
+
219
+ def fetch_truffleruby_releases
220
+ require "json"
221
+ require "net/http"
222
+ require "uri"
223
+
224
+ uri = URI.parse(TRUFFLERUBY_RELEASES_URL)
225
+ response = Net::HTTP.start(uri.host, uri.port, :use_ssl => true) do |http|
226
+ request = Net::HTTP::Get.new(uri.request_uri)
227
+ request["Accept"] = "application/vnd.github+json"
228
+ request["User-Agent"] = USER_AGENT
229
+ http.request(request)
230
+ end
231
+ JSON.parse(response.body)
232
+ end
233
+
234
+ def fetch_windows_versions
235
+ require "json"
236
+ require "net/http"
237
+ require "uri"
238
+
239
+ JSON.parse(Net::HTTP.get(URI.parse(WINDOWS_VERSIONS_URL)))
240
+ end
241
+ end
242
+ end
243
+ end
244
+ end
@@ -0,0 +1,115 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rubygems"
4
+ require_relative "platform_support/data"
5
+
6
+ module Kettle
7
+ module Rb
8
+ # OS-platform support evidence for CI matrix generation, one entry per
9
+ # engine / OS-family pair.
10
+ #
11
+ # The +linux+ / +macos+ / +windows+ vocabulary names CI OS *families*: a
12
+ # fourth platform vocabulary, distinct from Gemfile DSL platform symbols
13
+ # (Ruby implementations), +Gem::Platform+ strings (OS/architecture), and
14
+ # GitHub runner labels (CI hardware). These values select runner labels;
15
+ # they must never be passed to +bundle lock --add-platform+ or a Gemfile
16
+ # +platforms:+ DSL without translation.
17
+ #
18
+ # The data lives in +platform_support/data.rb+ and is regenerated from the
19
+ # GitHub releases API and ruby/setup-ruby by
20
+ # +rake kettle:rb:platform_support:generate+ (see
21
+ # {PlatformSupport::Generator}). Every claim carries a citation, so an
22
+ # unevidenced claim cannot be expressed.
23
+ module PlatformSupport
24
+ RunnerEntry = Struct.new(
25
+ :os_family,
26
+ :runner_label,
27
+ :architecture,
28
+ :note,
29
+ :citation
30
+ )
31
+
32
+ EngineOsEntry = Struct.new(
33
+ :engine,
34
+ :os_family,
35
+ :support,
36
+ :note,
37
+ :citation
38
+ )
39
+
40
+ RUNNERS = begin
41
+ entries = {}
42
+ RUNNER_ROWS.each do |row|
43
+ entry = RunnerEntry.new(*row)
44
+ entry.freeze
45
+ entries[entry.os_family] = entry
46
+ end
47
+ entries.freeze
48
+ end
49
+
50
+ ENGINE_OS = begin
51
+ entries = {}
52
+ ENGINE_OS_ROWS.each do |row|
53
+ entry = EngineOsEntry.new(*row)
54
+ entry.freeze
55
+ entries[[entry.engine, entry.os_family]] = entry
56
+ end
57
+ entries.freeze
58
+ end
59
+
60
+ class << self
61
+ # @param value [Object]
62
+ # @return [Boolean] whether +value+ is a known CI OS family
63
+ def os_family?(value)
64
+ OS_FAMILIES.include?(value.to_s)
65
+ end
66
+
67
+ # @param os_family [String]
68
+ # @return [RunnerEntry, nil]
69
+ def runner_entry(os_family)
70
+ RUNNERS[os_family.to_s]
71
+ end
72
+
73
+ # @param os_family [String]
74
+ # @return [String, nil] the GitHub runner label for the OS family
75
+ def runner_label(os_family)
76
+ found = runner_entry(os_family)
77
+ found && found.runner_label
78
+ end
79
+
80
+ # @param engine [String]
81
+ # @param os_family [String]
82
+ # @return [EngineOsEntry, nil]
83
+ def engine_os_entry(engine, os_family)
84
+ ENGINE_OS[[engine.to_s, os_family.to_s]]
85
+ end
86
+
87
+ # @param engine [String]
88
+ # @param os_family [String]
89
+ # @return [Boolean] whether the engine is supported on the OS family.
90
+ # An unknown pair is treated as unsupported rather than supported, so
91
+ # a missing claim can only hide CI coverage, never invent it.
92
+ def engine_supports_os?(engine, os_family)
93
+ found = engine_os_entry(engine, os_family)
94
+ !found.nil? && found.support == "supported"
95
+ end
96
+
97
+ # @param engine [String]
98
+ # @return [Array<String>] OS families the engine is supported on
99
+ def supported_os_families(engine)
100
+ ENGINE_OS.values
101
+ .select { |entry| entry.engine == engine.to_s && entry.support == "supported" }
102
+ .map { |entry| entry.os_family }
103
+ end
104
+
105
+ # @param os_family [String]
106
+ # @return [Array<String>] engines supported on the OS family
107
+ def supported_engines(os_family)
108
+ ENGINE_OS.values
109
+ .select { |entry| entry.os_family == os_family.to_s && entry.support == "supported" }
110
+ .map { |entry| entry.engine }
111
+ end
112
+ end
113
+ end
114
+ end
115
+ end
@@ -5,7 +5,7 @@ module Kettle
5
5
  # Version namespace for this gem.
6
6
  module Version
7
7
  # Current gem version.
8
- VERSION = "0.1.15"
8
+ VERSION = "0.1.18"
9
9
  end
10
10
  # Current gem version exposed at the traditional constant location.
11
11
  VERSION = Version::VERSION # Traditional Constant Location
data/lib/kettle/rb.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  require_relative "rb/compat_matrix"
4
4
  require_relative "rb/gem_floors"
5
5
  require_relative "rb/gem_dependencies"
6
+ require_relative "rb/platform_support"
6
7
  require_relative "rb/version"
7
8
 
8
9
  module Kettle
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kettle-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.15
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -46,7 +46,7 @@ dependencies:
46
46
  version: '3.1'
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 3.1.1
49
+ version: 3.1.13
50
50
  type: :development
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
@@ -56,7 +56,7 @@ dependencies:
56
56
  version: '3.1'
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: 3.1.1
59
+ version: 3.1.13
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: bundler-audit
62
62
  requirement: !ruby/object:Gem::Requirement
@@ -134,7 +134,7 @@ dependencies:
134
134
  version: '3.2'
135
135
  - - ">="
136
136
  - !ruby/object:Gem::Version
137
- version: 3.2.4
137
+ version: 3.2.5
138
138
  type: :development
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
@@ -144,7 +144,7 @@ dependencies:
144
144
  version: '3.2'
145
145
  - - ">="
146
146
  - !ruby/object:Gem::Version
147
- version: 3.2.4
147
+ version: 3.2.5
148
148
  - !ruby/object:Gem::Dependency
149
149
  name: kettle-test
150
150
  requirement: !ruby/object:Gem::Requirement
@@ -154,7 +154,7 @@ dependencies:
154
154
  version: '2.0'
155
155
  - - ">="
156
156
  - !ruby/object:Gem::Version
157
- version: 2.0.22
157
+ version: 2.0.25
158
158
  type: :development
159
159
  prerelease: false
160
160
  version_requirements: !ruby/object:Gem::Requirement
@@ -164,27 +164,27 @@ dependencies:
164
164
  version: '2.0'
165
165
  - - ">="
166
166
  - !ruby/object:Gem::Version
167
- version: 2.0.22
167
+ version: 2.0.25
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: turbo_tests2
170
170
  requirement: !ruby/object:Gem::Requirement
171
171
  requirements:
172
172
  - - "~>"
173
173
  - !ruby/object:Gem::Version
174
- version: '3.2'
174
+ version: '4.0'
175
175
  - - ">="
176
176
  - !ruby/object:Gem::Version
177
- version: 3.2.12
177
+ version: 4.0.0
178
178
  type: :development
179
179
  prerelease: false
180
180
  version_requirements: !ruby/object:Gem::Requirement
181
181
  requirements:
182
182
  - - "~>"
183
183
  - !ruby/object:Gem::Version
184
- version: '3.2'
184
+ version: '4.0'
185
185
  - - ">="
186
186
  - !ruby/object:Gem::Version
187
- version: 3.2.12
187
+ version: 4.0.0
188
188
  - !ruby/object:Gem::Dependency
189
189
  name: ruby-progressbar
190
190
  requirement: !ruby/object:Gem::Requirement
@@ -228,7 +228,7 @@ dependencies:
228
228
  version: '2.0'
229
229
  - - ">="
230
230
  - !ruby/object:Gem::Version
231
- version: 2.0.13
231
+ version: 2.0.15
232
232
  type: :development
233
233
  prerelease: false
234
234
  version_requirements: !ruby/object:Gem::Requirement
@@ -238,7 +238,7 @@ dependencies:
238
238
  version: '2.0'
239
239
  - - ">="
240
240
  - !ruby/object:Gem::Version
241
- version: 2.0.13
241
+ version: 2.0.15
242
242
  description: "\U0001F4CF Provides the shared Ruby, engine, Rails, RuboCop, and RuboCop
243
243
  LTS compatibility matrix used by Kettle-managed gems."
244
244
  email:
@@ -256,6 +256,9 @@ files:
256
256
  - lib/kettle/rb/gem_floors.rb
257
257
  - lib/kettle/rb/gem_floors/data.rb
258
258
  - lib/kettle/rb/gem_floors/generator.rb
259
+ - lib/kettle/rb/platform_support.rb
260
+ - lib/kettle/rb/platform_support/data.rb
261
+ - lib/kettle/rb/platform_support/generator.rb
259
262
  - lib/kettle/rb/version.rb
260
263
  - sig/kettle/rb.rbs
261
264
  homepage: https://github.com/kettle-dev/kettle-rb
@@ -263,10 +266,10 @@ licenses:
263
266
  - MIT
264
267
  metadata:
265
268
  homepage_uri: https://kettle-rb.galtzo.com
266
- source_code_uri: https://github.com/kettle-dev/kettle-rb/tree/v0.1.15
267
- changelog_uri: https://github.com/kettle-dev/kettle-rb/blob/v0.1.15/CHANGELOG.md
269
+ source_code_uri: https://github.com/kettle-dev/kettle-rb/tree/v0.1.18
270
+ changelog_uri: https://github.com/kettle-dev/kettle-rb/blob/v0.1.18/CHANGELOG.md
268
271
  bug_tracker_uri: https://github.com/kettle-dev/kettle-rb/issues
269
- documentation_uri: https://www.rubydoc.info/gems/kettle-rb/0.1.15
272
+ documentation_uri: https://www.rubydoc.info/gems/kettle-rb/0.1.18
270
273
  funding_uri: https://github.com/sponsors/pboling
271
274
  wiki_uri: https://github.com/kettle-dev/kettle-rb/wiki
272
275
  news_uri: https://www.railsbling.com/tags/kettle-rb
metadata.gz.sig CHANGED
Binary file