api_client 0.5.25-java → 0.5.26-java
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 +18 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46f8d80430a411bf5710319e0e19a34b921b45ec0083a52a65638a1143d0f95d
|
4
|
+
data.tar.gz: 664d529dae8ffc5510ccf88cbcb48fed53c7e6193d6a384ec6504feca167eedc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d259696c46cc81ce5848546125a54b70f57d32e6f7339923633c7adfd1953a421858eba11e8d8734811166818bee8366e32740fbd04cad11ff6637e5595ee7f
|
7
|
+
data.tar.gz: ac25304609317ecf4e95f04bda447ef37e55cac7ffa3acae6d8329308ca1820a659235853707f610a6f9b93dfd81aa61ac77e602968b685227367a06c8163ff2
|
data/CHANGELOG.md
CHANGED
@@ -109,6 +109,8 @@ module ApiClient
|
|
109
109
|
raise ApiClient::Errors::Conflict.new(nil, request, response)
|
110
110
|
when 410
|
111
111
|
raise ApiClient::Errors::Gone.new(nil, request, response)
|
112
|
+
when 412
|
113
|
+
raise ApiClient::Errors::PreconditionFailed.new(nil, request, response)
|
112
114
|
when 422
|
113
115
|
raise ApiClient::Errors::UnprocessableEntity.new(response.body, request, response)
|
114
116
|
when 423
|
data/lib/api_client/errors.rb
CHANGED
@@ -24,6 +24,7 @@ module ApiClient
|
|
24
24
|
class Gone < ApiClientError; end
|
25
25
|
class ServerError < ApiClientError; end
|
26
26
|
class UnprocessableEntity < ApiClientError; end
|
27
|
+
class PreconditionFailed < ApiClientError; end
|
27
28
|
class Locked < ApiClientError; end
|
28
29
|
class TooManyRequests < ApiClientError; end
|
29
30
|
end
|
data/lib/api_client/version.rb
CHANGED
@@ -149,6 +149,13 @@ describe ApiClient::Connection::Basic do
|
|
149
149
|
}.should raise_error(ApiClient::Errors::Gone, "Status code: 410")
|
150
150
|
end
|
151
151
|
|
152
|
+
it "raises an ApiClient::Errors::PreconditionFailed if status is 412" do
|
153
|
+
@response.env[:status] = 412
|
154
|
+
lambda {
|
155
|
+
@instance.send :handle_response, request, @response
|
156
|
+
}.should raise_error(ApiClient::Errors::PreconditionFailed, "Status code: 412")
|
157
|
+
end
|
158
|
+
|
152
159
|
it "raises an ApiClient::Errors::Unsupported if status is 422" do
|
153
160
|
@response.env[:status] = 422
|
154
161
|
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.26
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Zendesk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -17,8 +17,8 @@ dependencies:
|
|
17
17
|
- !ruby/object:Gem::Version
|
18
18
|
version: 2.14.1
|
19
19
|
name: rspec
|
20
|
-
type: :development
|
21
20
|
prerelease: false
|
21
|
+
type: :development
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
@@ -31,8 +31,8 @@ dependencies:
|
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '0'
|
33
33
|
name: jrjackson
|
34
|
-
type: :runtime
|
35
34
|
prerelease: false
|
35
|
+
type: :runtime
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
@@ -45,8 +45,8 @@ dependencies:
|
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 2.0.5
|
47
47
|
name: hashie
|
48
|
-
type: :runtime
|
49
48
|
prerelease: false
|
49
|
+
type: :runtime
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
@@ -62,8 +62,8 @@ dependencies:
|
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: 1.0.0
|
64
64
|
name: faraday
|
65
|
-
type: :runtime
|
66
65
|
prerelease: false
|
66
|
+
type: :runtime
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
69
|
- - ">="
|
@@ -79,8 +79,8 @@ dependencies:
|
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: 1.6.1
|
81
81
|
name: multi_json
|
82
|
-
type: :runtime
|
83
82
|
prerelease: false
|
83
|
+
type: :runtime
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - ">="
|
@@ -161,29 +161,29 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: '0'
|
163
163
|
requirements: []
|
164
|
-
rubygems_version: 3.
|
164
|
+
rubygems_version: 3.1.6
|
165
165
|
signing_key:
|
166
166
|
specification_version: 3
|
167
167
|
summary: API client builder
|
168
168
|
test_files:
|
169
169
|
- spec/spec_helper.rb
|
170
|
-
- spec/support/matchers.rb
|
171
|
-
- spec/api_client/utils_spec.rb
|
172
170
|
- spec/api_client/scope_spec.rb
|
173
171
|
- spec/api_client/base_spec.rb
|
174
|
-
- spec/api_client/
|
175
|
-
- spec/api_client/resource/scope_spec.rb
|
176
|
-
- spec/api_client/resource/base_spec.rb
|
177
|
-
- spec/api_client/connection/basic_spec.rb
|
172
|
+
- spec/api_client/utils_spec.rb
|
178
173
|
- spec/api_client/connection/abstract_spec.rb
|
174
|
+
- spec/api_client/connection/basic_spec.rb
|
179
175
|
- spec/api_client/connection/oauth_spec.rb
|
180
176
|
- spec/api_client/connection/request/logger_spec.rb
|
181
177
|
- spec/api_client/connection/request/json_spec.rb
|
182
178
|
- spec/api_client/connection/request/oauth_spec.rb
|
183
|
-
- spec/api_client/base/
|
184
|
-
- spec/api_client/base/inheritance_spec.rb
|
179
|
+
- spec/api_client/base/parsing_spec.rb
|
185
180
|
- spec/api_client/base/instantiation_spec.rb
|
181
|
+
- spec/api_client/base/inheritance_spec.rb
|
182
|
+
- spec/api_client/base/delegation_spec.rb
|
186
183
|
- spec/api_client/base/connection_hook_spec.rb
|
187
184
|
- spec/api_client/base/marshalling_spec.rb
|
188
|
-
- spec/api_client/base/
|
189
|
-
- spec/api_client/
|
185
|
+
- spec/api_client/base/scoping_spec.rb
|
186
|
+
- spec/api_client/resource/scope_spec.rb
|
187
|
+
- spec/api_client/resource/base_spec.rb
|
188
|
+
- spec/api_client/resource/name_spec.rb
|
189
|
+
- spec/support/matchers.rb
|