terminal-shop 3.10.9 → 3.11.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97e35ca94f77ccf7d4bcb986c8f27649aea37e5d1f6f9b6d7b718c9395b23643
4
- data.tar.gz: 06ce79ab5b094b4716e16d262d51dfde403269abc78eb3e96a615eb833c556f7
3
+ metadata.gz: 4a053bae05749f85bf2474bc569b35e65ad52599a6c0f7df65754b0b10ef7ff3
4
+ data.tar.gz: 9d154b452228015df0fa6a58ae76a667f0a6b88c2ad956f01224cdc00f02848e
5
5
  SHA512:
6
- metadata.gz: 8389939499a625d9149a90811f915c4ab8f5b8cfad02740ce5790b10da8db00ef84b2e80d03f58b811f1546116942f256c99cd4be9973056a4f0496c2e15dbac
7
- data.tar.gz: 98aafef4c5a4839253959b78417b73af5127d73e1da31896851e820242a4dd54f6ef748d2a13d15b5a3832be51778211de00bae93d87e68c1fe96e23c27d1f04
6
+ metadata.gz: 97c3266059478e2a496a8de558af0eba498a558ee1ab68b5bb98815c6b937826f7ab5e28374c49156cd169eab347698d692a218b0f88b324e941070b902d581e
7
+ data.tar.gz: ddcab21e0d9caa14b87bae9c819ec3de4fb1ff23aa5b15a02843470740914ff6d4fcb407f99f260c5e90a0ff4e7faca5c03fb7c9258bb4418d4a3b1870538438
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.11.0 (2026-04-28)
4
+
5
+ Full Changelog: [v3.10.10...v3.11.0](https://github.com/terminaldotshop/terminal-sdk-ruby/compare/v3.10.10...v3.11.0)
6
+
7
+ ### Features
8
+
9
+ * support setting headers via env ([6425e61](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/6425e615b49cecb1bf661d4eb2969a958eca8b0c))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **internal:** more robust bootstrap script ([f9b56f2](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/f9b56f2a99fa77dabb97491cd1c1d7539f44d9f8))
15
+ * **tests:** bump steady to v0.22.1 ([b4a58da](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/b4a58daf13a53b6c4977b4309cd953d53d27bbb7))
16
+
17
+ ## 3.10.10 (2026-04-09)
18
+
19
+ Full Changelog: [v3.10.9...v3.10.10](https://github.com/terminaldotshop/terminal-sdk-ruby/compare/v3.10.9...v3.10.10)
20
+
21
+ ### Bug Fixes
22
+
23
+ * multipart encoding for file arrays ([7badd8d](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/7badd8d4148f554c1a73a3476269d260d1d5f41d))
24
+
3
25
  ## 3.10.9 (2026-04-01)
4
26
 
5
27
  Full Changelog: [v3.10.8...v3.10.9](https://github.com/terminaldotshop/terminal-sdk-ruby/compare/v3.10.8...v3.10.9)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "terminal-shop", "~> 3.10.9"
29
+ gem "terminal-shop", "~> 3.11.0"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -113,6 +113,17 @@ module TerminalShop
113
113
  headers = {
114
114
  "x-terminal-app-id" => (@app_id = app_id&.to_s)
115
115
  }
116
+ custom_headers_env = ENV["TERMINAL_CUSTOM_HEADERS"]
117
+ unless custom_headers_env.nil?
118
+ parsed = {}
119
+ custom_headers_env.split("\n").each do |line|
120
+ colon = line.index(":")
121
+ unless colon.nil?
122
+ parsed[line[0...colon].strip] = line[(colon + 1)..].strip
123
+ end
124
+ end
125
+ headers = parsed.merge(headers)
126
+ end
116
127
 
117
128
  @bearer_token = bearer_token.to_s
118
129
 
@@ -610,6 +610,7 @@ module TerminalShop
610
610
  #
611
611
  # @return [Array(String, Enumerable<String>)]
612
612
  private def encode_multipart_streaming(body)
613
+ # rubocop:disable Style/CaseEquality
613
614
  # RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
614
615
  boundary = SecureRandom.urlsafe_base64(46)
615
616
 
@@ -619,7 +620,7 @@ module TerminalShop
619
620
  in Hash
620
621
  body.each do |key, val|
621
622
  case val
622
- in Array if val.all? { primitive?(_1) }
623
+ in Array if val.all? { primitive?(_1) || TerminalShop::Internal::Type::FileInput === _1 }
623
624
  val.each do |v|
624
625
  write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing)
625
626
  end
@@ -635,6 +636,7 @@ module TerminalShop
635
636
 
636
637
  fused_io = fused_enum(strio) { closing.each(&:call) }
637
638
  [boundary, fused_io]
639
+ # rubocop:enable Style/CaseEquality
638
640
  end
639
641
 
640
642
  # @api private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TerminalShop
4
- VERSION = "3.10.9"
4
+ VERSION = "3.11.0"
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.10.9
4
+ version: 3.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Terminal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-02 00:00:00.000000000 Z
11
+ date: 2026-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi