terminal-shop 3.10.0 → 3.10.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: 274d5c5a57b55288c52218c98666b1daad06931cca073d7fd4a9d753e992312a
4
- data.tar.gz: 61366798520a4343e75ad66d1901db5b63fa18bcbc368bd775810c40d255d3cc
3
+ metadata.gz: 6804df15d8dd91677f66b445620b1d34104af32e6e0ac40da893a28e52d33a9f
4
+ data.tar.gz: 4e6c24b0fedd78097f90fa46907049c8590a128570be3bdb9579022c2dbaba19
5
5
  SHA512:
6
- metadata.gz: 5e9ddb46fce75de0503c3a28013a499dd75110b9290cc8f7b14e13099d044752c90d1fcce912c7dd63630206f04bc8672780aa90ef793449677fe096556b5333
7
- data.tar.gz: 3961f07513a416fda2af69ec824ce3f9393cbd9f7708e9a9d34751a6c2c77bf0fc9df93571bcfb1aa05fa3adbde05971fdda34b55c61ac13810c9557f52d53d4
6
+ metadata.gz: ae4ba28bdcdd81b60241b1d388707361ca9d1959871192dfdbe4ebb4b3809b0e2e0ebb1055908527325f72f2927d67285779cf5d9cc9a47a51cda1578dc100d9
7
+ data.tar.gz: bba1a61d79e70eba98f64e37a56795ad10d6bb8eee4c19a87d285d9fb1881989c32599cb745e8955914644de235720195a47fdab1d8d6747144f9b0d3c71180e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.10.2 (2025-12-19)
4
+
5
+ Full Changelog: [v3.10.1...v3.10.2](https://github.com/terminaldotshop/terminal-sdk-ruby/compare/v3.10.1...v3.10.2)
6
+
7
+ ### Bug Fixes
8
+
9
+ * issue where json.parse errors when receiving HTTP 204 with nobody ([94aa4f7](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/94aa4f755ac518ba4c7ae4527cb19e2349405988))
10
+
11
+ ## 3.10.1 (2025-12-17)
12
+
13
+ Full Changelog: [v3.10.0...v3.10.1](https://github.com/terminaldotshop/terminal-sdk-ruby/compare/v3.10.0...v3.10.1)
14
+
15
+ ### Bug Fixes
16
+
17
+ * calling `break` out of streams should be instantaneous ([6a358cb](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/6a358cb492be7a91b5ae925bdecfd167bbae0d5d))
18
+
19
+
20
+ ### Chores
21
+
22
+ * explicitly require "base64" gem ([3feced3](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/3feced338b55884bcd41b6429ef86e795026f0f7))
23
+
3
24
  ## 3.10.0 (2025-11-05)
4
25
 
5
26
  Full Changelog: [v3.9.3...v3.10.0](https://github.com/terminaldotshop/terminal-sdk-ruby/compare/v3.9.3...v3.10.0)
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.10.0"
20
+ gem "terminal-shop", "~> 3.10.2"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -153,17 +153,19 @@ module TerminalShop
153
153
  end
154
154
 
155
155
  self.class.calibrate_socket_timeout(conn, deadline)
156
- conn.request(req) do |rsp|
157
- y << [req, rsp]
158
- break if finished
159
-
160
- rsp.read_body do |bytes|
161
- y << bytes.force_encoding(Encoding::BINARY)
162
- break if finished
163
-
164
- self.class.calibrate_socket_timeout(conn, deadline)
156
+ ::Kernel.catch(:jump) do
157
+ conn.request(req) do |rsp|
158
+ y << [req, rsp]
159
+ ::Kernel.throw(:jump) if finished
160
+
161
+ rsp.read_body do |bytes|
162
+ y << bytes.force_encoding(Encoding::BINARY)
163
+ ::Kernel.throw(:jump) if finished
164
+
165
+ self.class.calibrate_socket_timeout(conn, deadline)
166
+ end
167
+ eof = true
165
168
  end
166
- eof = true
167
169
  end
168
170
  end
169
171
  ensure
@@ -657,7 +657,8 @@ module TerminalShop
657
657
  def decode_content(headers, stream:, suppress_error: false)
658
658
  case (content_type = headers["content-type"])
659
659
  in TerminalShop::Internal::Util::JSON_CONTENT
660
- json = stream.to_a.join
660
+ return nil if (json = stream.to_a.join).empty?
661
+
661
662
  begin
662
663
  JSON.parse(json, symbolize_names: true)
663
664
  rescue JSON::ParserError => e
@@ -667,7 +668,11 @@ module TerminalShop
667
668
  in TerminalShop::Internal::Util::JSONL_CONTENT
668
669
  lines = decode_lines(stream)
669
670
  chain_fused(lines) do |y|
670
- lines.each { y << JSON.parse(_1, symbolize_names: true) }
671
+ lines.each do
672
+ next if _1.empty?
673
+
674
+ y << JSON.parse(_1, symbolize_names: true)
675
+ end
671
676
  end
672
677
  in %r{^text/event-stream}
673
678
  lines = decode_lines(stream)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TerminalShop
4
- VERSION = "3.10.0"
4
+ VERSION = "3.10.2"
5
5
  end
data/lib/terminal_shop.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  # Standard libraries.
4
4
  # rubocop:disable Lint/RedundantRequireStatement
5
5
  require "English"
6
+ require "base64"
6
7
  require "cgi"
7
8
  require "date"
8
9
  require "erb"
data/manifest.yaml CHANGED
@@ -1,5 +1,6 @@
1
1
  dependencies:
2
2
  - English
3
+ - base64
3
4
  - cgi
4
5
  - date
5
6
  - erb
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.10.0
4
+ version: 3.10.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-11-05 00:00:00.000000000 Z
11
+ date: 2025-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool