-
Notifications
You must be signed in to change notification settings - Fork 463
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CI: Get the build green for modern ruby and rack and rubocop-rspec (
#939) * Update how we use Rack::Utils to get status codes As part of rack/rack#2137 (released in Rack 3) Rack changed the values of `Rack::Utils::SYMBOL_TO_STATUS_CODE` so asking for `:unprocessable_entity` now returns `nil`. The guidance has always been to use `Rack::Util.status_code` (present in the API since Rack 1.1) so let's just do that. * Handle a missing `rack.input` in the env Ever since rack/rack#2018 `rack.input` has been optional so we can't assume it's there and call `read` or `rewind` on it in `Apipie::Extractor::Recorder`. Using safe navigation to call these methods seems like the simplest approach because we want to look for `rack.request.form_hash` instead in both the situation where `rack.input` is missing, or it's empty. * Add rubocop-rspec_rails and get rubocop run to green In rubocop/rubocop-rspec#1848 rubocop-rspec extracted some cops to separate gems, and because we referenced one of them in our rubocop_todo.yml the whole rubocop process wouldn't run because it doesn't like config for cops it doesn't know about. We introducing the missing gem, `rubocop-rspec_rails`, and fix the name in the config to let us run rubocop again. There is one infraction that exists in the source so we fix that to get us to a green rubocop run. * Only add rubocop-rspec_rails for ruby >-= 2.7 It's only available for 2.7+ and we still run this build on 2.6.
- Loading branch information
Showing
7 changed files
with
22 additions
and
11 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 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