ddy_remote_resource 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +34 -0
- data/CHANGELOG.md +9 -1
- data/lib/remote_resource/errors.rb +1 -0
- data/lib/remote_resource/request.rb +2 -0
- data/lib/remote_resource/version.rb +1 -1
- data/spec/lib/remote_resource/request_spec.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8cd90a581e26c088e0c97a35cb78784d1cf32b348d3f18dae23fc8c34b0fed09
|
4
|
+
data.tar.gz: 0f2dbdbd7f2ce7de69e5da14d98657854098337c7b0154beaaa695034911ccde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c67adbb1a6d2e6758ea13e6a6c4dfd325c1c97ff94d0cd04431235bb8ee3e5c2d55dff162b86fc4177310851a24fbaace509662331376a8663c3353ee157a587
|
7
|
+
data.tar.gz: c6eff6555735d51d30900b1136def3b0937d8477f3ebec37d792419392f25b2b22527bf92fe625419567d1bc881ff3acf37827d2b4c7b493baacef403c193dc8
|
@@ -0,0 +1,34 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- main
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
test:
|
13
|
+
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
|
16
|
+
strategy:
|
17
|
+
matrix:
|
18
|
+
ruby-version: [3.1, 3.2, 3.3] # Define the Ruby versions to test against
|
19
|
+
|
20
|
+
steps:
|
21
|
+
- name: Check out code
|
22
|
+
uses: actions/checkout@v2
|
23
|
+
|
24
|
+
- name: Set up Ruby
|
25
|
+
uses: ruby/setup-ruby@v1
|
26
|
+
with:
|
27
|
+
ruby-version: ${{ matrix.ruby-version }} # Use the version defined in the matrix
|
28
|
+
bundler-cache: true # Caches 'vendor/bundle' directory
|
29
|
+
|
30
|
+
- name: Install dependencies
|
31
|
+
run: bundle install
|
32
|
+
|
33
|
+
- name: Run tests
|
34
|
+
run: bundle exec rake spec
|
data/CHANGELOG.md
CHANGED
@@ -2,13 +2,21 @@
|
|
2
2
|
|
3
3
|
## [Unreleased]
|
4
4
|
|
5
|
+
## [1.3.3] - 2023-08-20
|
6
|
+
|
7
|
+
### Added
|
8
|
+
|
9
|
+
- Add HTTP 429 TooManyRequests error
|
10
|
+
|
5
11
|
## [1.3.2] - 2023-08-08
|
6
12
|
|
7
13
|
### Added
|
8
14
|
|
9
15
|
- Allow using request body for GET requests by passing `force_get_params_in_body: true`.
|
10
16
|
|
11
|
-
|
17
|
+
```ruby
|
18
|
+
User.all(params: {ids: ids}, force_get_params_in_body: true)
|
19
|
+
```
|
12
20
|
|
13
21
|
## [1.3.1] - 2023-02-26
|
14
22
|
|
@@ -81,6 +81,7 @@ module RemoteResource
|
|
81
81
|
HTTPConflict = Class.new(HTTPClientError) # HTTP 409
|
82
82
|
HTTPGone = Class.new(HTTPClientError) # HTTP 410
|
83
83
|
HTTPTeapot = Class.new(HTTPClientError) # HTTP 418
|
84
|
+
HTTPTooManyRequests = Class.new(HTTPClientError) # HTTP 429
|
84
85
|
|
85
86
|
NginxClientError = Class.new(HTTPClientError) # HTTP errors used in Nginx
|
86
87
|
|
@@ -160,6 +160,8 @@ module RemoteResource
|
|
160
160
|
raise RemoteResource::HTTPGone.new(request, response)
|
161
161
|
when 418
|
162
162
|
raise RemoteResource::HTTPTeapot.new(request, response)
|
163
|
+
when 429
|
164
|
+
raise RemoteResource::HTTPTooManyRequests.new(request, response)
|
163
165
|
when 444
|
164
166
|
raise RemoteResource::HTTPNoResponse.new(request, response)
|
165
167
|
when 494
|
@@ -675,6 +675,7 @@ RSpec.describe RemoteResource::Request do
|
|
675
675
|
409 => RemoteResource::HTTPConflict,
|
676
676
|
410 => RemoteResource::HTTPGone,
|
677
677
|
418 => RemoteResource::HTTPTeapot,
|
678
|
+
429 => RemoteResource::HTTPTooManyRequests,
|
678
679
|
444 => RemoteResource::HTTPNoResponse,
|
679
680
|
494 => RemoteResource::HTTPRequestHeaderTooLarge,
|
680
681
|
495 => RemoteResource::HTTPCertError,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ddy_remote_resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Digidentity
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-08-
|
13
|
+
date: 2024-08-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -248,6 +248,7 @@ executables: []
|
|
248
248
|
extensions: []
|
249
249
|
extra_rdoc_files: []
|
250
250
|
files:
|
251
|
+
- ".github/workflows/ci.yml"
|
251
252
|
- ".gitignore"
|
252
253
|
- ".rspec"
|
253
254
|
- ".ruby-gemset"
|