Modernize CI/test runner via Appraisal (mirrors u-case)#74
Merged
Conversation
- Replace bin/test + bin/prepare_coverage + per-Ruby ENV-switched Gemfile
with an Appraisal-driven setup
- Add Appraisals file gated on RUBY_VERSION (activemodel 6.0..8.1 + edge)
- Rewrite GitHub Actions matrix: Ruby 2.7..4.0+head, conditional Rails
steps, plus baseline + per-module (KIND_BASIC) + KIND_STRICT runs
- Add bin/matrix, rake matrix, and rake test_basic_modules tasks
- Bump gemspec required_ruby_version to >= 2.7.0; add appraisal dev dep
- Workflow hardening: explicit permissions: contents: read +
actions/checkout persist-credentials: false
- Switch coverage upload from CodeClimate to Qlty (token-auth)
- Replace CodeClimate badges with Qlty badges; refresh Ruby/Rails badges
Ruby 3.4+/4.0 compatibility fixes:
- lib/kind/any.rb: Set#inspect format changed in Ruby 4.0
("#<Set: {...}>" -> "Set[...]"); rebuild the brace-list form from
the values directly so the Kind::Any name stays "Kind::Any{:low, :high}"
across Ruby versions
- Tests: quote-agnostic regex for the private/protected method error
message format change in 3.4
- Tests: derive hash-in-message expectations from Hash#inspect to
survive the 3.4 hash-literal display change
- Add ostruct to Gemfile guarded by RUBY_VERSION >= 3.5
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings the kind gem's test runner up to par with the modernized u-case + u-attributes gems.
CI matrix
KIND_BASIC=t) +KIND_STRICT=tstrict_disabled_testInfrastructure
bin/test+bin/prepare_coverage+ the ENV-switchedGemfilewith anAppraisalsfile and a generatedgemfiles/rails_X_Y.gemfilelayout.bin/setup,bin/matrix, andrake matrix/rake test_basic_modulestasks. The basic-modules task uses Rake'srake_test_loader.rbso it works under/bin/sh(no shell brace expansion required).permissions: { contents: read }andactions/checkoutwithpersist-credentials: false.QLTY_COVERAGE_TOKEN).>= 2.7/>= 6.0.Gemspec
required_ruby_versionbumped from>= 2.1.0→>= 2.7.0.appraisal ~> 2.5added as a development dependency.changelog_urimetadata wired up.Source change —
lib/kind/any.rbRuby 4.0 changed
Set#inspectfrom"#<Set: {:low, :high}>"to"Set[:low, :high]", which broke the regex-based stripping inKind::Any#name. The replacement rebuilds the brace-list form directly from@valuesso the output staysKind::Any{:low, :high}on every supported Ruby.Test fixes for Ruby 3.4+/4.0 compatibility
private/protected methoderror message change (`b'→'b';for #<Foo>→for an instance of Foo).Hash#inspectformat change in Ruby 3.4 ({:foo=>:bar}→{foo: :bar}): hardcoded error-message strings replaced with"#{hash.inspect} ..."interpolation so the assertion follows the runtime.Manual setup needed on your side
serradura/kind.QLTY_COVERAGE_TOKENto the repo's GitHub Actions secrets (same flow as u-case).CC_TEST_REPORTER_IDsecret if still present.Test plan
🤖 Generated with Claude Code