active_call-api 0.1.0 → 0.1.1

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: 0d89661cdfe0817001170ea4c3bbcefdde885817d1083135fb2579508b0495cc
4
- data.tar.gz: 0f5e046770d937b922e26fe222682889eef76e4493cad13b13b846e0edf5541a
3
+ metadata.gz: 50d0496b6464e535935177271048ee1e64f343b02d0861ecf1194e6b478b94bd
4
+ data.tar.gz: 220af672cf5bc713ba37de16ff2f1491e4b4123fd1f33e1de14dee7c77e95cd3
5
5
  SHA512:
6
- metadata.gz: 23546750b36d58b739fa1e02cb1978df326bf7453c40ddf843b28ce17c66737b6a5d5cbd10b2fb25d8605ae0e47ff4479672497529ba74f9fcac8cc56015b5a0
7
- data.tar.gz: 5f9459ff18547e0bcb1dc8bf2373ef628aa3e30451e7310a04c4f84a3e28095872bab603ce3b6a136d73a1b78a82a3b7d03a96f4a16ea7d2a17cfda4bf669b34
6
+ metadata.gz: cae306b53bd3c345e93c50144c630a2bf3d55e8639a6d374759727c60d464010ee995969eb49e51b0c86e121d18efc2323bf4e8277796e09fb1bb56139e80033
7
+ data.tar.gz: 2b2888e5b561c8985cdc33c825774948836c3ff1f6a47a1cc0617904a4a5b2f3502144314b261d9b66befeca62897a68e12ffc1c77988887bc32e444059b0162
data/CHANGELOG.md CHANGED
@@ -1,4 +1,6 @@
1
- ## [Unreleased]
1
+ ## [0.1.1] - 2025-03-27
2
+
3
+ - Remove `include ActiveModel::Validations`, it is already included with `active_call`.
2
4
 
3
5
  ## [0.1.0] - 2025-03-25
4
6
 
data/README.md CHANGED
@@ -1,23 +1,23 @@
1
1
  # Active Call - Api
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/active_call-api.svg?icon=si%3Arubygems)](https://badge.fury.io/rb/active_call-api)
4
+
3
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.
4
6
 
5
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.
6
8
 
7
9
  ## Installation
8
10
 
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
-
11
11
  Install the gem and add to the application's Gemfile by executing:
12
12
 
13
13
  ```bash
14
- bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
14
+ bundle add active_call-api
15
15
  ```
16
16
 
17
17
  If bundler is not being used to manage dependencies, install the gem by executing:
18
18
 
19
19
  ```bash
20
- gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
20
+ gem install active_call-api
21
21
  ```
22
22
 
23
23
  ## Usage
@@ -168,10 +168,11 @@ class YourGem::BaseService < ActiveCall::Base
168
168
  unprocessable_entity: YourGem::UnprocessableEntityError,
169
169
  too_many_requests: YourGem::TooManyRequestsError,
170
170
  internal_server_error: YourGem::InternalServerError,
171
+ not_implemented: YourGem::NotImplementedError,
171
172
  bad_gateway: YourGem::BadGatewayError,
172
173
  service_unavailable: YourGem::ServiceUnavailableError,
173
174
  gateway_timeout: YourGem::GatewayTimeoutError
174
- }
175
+ }.freeze
175
176
  end
176
177
  end
177
178
 
@@ -240,6 +241,10 @@ class YourGem::BaseService < ActiveCall::Base
240
241
  response.status == 500
241
242
  end
242
243
 
244
+ def not_implemented?
245
+ response.status == 501
246
+ end
247
+
243
248
  def bad_gateway?
244
249
  response.status == 502
245
250
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveCall
4
4
  module Api
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
6
6
  end
7
7
  end
@@ -18,8 +18,6 @@ module ActiveCall::Api
18
18
  extend ActiveSupport::Concern
19
19
 
20
20
  included do
21
- include ActiveModel::Validations
22
-
23
21
  validate on: :response do
24
22
  throw :abort if response.is_a?(Enumerable)
25
23
 
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.0
4
+ version: 0.1.1
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-25 00:00:00.000000000 Z
11
+ date: 2025-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_call
@@ -90,7 +90,7 @@ licenses:
90
90
  - MIT
91
91
  metadata:
92
92
  allowed_push_host: https://rubygems.org
93
- rubygems_mfa_required: 'false'
93
+ rubygems_mfa_required: 'true'
94
94
  homepage_uri: https://github.com/kobusjoubert/active_call-api
95
95
  source_code_uri: https://github.com/kobusjoubert/active_call-api
96
96
  changelog_uri: https://github.com/kobusjoubert/active_call-api/blob/main/CHANGELOG.md