active_call-api 0.1.2 → 0.1.4
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 +8 -0
- data/README.md +8 -2
- 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 +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a83fe19b657a8adf51e06163d4d237ae3c7bcd979f884ea0cf73cc9dbce2244
|
4
|
+
data.tar.gz: 3a9ac4e4a3b733ace4a562326d68579c1a47d209ce3c1c5c78273a2bf89ac8a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f1a745f6d8058aea06eaa833d57a83d2334d2064e0722dcc7634a49d01d92b4384624af1f280fefa008095ebf8a24f514f64f145ccb9912d0d942f783fe0ab7
|
7
|
+
data.tar.gz: 725e861564f3560394ca532549d791b2d2c00ee061de2e8250379d3cea71d96803548f67c5657711043eb34d8739790045519018fd4d1353a378b0bbaa84d0dc
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## [0.1.4] - 2025-05-07
|
2
|
+
|
3
|
+
- Update repository urls to activecall organization.
|
4
|
+
|
5
|
+
## [0.1.3] - 2025-04-02
|
6
|
+
|
7
|
+
- Added HTTP status code 410 Gone
|
8
|
+
|
1
9
|
## [0.1.2] - 2025-03-28
|
2
10
|
|
3
11
|
- Fix for when included in a Rails app when getting `<NoMethodError: undefined method 'attributes'`.
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Active Call - API is an extension of [Active Call](https://rubygems.org/gems/active_call) that provides a standardized way to create service objects for REST API endpoints.
|
6
6
|
|
7
|
-
Before proceeding, please review the [Active Call Usage](https://github.com/
|
7
|
+
Before proceeding, please review the [Active Call Usage](https://github.com/activecall/active_call?tab=readme-ov-file#usage) section. It takes just 55 seconds.
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
@@ -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
|
@@ -291,7 +297,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
291
297
|
|
292
298
|
## Contributing
|
293
299
|
|
294
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
300
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/activecall/active_call-api.
|
295
301
|
|
296
302
|
## License
|
297
303
|
|
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.4
|
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-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_call
|
@@ -86,15 +86,15 @@ files:
|
|
86
86
|
- lib/active_call/api/version.rb
|
87
87
|
- lib/active_call/error.rb
|
88
88
|
- sig/active_call/api.rbs
|
89
|
-
homepage: https://github.com/
|
89
|
+
homepage: https://github.com/activecall/active_call-api
|
90
90
|
licenses:
|
91
91
|
- MIT
|
92
92
|
metadata:
|
93
93
|
allowed_push_host: https://rubygems.org
|
94
94
|
rubygems_mfa_required: 'true'
|
95
|
-
homepage_uri: https://github.com/
|
96
|
-
source_code_uri: https://github.com/
|
97
|
-
changelog_uri: https://github.com/
|
95
|
+
homepage_uri: https://github.com/activecall/active_call-api
|
96
|
+
source_code_uri: https://github.com/activecall/active_call-api
|
97
|
+
changelog_uri: https://github.com/activecall/active_call-api/blob/main/CHANGELOG.md
|
98
98
|
post_install_message:
|
99
99
|
rdoc_options: []
|
100
100
|
require_paths:
|