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

dependency on faraday_middleware, which is deprecated/obsolete #133

Open
Apteryks opened this issue Jan 9, 2023 · 2 comments
Open

dependency on faraday_middleware, which is deprecated/obsolete #133

Apteryks opened this issue Jan 9, 2023 · 2 comments

Comments

@Apteryks
Copy link

Apteryks commented Jan 9, 2023

Hi,

According to https://github.com/lostisland/faraday_middleware/README.md, that component is deprecated and should be moved away from. Are there plans to do so for faraday-http-cache?

Thanks!

@garaujodev
Copy link
Contributor

I'll take a look. Thanks for the info.

Any updates I'll post here.

@garaujodev
Copy link
Contributor

Hello @Apteryks, sorry for my late reply.

faraday_middleware gem is only a development dependency when ENV['FARADAY_VERSION'] is set to <= 1.0, faraday-http-cache will pick the proper "Middleware" class according to Faraday version you're using dynamically.

if Faraday.respond_to?(:register_middleware)
Faraday.register_middleware http_cache: Faraday::HttpCache
elsif Faraday::Middleware.respond_to?(:register_middleware)
Faraday::Middleware.register_middleware http_cache: Faraday::HttpCache
end

So it should work in all versions, but if you get any issue please let me know.

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

No branches or pull requests

2 participants