active_call-api 0.1.2 → 0.1.3

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
  SHA256:
3
- metadata.gz: d23874a9558d000decbf108d6b788a55b6828f708e803ec00b94c529e87bec29
4
- data.tar.gz: eb9ee3ac6d81af702a00baebb7c08396f2f119a58877ece7a7ff4362a0cd9cbb
3
+ metadata.gz: f5c3f38434e7692958582f2a3f817729b8d1d9890e6b66ea57f480d749b75d32
4
+ data.tar.gz: 2205f34f43fd3aade686c13a409d7bb3cc488e465c99da41d77f55f1954edc7c
5
5
  SHA512:
6
- metadata.gz: 04ec1dab25deb138924d7afedbe3109e7fde959e9acec589b48cced78be931540319ffd748253645a8cf9037c77aa94f6ae0f76d2ca6c2220d21b66b3b14b9d3
7
- data.tar.gz: e193076a2823202d9275d54d4af2313f8c1969167b11370781827c0e4caa0423368a981ae2de2375e8ae00bac88fdfd22a585cea647ac6ef97bcfda5c93050b4
6
+ metadata.gz: caf0cc2f7811f8ad07e36afc1348d043569ac3473bfc6faba830d61255ee3931cbddd61760bbc42a42a60ccb38790fde4abe49d3150ac078644761c3691c8b92
7
+ data.tar.gz: 2c11d2c5633b359592a8112efe2e9f97dcb1999b079b0f73ba5d30f52144af66244c817cbd14b8fa6f8f864ff05cef7ef3f9e764582f751767d6bb6950c1102f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.1.3] - 2025-04-02
2
+
3
+ - Added HTTP status code 410 Gone
4
+
1
5
  ## [0.1.2] - 2025-03-28
2
6
 
3
7
  - Fix for when included in a Rails app when getting `<NoMethodError: undefined method 'attributes'`.
data/README.md CHANGED
@@ -127,6 +127,7 @@ The following exceptions will get raised when using `call!` and the request was
127
127
  | **407** | `ActiveCall::ProxyAuthenticationRequiredError` |
128
128
  | **408** | `ActiveCall::RequestTimeoutError` |
129
129
  | **409** | `ActiveCall::ConflictError` |
130
+ | **410** | `ActiveCall::GoneError` |
130
131
  | **422** | `ActiveCall::UnprocessableEntityError` |
131
132
  | **429** | `ActiveCall::TooManyRequestsError` |
132
133
  | **5xx** | `ActiveCall::ServerError` |
@@ -165,6 +166,7 @@ class YourGem::BaseService < ActiveCall::Base
165
166
  proxy_authentication_required: YourGem::ProxyAuthenticationRequiredError,
166
167
  request_timeout: YourGem::RequestTimeoutError,
167
168
  conflict: YourGem::ConflictError,
169
+ gone: YourGem::GoneError,
168
170
  unprocessable_entity: YourGem::UnprocessableEntityError,
169
171
  too_many_requests: YourGem::TooManyRequestsError,
170
172
  internal_server_error: YourGem::InternalServerError,
@@ -229,6 +231,10 @@ class YourGem::BaseService < ActiveCall::Base
229
231
  response.status == 409
230
232
  end
231
233
 
234
+ def gone?
235
+ response.status == 410
236
+ end
237
+
232
238
  def unprocessable_entity?
233
239
  response.status == 422
234
240
  end
@@ -11,6 +11,7 @@ en:
11
11
  conflict: 'Conflict'
12
12
  forbidden: 'Forbidden'
13
13
  gateway_timeout: 'Gateway Timeout'
14
+ gone: 'Gone'
14
15
  internal_server_error: 'Internal Server Error'
15
16
  not_found: 'Not Found'
16
17
  not_acceptable: 'Not Acceptable'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveCall
4
4
  module Api
5
- VERSION = '0.1.2'
5
+ VERSION = '0.1.3'
6
6
  end
7
7
  end
@@ -38,6 +38,7 @@ module ActiveCall::Api
38
38
  errors.add(:base, :proxy_authentication_required) and throw :abort if proxy_authentication_required?
39
39
  errors.add(:base, :request_timeout) and throw :abort if request_timeout?
40
40
  errors.add(:base, :conflict) and throw :abort if conflict?
41
+ errors.add(:base, :gone) and throw :abort if gone?
41
42
  errors.add(:base, :unprocessable_entity) and throw :abort if unprocessable_entity?
42
43
  errors.add(:base, :too_many_requests) and throw :abort if too_many_requests?
43
44
 
@@ -90,6 +91,7 @@ module ActiveCall::Api
90
91
  proxy_authentication_required: ActiveCall::ProxyAuthenticationRequiredError,
91
92
  request_timeout: ActiveCall::RequestTimeoutError,
92
93
  conflict: ActiveCall::ConflictError,
94
+ gone: ActiveCall::GoneError,
93
95
  unprocessable_entity: ActiveCall::UnprocessableEntityError,
94
96
  too_many_requests: ActiveCall::TooManyRequestsError,
95
97
  internal_server_error: ActiveCall::InternalServerError,
@@ -270,6 +272,10 @@ module ActiveCall::Api
270
272
  response.status == 409
271
273
  end
272
274
 
275
+ def gone?
276
+ response.status == 410
277
+ end
278
+
273
279
  def unprocessable_entity?
274
280
  response.status == 422
275
281
  end
@@ -28,6 +28,9 @@ module ActiveCall
28
28
  # 409
29
29
  class ConflictError < ClientError; end
30
30
 
31
+ # 410
32
+ class GoneError < ClientError; end
33
+
31
34
  # 422
32
35
  class UnprocessableEntityError < ClientError; end
33
36
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_call-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kobus Joubert
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-03-28 00:00:00.000000000 Z
11
+ date: 2025-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_call