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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6aee99219c58bf02f29e11548ea72dd56ad18fba534f326626147053148f81b
4
- data.tar.gz: 767a054b03b9ea36501f7dbdd71bc898d65d5db26b09962dbb1d4e4283c60203
3
+ metadata.gz: 46f8d80430a411bf5710319e0e19a34b921b45ec0083a52a65638a1143d0f95d
4
+ data.tar.gz: 664d529dae8ffc5510ccf88cbcb48fed53c7e6193d6a384ec6504feca167eedc
5
5
  SHA512:
6
- metadata.gz: ae82881334deac2a7d458e4618d6c7502580e4a070202e04836b8166603a42bba48d6abe047efda1eaff153f540993c1ccb0109a275eebffcf35e38a01985abb
7
- data.tar.gz: 78193bbf66f1e8c8d961f83b39ed86a23348cca2c56c235e1f896ae8b19ec676aaa0f678602c00b5a239e4c0555814d7b1b3a6b9432a3d3bc3414dda1d5ad834
6
+ metadata.gz: 7d259696c46cc81ce5848546125a54b70f57d32e6f7339923633c7adfd1953a421858eba11e8d8734811166818bee8366e32740fbd04cad11ff6637e5595ee7f
7
+ data.tar.gz: ac25304609317ecf4e95f04bda447ef37e55cac7ffa3acae6d8329308ca1820a659235853707f610a6f9b93dfd81aa61ac77e602968b685227367a06c8163ff2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.5.26
2
+
3
+ * Add support for HTTP status code: 412 Precondition Failed
4
+
1
5
  # 0.5.25
2
6
 
3
7
  * Fix broken gem build (gemspec files)
@@ -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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module ApiClient
2
- VERSION = '0.5.25'
2
+ VERSION = '0.5.26'
3
3
  end
@@ -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.25
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: 2020-07-15 00:00:00.000000000 Z
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.0.6
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/resource/name_spec.rb
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/scoping_spec.rb
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/parsing_spec.rb
189
- - spec/api_client/base/delegation_spec.rb
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