team-telnyx / telnyx-ruby

Telnyx API Ruby Client
https://developers.telnyx.com/docs/api/v2/overview
MIT License
24 stars 17 forks source link

Support Faraday 2.x #83

Closed woodhull closed 8 months ago

woodhull commented 1 year ago

We'd like to use Telnyx with an application that is already using Faraday 2.x

The largest change in the new version is moving middleware out of the core gem into middleware specific gems of their own. https://github.com/lostisland/faraday/discussions/1358 https://github.com/lostisland/faraday/blob/main/UPGRADING.md

Is it possible to release a version that supports Faraday 2.0+

ADandyGuyInSpace commented 8 months ago

Updated to support faraday going forward

daneshd commented 1 month ago

@ADandyGuyInSpace I was setting up this gem in a new project and ran into a load error with this gem requiring faraday/retry. I believe faraday-retry needs to be added to as a dependency in telnyx.gemspec. Adding it to my own Gemfile resolved my load issue.

/usr/local/lib/ruby/3.3.0/bundled_gems.rb:75:in `require': cannot load such file -- faraday/retry (LoadError)
    from /usr/local/lib/ruby/3.3.0/bundled_gems.rb:75:in `block (2 levels) in replace_require'
    from /usr/local/bundle/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
    from /usr/local/bundle/gems/telnyx-3.0.3/lib/telnyx.rb:7:in `<main>'
n-at-han-k commented 1 week ago

@ADandyGuyInSpace I was setting up this gem in a new project and ran into a load error with this gem requiring faraday/retry. I believe faraday-retry needs to be added to as a dependency in telnyx.gemspec. Adding it to my own Gemfile resolved my load issue.

/usr/local/lib/ruby/3.3.0/bundled_gems.rb:75:in `require': cannot load such file -- faraday/retry (LoadError)
  from /usr/local/lib/ruby/3.3.0/bundled_gems.rb:75:in `block (2 levels) in replace_require'
  from /usr/local/bundle/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
  from /usr/local/bundle/gems/telnyx-3.0.3/lib/telnyx.rb:7:in `<main>'

I had this same issue. Running bundle add faraday-retry fixed it.