patchwork-rb 0.1.2 → 0.1.3

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: 108700913cae8170b5b159b176721c89622cdb953b05742faf9ea67412737efb
4
- data.tar.gz: 265117f01f55ae9c4ed57aae204f4a1e1075bacfa89a7cada213d3d7d4dba2c6
3
+ metadata.gz: 242267fcd3ddc369be17e976228f9106b9d1ecbc9b5a2e6d1c7848b3e021667a
4
+ data.tar.gz: '0396a4b146c596df95003bc844c96092c69daf6b0fa8535ee4259a9b0dd7efed'
5
5
  SHA512:
6
- metadata.gz: f96ee8264f33daf9f0167a8dc9d3fcd5dcfd1152a595c2558a2b5902d1f89cbb82b648439043eccb4822fc6b75b3e869a9294c150220f6d10ddab4fdac4a3d01
7
- data.tar.gz: b46c6776a18619c2b9cc0fc5cbb987a35ad32206445b7c28fdef6af60f0e38161632dca1d0dc18a720faaea50fc2f73786f480ccdd3b7100c76fa0042cf403ef
6
+ metadata.gz: dada508727728393bce618506e53dbe5dd88b100a3c7bf83e1a09c6a641d4c84a3fea5c8301261b0fe0dc6ccfb92cf669389bf8024ee74d9d399441368f6aae0
7
+ data.tar.gz: 879dd1640710686be7ff031d2576b8b312f57cbbe019f636446f0328caff46c7e9b9774ad4fcd055ee6a0c2a8af4c2ff634d58734d17bcb98c4b21c1a5bd13f8
@@ -32,17 +32,20 @@ module Patchwork
32
32
  TooLarge = Class.new(Error)
33
33
 
34
34
  def initialize(app, resolve:, subject: nil, mint_path: nil, health_check: true,
35
- max_body_bytes: MAX_BODY_BYTES, replay_guard: nil)
35
+ health_path: HealthCheck::PATH, max_body_bytes: MAX_BODY_BYTES,
36
+ replay_guard: nil)
36
37
  raise ArgumentError, "resolve must respond to #call" unless resolve.respond_to?(:call)
37
38
  raise ArgumentError, "subject must respond to #decode" if subject && !subject.respond_to?(:decode)
38
39
  raise ArgumentError, "replay_guard must respond to #call" if replay_guard && !replay_guard.respond_to?(:call)
39
40
  raise ArgumentError, "mint_path must be an absolute path" if mint_path && !mint_path.to_s.start_with?("/")
41
+ raise ArgumentError, "health_path must be an absolute path" unless health_path.to_s.start_with?("/")
40
42
 
41
43
  @app = app
42
44
  @resolve = resolve
43
45
  @subject = subject
44
46
  @mint_path = mint_path&.to_s
45
47
  @health_check = health_check
48
+ @health_path = health_path.to_s
46
49
  @max_body_bytes = Integer(max_body_bytes)
47
50
  @replay_guard = replay_guard
48
51
  end
@@ -55,7 +58,7 @@ module Patchwork
55
58
  request = Rack::Request.new(env)
56
59
  signature = env[SIGNATURE_HEADER].to_s
57
60
 
58
- return health(request, signature) if @health_check && at?(request, HealthCheck::PATH) && request.post?
61
+ return health(request, signature) if @health_check && at?(request, @health_path) && request.post?
59
62
  return @app.call(env) if signature.empty?
60
63
  return relay_mint(request, signature) if @mint_path && at?(request, @mint_path) && request.post?
61
64
 
@@ -1,3 +1,3 @@
1
1
  module Patchwork
2
- VERSION = "0.1.2".freeze
2
+ VERSION = "0.1.3".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: patchwork-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chromablue Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-03 00:00:00.000000000 Z
11
+ date: 2026-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt