rdstation-ruby-client 2.3.0 → 2.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93cdc7036300cb21cf4609bb92042f47e280a864f84cfaba3b5a9e6181274aad
4
- data.tar.gz: 349d48fb5a969953c3e637b0cf73aef037328aafff3aeb779c7f217c0ac1e537
3
+ metadata.gz: b6526c586f6fb45ddb0851311da56f9525ca352eb2383dd46e746fe98c9642f7
4
+ data.tar.gz: c539bb37a63551c67b2e5d376bf08855f2a1a7371232b4490f7b3c06b1976c02
5
5
  SHA512:
6
- metadata.gz: 8cfa5e1cd4d75f9a30536b99055075e92a7bdb3630ed8b71cfc66f4032983677079d78663d9eaadc4fcfb88875665281e271b270c6a584e93a81b5065bd7f005
7
- data.tar.gz: 7e64c0b2983ce2d081d4236c42d432a7c994f2927f17e766020067b512a2ed47b1988acdc5c1a8d81edaf3cd0acc43f96209e1a0192abb11d0f52074758a1989
6
+ metadata.gz: c6c7f1555c420ac06ee04bfe1d2ff5596c4a7d92dd39990b1221ff386247dcf3142b78c065190030856183f2b0878f0bcaae55e0b01889e738a04dc735704767
7
+ data.tar.gz: e6fd2530aa309a93dac05b913ca7ab527d740ebd20fe640ea3c5fd87fe4449943a6c501d3902d2f9ecd40b79caa4431df143baccda99d642b3fe37ae13e25a20
@@ -1,3 +1,7 @@
1
+ ## 2.3.1
2
+
3
+ - Fixed a bug when no error is found in the known errors list (issue [#52](https://github.com/ResultadosDigitais/rdstation-ruby-client/issues/52))
4
+
1
5
  ## 2.3.0
2
6
 
3
7
  ### Additions
@@ -24,6 +24,7 @@ module RDStation
24
24
  class BadGateway < Error; end
25
25
  class ServiceUnavailable < Error; end
26
26
  class ServerError < Error; end
27
+ class UnknownError < Error; end
27
28
 
28
29
  # 400 - Bad Request
29
30
  class ConflictingField < BadRequest; end
@@ -37,6 +37,8 @@ module RDStation
37
37
  when 502 then RDStation::Error::BadGateway
38
38
  when 503 then RDStation::Error::ServiceUnavailable
39
39
  when 500..599 then RDStation::Error::ServerError
40
+ else
41
+ RDStation::Error::UnknownError
40
42
  end
41
43
  end
42
44
 
@@ -1,3 +1,3 @@
1
1
  module RDStation
2
- VERSION = '2.3.0'.freeze
2
+ VERSION = '2.3.1'.freeze
3
3
  end
@@ -151,6 +151,7 @@ RSpec.describe RDStation::ErrorHandler do
151
151
  expect { error_handler.raise_error }.to raise_error(RDStation::Error::ServiceUnavailable, 'Error Message')
152
152
  end
153
153
  end
154
+
154
155
  context 'with 5xx error' do
155
156
  let(:http_status) { 505 }
156
157
 
@@ -172,5 +173,13 @@ RSpec.describe RDStation::ErrorHandler do
172
173
  expect { error_handler.raise_error }.to raise_error(RDStation::Error::BadGateway, '<html><body>HTML error response</body></html>')
173
174
  end
174
175
  end
176
+
177
+ context 'with an unknown error' do
178
+ let(:http_status) { 123 }
179
+
180
+ it 'raises a unknown error' do
181
+ expect { error_handler.raise_error }.to raise_error(RDStation::Error::UnknownError, 'Error Message')
182
+ end
183
+ end
175
184
  end
176
185
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdstation-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paulo L F Casaretto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-05 00:00:00.000000000 Z
11
+ date: 2020-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler