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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 01c488609ff4533d6ea54be08027729ce36cc12af11de2d6f35bb5e56482e418
4
- data.tar.gz: de39889dd48982a7c401c6c6f5172e15e76a0b35eb37e31801b7be3a3266df31
3
+ metadata.gz: 8cd90a581e26c088e0c97a35cb78784d1cf32b348d3f18dae23fc8c34b0fed09
4
+ data.tar.gz: 0f2dbdbd7f2ce7de69e5da14d98657854098337c7b0154beaaa695034911ccde
5
5
  SHA512:
6
- metadata.gz: 6658fe02ece1e49db0fa8cf6cf8d2d35ec2b338e30b1ac363c8a638ae55e036c83979ac850a19009028b2bdbbb03497c39264b3bd210050e7ce4603c98418555
7
- data.tar.gz: b7515a8da8131f9981e5c3387cc7626e3ffe50939171087a469397f31bc094159e37db44e81a3c2bffa29fbc9093b3e97cd46b081d5467ed0b9bb05cfa76394e
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
- User.all(params: {ids: ids}, force_get_params_in_body: true)
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
@@ -1,3 +1,3 @@
1
1
  module RemoteResource
2
- VERSION = '1.3.2'.freeze
2
+ VERSION = '1.3.3'.freeze
3
3
  end
@@ -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.2
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-08 00:00:00.000000000 Z
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"