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

Uses of FaradayMiddleware#on_complete should not be private #1316

Merged
merged 2 commits into from Dec 28, 2020

Conversation

tarebyte
Copy link
Member

Fixes #1315

In lostisland/faraday#1194 on_complete was introduced to Faraday::Middleware and was extracted out of Faraday::Response. Because our implementations of on_complete were private they no longer responded to FaradayMiddleware#call.

This updates all uses of Octokit::Response::Middleware so that on_complete isn't a private method.

@tarebyte
Copy link
Member Author

For posterity

~/src/octokit/octokit.rb tarebyte/faraday-fixes                                                                                                                                                                                                                                       12s 15:15:44
❯ bundle info faraday
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
The dependency json (>= 2.3.0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
  * faraday (1.2.0)
        Summary: HTTP/REST API client library.
        Homepage: https://lostisland.github.io/faraday
        Path: /Users/tarebyte/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/faraday-1.2.0
~/src/octokit/octokit.rb tarebyte/faraday-fixes                                                                                                                                                                                                                                           15:15:49
❯ bundle exec rake
/Users/tarebyte/.rbenv/versions/2.6.5/bin/ruby -I/Users/tarebyte/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/lib:/Users/tarebyte/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rspec-support-3.10.1/lib /Users/tarebyte/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rspec-core-3.10.1/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb

Randomized with seed 64432
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................WARNING: The preview version of the Template_repositories API is not yet suitable for production use.
You can avoid this message by supplying an appropriate media type in the 'Accept' request
header.
.................WARNING: The preview version of the Template_repositories API is not yet suitable for production use.
You can avoid this message by supplying an appropriate media type in the 'Accept' request
header.
WARNING: The preview version of the Template_repositories API is not yet suitable for production use.
You can avoid this message by supplying an appropriate media type in the 'Accept' request
header.
.....................................................................................................

Finished in 27.37 seconds (files took 1.02 seconds to load)
818 examples, 0 failures

Randomized with seed 64432

Coverage report generated for RSpec to /Users/tarebyte/src/octokit/octokit.rb/coverage. 7231 / 7282 LOC (99.3%) covered.
~/src/octokit/octokit.rb tarebyte/faraday-fixes

@tarebyte tarebyte merged commit a03b75c into 4-stable Dec 28, 2020
@tarebyte tarebyte deleted the tarebyte/faraday-fixes branch December 28, 2020 20:19
kevindew added a commit to alphagov/release that referenced this pull request Feb 25, 2021
This fixes an issue where communication with GitHub no longer resulted
in exceptions being raised on the event of an error [1].

[1]: octokit/octokit.rb#1316
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.

Test failed with Faraday 1.2.0
1 participant