Add Appraisals to test against multiple json gem versions - #114
Merged
Merged
Conversation
Danger ReportNo issues found. |
dblock
force-pushed
the
appraisals-json
branch
2 times, most recently
from
September 12, 2026 17:03
08fa526 to
f8735b8
Compare
Adds an Appraisal-based test matrix (json-2, json-3) run in CI so the existing spec suite is exercised against both the currently supported json < 3.0 and json >= 3.0, reproducing the Faraday::ParsingError / ArgumentError described in #113 whenever json 3.x is resolved. - Add 'appraisal' gem and an Appraisals file defining 'json-2' and 'json-3' appraisals. - Move rubocop, rubocop-rake, and rubocop-rspec out of the main Gemfile into their own gemfiles/rubocop.gemfile, since rubocop < 1.90 pins json ~> 2.3, which otherwise made it impossible to resolve a Gemfile that also depends on json ~> 3.0. - Update the Rakefile default task and .github/workflows/rubocop.yml to use gemfiles/rubocop.gemfile via BUNDLE_GEMFILE. - Add a CI job in .github/workflows/test.yml that runs 'rake spec' against each appraisal gemfile; the json-3 job is currently expected to fail, tracking when the incompatibility is resolved. - Exclude generated gemfiles/*.gemfile from rubocop and gemfiles/*.gemfile.lock from git. - Document the new workflow in CONTRIBUTING.md and CHANGELOG.md. Verified locally: the existing oauth/api/webhooks specs pass under gemfiles/json_2.gemfile (0 failures) and fail under gemfiles/json_3.gemfile with the exact reported error, reproducing #113. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dblock
force-pushed
the
appraisals-json
branch
from
September 12, 2026 17:06
f8735b8 to
1149bfd
Compare
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.
Description
Adds an Appraisal-based test matrix (
json-2,json-3) so the existing spec suite can be run against bothjson < 3.0(currently supported) andjson >= 3.0, to reproduce and track #113.json3.0 changedJSON.parseto keyword-only options, dropping the positional options hash form that Faraday's:jsonresponse middleware relies on. As a result, any Strava API response parsed through Faraday's JSON middleware fails with:Changes
appraisalgem and anAppraisalsfile definingjson-2andjson-3appraisals.rubocop,rubocop-rake, andrubocop-rspecout of the mainGemfileinto their owngemfiles/rubocop.gemfile, sincerubocop < 1.90pinsjson ~> 2.3, which otherwise made it impossible to resolve a Gemfile that also depends onjson ~> 3.0.Rakefiledefault task and.github/workflows/rubocop.ymlto usegemfiles/rubocop.gemfileviaBUNDLE_GEMFILE.appraisalsCI job in.github/workflows/test.ymlthat runsrake specagainst thejson-2gemfile. Thejson-3entry is present but commented out since it currently fails CI — it's there so it's easy to re-enable once the underlying incompatibility (tracked in Faraday::ParsingError with json gem >= 3.0 (ArgumentError: wrong number of arguments) #113) is fixed, or to run manually/locally.gemfiles/*.gemfilefrom rubocop andgemfiles/*.gemfile.lockfrom git.CONTRIBUTING.mdandCHANGELOG.md.Verification
Ran locally:
Related to #113.