increase 1.128.0 → 1.129.1

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: c8565ba6edd5ca866d670a296edc52eceed8a7bdc18f8991c7dbf830f909c510
4
- data.tar.gz: 5e47a59c19af0bad2327297e13689d30c93606f0b00def9d42f431bb9fcac251
3
+ metadata.gz: 9737e0450430deb991873ab0ab13d1d170e25f4260c47cb5e555e626c0be0a94
4
+ data.tar.gz: 8cead100b821e204dab1f7ae600391fbddc4733e4af12df8358289ad3f92dc12
5
5
  SHA512:
6
- metadata.gz: d6dec9a481db97ef6cf045aed256774bcdc417b845dcf542989f104c133a7ef9f1f4b86f6d5f6034d1766b89be196eda06bcedd1d41c2cec19d43cc32eab8951
7
- data.tar.gz: 5e7ba6dd9cee44171ab9405669a571ee3eca8bc3ace274370e99ac4809e789865705295a209c004e65c498d676b298712804d1b16eaea7b40fb3397161aa8e4e
6
+ metadata.gz: a3e2822823f26f41f1573633f231e7d5ea67b0f26456097d564594b8263f309778a5da3276a15c02d8f3dae6185480cbf030d652abbd8428d520028c04a8233b
7
+ data.tar.gz: f3377cce1e8797df6192b266fe7fca0ea2c308fcfaa3847dba19ef1604fc2e921b64d3051f25df03389dbe6bf534d929faedf094310fe664e4f83f8c2710a993
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.129.1 (2025-11-04)
4
+
5
+ Full Changelog: [v1.129.0...v1.129.1](https://github.com/Increase/increase-ruby/compare/v1.129.0...v1.129.1)
6
+
7
+ ### Bug Fixes
8
+
9
+ * better thread safety via early initializing SSL store during HTTP client creation ([05a53e3](https://github.com/Increase/increase-ruby/commit/05a53e3f30b596d51e1e0c572ef239b0b9b8b018))
10
+
11
+ ## 1.129.0 (2025-11-04)
12
+
13
+ Full Changelog: [v1.128.0...v1.129.0](https://github.com/Increase/increase-ruby/compare/v1.128.0...v1.129.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** api update ([4a2efb2](https://github.com/Increase/increase-ruby/commit/4a2efb2b33bd395db1c66e459ba895683dc91366))
18
+
19
+
20
+ ### Chores
21
+
22
+ * bump dependency version and update sorbet types ([eab9d7e](https://github.com/Increase/increase-ruby/commit/eab9d7e7c99706e45739fe8b828ba6b5f8bfe88a))
23
+ * **client:** send user-agent header ([3fa3e13](https://github.com/Increase/increase-ruby/commit/3fa3e1396480c27aaae01a7533b59d3c3279a789))
24
+
3
25
  ## 1.128.0 (2025-10-31)
4
26
 
5
27
  Full Changelog: [v1.127.0...v1.128.0](https://github.com/Increase/increase-ruby/compare/v1.127.0...v1.128.0)
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 "increase", "~> 1.128.0"
18
+ gem "increase", "~> 1.129.1"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -201,7 +201,8 @@ module Increase
201
201
  self.class::PLATFORM_HEADERS,
202
202
  {
203
203
  "accept" => "application/json",
204
- "content-type" => "application/json"
204
+ "content-type" => "application/json",
205
+ "user-agent" => user_agent
205
206
  },
206
207
  headers
207
208
  )
@@ -219,6 +220,11 @@ module Increase
219
220
  # @return [Hash{String=>String}]
220
221
  private def auth_headers = {}
221
222
 
223
+ # @api private
224
+ #
225
+ # @return [String]
226
+ private def user_agent = "#{self.class.name}/Ruby #{Increase::VERSION}"
227
+
222
228
  # @api private
223
229
  #
224
230
  # @return [String]
@@ -16,10 +16,11 @@ module Increase
16
16
  class << self
17
17
  # @api private
18
18
  #
19
+ # @param cert_store [OpenSSL::X509::Store]
19
20
  # @param url [URI::Generic]
20
21
  #
21
22
  # @return [Net::HTTP]
22
- def connect(url)
23
+ def connect(cert_store:, url:)
23
24
  port =
24
25
  case [url.port, url.scheme]
25
26
  in [Integer, _]
@@ -33,6 +34,8 @@ module Increase
33
34
  Net::HTTP.new(url.host, port).tap do
34
35
  _1.use_ssl = %w[https wss].include?(url.scheme)
35
36
  _1.max_retries = 0
37
+
38
+ (_1.cert_store = cert_store) if _1.use_ssl?
36
39
  end
37
40
  end
38
41
 
@@ -102,7 +105,7 @@ module Increase
102
105
  pool =
103
106
  @mutex.synchronize do
104
107
  @pools[origin] ||= ConnectionPool.new(size: @size) do
105
- self.class.connect(url)
108
+ self.class.connect(cert_store: @cert_store, url: url)
106
109
  end
107
110
  end
108
111
 
@@ -192,6 +195,7 @@ module Increase
192
195
  def initialize(size: self.class::DEFAULT_MAX_CONNECTIONS)
193
196
  @mutex = Mutex.new
194
197
  @size = size
198
+ @cert_store = OpenSSL::X509::Store.new.tap(&:set_default_paths)
195
199
  @pools = {}
196
200
  end
197
201
 
@@ -294,12 +294,12 @@ module Increase
294
294
  # The drawdown request is queued to be submitted to Fedwire.
295
295
  PENDING_SUBMISSION = :pending_submission
296
296
 
297
- # The drawdown request has been sent and the recipient should respond in some way.
298
- PENDING_RESPONSE = :pending_response
299
-
300
297
  # The drawdown request has been fulfilled by the recipient.
301
298
  FULFILLED = :fulfilled
302
299
 
300
+ # The drawdown request has been sent and the recipient should respond in some way.
301
+ PENDING_RESPONSE = :pending_response
302
+
303
303
  # The drawdown request has been refused by the recipient.
304
304
  REFUSED = :refused
305
305
 
@@ -73,12 +73,12 @@ module Increase
73
73
  # The drawdown request is queued to be submitted to Fedwire.
74
74
  PENDING_SUBMISSION = :pending_submission
75
75
 
76
- # The drawdown request has been sent and the recipient should respond in some way.
77
- PENDING_RESPONSE = :pending_response
78
-
79
76
  # The drawdown request has been fulfilled by the recipient.
80
77
  FULFILLED = :fulfilled
81
78
 
79
+ # The drawdown request has been sent and the recipient should respond in some way.
80
+ PENDING_RESPONSE = :pending_response
81
+
82
82
  # The drawdown request has been refused by the recipient.
83
83
  REFUSED = :refused
84
84
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Increase
4
- VERSION = "1.128.0"
4
+ VERSION = "1.129.1"
5
5
  end
data/lib/increase.rb CHANGED
@@ -9,6 +9,7 @@ require "erb"
9
9
  require "etc"
10
10
  require "json"
11
11
  require "net/http"
12
+ require "openssl"
12
13
  require "pathname"
13
14
  require "rbconfig"
14
15
  require "securerandom"
data/manifest.yaml CHANGED
@@ -6,6 +6,7 @@ dependencies:
6
6
  - etc
7
7
  - json
8
8
  - net/http
9
+ - openssl
9
10
  - pathname
10
11
  - rbconfig
11
12
  - securerandom
@@ -176,6 +176,11 @@ module Increase
176
176
  private def auth_headers
177
177
  end
178
178
 
179
+ # @api private
180
+ sig { returns(String) }
181
+ private def user_agent
182
+ end
183
+
179
184
  # @api private
180
185
  sig { returns(String) }
181
186
  private def generate_idempotency_key
@@ -26,8 +26,12 @@ module Increase
26
26
 
27
27
  class << self
28
28
  # @api private
29
- sig { params(url: URI::Generic).returns(Net::HTTP) }
30
- def connect(url)
29
+ sig do
30
+ params(cert_store: OpenSSL::X509::Store, url: URI::Generic).returns(
31
+ Net::HTTP
32
+ )
33
+ end
34
+ def connect(cert_store:, url:)
31
35
  end
32
36
 
33
37
  # @api private
@@ -31,7 +31,7 @@ module Increase
31
31
  #
32
32
  # Assumes superclass fields are totally defined before fields are accessed /
33
33
  # defined on subclasses.
34
- sig { params(child: T.self_type).void }
34
+ sig { params(child: Increase::Internal::Type::BaseModel).void }
35
35
  def inherited(child)
36
36
  end
37
37
 
@@ -274,9 +274,13 @@ module Increase
274
274
 
275
275
  # Create a new instance of a model.
276
276
  sig do
277
- params(data: T.any(T::Hash[Symbol, T.anything], T.self_type)).returns(
278
- T.attached_class
279
- )
277
+ params(
278
+ data:
279
+ T.any(
280
+ T::Hash[Symbol, T.anything],
281
+ Increase::Internal::Type::BaseModel
282
+ )
283
+ ).returns(T.attached_class)
280
284
  end
281
285
  def self.new(data = {})
282
286
  end
@@ -391,6 +391,10 @@ module Increase
391
391
  Increase::WireDrawdownRequest::Status::TaggedSymbol
392
392
  )
393
393
 
394
+ # The drawdown request has been fulfilled by the recipient.
395
+ FULFILLED =
396
+ T.let(:fulfilled, Increase::WireDrawdownRequest::Status::TaggedSymbol)
397
+
394
398
  # The drawdown request has been sent and the recipient should respond in some way.
395
399
  PENDING_RESPONSE =
396
400
  T.let(
@@ -398,10 +402,6 @@ module Increase
398
402
  Increase::WireDrawdownRequest::Status::TaggedSymbol
399
403
  )
400
404
 
401
- # The drawdown request has been fulfilled by the recipient.
402
- FULFILLED =
403
- T.let(:fulfilled, Increase::WireDrawdownRequest::Status::TaggedSymbol)
404
-
405
405
  # The drawdown request has been refused by the recipient.
406
406
  REFUSED =
407
407
  T.let(:refused, Increase::WireDrawdownRequest::Status::TaggedSymbol)
@@ -168,17 +168,17 @@ module Increase
168
168
  Increase::WireDrawdownRequestListParams::Status::In::TaggedSymbol
169
169
  )
170
170
 
171
- # The drawdown request has been sent and the recipient should respond in some way.
172
- PENDING_RESPONSE =
171
+ # The drawdown request has been fulfilled by the recipient.
172
+ FULFILLED =
173
173
  T.let(
174
- :pending_response,
174
+ :fulfilled,
175
175
  Increase::WireDrawdownRequestListParams::Status::In::TaggedSymbol
176
176
  )
177
177
 
178
- # The drawdown request has been fulfilled by the recipient.
179
- FULFILLED =
178
+ # The drawdown request has been sent and the recipient should respond in some way.
179
+ PENDING_RESPONSE =
180
180
  T.let(
181
- :fulfilled,
181
+ :pending_response,
182
182
  Increase::WireDrawdownRequestListParams::Status::In::TaggedSymbol
183
183
  )
184
184
 
@@ -87,6 +87,8 @@ module Increase
87
87
 
88
88
  private def auth_headers: -> ::Hash[String, String]
89
89
 
90
+ private def user_agent: -> String
91
+
90
92
  private def generate_idempotency_key: -> String
91
93
 
92
94
  private def build_request: (
@@ -17,7 +17,10 @@ module Increase
17
17
 
18
18
  DEFAULT_MAX_CONNECTIONS: Integer
19
19
 
20
- def self.connect: (URI::Generic url) -> top
20
+ def self.connect: (
21
+ cert_store: OpenSSL::X509::Store,
22
+ url: URI::Generic
23
+ ) -> top
21
24
 
22
25
  def self.calibrate_socket_timeout: (top conn, Float deadline) -> void
23
26
 
@@ -186,7 +186,7 @@ module Increase
186
186
  end
187
187
 
188
188
  type status =
189
- :pending_submission | :pending_response | :fulfilled | :refused
189
+ :pending_submission | :fulfilled | :pending_response | :refused
190
190
 
191
191
  module Status
192
192
  extend Increase::Internal::Type::Enum
@@ -194,12 +194,12 @@ module Increase
194
194
  # The drawdown request is queued to be submitted to Fedwire.
195
195
  PENDING_SUBMISSION: :pending_submission
196
196
 
197
- # The drawdown request has been sent and the recipient should respond in some way.
198
- PENDING_RESPONSE: :pending_response
199
-
200
197
  # The drawdown request has been fulfilled by the recipient.
201
198
  FULFILLED: :fulfilled
202
199
 
200
+ # The drawdown request has been sent and the recipient should respond in some way.
201
+ PENDING_RESPONSE: :pending_response
202
+
203
203
  # The drawdown request has been refused by the recipient.
204
204
  REFUSED: :refused
205
205
 
@@ -68,7 +68,7 @@ module Increase
68
68
  }
69
69
 
70
70
  type in_ =
71
- :pending_submission | :pending_response | :fulfilled | :refused
71
+ :pending_submission | :fulfilled | :pending_response | :refused
72
72
 
73
73
  module In
74
74
  extend Increase::Internal::Type::Enum
@@ -76,12 +76,12 @@ module Increase
76
76
  # The drawdown request is queued to be submitted to Fedwire.
77
77
  PENDING_SUBMISSION: :pending_submission
78
78
 
79
- # The drawdown request has been sent and the recipient should respond in some way.
80
- PENDING_RESPONSE: :pending_response
81
-
82
79
  # The drawdown request has been fulfilled by the recipient.
83
80
  FULFILLED: :fulfilled
84
81
 
82
+ # The drawdown request has been sent and the recipient should respond in some way.
83
+ PENDING_RESPONSE: :pending_response
84
+
85
85
  # The drawdown request has been refused by the recipient.
86
86
  REFUSED: :refused
87
87
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: increase
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.128.0
4
+ version: 1.129.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Increase
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-31 00:00:00.000000000 Z
11
+ date: 2025-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool