XeroAPI / xero-ruby

Xero Ruby SDK for OAuth 2.0 generated from XeroAPI/Xero-OpenAPI
http://developer.xero.com/
MIT License
58 stars 91 forks source link

xero-ruby-3.17.0 problem #242

Closed tinhphamvan closed 1 year ago

tinhphamvan commented 1 year ago

I tried upgrade to 3.17 but i got ArgumentError: wrong number of arguments (given 4, expected 3) from /usr/local/bundle/gems/faraday-1.10.2/lib/faraday/request/authorization.rb:48:ininitialize'` when calling xero_client.last_connection

Because of faraday version or sth?? Can you guys help me take a look? Screen Shot 2022-12-08 at 10 41 44 image

tinhphamvan commented 1 year ago

lasttime i used 3.9.0 and it works perfect

tinhphamvan commented 1 year ago

I knew why, dependencies must be update to faraday 2.0 instead of 1.10.2 Pls verify!!!

RettBehrens commented 1 year ago

Yes, the latest release was updated to support faraday 2.x and in doing so no longer supports 1.x. This should have been a major version as it's a breaking change. My apologies. The next release will be 4.0.0 with call out of breaking change of faraday dependency

gravitystorm commented 1 year ago

It might be worth yanking the 3.17.0 gem from rubygems.org, if it's a known-broken release. Otherwise people (like me! :smile:) with a Gemfile constraint of gem 'xero-ruby', '~> 3.0' might upgrade to 3.17.0 and run into this problem.

tinhphamvan commented 1 year ago

It might be worth yanking the 3.17.0 gem from rubygems.org, if it's a known-broken release. Otherwise people (like me! 😄) with a Gemfile constraint of gem 'xero-ruby', '~> 3.0' might upgrade to 3.17.0 and run into this problem.

Yes, it's quite annoying! what i have done when update from 3.9 --> 3.17 is: Upgrade:

HashNotAdam commented 1 year ago

Yeah, I wasted far too much time debugging this because I have other dependencies holding back Faraday

pumpkinball commented 1 year ago

Thank you @tinhphamvan for picking this up, we've pulled the 3.17.0 gem now from rubygems. If you want to keep Faraday 2.0, please use gem version >= 4.0.0. @gravitystorm @HashNotAdam

gravitystorm commented 1 year ago

Thank you @pumpkinball !