minato_ruby_api_client 0.3.1 → 0.3.2
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 +6 -0
- data/Gemfile.lock +1 -1
- data/lib/minato_ruby_api_client/api_client.rb +1 -1
- data/lib/minato_ruby_api_client/version.rb +1 -1
- data/spec/api_client_spec.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 67f7f0e5c35c222867f68158717831cb029cdc6b445113a33335a2336be337f7
|
|
4
|
+
data.tar.gz: 598a2224f1082f5f8aa1f126fc5621acb0514118c3c29002f55d450e45b6c9d5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ff523a40ac50433b9b3b37b0d73e077f4af7e2351c664e16d35e86b69b79567978cd28e8136e996cd44b349f50cf185bafd2acbcd08a119bd6e77d09b392c724
|
|
7
|
+
data.tar.gz: d8701418132c6464f75bbc32f52c687da2dc475f7b347676ddb0d138cad6c178f79a483141d88574e11072e0fd8f4c1c3aa9808382227e5046d3e70f535416c1
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ 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.2]
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Stop leaking one persistent `async_http` client per request on the calling thread. `call_api` builds a new Faraday connection for every request, and the adapter's default `PerThreadPersistentClients` stored each one in a thread variable that was never released, so memory grew with every request for the lifetime of the thread (the main thread of a Falcon worker). The adapter now uses `Async::HTTP::Faraday::Clients`, which closes the client when the request finishes.
|
|
13
|
+
|
|
8
14
|
## [0.3.0]
|
|
9
15
|
|
|
10
16
|
### Changed
|
data/Gemfile.lock
CHANGED
data/spec/api_client_spec.rb
CHANGED
|
@@ -119,6 +119,15 @@ describe MinatoRubyApiClient::ApiClient do
|
|
|
119
119
|
end
|
|
120
120
|
end
|
|
121
121
|
|
|
122
|
+
context 'when called repeatedly on the same thread' do
|
|
123
|
+
it 'does not retain HTTP clients on the thread' do
|
|
124
|
+
api_client.call_api(:post, '/test', opts)
|
|
125
|
+
|
|
126
|
+
expect { 3.times { api_client.call_api(:post, '/test', opts) } }
|
|
127
|
+
.not_to(change { Thread.current.thread_variables.size })
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
|
|
122
131
|
context 'when request failed' do
|
|
123
132
|
let(:http_response) do
|
|
124
133
|
{ status: [400, 'Bad Request'], headers: { 'Context-type': 'application/json' },
|
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.3.
|
|
4
|
+
version: 0.3.2
|
|
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-11-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|