Skip to content

kettle-rb/kettle-jem-appraisals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0 ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5 kettle-rb Logo by Aboling0, CC BY-SA 4.0 kettle-jem-appraisals Logo by Aboling0, CC BY-SA 4.0

🍲 Kettle::Jem::Appraisals

Version GitHub tag (latest SemVer) License: AGPL-3.0-only Downloads Rank Open Source Helpers CodeCov Test Coverage Coveralls Test Coverage QLTY Test Coverage QLTY Maintainability CI Heads CI Runtime Dependencies @ HEAD CI Current CI Truffle Ruby CI JRuby Deps Locked Deps Unlocked CI Test Coverage CI Style CodeQL Apache SkyWalking Eyes License Compatibility Check

if ci_badges.map(&:color).detect { it != "green"} ☝️ let me know, as I may have missed the discord notification.


if ci_badges.map(&:color).all? { it == "green"} 👇️ send money so I can do more of this. FLOSS maintenance is now my full-time job.

OpenCollective Backers OpenCollective Sponsors Sponsor Me on Github Liberapay Goal Progress Donate on PayPal Buy me a coffee Donate on Polar Donate at ko-fi.com

👣 How will this project approach the September 2025 hostile takeover of RubyGems? 🚑️

I've summarized my thoughts in this blog post.

🌻 Synopsis

kettle-jem-appraisals automates CI testing matrix generation for Ruby gems. It reads your gemspec, queries the RubyGems API to discover published versions of your runtime dependencies, detects Ruby-version seam points (where required_ruby_version changes), and produces:

  • Modular gemfiles under gemfiles/modular/{gem}/{ruby_series}/v{version}.gemfile
  • An Appraisals file for use with appraisal2
  • Workflow strategy matrix snippets for GitHub Actions CI

If you want a lighter-weight DSL for the original appraisal gem, consider appraisal-matrix instead. kettle-jem-appraisals targets appraisal2 (which supports eval_gemfile, and all ruby versions), while appraisal-matrix targets appraisal (which does not support eval_gemfile, and only supports modern ruby).

Key concepts

Concept Description
Tier 1 Primary runtime dependencies whose version matrix you test against (e.g. activerecord, mail)
Tier 2 Secondary runtime dependencies cross-producted with tier 1 (e.g. omniauth)
Ruby series Buckets like r2.4, r2.6, r2, r3.1, r3 derived from min-ruby seam analysis
Seam A version boundary where a gem's required_ruby_version floor increases
Mode Version selection strategy: major, minor, patch, minor-minmax, or semver
kja- prefix All generated appraisal names start with kja- for reliable cleanup on regeneration

💡 Info you can shake a stick at

Tokens to Remember Gem name Gem namespace
Works with JRuby JRuby current Compat JRuby HEAD Compat
Works with Truffle Ruby Truffle Ruby 24.2 Compat Truffle Ruby 25.0 Compat Truffle Ruby current Compat
Works with MRI Ruby 4 Ruby 4.0 Compat Ruby current Compat Ruby HEAD Compat
Works with MRI Ruby 3 Ruby 3.2 Compat Ruby 3.3 Compat Ruby 3.4 Compat
Support & Community Join Me on Daily.dev's RubyFriends Live Chat on Discord Get help from me on Upwork Get help from me on Codementor
Source Source on GitLab.com Source on CodeBerg.org Source on Github.com The best SHA: dQw4w9WgXcQ!
Documentation Current release on RubyDoc.info YARD on Galtzo.com Maintainer Blog GitLab Wiki GitHub Wiki
Compliance License: AGPL-3.0-only Apache license compatibility: Category X 📄ilo-declaration-img Security Policy Contributor Covenant 2.1 SemVer 2.0.0
Style Enforced Code Style Linter Keep-A-Changelog 1.0.0 Gitmoji Commits Compatibility appraised by: appraisal2
Maintainer 🎖️ Follow Me on LinkedIn Follow Me on Ruby.Social Follow Me on Bluesky Contact Maintainer My technical writing
... 💖 Find Me on WellFound: Find Me on CrunchBase My LinkTree More About Me 🧊 🐙 🛖 🧪

Compatibility

Compatible with MRI Ruby 3.2.0+, and concordant releases of JRuby, and TruffleRuby.

🚚 Amazing test matrix was brought to you by 🔎 appraisal2 🔎 and the color 💚 green 💚
👟 Check it out! github.com/appraisal-rb/appraisal2

Federated DVCS

Find this repo on federated forges (Coming soon!)
Federated DVCS Repository Status Issues PRs Wiki CI Discussions
🧪 kettle-rb/kettle-jem-appraisals on GitLab The Truth 💚 💚 💚 🐭 Tiny Matrix
🧊 kettle-rb/kettle-jem-appraisals on CodeBerg An Ethical Mirror (Donate) 💚 💚 ⭕️ No Matrix
🐙 kettle-rb/kettle-jem-appraisals on GitHub Another Mirror 💚 💚 💚 💯 Full Matrix 💚
🎮️ Discord Server Live Chat on Discord Let's talk about this library!

Enterprise Support Tidelift

Available as part of the Tidelift Subscription.

Need enterprise-level guarantees?

The maintainers of this and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use.

Get help from me on Tidelift

  • 💡Subscribe for support guarantees covering all your FLOSS dependencies
  • 💡Tidelift is part of Sonar
  • 💡Tidelift pays maintainers to maintain the software you depend on!
    📊@Pointy Haired Boss: An enterprise support subscription is "never gonna let you down", and supports open source maintainers

Alternatively:

  • Live Chat on Discord
  • Get help from me on Upwork
  • Get help from me on Codementor

✨ Installation

Install the gem and add to the application's Gemfile by executing:

bundle add kettle-jem-appraisals

If bundler is not being used to manage dependencies, install the gem by executing:

gem install kettle-jem-appraisals

🔒 Secure Installation

For Medium or High Security Installations

This gem is cryptographically signed and has verifiable SHA-256 and SHA-512 checksums by stone_checksums. Be sure the gem you install hasn’t been tampered with by following the instructions below.

Add my public key (if you haven’t already; key expires 2045-04-29) as a trusted certificate:

