-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
This file contains 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
- 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
runlevel5
approved these changes
Jul 10, 2024
thenathanjones
approved these changes
Jul 10, 2024
Telthius
approved these changes
Jul 10, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice :)
Merged
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.
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:rack.input
to benil
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.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
appraisal
generated gem files to use~>
syntax so that we're always testing against the latest patch of minor versions.appraisal
v4.0.0
Heads up!
PRs that go 60 days without activity may be automatically closed. See these docs for more information.