Jesus / dropbox_api

Ruby client library for Dropbox API v2
MIT License
171 stars 113 forks source link

Address `Faraday::Connection#authorization` deprecation warning #93

Closed nsmmrs closed 2 years ago

nsmmrs commented 2 years ago

Fixes #89:

WARNING: `Faraday::Connection#authorization` is deprecated; it will be removed in version 2.0.
While initializing your connection, use `#request(:authorization, ...)` instead.
See https://lostisland.github.io/faraday/middleware/authentication for more usage info.

The tests pass, but I've never touched Faraday or VCR before, so I'm sure a sanity check is in order.

It may be worth noting that when I remove the list_folder_longpoll VCR fixtures and re-run the tests, I do get this one failure:

Failures:

  1) DropboxApi::Client#list_folder_longpoll indicates if there're changes
     Failure/Error: expect(result.changes).to be_truthy

       expected: truthy value
            got: false
     # ./spec/endpoints/files/list_folder_longpoll_spec.rb:22:in `block (2 levels) in <top (required)>'
     # ./spec/support/vcr.rb:36:in `block (3 levels) in <top (required)>'
     # ./spec/support/vcr.rb:36:in `block (2 levels) in <top (required)>'

Finished in 54.28 seconds (files took 0.93252 seconds to load)
210 examples, 1 failure

Failed examples:

rspec ./spec/endpoints/files/list_folder_longpoll_spec.rb:19 # DropboxApi::Client#list_folder_longpoll indicates if there're changes
rainerborene commented 2 years ago

@Jesus could you please merge this PR and release a new version?

Jesus commented 2 years ago

Thanks for flagging the problem with the list_folder/longpoll endpoint, it was a bug in the tests and have been fixed in 3cd0c321e93de2930669286930030b17a7abaa93. Totally unrelated to your changes.

rainerborene commented 2 years ago

@Jesus did you release a new version on Rubygems? If not, please do so. Thanks, dude :)