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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d23874a9558d000decbf108d6b788a55b6828f708e803ec00b94c529e87bec29
4
- data.tar.gz: eb9ee3ac6d81af702a00baebb7c08396f2f119a58877ece7a7ff4362a0cd9cbb
3
+ metadata.gz: 4a83fe19b657a8adf51e06163d4d237ae3c7bcd979f884ea0cf73cc9dbce2244
4
+ data.tar.gz: 3a9ac4e4a3b733ace4a562326d68579c1a47d209ce3c1c5c78273a2bf89ac8a6
5
5
  SHA512:
6
- metadata.gz: 04ec1dab25deb138924d7afedbe3109e7fde959e9acec589b48cced78be931540319ffd748253645a8cf9037c77aa94f6ae0f76d2ca6c2220d21b66b3b14b9d3
7
- data.tar.gz: e193076a2823202d9275d54d4af2313f8c1969167b11370781827c0e4caa0423368a981ae2de2375e8ae00bac88fdfd22a585cea647ac6ef97bcfda5c93050b4
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/kobusjoubert/active_call?tab=readme-ov-file#usage) section. It takes just 55 seconds.
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/kobusjoubert/active_call-api.
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
 
@@ -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.4'
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.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-03-28 00:00:00.000000000 Z
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/kobusjoubert/active_call-api
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/kobusjoubert/active_call-api
96
- source_code_uri: https://github.com/kobusjoubert/active_call-api
97
- changelog_uri: https://github.com/kobusjoubert/active_call-api/blob/main/CHANGELOG.md
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: