mini_strava 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 17f57c2f43ce57a2adc6204a120300911952ec8b
4
- data.tar.gz: b0695afa11997d750f50a17f3641c3e7d89a7988
3
+ metadata.gz: c58a54a619f569d1e533819d5302ec0d51ec3ee5
4
+ data.tar.gz: be9a775892380738db710c16240bbd1fa4c6a238
5
5
  SHA512:
6
- metadata.gz: 6a609b02a84cfc78ef00ace1776ab9d796ce0b1213a9ca642d487835cafcd307022827adbbd91d3443452fa56067af1d51c6a348d3fafdaba8b9eccfb3384c19
7
- data.tar.gz: 02e2b65c27f97cd57c5554265da73c00577863fb3380c27aabf5f22098ccb08573981c384503f8136cd7ca43f5c2bf2bb7d587c8bdb8dac246872d9a2162e2ee
6
+ metadata.gz: 7c5b4d9acaec79c52161ab3704382d5de1631baa4d01ff923c42413b3b8da69ca52fe459e58e4fba7e6787e35a1b7746b1bac063509f88916064849505b6caae
7
+ data.tar.gz: 8e564ed16e44006145fb1c1b3503fc56f62349823970197f78990de3999ddde17b71ca8b5ce01f18c72ba677b389929ae2a337992792efc7423cb2252786f889
@@ -45,9 +45,9 @@ module MiniStrava
45
45
  end
46
46
 
47
47
  case response.code
48
- when 401
48
+ when '401'
49
49
  raise AuthorizationError.new
50
- when 404
50
+ when '404'
51
51
  raise ResourceNotFound.new
52
52
  else
53
53
  response
@@ -1,3 +1,3 @@
1
1
  module MiniStrava
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
data/spec/client_spec.rb CHANGED
@@ -30,7 +30,7 @@ module MiniStrava
30
30
  describe 'perform_request' do
31
31
  context 'not found' do
32
32
  it 'raises a ResourceNotFound exception' do
33
- not_found_response = double('response', code: 404)
33
+ not_found_response = double('response', code: '404')
34
34
  allow(Net::HTTP).to receive(:start).and_return not_found_response
35
35
  expect{ subject.send(:perform_request, nil, URI('http://localhost')) }.to raise_error(Client::ResourceNotFound)
36
36
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_strava
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrea Franz