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

Update faraday_middleware #86

Merged
merged 2 commits into from
Feb 17, 2021

Conversation

dorotheelaugwitz
Copy link
Contributor

ch6713

* set `faraday_middleware` version to be `>= 1.0.0`
* amend `PactasItero::Response::RaiseError` to conform with the
[guides for custom faraday middlewares](https://lostisland.github.io/faraday/middleware/custom)

[ch6713](https://app.clubhouse.io/shipcloud/story/6713)
@shortcut-integration
Copy link

This pull request has been linked to Clubhouse Story #6713: Update faraday und faraday_middleware.

Comment on lines 11 to 12

private

def on_complete(response)
if error = PactasItero::Error.from_response(response)
raise error
def call(request_env)
Copy link
Contributor

Choose a reason for hiding this comment

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

Die Leerzeile kann noch weg.

In dem verlinkten Guide steht unten:

Do I need to override #call?
For the majority of middleware, it’s not necessary to override the #call method. You can instead use #on_request and #on_complete.

weswegen auch #on_complete nach wie vor praktikabel wäre. Bei der Variante mit #call steht noch:

When you do so, remember to call either app.call(env) or super to avoid breaking the middleware stack call!

Da du das tust, ist diese Variante aber so auch ok.

Copy link
Contributor

@malachewhiz malachewhiz left a comment

Choose a reason for hiding this comment

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

RTM

@dorotheelaugwitz dorotheelaugwitz merged commit 152a19e into master Feb 17, 2021
@dorotheelaugwitz dorotheelaugwitz deleted the dl-ch6713-update-faraday-middleware branch February 17, 2021 15:39
dorotheelaugwitz added a commit that referenced this pull request Mar 3, 2021
* Changed
- `faraday_middleware` version is specified to be `>= 1.0.0` (#86)
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.

2 participants