minato_ruby_api_client 0.2.9 → 0.3.0
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 +11 -0
- data/Gemfile.lock +59 -29
- data/lib/minato_ruby_api_client/api_client.rb +5 -2
- data/lib/minato_ruby_api_client/version.rb +1 -1
- data/minato_ruby_api_client.gemspec +3 -1
- metadata +32 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 430a3104ab0c69e3c62ba990f3fb91029a85f257525c56e6a35f58b88a9a94bd
|
|
4
|
+
data.tar.gz: eec830c93eab4c0f5b395adf4f1b65a93c8b92add998c7d095b9adb10f0c0249
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0119f09dc1d07e5901b65979adfcc4025f269fbdc321861790fa78562dd18bf49ef093d76473ae160e92982c8e585eb0ef4972e77ea02eaa11935e668feadb19'
|
|
7
|
+
data.tar.gz: f5040c62fb32554a3fa83c14b9368a6d7e0647d629dca7aafd125442b0e3816c38eb580977f12479d501093cee7561d8a9383023d18d5719a3e9ddad48ae8d80
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.3.0]
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Switch the Faraday adapter from `net_http` to `async_http` (`async-http-faraday`) so requests no longer block the underlying thread inside Falcon's fiber scheduler.
|
|
13
|
+
- Require Faraday `>= 2.0` (needed by `async-http-faraday`).
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- `ApiError#caused_by` now falls back to the standard HTTP status text when the adapter does not expose a custom reason phrase (the `async_http` adapter does not preserve it, unlike `net_http`).
|
|
18
|
+
|
|
8
19
|
## [0.2.0]
|
|
9
20
|
|
|
10
21
|
### Added
|
data/Gemfile.lock
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
minato_ruby_api_client (0.
|
|
5
|
-
faraday (>=
|
|
4
|
+
minato_ruby_api_client (0.3.0)
|
|
5
|
+
async-http-faraday (>= 0.19)
|
|
6
|
+
faraday (>= 2.0, < 3.0)
|
|
6
7
|
minato-trace (>= 0.2.0)
|
|
7
8
|
minato_error_handler (>= 0.1.13)
|
|
9
|
+
rack (>= 2.0)
|
|
8
10
|
|
|
9
11
|
GEM
|
|
10
12
|
remote: https://rubygems.org/
|
|
@@ -86,6 +88,28 @@ GEM
|
|
|
86
88
|
addressable (2.8.7)
|
|
87
89
|
public_suffix (>= 2.0.2, < 7.0)
|
|
88
90
|
ast (2.4.3)
|
|
91
|
+
async (2.37.0)
|
|
92
|
+
console (~> 1.29)
|
|
93
|
+
fiber-annotation
|
|
94
|
+
io-event (~> 1.11)
|
|
95
|
+
metrics (~> 0.12)
|
|
96
|
+
traces (~> 0.18)
|
|
97
|
+
async-http (0.94.2)
|
|
98
|
+
async (>= 2.10.2)
|
|
99
|
+
async-pool (~> 0.11)
|
|
100
|
+
io-endpoint (~> 0.14)
|
|
101
|
+
io-stream (~> 0.6)
|
|
102
|
+
metrics (~> 0.12)
|
|
103
|
+
protocol-http (~> 0.58)
|
|
104
|
+
protocol-http1 (~> 0.36)
|
|
105
|
+
protocol-http2 (~> 0.22)
|
|
106
|
+
protocol-url (~> 0.2)
|
|
107
|
+
traces (~> 0.10)
|
|
108
|
+
async-http-faraday (0.22.1)
|
|
109
|
+
async-http (~> 0.42)
|
|
110
|
+
faraday
|
|
111
|
+
async-pool (0.11.2)
|
|
112
|
+
async (>= 2.0)
|
|
89
113
|
base64 (0.3.0)
|
|
90
114
|
bigdecimal (3.3.1)
|
|
91
115
|
builder (3.3.0)
|
|
@@ -93,6 +117,10 @@ GEM
|
|
|
93
117
|
coderay (1.1.3)
|
|
94
118
|
concurrent-ruby (1.3.5)
|
|
95
119
|
connection_pool (2.5.4)
|
|
120
|
+
console (1.34.3)
|
|
121
|
+
fiber-annotation
|
|
122
|
+
fiber-local (~> 1.1)
|
|
123
|
+
json
|
|
96
124
|
crack (1.0.1)
|
|
97
125
|
bigdecimal
|
|
98
126
|
rexml
|
|
@@ -103,29 +131,18 @@ GEM
|
|
|
103
131
|
drb (2.2.3)
|
|
104
132
|
erb (6.0.0)
|
|
105
133
|
erubi (1.13.1)
|
|
106
|
-
faraday (
|
|
107
|
-
faraday-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
faraday
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
faraday-em_http (1.0.0)
|
|
119
|
-
faraday-em_synchrony (1.0.1)
|
|
120
|
-
faraday-excon (1.1.0)
|
|
121
|
-
faraday-httpclient (1.0.1)
|
|
122
|
-
faraday-multipart (1.1.1)
|
|
123
|
-
multipart-post (~> 2.0)
|
|
124
|
-
faraday-net_http (1.0.2)
|
|
125
|
-
faraday-net_http_persistent (1.2.0)
|
|
126
|
-
faraday-patron (1.0.0)
|
|
127
|
-
faraday-rack (1.0.0)
|
|
128
|
-
faraday-retry (1.0.3)
|
|
134
|
+
faraday (2.14.3)
|
|
135
|
+
faraday-net_http (>= 2.0, < 3.5)
|
|
136
|
+
json
|
|
137
|
+
logger
|
|
138
|
+
faraday-net_http (3.4.4)
|
|
139
|
+
net-http (~> 0.5)
|
|
140
|
+
faraday-retry (2.4.0)
|
|
141
|
+
faraday (~> 2.0)
|
|
142
|
+
fiber-annotation (0.2.0)
|
|
143
|
+
fiber-local (1.1.0)
|
|
144
|
+
fiber-storage
|
|
145
|
+
fiber-storage (1.0.1)
|
|
129
146
|
gapic-common (1.2.0)
|
|
130
147
|
faraday (>= 1.9, < 3.a)
|
|
131
148
|
faraday-retry (>= 1.0, < 3.a)
|
|
@@ -218,11 +235,14 @@ GEM
|
|
|
218
235
|
i18n (1.14.7)
|
|
219
236
|
concurrent-ruby (~> 1.0)
|
|
220
237
|
io-console (0.8.1)
|
|
238
|
+
io-endpoint (0.17.2)
|
|
239
|
+
io-event (1.11.2)
|
|
240
|
+
io-stream (0.11.1)
|
|
221
241
|
irb (1.15.3)
|
|
222
242
|
pp (>= 0.6.0)
|
|
223
243
|
rdoc (>= 4.0.0)
|
|
224
244
|
reline (>= 0.4.2)
|
|
225
|
-
json (2.
|
|
245
|
+
json (2.21.2)
|
|
226
246
|
jwt (3.1.2)
|
|
227
247
|
base64
|
|
228
248
|
language_server-protocol (3.17.0.5)
|
|
@@ -238,6 +258,7 @@ GEM
|
|
|
238
258
|
net-smtp
|
|
239
259
|
marcel (1.1.0)
|
|
240
260
|
method_source (1.1.0)
|
|
261
|
+
metrics (0.15.0)
|
|
241
262
|
minato-trace (0.2.0)
|
|
242
263
|
google-cloud-trace (~> 0.42.2)
|
|
243
264
|
rails (>= 7.0.0)
|
|
@@ -246,7 +267,8 @@ GEM
|
|
|
246
267
|
mini_mime (1.1.5)
|
|
247
268
|
minitest (5.26.2)
|
|
248
269
|
multi_json (1.17.0)
|
|
249
|
-
|
|
270
|
+
net-http (0.9.1)
|
|
271
|
+
uri (>= 0.11.1)
|
|
250
272
|
net-imap (0.5.12)
|
|
251
273
|
date
|
|
252
274
|
net-protocol
|
|
@@ -282,6 +304,14 @@ GEM
|
|
|
282
304
|
prettyprint
|
|
283
305
|
prettyprint (0.2.0)
|
|
284
306
|
prism (1.6.0)
|
|
307
|
+
protocol-hpack (1.5.1)
|
|
308
|
+
protocol-http (0.59.0)
|
|
309
|
+
protocol-http1 (0.37.0)
|
|
310
|
+
protocol-http (~> 0.58)
|
|
311
|
+
protocol-http2 (0.24.0)
|
|
312
|
+
protocol-hpack (~> 1.4)
|
|
313
|
+
protocol-http (~> 0.47)
|
|
314
|
+
protocol-url (0.10.0)
|
|
285
315
|
pry (0.15.2)
|
|
286
316
|
coderay (~> 1.1)
|
|
287
317
|
method_source (~> 1.0)
|
|
@@ -371,7 +401,6 @@ GEM
|
|
|
371
401
|
rubocop-rspec (3.0.5)
|
|
372
402
|
rubocop (~> 1.61)
|
|
373
403
|
ruby-progressbar (1.13.0)
|
|
374
|
-
ruby2_keywords (0.0.5)
|
|
375
404
|
securerandom (0.4.1)
|
|
376
405
|
signet (0.21.0)
|
|
377
406
|
addressable (~> 2.8)
|
|
@@ -389,6 +418,7 @@ GEM
|
|
|
389
418
|
stringio (3.1.8)
|
|
390
419
|
thor (1.4.0)
|
|
391
420
|
timeout (0.4.4)
|
|
421
|
+
traces (0.18.2)
|
|
392
422
|
tsort (0.2.0)
|
|
393
423
|
tzinfo (2.0.6)
|
|
394
424
|
concurrent-ruby (~> 1.0)
|
|
@@ -426,4 +456,4 @@ DEPENDENCIES
|
|
|
426
456
|
webmock
|
|
427
457
|
|
|
428
458
|
BUNDLED WITH
|
|
429
|
-
2.
|
|
459
|
+
2.5.5
|
|
@@ -4,6 +4,8 @@ require 'logger'
|
|
|
4
4
|
require 'tempfile'
|
|
5
5
|
require 'time'
|
|
6
6
|
require 'faraday'
|
|
7
|
+
require 'async/http/faraday'
|
|
8
|
+
require 'rack/utils'
|
|
7
9
|
require 'minato/trace'
|
|
8
10
|
require 'ostruct'
|
|
9
11
|
|
|
@@ -56,7 +58,7 @@ module MinatoRubyApiClient
|
|
|
56
58
|
conn.request :multipart
|
|
57
59
|
conn.request :url_encoded
|
|
58
60
|
end
|
|
59
|
-
conn.adapter(
|
|
61
|
+
conn.adapter(:async_http)
|
|
60
62
|
end
|
|
61
63
|
|
|
62
64
|
request = nil
|
|
@@ -72,7 +74,8 @@ module MinatoRubyApiClient
|
|
|
72
74
|
unless response.success?
|
|
73
75
|
error = self.class.module_parent::ApiError.new(:status_code => response.status,
|
|
74
76
|
:res => response, :req => request)
|
|
75
|
-
|
|
77
|
+
reason = response.reason_phrase.to_s.empty? ? Rack::Utils::HTTP_STATUS_CODES[response.status] : response.reason_phrase
|
|
78
|
+
error.caused_by = reason unless error.upstream_error?
|
|
76
79
|
|
|
77
80
|
fail error
|
|
78
81
|
end
|
|
@@ -22,7 +22,9 @@ Gem::Specification.new do |s|
|
|
|
22
22
|
s.license = "unlicense"
|
|
23
23
|
s.required_ruby_version = ">= 3.2"
|
|
24
24
|
|
|
25
|
-
s.add_runtime_dependency 'faraday', '>=
|
|
25
|
+
s.add_runtime_dependency 'faraday', '>= 2.0', '< 3.0'
|
|
26
|
+
s.add_runtime_dependency 'async-http-faraday', '>= 0.19'
|
|
27
|
+
s.add_runtime_dependency 'rack', '>= 2.0'
|
|
26
28
|
s.add_runtime_dependency 'minato_error_handler', '>= 0.1.13'
|
|
27
29
|
s.add_runtime_dependency 'minato-trace', '>= 0.2.0'
|
|
28
30
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: minato_ruby_api_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ferreri
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-08-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -16,7 +16,7 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
19
|
+
version: '2.0'
|
|
20
20
|
- - "<"
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
22
|
version: '3.0'
|
|
@@ -26,10 +26,38 @@ dependencies:
|
|
|
26
26
|
requirements:
|
|
27
27
|
- - ">="
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: '
|
|
29
|
+
version: '2.0'
|
|
30
30
|
- - "<"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
32
|
version: '3.0'
|
|
33
|
+
- !ruby/object:Gem::Dependency
|
|
34
|
+
name: async-http-faraday
|
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - ">="
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '0.19'
|
|
40
|
+
type: :runtime
|
|
41
|
+
prerelease: false
|
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - ">="
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '0.19'
|
|
47
|
+
- !ruby/object:Gem::Dependency
|
|
48
|
+
name: rack
|
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - ">="
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '2.0'
|
|
54
|
+
type: :runtime
|
|
55
|
+
prerelease: false
|
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
+
requirements:
|
|
58
|
+
- - ">="
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: '2.0'
|
|
33
61
|
- !ruby/object:Gem::Dependency
|
|
34
62
|
name: minato_error_handler
|
|
35
63
|
requirement: !ruby/object:Gem::Requirement
|