ruckus / quickbooks-ruby

Quickbooks Online REST API V3 - Ruby
MIT License
374 stars 302 forks source link

Use Faraday::UploadIO instead of UploadIO #596

Closed ngan closed 1 year ago

ngan commented 1 year ago

This changes all reference of the deprecated ::UploadIO for Faraday::UploadIO. multipart-post 2.2.0 deprecates top-level UploadIO: https://github.com/socketry/multipart-post/commit/cb18a32ed9522af9e4072195d0411a8281c6a061#diff-f192e4f2c6b7ce852ab54997f6dec1141f625ccd9d02a002b1a8adc39033c250

I decided to just use Faraday's alias of UploadIO since they check the version of mutlipart-post you're on and alias the constant properly. I also added >= 1.0.4 for multipart-post...since Faraday::UploadIO wasn't introduced until 1.0.2 anyways. So, I'm not sure how this was working for folks with multipart-post 1.0.0 or 1.0.1: https://github.com/ruckus/quickbooks-ruby/blob/2.0.2/lib/quickbooks/service/upload.rb#L23

ngan commented 1 year ago

@ruckus mind taking a look?