api_client 0.5.20 → 0.5.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/api_client/connection/basic.rb +2 -0
- data/lib/api_client/errors.rb +1 -0
- data/lib/api_client/version.rb +1 -1
- data/spec/api_client/connection/basic_spec.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 740df514af720a036b09ab2fdf1ccf1bbd3a8067
|
4
|
+
data.tar.gz: 6e9a48595d5242e14a2c676ffaed756882a4e65c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc07d971fa5c4c35499ba037789c2c0a6f9ec96a850b20493dfd3d1dc810e44378fd2ee94fc130f2dc4bf65dbc129256576e9c148d15d4ec9ff2dec85b9207b6
|
7
|
+
data.tar.gz: 2bdae8df28fd038473debd05eca7c8b7b02d710c7c56259698b97444b56379f3371a4ab361e078389fcf40d9612f2e92873d9386af4d49803f0f440c694ed736
|
data/CHANGELOG.md
CHANGED
@@ -107,6 +107,8 @@ module ApiClient
|
|
107
107
|
raise ApiClient::Errors::Unsupported.new(nil, request, response)
|
108
108
|
when 409
|
109
109
|
raise ApiClient::Errors::Conflict.new(nil, request, response)
|
110
|
+
when 410
|
111
|
+
raise ApiClient::Errors::Gone.new(nil, request, response)
|
110
112
|
when 422
|
111
113
|
raise ApiClient::Errors::UnprocessableEntity.new(response.body, request, response)
|
112
114
|
when 429
|
data/lib/api_client/errors.rb
CHANGED
@@ -21,6 +21,7 @@ module ApiClient
|
|
21
21
|
class BadRequest < ApiClientError; end
|
22
22
|
class Unsupported < ApiClientError; end
|
23
23
|
class Conflict < ApiClientError; end
|
24
|
+
class Gone < ApiClientError; end
|
24
25
|
class ServerError < ApiClientError; end
|
25
26
|
class UnprocessableEntity < ApiClientError; end
|
26
27
|
class TooManyRequests < ApiClientError; end
|
data/lib/api_client/version.rb
CHANGED
@@ -142,6 +142,13 @@ describe ApiClient::Connection::Basic do
|
|
142
142
|
}.should raise_error(ApiClient::Errors::Conflict, "Status code: 409")
|
143
143
|
end
|
144
144
|
|
145
|
+
it "raises an ApiClient::Errors::Gone if status is 410" do
|
146
|
+
@response.env[:status] = 410
|
147
|
+
lambda {
|
148
|
+
@instance.send :handle_response, request, @response
|
149
|
+
}.should raise_error(ApiClient::Errors::Gone, "Status code: 410")
|
150
|
+
end
|
151
|
+
|
145
152
|
it "raises an ApiClient::Errors::Unsupported if status is 422" do
|
146
153
|
@response.env[:status] = 422
|
147
154
|
lambda {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: api_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcin Bunsch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|