savonrb / httpi

Common interface for Ruby's HTTP clients
http://httpirb.com
MIT License
300 stars 150 forks source link

Savon breaks with http gem >= 5.0.0 #217

Closed robertwoolley99 closed 3 years ago

robertwoolley99 commented 3 years ago

Attempting to use Savon with http 5.0.0. breaks.

Current behavior: Running Savon with 5.0.0 results in calls failing with the message '

Steps to reproduce current behavior: Upgrade gems to include http at 5.0.0 Make a call using savon - gives an error 'Key not found: :request' Stack trace from RSpec:

/Users/ttrjw/.rvm/gems/ruby-3.0.1/gems/http-5.0.0/lib/http/response.rb:46:in fetch' /Users/ttrjw/.rvm/gems/ruby-3.0.1/gems/http-5.0.0/lib/http/response.rb:46:in initialize' /Users/ttrjw/.rvm/gems/ruby-3.0.1/gems/webmock-3.12.2/lib/webmock/http_lib_adapters/http_rb/response.rb:32:in 'new' /Users/ttrjw/.rvm/gems/ruby-3.0.1/gems/webmock-3.12.2/lib/webmock/http_lib_adapters/http_rb/response.rb:32:in from_webmock' /Users/ttrjw/.rvm/gems/ruby-3.0.1/gems/webmock-3.12.2/lib/webmock/http_lib_adapters/http_rb/webmock.rb:41:in 'replay' /Users/ttrjw/.rvm/gems/ruby-3.0.1/gems/webmock-3.12.2/lib/webmock/http_lib_adapters/http_rb/webmock.rb:10:in 'exec' /Users/ttrjw/.rvm/gems/ruby-3.0.1/gems/webmock-3.12.2/lib/webmock/http_lib_adapters/http_rb/client.rb:8:in 'perform' /Users/ttrjw/.rvm/gems/ruby-3.0.1/gems/http-5.0.0/lib/http/client.rb:31:in 'request' /Users/ttrjw/.rvm/gems/ruby-3.0.1/gems/http-5.0.0/lib/http/chainable.rb:27:in 'post' /Users/ttrjw/.rvm/gems/ruby-3.0.1/gems/httpi-2.4.5/lib/httpi/adapter/http.rb:36:in 'request' /Users/ttrjw/.rvm/gems/ruby-3.0.1/gems/httpi-2.4.5/lib/httpi.rb:161:in 'request' /Users/ttrjw/.rvm/gems/ruby-3.0.1/gems/httpi-2.4.5/lib/httpi.rb:133:in 'post' /Users/ttrjw/.rvm/gems/ruby-3.0.1/gems/savon-2.12.1/lib/savon/operation.rb:94:in 'block in call_with_logging' /Users/ttrjw/.rvm/gems/ruby-3.0.1/gems/savon-2.12.1/lib/savon/request_logger.rb:12:in 'log' /Users/ttrjw/.rvm/gems/ruby-3.0.1/gems/savon-2.12.1/lib/savon/operation.rb:94:in 'call_with_logging' /Users/ttrjw/.rvm/gems/ruby-3.0.1/gems/savon-2.12.1/lib/savon/operation.rb:54:in 'call' /Users/ttrjw/.rvm/gems/ruby-3.0.1/gems/savon-2.12.1/lib/savon/client.rb:36:in 'call'

[then three lines of own code]

Expected behavior: Call should go through smoothly.

System information:

ruby version: 3.0.1
savon version: 2.12.1
olleolleolle commented 3 years ago

@robertwoolley99 Thanks for the report, here's the webmock report which is the source of the problem: https://github.com/bblimke/webmock/issues/940.

I will close this issue, but please do subscribe to the webmock Issue about that thing.

olleolleolle commented 3 years ago

And now, the updated webmock is released!