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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +6 -0
- data/lib/active_call/api/locale/en.yml +1 -0
- data/lib/active_call/api/version.rb +1 -1
- data/lib/active_call/api.rb +6 -0
- data/lib/active_call/error.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5c3f38434e7692958582f2a3f817729b8d1d9890e6b66ea57f480d749b75d32
|
4
|
+
data.tar.gz: 2205f34f43fd3aade686c13a409d7bb3cc488e465c99da41d77f55f1954edc7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: caf0cc2f7811f8ad07e36afc1348d043569ac3473bfc6faba830d61255ee3931cbddd61760bbc42a42a60ccb38790fde4abe49d3150ac078644761c3691c8b92
|
7
|
+
data.tar.gz: 2c11d2c5633b359592a8112efe2e9f97dcb1999b079b0f73ba5d30f52144af66244c817cbd14b8fa6f8f864ff05cef7ef3f9e764582f751767d6bb6950c1102f
|
data/CHANGELOG.md
CHANGED
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
|
data/lib/active_call/api.rb
CHANGED
@@ -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
|
data/lib/active_call/error.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2025-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_call
|