e-invoice-api 0.5.2 → 0.5.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 438b75b71296823e500d9b3c1b24b6cf127222237107a15e412ac746e5bae37c
4
- data.tar.gz: f87581a3ab2ce3616f068d8ffac4fc403de0ca488a0b02402ce16e4e1993439d
3
+ metadata.gz: 68e5f567520abd1291e0ec6e14563a5eb87034d5cb2ccddbdf9a4e73c0a7272f
4
+ data.tar.gz: 2aa5284cd216230ac2aa48dfa58bb4127c5be2a6dc0548b01f968f39a0cf2f8b
5
5
  SHA512:
6
- metadata.gz: eeb1f588e88631e17d59b10706dc237c34f035d448cf66502a261eb0bb9b0704ebf1108c841029c5c7e45f32bd7935eed700953e2d791e3403d47f7495a094ea
7
- data.tar.gz: 7d07de513ce62e598f7cac78f9784992fbc51857ff5a0f7c10d827f82989bec611b3b6aa5e96d9ec941d699a8d666d724585969465783573b9b59bf4ef092eb8
6
+ metadata.gz: e1a29880e22082492578b573e2ea73a649c0aa77287d82cc519ff4f1c5bfef8e12f7d4674edfeed1d8186d7fa9a176aef142175b96a6d1781854243c1caed6a2
7
+ data.tar.gz: aab1743154bd2a1db806656b067e9affd0256cb94ceaaf78476a55be9513695100116c3d9075d55d554670581b301037e565e5ee46a0c818f32b7aa203f8dd67
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.3 (2025-10-01)
4
+
5
+ Full Changelog: [v0.5.2...v0.5.3](https://github.com/e-invoice-be/e-invoice-rb/compare/v0.5.2...v0.5.3)
6
+
7
+ ### Bug Fixes
8
+
9
+ * coroutine leaks from connection pool ([e3c2fbb](https://github.com/e-invoice-be/e-invoice-rb/commit/e3c2fbb823d70358893251e83f40f02ee0b1551b))
10
+
3
11
  ## 0.5.2 (2025-09-30)
4
12
 
5
13
  Full Changelog: [v0.5.1...v0.5.2](https://github.com/e-invoice-be/e-invoice-rb/compare/v0.5.1...v0.5.2)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "e-invoice-api", "~> 0.5.2"
20
+ gem "e-invoice-api", "~> 0.5.3"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -134,9 +134,9 @@ module EInvoiceAPI
134
134
 
135
135
  # rubocop:disable Metrics/BlockLength
136
136
  enum = Enumerator.new do |y|
137
- with_pool(url, deadline: deadline) do |conn|
138
- next if finished
137
+ next if finished
139
138
 
139
+ with_pool(url, deadline: deadline) do |conn|
140
140
  req, closing = self.class.build_request(request) do
141
141
  self.class.calibrate_socket_timeout(conn, deadline)
142
142
  end
@@ -149,7 +149,7 @@ module EInvoiceAPI
149
149
 
150
150
  self.class.calibrate_socket_timeout(conn, deadline)
151
151
  conn.request(req) do |rsp|
152
- y << [conn, req, rsp]
152
+ y << [req, rsp]
153
153
  break if finished
154
154
 
155
155
  rsp.read_body do |bytes|
@@ -160,6 +160,8 @@ module EInvoiceAPI
160
160
  end
161
161
  eof = true
162
162
  end
163
+ ensure
164
+ conn.finish if !eof && conn&.started?
163
165
  end
164
166
  rescue Timeout::Error
165
167
  raise EInvoiceAPI::Errors::APITimeoutError.new(url: url, request: req)
@@ -168,16 +170,11 @@ module EInvoiceAPI
168
170
  end
169
171
  # rubocop:enable Metrics/BlockLength
170
172
 
171
- conn, _, response = enum.next
173
+ _, response = enum.next
172
174
  body = EInvoiceAPI::Internal::Util.fused_enum(enum, external: true) do
173
175
  finished = true
174
- tap do
175
- enum.next
176
- rescue StopIteration
177
- nil
178
- end
176
+ loop { enum.next }
179
177
  ensure
180
- conn.finish if !eof && conn&.started?
181
178
  closing&.call
182
179
  end
183
180
  [Integer(response.code), response, body]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EInvoiceAPI
4
- VERSION = "0.5.2"
4
+ VERSION = "0.5.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: e-invoice-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - e-invoice
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-09-30 00:00:00.000000000 Z
11
+ date: 2025-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool