trycourier 3.4.0.pre.alpha5 → 3.4.0.pre.alpha7

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: f14ee1336a781820bc7322a988b66af49dc962deb69ca3d632678a9d87418dae
4
- data.tar.gz: 48cf6121b3dfdea6d0333a4d3c099dcdff65a44e487312ff4c662e8132e7da96
3
+ metadata.gz: 5fa5020a219e691d41a4ff4c23818a3bc0ae64841f594d0e4645b8c32455bfdd
4
+ data.tar.gz: '06091225ad3b4a3491ffbe05c2cbc24298dedfa8113205bee1839b65ea985fef'
5
5
  SHA512:
6
- metadata.gz: 76668745729ceabd8103834ff1c0a4f314554bb7011cfed1602474b3d7209b742b6f68f62a25a24e8b49cdb1c72391a83ff4502c52df1ed34eb7c4173a05ffe5
7
- data.tar.gz: eea8f1d219fd7253402ae012e2e5364d4e80b93e35eba7f124426ce03f95afdc2c776ad342c3af80ccf5b4005c36f2300780ceeca4358f926c82befcc3f9a215
6
+ metadata.gz: b9c05ff1d3cc88b637a338435d34d33b581ec3d70e732446047a714d36db15ac72c499507d6c30321307757919007e0a1832eab632ae353c686e5fc2e9bf9c63
7
+ data.tar.gz: f5c6608c5e5ee3842b138d45effcdb326c40431337a72ed1f8b22f0d975c4e1e18461681663767f67799380d56417abbff018996e06f9fc67b91ba6225b16913
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.4.0-alpha7 (2025-10-31)
4
+
5
+ Full Changelog: [v3.4.0-alpha6...v3.4.0-alpha7](https://github.com/trycourier/courier-ruby/compare/v3.4.0-alpha6...v3.4.0-alpha7)
6
+
7
+ ### Features
8
+
9
+ * Comment adjustment to kick of build ([3f53532](https://github.com/trycourier/courier-ruby/commit/3f535324c5b114494cfd28e2570d9fb3c192b6b1))
10
+ * handle thread interrupts in the core HTTP client ([27380fe](https://github.com/trycourier/courier-ruby/commit/27380fe7d02178679a46b849acbc5807e3dc4136))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * Comment to kick off build ([bbdb8ce](https://github.com/trycourier/courier-ruby/commit/bbdb8cec3dec051e17a89091f2ea881897e3b532))
16
+
17
+ ## 3.4.0-alpha6 (2025-10-17)
18
+
19
+ Full Changelog: [v3.4.0-alpha5...v3.4.0-alpha6](https://github.com/trycourier/courier-ruby/compare/v3.4.0-alpha5...v3.4.0-alpha6)
20
+
21
+ ### Bug Fixes
22
+
23
+ * Dep Warning ([3439cba](https://github.com/trycourier/courier-ruby/commit/3439cbae785d9e2198cc6af4a19e4e54e9e74c0c))
24
+
3
25
  ## 3.4.0-alpha5 (2025-10-17)
4
26
 
5
27
  Full Changelog: [v3.4.0-alpha4...v3.4.0-alpha5](https://github.com/trycourier/courier-ruby/compare/v3.4.0-alpha4...v3.4.0-alpha5)
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "trycourier", "~> 3.4.0.pre.alpha5"
18
+ gem "trycourier", "~> 3.4.0.pre.alpha7"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -128,40 +128,48 @@ module Trycourier
128
128
  url, deadline = request.fetch_values(:url, :deadline)
129
129
 
130
130
  req = nil
131
- eof = false
132
131
  finished = false
133
- closing = nil
134
132
 
135
133
  # rubocop:disable Metrics/BlockLength
136
134
  enum = Enumerator.new do |y|
137
135
  next if finished
138
136
 
139
137
  with_pool(url, deadline: deadline) do |conn|
140
- req, closing = self.class.build_request(request) do
141
- self.class.calibrate_socket_timeout(conn, deadline)
142
- end
143
-
144
- self.class.calibrate_socket_timeout(conn, deadline)
145
- unless conn.started?
146
- conn.keep_alive_timeout = self.class::KEEP_ALIVE_TIMEOUT
147
- conn.start
148
- end
138
+ eof = false
139
+ closing = nil
140
+ ::Thread.handle_interrupt(Object => :never) do
141
+ ::Thread.handle_interrupt(Object => :immediate) do
142
+ req, closing = self.class.build_request(request) do
143
+ self.class.calibrate_socket_timeout(conn, deadline)
144
+ end
149
145
 
150
- self.class.calibrate_socket_timeout(conn, deadline)
151
- conn.request(req) do |rsp|
152
- y << [req, rsp]
153
- break if finished
154
-
155
- rsp.read_body do |bytes|
156
- y << bytes.force_encoding(Encoding::BINARY)
157
- break if finished
146
+ self.class.calibrate_socket_timeout(conn, deadline)
147
+ unless conn.started?
148
+ conn.keep_alive_timeout = self.class::KEEP_ALIVE_TIMEOUT
149
+ conn.start
150
+ end
158
151
 
159
152
  self.class.calibrate_socket_timeout(conn, deadline)
153
+ conn.request(req) do |rsp|
154
+ y << [req, rsp]
155
+ break if finished
156
+
157
+ rsp.read_body do |bytes|
158
+ y << bytes.force_encoding(Encoding::BINARY)
159
+ break if finished
160
+
161
+ self.class.calibrate_socket_timeout(conn, deadline)
162
+ end
163
+ eof = true
164
+ end
165
+ end
166
+ ensure
167
+ begin
168
+ conn.finish if !eof && conn&.started?
169
+ ensure
170
+ closing&.call
160
171
  end
161
- eof = true
162
172
  end
163
- ensure
164
- conn.finish if !eof && conn&.started?
165
173
  end
166
174
  rescue Timeout::Error
167
175
  raise Trycourier::Errors::APITimeoutError.new(url: url, request: req)
@@ -174,8 +182,6 @@ module Trycourier
174
182
  body = Trycourier::Internal::Util.fused_enum(enum, external: true) do
175
183
  finished = true
176
184
  loop { enum.next }
177
- ensure
178
- closing&.call
179
185
  end
180
186
  [Integer(response.code), response, body]
181
187
  end
@@ -12,7 +12,7 @@ module Trycourier
12
12
 
13
13
  # @!attribute raw
14
14
  # Raw data to apply to the channel. If `elements` has not been specified, `raw` is
15
- # `required`.
15
+ # required.
16
16
  #
17
17
  # @return [Hash{Symbol=>Object}, nil]
18
18
  optional :raw, Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown], nil?: true
@@ -34,7 +34,7 @@ module Trycourier
34
34
  #
35
35
  # @param channel [String] The channel the contents of this element should be applied to. Can be `email`,
36
36
  #
37
- # @param raw [Hash{Symbol=>Object}, nil] Raw data to apply to the channel. If `elements` has not been
37
+ # @param raw [Hash{Symbol=>Object}, nil] Raw data to apply to the channel. If `elements` has not been specified, `raw` is
38
38
  end
39
39
  end
40
40
  end
@@ -4,7 +4,7 @@ module Trycourier
4
4
  module Models
5
5
  class Recipient < Trycourier::Internal::Type::BaseModel
6
6
  # @!attribute account_id
7
- # Use `tenant_id` instead.
7
+ # Deprecated - Use `tenant_id` instead.
8
8
  #
9
9
  # @return [String, nil]
10
10
  optional :account_id, String, nil?: true
@@ -60,7 +60,7 @@ module Trycourier
60
60
  # Some parameter documentations has been truncated, see
61
61
  # {Trycourier::Models::Recipient} for more details.
62
62
  #
63
- # @param account_id [String, nil] Use `tenant_id` instead.
63
+ # @param account_id [String, nil] Deprecated - Use `tenant_id` instead.
64
64
  #
65
65
  # @param context [Trycourier::Models::MessageContext, nil] Context such as tenant_id to send the notification with.
66
66
  #
@@ -4,7 +4,7 @@ module Trycourier
4
4
  module Models
5
5
  class UserRecipient < Trycourier::Internal::Type::BaseModel
6
6
  # @!attribute account_id
7
- # Use `tenant_id` instead.
7
+ # Deprecated - Use `tenant_id` instead.
8
8
  #
9
9
  # @return [String, nil]
10
10
  optional :account_id, String, nil?: true
@@ -60,7 +60,7 @@ module Trycourier
60
60
  # Some parameter documentations has been truncated, see
61
61
  # {Trycourier::Models::UserRecipient} for more details.
62
62
  #
63
- # @param account_id [String, nil] Use `tenant_id` instead.
63
+ # @param account_id [String, nil] Deprecated - Use `tenant_id` instead.
64
64
  #
65
65
  # @param context [Trycourier::Models::MessageContext, nil] Context such as tenant_id to send the notification with.
66
66
  #
@@ -6,7 +6,7 @@ module Trycourier
6
6
  # Some parameter documentations has been truncated, see
7
7
  # {Trycourier::Models::SendMessageParams} for more details.
8
8
  #
9
- # Use the send API to send a message to one or more recipients.
9
+ # API to send a message to one or more recipients.
10
10
  #
11
11
  # @overload message(message:, request_options: {})
12
12
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Trycourier
4
- VERSION = "3.4.0.pre.alpha5"
4
+ VERSION = "3.4.0.pre.alpha7"
5
5
  end
@@ -14,7 +14,7 @@ module Trycourier
14
14
  attr_accessor :channel
15
15
 
16
16
  # Raw data to apply to the channel. If `elements` has not been specified, `raw` is
17
- # `required`.
17
+ # required.
18
18
  sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
19
19
  attr_accessor :raw
20
20
 
@@ -39,7 +39,7 @@ module Trycourier
39
39
  # `push`, `direct_message`, `sms` or a provider such as slack
40
40
  channel:,
41
41
  # Raw data to apply to the channel. If `elements` has not been specified, `raw` is
42
- # `required`.
42
+ # required.
43
43
  raw: nil
44
44
  )
45
45
  end
@@ -8,7 +8,7 @@ module Trycourier
8
8
  T.any(Trycourier::Recipient, Trycourier::Internal::AnyHash)
9
9
  end
10
10
 
11
- # Use `tenant_id` instead.
11
+ # Deprecated - Use `tenant_id` instead.
12
12
  sig { returns(T.nilable(String)) }
13
13
  attr_accessor :account_id
14
14
 
@@ -69,7 +69,7 @@ module Trycourier
69
69
  ).returns(T.attached_class)
70
70
  end
71
71
  def self.new(
72
- # Use `tenant_id` instead.
72
+ # Deprecated - Use `tenant_id` instead.
73
73
  account_id: nil,
74
74
  # Context such as tenant_id to send the notification with.
75
75
  context: nil,
@@ -8,7 +8,7 @@ module Trycourier
8
8
  T.any(Trycourier::UserRecipient, Trycourier::Internal::AnyHash)
9
9
  end
10
10
 
11
- # Use `tenant_id` instead.
11
+ # Deprecated - Use `tenant_id` instead.
12
12
  sig { returns(T.nilable(String)) }
13
13
  attr_accessor :account_id
14
14
 
@@ -70,7 +70,7 @@ module Trycourier
70
70
  ).returns(T.attached_class)
71
71
  end
72
72
  def self.new(
73
- # Use `tenant_id` instead.
73
+ # Deprecated - Use `tenant_id` instead.
74
74
  account_id: nil,
75
75
  # Context such as tenant_id to send the notification with.
76
76
  context: nil,
@@ -3,7 +3,7 @@
3
3
  module Trycourier
4
4
  module Resources
5
5
  class Send
6
- # Use the send API to send a message to one or more recipients.
6
+ # API to send a message to one or more recipients.
7
7
  sig do
8
8
  params(
9
9
  message: Trycourier::SendMessageParams::Message::OrHash,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trycourier
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0.pre.alpha5
4
+ version: 3.4.0.pre.alpha7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Courier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-17 00:00:00.000000000 Z
11
+ date: 2025-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool