trycourier 3.4.0.pre.alpha6 → 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 +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +1 -1
- data/lib/trycourier/internal/transport/pooled_net_requester.rb +30 -24
- data/lib/trycourier/models/elemental_channel_node.rb +2 -2
- data/lib/trycourier/resources/send.rb +1 -1
- data/lib/trycourier/version.rb +1 -1
- data/rbi/trycourier/models/elemental_channel_node.rbi +2 -2
- data/rbi/trycourier/resources/send.rbi +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5fa5020a219e691d41a4ff4c23818a3bc0ae64841f594d0e4645b8c32455bfdd
|
|
4
|
+
data.tar.gz: '06091225ad3b4a3491ffbe05c2cbc24298dedfa8113205bee1839b65ea985fef'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b9c05ff1d3cc88b637a338435d34d33b581ec3d70e732446047a714d36db15ac72c499507d6c30321307757919007e0a1832eab632ae353c686e5fc2e9bf9c63
|
|
7
|
+
data.tar.gz: f5c6608c5e5ee3842b138d45effcdb326c40431337a72ed1f8b22f0d975c4e1e18461681663767f67799380d56417abbff018996e06f9fc67b91ba6225b16913
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
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
|
+
|
|
3
17
|
## 3.4.0-alpha6 (2025-10-17)
|
|
4
18
|
|
|
5
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)
|
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.
|
|
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
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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
|
-
#
|
|
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
|
|
@@ -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
|
-
#
|
|
9
|
+
# API to send a message to one or more recipients.
|
|
10
10
|
#
|
|
11
11
|
# @overload message(message:, request_options: {})
|
|
12
12
|
#
|
data/lib/trycourier/version.rb
CHANGED
|
@@ -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
|
-
#
|
|
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
|
-
#
|
|
42
|
+
# required.
|
|
43
43
|
raw: nil
|
|
44
44
|
)
|
|
45
45
|
end
|
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.
|
|
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-
|
|
11
|
+
date: 2025-10-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: connection_pool
|