π² Kettle::Jem::Appraisals
if ci_badges.map(&:color).detect { it != "green"} βοΈ let me know on Discord or RubyForum, as I may have missed the 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.
π£ 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 | |
|---|---|
| Works with JRuby | |
| Works with MRI Ruby 4 | |
| Support & Community | |
| Source | |
| Documentation | |
| Compliance | |
| Style | |
| Maintainer ποΈ | |
... π |
Compatibility
Compatible with MRI Ruby 4.0.0+, and JRuby.
CI workflows and Appraisals are generated for MRI Ruby 4.0.0+.
This test floor is configured by ruby.test_minimum in .structuredmerge/kettle-jem.yml and
may be higher than the gem's runtime compatibility floor when legacy Rubies are
not practical for the current toolchain.
The amazing test matrix is powered by the kettle-dev stack.
How kettle-dev manages complexity in tests
| Gem | Source | Role | Total downloads |
|---|---|---|---|
| appraisal2 | GitHub | multi-dependency Appraisal matrix generation | |
| appraisal2-rubocop | GitHub | RuboCop Appraisal generator integration | |
| kettle-dev | GitHub | development, release, and CI workflow tooling | |
| kettle-jem | GitHub | Appraisals & CI workflow templates | |
| kettle-soup-cover | GitHub | SimpleCov coverage policy and reporting | |
| kettle-test | GitHub | standard test runner and coverage harness | |
| rubocop-lts | GitHub | Ruby-version-aware linting | |
| turbo_tests2 | GitHub | parallel test execution |
Federated DVCS
Find this repo on federated forges (Coming soon!)
| Federated DVCS Repository | Status | Issues | PRs | Wiki | CI |
|---|---|---|---|---|---|
| π§ͺ appraisal-rb/kettle-jem-appraisals on GitLab | The Truth | π | π | π | π Tiny Matrix |
| π§ appraisal-rb/kettle-jem-appraisals on CodeBerg | An Ethical Mirror (Donate) | π | π | β | βοΈ No Matrix |
| π appraisal-rb/kettle-jem-appraisals on GitHub | Another Mirror | π | π | π | π― Full Matrix |
Enterprise Support
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.
- π‘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:
β¨ 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
βοΈ Configuration
Configuration lives under the appraisal_matrix key of the project's
kettle-jem configuration file,
.structuredmerge/kettle-jem.yml β the same file kettle-jem reads when templating.
Projects that still have a legacy root .kettle-jem.yml (and no
.structuredmerge/kettle-jem.yml) are read from there instead.
Running --scaffold creates a starter appraisal_matrix from your gemspec.
Writes are surgical: --scaffold and --resolve only rewrite the top-level
sections they change (normally just appraisal_matrix), so comments and every
other kettle-jem setting in the file are preserved.
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"
# How generated entries collapse onto kettle-jem's standard ruby-X-Y
# appraisals (default: unique). See "Collapsing onto standard appraisals".
standard_appraisal_role: runtime_dependency
# Shared support gemfiles evaluated by every generated entry (and injected
# by kettle-jem into standard test appraisals). See "Shared support gemfiles".
appraisal_gemfiles:
- modular/combustion.gemfile
# Generate and wire ActiveRecord database support gemfiles when activerecord
# is a tier1 gem (default: true). See "ActiveRecord database support".
activerecord_support: true
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
modewould not normally include them - the final generated matrix is the union of
moderesults,requirementsfiltering, andinclude_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)
Collapsing onto standard appraisals
kettle-jem already generates one standard appraisal per supported Ruby series
(ruby-2-7, ruby-3-1, β¦), and each of those already has a CI job. A generated
kja-* entry whose Ruby bucket maps to one of those series would otherwise be a
duplicate appraisal (and duplicate CI job) for the same Ruby. To avoid that,
kettle-jem-appraisals intentionally collapses one generated entry per
standard series onto the standard name: the entry keeps its kja-* name
internally, but is emitted as appraise "ruby-X-Y". kettle-jem then merges that
block with its own templated ruby-X-Y block, so the standard job runs against
the generated dependency versions. Every entry that is not collapsed keeps its
kja-* name, and stale-file cleanup still keys off the kja- prefix.
Which entry collapses is controlled by the collapse policy, read from
appraisal_matrix.collapse.standard_appraisals, standard_appraisal_role, or
standard_appraisal_collapse (first one set wins):
| Policy | Accepted values | Behavior |
|---|---|---|
| unique (default) | anything not listed below | Collapse only when a single generated entry maps to the series; ambiguous series keep all entries as kja-*. |
| required | required, runtime, runtime_dependency, dependency, substrate |
Always collapse one entry per series β the one with the highest tier1 (then tier2) version. Use when the tier1 gem is a runtime dependency every standard job needs. |
| none | none, false, off, no, never |
Never collapse; every entry stays kja-*. |
For example, with standard_appraisal_role: runtime_dependency and an
activerecord tier1, the r3.1 bucket's ActiveRecord 7.2 entry is emitted as
ruby-3-1, while an extra ActiveRecord 7.0 entry for the same bucket stays
kja-ar-7-0-r2.
Shared support gemfiles
appraisal_matrix.appraisal_gemfiles (alias: appraisal_eval_gemfiles) lists
modular gemfiles that every generated entry should eval_gemfile, such as
test-only fixtures (modular/combustion.gemfile). Paths may be given with or
without the leading gemfiles/. kettle-jem reads the same key (or
workflows.standard_appraisal_gemfiles) to inject those gemfiles into its
standard test appraisals, so collapsed and non-collapsed jobs share them.
kettle-jem's test_bundle.gemfiles is separate: it controls the root
Gemfile used for local development and the locked-deps workflow, and is not
changed by appraisal_matrix.
ActiveRecord database support
This gem's primary use case is gems that are tested against a spread of
ActiveRecord versions on MRI, JRuby, and TruffleRuby. Those test suites need a
database driver whose gem differs per engine and per ActiveRecord version:
sqlite3 on MRI/TruffleRuby, activerecord-jdbcsqlite3-adapter (plus
bigdecimal) on JRuby. When activerecord is a tier1 gem, --resolve:
- writes
gemfiles/modular/activerecord_support.gemfile(sqlite31.4.x, for ActiveRecord < 7.2) andgemfiles/modular/activerecord_support_modern.gemfile(sqlite3>= 2.1, for ActiveRecord >= 7.2), each with a JRuby platform block for the JDBC adapter, whose release series tracks ActiveRecord so Bundler picks the matching adapter; - adds the matching support gemfile to each generated entry, based on that
entry's ActiveRecord version (unless
appraisal_gemfilesalready lists one of them).
Existing support gemfiles that do not carry the # Generated by kettle-jem-appraisals header are treated as hand-maintained and left untouched.
Set activerecord_support: false to opt out entirely (for example, when the
suite uses PostgreSQL). Point the root Gemfile at the modern support gemfile
via kettle-jem's test_bundle.gemfiles, and select the JDBC adapter in your spec
helper on JRuby:
require "active_record"
if RUBY_PLATFORM == "java"
require "activerecord-jdbcsqlite3-adapter"
else
require "sqlite3"
end
adapter = (RUBY_PLATFORM == "java" && ActiveRecord.version < Gem::Version.new("7.2")) ? "jdbcsqlite3" : "sqlite3"
ActiveRecord::Base.establish_connection(adapter: adapter, database: ":memory:")
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 appraisal_matrix in .structuredmerge/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ΓbucketAppraisalsβ references the modular gemfiles- Runs
bin/appraisal generateto 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.
π Security
See SECURITY.md.
π€ Contributing
If you need some ideas of where to help, you could work on adding more code coverage, check issues or PRs, or use the gem and think about how it could be better.
We so if you make changes, remember to update it.
See CONTRIBUTING.md for more detailed instructions.
π Release Instructions
See CONTRIBUTING.md.
Code Coverage
πͺ Code of Conduct
Everyone interacting with this project's codebases, issue trackers,
chat rooms and mailing lists agrees to follow the .
π Contributors
Made with contributors-img.
Also see GitLab Contributors: https://gitlab.com/appraisal-rb/kettle-jem-appraisals/-/graphs/main
π Versioning
This library follows for its public API where practical.
For most applications, prefer 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.
Dropping support for a platform can be a breaking change for affected users. If a release changes supported platforms, it should be called out clearly in the changelog and versioned with that impact in mind.
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.
Copyright holders
- Copyright (c) 2026 Peter H. Boling
π€ 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, use the RubyForum or Discord.
To say "thanks!" βοΈ Join the community or ποΈ send money.
Please give the project a star β β₯.
Many parts of this project are actively managed by a kettle-jem smart template utilizing StructuredMerge.org merge contracts.
Thanks for RTFM. βΊοΈ
| Field | Value |
|---|---|
| Package | kettle-jem-appraisals |
| Description | π² 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-dev ecosystem. |
| Homepage | https://github.com/appraisal-rb/kettle-jem-appraisals |
| Source | https://github.com/appraisal-rb/kettle-jem-appraisals |
| License | AGPL-3.0-only |
| Funding | https://github.com/sponsors/pboling, https://ko-fi.com/pboling, https://liberapay.com/pboling/donate, https://opencollective.com/kettle-dev, https://thanks.dev/u/gh/pboling, https://tidelift.com/funding/github/rubygems/kettle-jem-appraisals, https://www.buymeacoffee.com/pboling |
