terminal-shop 3.9.1 → 3.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1f62c6ed06725ca6c2158ccd56b6b742f19ec9ca5b059791a7065c7cb5bf8c2
4
- data.tar.gz: 416ce19e783ece0e71fa6cc9135c51811e3882c97dcf06ddd9017818ab8a803c
3
+ metadata.gz: 045164efa87078339e485df768aeeb1396b50b065e508c8f55de1f847a6c0b2d
4
+ data.tar.gz: 70f4256c27c436a237556e0e5eeb04400cce7fec891e56fe1e1a4173c75dec72
5
5
  SHA512:
6
- metadata.gz: 07156b550f3ee1e9d563de766a06ccc03a73237e6b053cae1c0641dc4dde0bebd695383b886d9b7ef2815ee9dce3c4f54b3459f45fe1488b7a1d871435a1519c
7
- data.tar.gz: 8b689f8115160093ead6fc4385ffc2dae96a05e52dc42bb76f638e7562fa9cbd6c95db38544a66e7f389af7b4c9b8c1426c55036794bc3ea6d907a52d4d808a2
6
+ metadata.gz: f2ed700093e40e5a1bbcff5065d0a56a79cf8506a22ee7d9e18f702c9c61504440770f41a3d2eca92b7111184177bae0ff963c2685334389409feea0837c078a
7
+ data.tar.gz: 26ba3456b464e1ed33f4fe5e07e1404bf97c67fc7833c82b20943d239ba0d1f7db878a5ef81cacf9303bd338f7d3aaa54ec94c92d10aa27a57ab06dfe637b237
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.9.2 (2025-10-15)
4
+
5
+ Full Changelog: [v3.9.1...v3.9.2](https://github.com/terminaldotshop/terminal-sdk-ruby/compare/v3.9.1...v3.9.2)
6
+
7
+ ### Bug Fixes
8
+
9
+ * coroutine leaks from connection pool ([609da82](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/609da8210e3c355913e5464b72b4bf562e984024))
10
+ * should not reuse buffers for `IO.copy_stream` interop ([51cbae7](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/51cbae7450fb445d494a6e8a1161ab2c87a980f6))
11
+
12
+
13
+ ### Chores
14
+
15
+ * ignore linter error for tests having large collections ([6d41fa1](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/6d41fa1ca081d582e52a432a2d953952bf6d15f1))
16
+
3
17
  ## 3.9.1 (2025-09-30)
4
18
 
5
19
  Full Changelog: [v3.9.0...v3.9.1](https://github.com/terminaldotshop/terminal-sdk-ruby/compare/v3.9.0...v3.9.1)
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 "terminal-shop", "~> 3.9.1"
20
+ gem "terminal-shop", "~> 3.9.2"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -134,9 +134,9 @@ module TerminalShop
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 TerminalShop
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 TerminalShop
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 TerminalShop::Errors::APITimeoutError.new(url: url, request: req)
@@ -168,16 +170,11 @@ module TerminalShop
168
170
  end
169
171
  # rubocop:enable Metrics/BlockLength
170
172
 
171
- conn, _, response = enum.next
173
+ _, response = enum.next
172
174
  body = TerminalShop::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]
@@ -473,10 +473,9 @@ module TerminalShop
473
473
  # @return [Enumerable<String>]
474
474
  def writable_enum(&blk)
475
475
  Enumerator.new do |y|
476
- buf = String.new
477
476
  y.define_singleton_method(:write) do
478
- self << buf.replace(_1)
479
- buf.bytesize
477
+ self << _1.dup
478
+ _1.bytesize
480
479
  end
481
480
 
482
481
  blk.call(y)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TerminalShop
4
- VERSION = "3.9.1"
4
+ VERSION = "3.9.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terminal-shop
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.9.1
4
+ version: 3.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Terminal
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-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool