knockapi 1.24.0 → 1.25.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: 84774d9cd9e713ea07cb13d8e2b05f2b73f19d41f3c245ebcd64cb26b5f18bd0
4
- data.tar.gz: aa21741e6901b118f3a417844b9f605d1014fdb051e7f528f74e3b5f52056021
3
+ metadata.gz: 95dc137b6092011539e7c489a17decbd00009f5be384d2577032c45dc61206ba
4
+ data.tar.gz: 9763c56b2a6c1a0eda462a7b513deced67343e1d02b1d184250bd22f98c57287
5
5
  SHA512:
6
- metadata.gz: a1385f420f24a2a4f22dfca3f5ef67006eae61ffbaff5a32d502eb7b563ac575547256b01645ae4409117186aa8e0f1bba5047f2889e49be161c113bb2b85f93
7
- data.tar.gz: d58277c1059aed231030d359939a6c18eae1b28bae140090f304aaf251cc2a25efd96b8f73de316216e7934078122a4ddea232bf68a2f842a5f16ec3eefadf36
6
+ metadata.gz: b77d86b976ae7194bee86cf80584d7dba83bdf46cacf79a874bd5349023e23d32fb01c0ddc164ceea9fdb5b3b6e56a1af8b3173304f23c8905215906413e4129
7
+ data.tar.gz: b12fa4303ad159a34b6941febfd6fa16827dd44270b67a858bbb3a7f5c67b6d5d2b67aa1ecf0763fa4f4f1fda3e9855fc1003f6e9ed438fe2e4d9112191d46f2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.25.1 (2026-01-05)
4
+
5
+ Full Changelog: [v1.25.0...v1.25.1](https://github.com/knocklabs/knock-ruby/compare/v1.25.0...v1.25.1)
6
+
7
+ ### Bug Fixes
8
+
9
+ * calling `break` out of streams should be instantaneous ([e0aaa94](https://github.com/knocklabs/knock-ruby/commit/e0aaa946c031e505099b14ce116c8c759cd8a0d8))
10
+ * issue where json.parse errors when receiving HTTP 204 with nobody ([a3db935](https://github.com/knocklabs/knock-ruby/commit/a3db935b41a2910e81827c7de0a89a5598b7e7b2))
11
+
12
+
13
+ ### Chores
14
+
15
+ * **internal:** codegen related update ([c826f27](https://github.com/knocklabs/knock-ruby/commit/c826f27bab301d7b42e57433eb370a8593723a8f))
16
+
17
+ ## 1.25.0 (2025-12-09)
18
+
19
+ Full Changelog: [v1.24.0...v1.25.0](https://github.com/knocklabs/knock-ruby/compare/v1.24.0...v1.25.0)
20
+
21
+ ### Features
22
+
23
+ * **api:** api update ([7dc711f](https://github.com/knocklabs/knock-ruby/commit/7dc711fc2bbbb9152dbe750b8ed2666cc66aa37e))
24
+
3
25
  ## 1.24.0 (2025-12-09)
4
26
 
5
27
  Full Changelog: [v1.23.0...v1.24.0](https://github.com/knocklabs/knock-ruby/compare/v1.23.0...v1.24.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 "knockapi", "~> 1.24.0"
20
+ gem "knockapi", "~> 1.25.1"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -153,17 +153,19 @@ module Knockapi
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 Knockapi
657
657
  def decode_content(headers, stream:, suppress_error: false)
658
658
  case (content_type = headers["content-type"])
659
659
  in Knockapi::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 Knockapi
667
668
  in Knockapi::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)
@@ -4,8 +4,8 @@ module Knockapi
4
4
  module Resources
5
5
  class Tenants
6
6
  class Bulk
7
- # Delete up to 100 tenants at a time in a single operation. This operation cannot
8
- # be undone.
7
+ # Delete up to 1,000 tenants at a time in a single operation. This operation
8
+ # cannot be undone.
9
9
  #
10
10
  # @overload delete(tenant_ids:, request_options: {})
11
11
  #
@@ -27,7 +27,7 @@ module Knockapi
27
27
  )
28
28
  end
29
29
 
30
- # Set or update up to 100 tenants in a single operation.
30
+ # Set or update up to 1,000 tenants in a single operation.
31
31
  #
32
32
  # @overload set(tenants:, request_options: {})
33
33
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Knockapi
4
- VERSION = "1.24.0"
4
+ VERSION = "1.25.1"
5
5
  end
@@ -4,8 +4,8 @@ module Knockapi
4
4
  module Resources
5
5
  class Tenants
6
6
  class Bulk
7
- # Delete up to 100 tenants at a time in a single operation. This operation cannot
8
- # be undone.
7
+ # Delete up to 1,000 tenants at a time in a single operation. This operation
8
+ # cannot be undone.
9
9
  sig do
10
10
  params(
11
11
  tenant_ids: T::Array[String],
@@ -19,7 +19,7 @@ module Knockapi
19
19
  )
20
20
  end
21
21
 
22
- # Set or update up to 100 tenants in a single operation.
22
+ # Set or update up to 1,000 tenants in a single operation.
23
23
  sig do
24
24
  params(
25
25
  tenants: T::Array[T.any(String, Knockapi::TenantRequest::OrHash)],
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knockapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.24.0
4
+ version: 1.25.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Knock
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-09 00:00:00.000000000 Z
11
+ date: 2026-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool