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 +4 -4
- data/CHANGELOG.md +3 -1
- data/README.md +10 -5
- data/lib/active_call/api/version.rb +1 -1
- data/lib/active_call/api.rb +0 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50d0496b6464e535935177271048ee1e64f343b02d0861ecf1194e6b478b94bd
|
4
|
+
data.tar.gz: 220af672cf5bc713ba37de16ff2f1491e4b4123fd1f33e1de14dee7c77e95cd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cae306b53bd3c345e93c50144c630a2bf3d55e8639a6d374759727c60d464010ee995969eb49e51b0c86e121d18efc2323bf4e8277796e09fb1bb56139e80033
|
7
|
+
data.tar.gz: 2b2888e5b561c8985cdc33c825774948836c3ff1f6a47a1cc0617904a4a5b2f3502144314b261d9b66befeca62897a68e12ffc1c77988887bc32e444059b0162
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
# Active Call - Api
|
2
2
|
|
3
|
+
[](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
|
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
|
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
|
data/lib/active_call/api.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.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-
|
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: '
|
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
|