Skip to content

Allow faraday 2 #89

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

Closed
jrochkind opened this issue Mar 28, 2022 · 2 comments · Fixed by #91
Closed

Allow faraday 2 #89

jrochkind opened this issue Mar 28, 2022 · 2 comments · Fixed by #91

Comments

@jrochkind
Copy link
Collaborator

Right now our dependency on faraday-middleware means any app using this gem (or another gem that depends on it) cannot update to faraday 2.0, because the faraday-middleware gem is faraday 1.0-only.

As far as i can tell, we use faraday-middleware only for the "follow redirects" middleware.

if follow_redirects
require 'faraday_middleware'
builder.response :follow_redirects, :limit => follow_redirects.to_i

Updating ruby-oai to require faraday 2.x is likely to be disruptive to current users. We really want it to support 1.x or 2.x.

It's not entirely clear how to use that middleware while working with either faraday 1.x or 2.x

It may require some upstream PR's, looking into it.

lostisland/faraday#1358 (comment)

@jrochkind
Copy link
Collaborator Author

@jrochkind
Copy link
Collaborator Author

Hmm, after switching over to newest version of faraday_follow-redirects gem, we can upgrade to Faraday 2.x... but tests don't actually pass.

We get a <Encoding::CompatibilityError(<incompatible encoding regexp match (ASCII-8BIT regexp with ISO-8859-1 string)>) in one.

I will see if I can find time to try to debug.

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 a pull request may close this issue.

1 participant