Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibility with Rack 3 + general tidy up #58

Merged
merged 10 commits into from
Jul 10, 2024
Merged

Conversation

4-Eyes
Copy link
Contributor

@4-Eyes 4-Eyes commented Jul 10, 2024

Context

I'm in the process of upgrading to Rails 7.1 and Rack 3 and I've come across an issue with the jwt_signed_request gem does not properly support Rack 3. The main issues are:

As part of this, I also tried to do a bit of a tidy up of our testing suites and updated our test matrix to test against the latest versions of the various gems we support and dropped support for older versions.

What Changed

  • Fix compatibility issues with Rack 3
  • Add tests to cover the Rack issues raised in Rack 3
  • Updated appraisal generated gem files to use ~> syntax so that we're always testing against the latest patch of minor versions.
  • Updated the README with details on setting up appraisal
  • Drop support for Ruby 2.4 & 2.5 (they're well past their EOL)
  • Update the test matrix to match our new test configuration.
  • Bump version to v4.0.0
    • Doing a major version bump here as we're dropping support for a lot of different ruby/gem versions

Heads up!

PRs that go 60 days without activity may be automatically closed. See these docs for more information.

4-Eyes added 7 commits July 10, 2024 16:04
- it's possible for `rack.input` to be `nil` in rack 3, which means that we can't always assume that the body is readable and need to do a nil check. See https://github.com/rack/rack/blob/main/CHANGELOG.md#spec-changes.
- in Rack 3, the body is not automatically rewound after reading, so we need to rewind it manually. See https://github.com/rack/rack/blob/main/UPGRADE-GUIDE.md#rackinput-is-no-longer-rewound-after-consuming-form-and-multipart-data
currently, they're for fixed minor versions and this breaks things like testing older versions of faraday against older versions of rails.
- faraday 2.9.0 dropped support for ruby 2.*, so we need to remove it from the test matrix
- rack 2.1.0 does not work with ruby 3.3, so it has been excluded from the test matrix
- faraday 1.10.3 works with ruby 3+, so we can remove the exclusion for it
Copy link

@Telthius Telthius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice :)

@4-Eyes 4-Eyes merged commit 2db4736 into master Jul 10, 2024
134 checks passed
@4-Eyes 4-Eyes deleted the jaf/rack-3-support branch July 10, 2024 21:53
@4-Eyes 4-Eyes mentioned this pull request Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants