-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify Rack 3 support using
Rack::Headers
The `Rack::Headers` subclass of `Hash` was added in Rack 3, and is meant to help libraries support both Rack 2 and 3. I was concerned whether returning `Rack::Headers` instead of `Hash` to the end user was backwards compatible, but it seems that both Roda and Rack are doing it, so it should be safe. We remove Appraisal and for now let Rack 2 be tested implicitly with Ruby 2.3, as Rack 3 requires Ruby 2.4+. But I don't think we need to be testing Rack 2.x support, especially now that we've removed duplication, I would be surprised if it breaks. With `Rack::Headers` we were able to keep Ruby 2.3 support, as we're not using `Hash#transform_keys` anymore. I also switched from rack-test_app, which seems to be unmaintained, back to rack-test, which is the established library for testing Rack apps. Ever since Jeremy Evans took over maintenance, it's gotten a lot better and more flexible, so it's completely viable for Shrine's needs. Since rack-test returns `Rack::Headers`, we were able to remove the header constants.
- Loading branch information
Showing
19 changed files
with
314 additions
and
421 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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
Oops, something went wrong.