gem cert --add <(curl -Ls https://raw.github.com/galtzo-floss/certs/main/pboling.pem)

You only need to do that once. Then proceed to install with:

gem install kettle-jem-appraisals -P HighSecurity

The HighSecurity trust profile will verify signed gems, and not allow the installation of unsigned dependencies.

If you want to up your security game full-time:

bundle config set --global trust-policy MediumSecurity

MediumSecurity instead of HighSecurity is necessary if not all the gems you use are signed.

NOTE: Be prepared to track down certs for signed gems and add them the same way you added mine.

⚙️ Configuration

Configuration lives in .kettle-jem.yml under the appraisal_matrix key. Running --scaffold creates a starter config from your gemspec.

Config schema

appraisal_matrix:
  # Global version selection mode (default: semver)
  # Per-gem overrides via the "mode" key on individual gem entries.
  mode: semver

  # Seconds before a resolved matrix is considered stale (default: 604800 = 7 days).
  # Use --force to bypass.
  freshness_ttl: 604800

  # Command to run in CI for each appraisal entry (default: "rake spec")
  exec_cmd: "rake spec"

  gems:
    # Tier 1: primary dependencies whose versions drive the matrix.
    # Each tier1 version is assigned to its optimal Ruby bucket.
    tier1:
      - name: activerecord
        # Optional requirements filter
        requirements:
          - ">= 6.1"
          - "< 8.0"
        # Optional exact-version allowlist, added on top of mode + requirements
        include_versions:
          - "8.0.1"
        # Optional exact-version denylist, removed from the final matrix
        exclude_versions:
          - "7.2"
      - name: mail
        mode: major  # per-gem mode override

    # Optional tier1_mode: default mode for all tier1 gems (overrides global mode)
    # tier1_mode: minor-minmax

    # Tier 2: secondary dependencies cross-producted with tier1.
    # Omit if your gem has only one primary dependency.
    tier2:
      - name: omniauth

    # Optional tier2_mode: default mode for all tier2 gems
    # tier2_mode: major

Version selection modes

Mode Selects Best for
major Latest minor of each major version Large gems with many majors (e.g. Rails)
minor Every minor version across all majors Small gems with few versions
patch Every matching patch version Tight compatibility windows or regression-focused matrices
minor-minmax First + last minor per older major; all minors of current major Balanced coverage
semver Latest minor per older major + Ruby-cutoff minors + all minors of current major unless that major is large, then latest + cutoffs Default — best signal-to-noise ratio

Per-gem requirements

Each gem entry may further restrict the resolved version set with requirements. Values can be a string or an array of RubyGems requirement strings.

appraisal_matrix:
  gems:
    tier1:
      - name: activerecord
        mode: patch
        requirements:
          - ">= 7.1"
          - "< 7.2"
      - name: sequel
        requirements:
          - ">= 5.0"
          - "< 6.0"

Those filters apply both to version selection and to Ruby seam detection, so the generated buckets stay aligned with the versions you actually intend to test.

Per-gem include_versions

Each gem entry may also specify include_versions, an explicit allowlist of additional versions to union into the matrix.

appraisal_matrix:
  gems:
    tier1:
      - name: activerecord
        mode: semver
        requirements:
          - ">= 7.1"
          - "< 7.2"
        include_versions:
          - "6.0.9"
          - "8.0.1"

include_versions is additive:

  • versions listed there are added even if they fall outside requirements
  • versions listed there are added even if the selected mode would not normally include them
  • the final generated matrix is the union of mode results, requirements filtering, and include_versions

Per-gem exclude_versions

Each gem entry may also specify exclude_versions, an explicit denylist of exact versions to remove from the resolved matrix.

appraisal_matrix:
  gems:
    tier1:
      - name: activerecord
        mode: semver
        requirements:
          - ">= 7.1"
          - "< 7.2"
        include_versions:
          - "6.0.9"
          - "8.0.1"
        exclude_versions:
          - "7.1.0"
          - "8.0.1"

exclude_versions is applied after mode selection, requirements, and include_versions, so the final set is:

  • start with the versions selected by mode
  • filter that set with requirements
  • union in include_versions
  • subtract exclude_versions

Semver pruning

When a single major version has more than 9 minor releases (e.g. aws-sdk-dynamodb with 166 minors in major 1), semver mode automatically prunes to:

  • The latest minor of that major
  • Any minor that is the last before a Ruby version is dropped (Ruby-cutoff versions)

This prevents matrix explosion while preserving meaningful coverage.

Appraisal naming

All generated names are prefixed with kja- (kettle-jem-appraisals) so that regeneration can reliably identify and remove stale entries.

Format: kja-{tier1}-{t1ver}-{tier2}-{t2ver}-{ruby}

Common gem abbreviations are applied automatically:

Gem Abbreviation
activerecord ar
activesupport as
omniauth oa
mongoid mo
sequel sq

Examples: kja-ar-7-1-oa-2-1-r3, kja-mail-2-8-r3 (tier1-only)

Optimal bucket assignment

Rather than cross-producting every gem version with every Ruby series, each tier1 version is assigned to its optimal bucket — the newest Ruby where that version is the best (latest) choice. Gaps are backfilled automatically.

Example with activerecord:

Version Optimal bucket Reason
AR 5.2 r2.4 Next seam (AR 6.0) needs Ruby ≥2.5; newest Ruby below is 2.4
AR 6.1 r2.6 Next seam (AR 7.0) needs Ruby ≥2.7; newest Ruby below is 2.6
AR 7.1 r2 Next seam (AR 7.2) needs Ruby ≥3.1; newest Ruby below is 2.7
AR 7.2 r3.1 Next seam (AR 8.0) needs Ruby ≥3.2; newest Ruby below is 3.1
AR 8.1 r3 Catch-all latest bucket

🔧 Basic Usage

Two-step workflow

Step 1 — Scaffold reads your gemspec and populates .kettle-jem.yml:

kettle-jem-appraisals --scaffold

Review the generated config: move gems between tier1 and tier2, set per-gem mode overrides, and remove any gems you don't want in the matrix.

Step 2 — Resolve queries RubyGems, computes the matrix, and writes files:

kettle-jem-appraisals --resolve

This generates:

  • gemfiles/modular/{gem}/{ruby_series}/v{version}.gemfile — one per version×bucket
  • Appraisals — references the modular gemfiles
  • Runs bin/appraisal generate to create flat gemfiles (if binstub exists)

CLI flags

Flag Description
--scaffold Force scaffold mode (even if config exists)
--resolve Force resolve mode
--force Bypass freshness TTL and re-resolve

Without flags, the CLI auto-detects: scaffold if no versions are configured, resolve otherwise.

Re-resolving

The resolved matrix is timestamped. Subsequent runs within freshness_ttl seconds are skipped unless --force is passed. Stale kja-* flat gemfiles from previous runs are automatically cleaned up.

Example: sanitize_email (tier1-only)

appraisal_matrix:
  mode: semver
  gems:
    tier1:
      - name: mail

Produces ~5 entries like kja-mail-2-7-r2.4, kja-mail-2-8-r3.

Example: omniauth-identity (tier1 + tier2)

appraisal_matrix:
  mode: semver
  gems:
    tier1:
      - name: activerecord
      - name: sequel
        mode: major
    tier2:
      - name: omniauth

Produces entries like kja-ar-7-1-oa-2-1-r3, kja-sq-5-0-oa-2-1-r3.

Workflow strategy output

The resolve step also generates CI lifecycle groupings:

Lifecycle Description
supported Current Ruby series (actively maintained)
legacy Older Ruby series (maintenance mode)
unsupported Ruby versions past EOL
ancient Very old Ruby (best-effort)

These map to separate GitHub Actions workflow files for tiered CI execution.

🦷 FLOSS Funding

While kettle-rb tools are free software and will always be, the project would benefit immensely from some funding. Raising a monthly budget of... "dollars" would make the project more sustainable.

We welcome both individual and corporate sponsors! We also offer a wide array of funding channels to account for your preferences (although currently Open Collective is our preferred funding platform).

If you're working in a company that's making significant use of kettle-rb tools we'd appreciate it if you suggest to your company to become a kettle-rb sponsor.

You can support the development of kettle-rb tools via GitHub Sponsors, Liberapay, PayPal, Open Collective and Tidelift.

📍 NOTE
If doing a sponsorship in the form of donation is problematic for your company
from an accounting standpoint, we'd recommend the use of Tidelift,
where you can get a support-like subscription instead.

Open Collective for Individuals

Support us with a monthly donation and help us continue our activities. [Become a backer]

NOTE: kettle-readme-backers updates this list every day, automatically.

No backers yet. Be the first!

Open Collective for Organizations

Become a sponsor and get your logo on our README on GitHub with a link to your site. [Become a sponsor]

NOTE: kettle-readme-backers updates this list every day, automatically.

No sponsors yet. Be the first!

Another way to support open-source

I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈‍ cats).

If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in bundle fund.

I’m developing a new library, floss_funding, designed to empower open-source developers like myself to get paid for the work we do, in a sustainable way. Please give it a look.

Floss-Funding.dev: 👉️ No network calls. 👉️ No tracking. 👉️ No oversight. 👉️ Minimal crypto hashing. 💡 Easily disabled nags

OpenCollective Backers OpenCollective Sponsors Sponsor Me on Github Liberapay Goal Progress Donate on PayPal Buy me a coffee Donate on Polar Donate to my FLOSS efforts at ko-fi.com Donate to my FLOSS efforts using Patreon

🔐 Security

See SECURITY.md.

🤝 Contributing

If you need some ideas of where to help, you could work on adding more code coverage, or if it is already 💯 (see below) check issues or PRs, or use the gem and think about how it could be better.

We Keep A Changelog so if you make changes, remember to update it.

See CONTRIBUTING.md for more detailed instructions.

🚀 Release Instructions

See CONTRIBUTING.md.

Code Coverage

Coverage Graph

Coveralls Test Coverage

QLTY Test Coverage

🪇 Code of Conduct

Everyone interacting with this project's codebases, issue trackers, chat rooms and mailing lists agrees to follow the Contributor Covenant 2.1.

🌈 Contributors

Contributors

Made with contributors-img.

Also see GitLab Contributors: https://gitlab.com/kettle-rb/kettle-jem-appraisals/-/graphs/main

⭐️ Star History Star History Chart

📌 Versioning

This Library adheres to Semantic Versioning 2.0.0. Violations of this scheme should be reported as bugs. Specifically, if a minor or patch version is released that breaks backward compatibility, a new version should be immediately released that restores compatibility. Breaking changes to the public API will only be introduced with new major versions.

dropping support for a platform is both obviously and objectively a breaking change
—Jordan Harband (@ljharb, maintainer of SemVer) in SemVer issue 716

I understand that policy doesn't work universally ("exceptions to every rule!"), but it is the policy here. As such, in many cases it is good to specify a dependency on this library using the Pessimistic Version Constraint with two digits of precision.

For example:

spec.add_dependency("kettle-jem-appraisals", "~> 0.0")
📌 Is "Platform Support" part of the public API? More details inside.

SemVer should, IMO, but doesn't explicitly, say that dropping support for specific Platforms is a breaking change to an API, and for that reason the bike shedding is endless.

To get a better understanding of how SemVer is intended to work over a project's lifetime, read this article from the creator of SemVer:

See CHANGELOG.md for a list of releases.

📄 License

The gem is available under the following license: AGPL-3.0-only. See LICENSE.md for details.

If none of the available licenses suit your use case, please contact us to discuss a custom commercial license.

© Copyright

See LICENSE.md for the official copyright notice.

🤑 A request for help

Maintainers have teeth and need to pay their dentists. After getting laid off in an RIF in March, and encountering difficulty finding a new one, I began spending most of my time building open source tools. I'm hoping to be able to pay for my kids' health insurance this month, so if you value the work I am doing, I need your support. Please consider sponsoring me or the project.

To join the community or get help 👇️ Join the Discord.

Live Chat on Discord

To say "thanks!" ☝️ Join the Discord or 👇️ send money.

Sponsor kettle-rb/kettle-jem-appraisals on Open Source Collective 💌 Sponsor me on GitHub Sponsors 💌 Sponsor me on Liberapay 💌 Donate on PayPal

Please give the project a star ⭐ ♥.

Thanks for RTFM. ☺️

About

🍲 Kettle::Jem::Appraisals auto-generates CI test matrices from RubyGems API data. Scaffolds tier1/tier2 gem lists from gemspec, resolves version spreads per mode (major/minor/minor-minmax/semver), generates modular gemfiles and Appraisals files. Part of the kettle-rb ecosystem.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors