Skip to content

Commit c0b6102

Browse files
committed
Added UPGRADING note.
1 parent ff9b968 commit c0b6102

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

UPGRADING.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Upgrading Strava-Ruby-Client
22

3+
### Upgrading to >= 2.3.0
4+
5+
The signature of `Strava::Errors::RatelimitError` has changed with `message` calling `super`, and `headers`, and `errors` removed. Instead, use `message`, `response[:headers]` and `response[:body]['error']` respectively.
6+
7+
See [#91](https://github.com/dblock/strava-ruby-client/pull/91) for details.
8+
39
### Upgrading to >= 2.2.0
410

511
Support for Ruby 2.x has been dropped. The minimum required Ruby version is now 3.0.0.
@@ -45,4 +51,4 @@ client = Strava::Api::Client.new(ca_file: OpenSSL::X509::DEFAULT_CERT_FILE, ca_p
4551

4652
The library was upgraded to require Faraday 1.0 or newer. Change all references to `Faraday::Error::ResourceNotFound` or `Faraday::Error::ConnectionFailed` to `Faraday::ConnectionFailed` and `Faraday::ResourceNotFound` respectively.
4753

48-
See [#30](https://github.com/dblock/strava-ruby-client/pull/30) for more details.
54+
See [#30](https://github.com/dblock/strava-ruby-client/pull/30) for details.

spec/strava/api/client_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@
4949
expect(error.ratelimit.exceeded?).to be(true)
5050
expect(error.ratelimit.exceeded).to eql({ fifteen_minutes_remaining: 0 })
5151
expect(error.response[:request]).to be_nil
52+
expect(error.message).to eq 'the server responded with status 429'
53+
expect(error.response[:headers]).to be_a Hash
54+
expect(error.response[:body]['error']).to eq 'Rate Limit Exceeded'
5255
end
5356
end
5457
end

0 commit comments

Comments
 (0)