leopard 0.3.0 → 0.3.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: 4d1aeb9c3c7a7e402bb3f9fa824c49e56d0138f7dbad76d9c2f26b31280a9dfd
4
- data.tar.gz: 2362a8775ed22e26944e2d9569a234613eac744345e4820c733abeacfe9d452e
3
+ metadata.gz: 79ba04039c1795930b780fe4d958bc4cac050d641f079222f6c07737fd3a9f67
4
+ data.tar.gz: 2327bd745905c55a56c6ee7b1e6f5a00f9f2c69a86b63402d50dac5b1f09d3b3
5
5
  SHA512:
6
- metadata.gz: db4f46324cde1b6a507adf5690d2a4adb04520e792174c727c99c727fcc6164af25298913ecbbd0c848fd1268218b740f32a8cfb07b3360da2589c6353d41eff
7
- data.tar.gz: 0f6701f12059b90c932feae64cdee90746a0fdbe330456159d366933973314af68e800c0c0b617274670dc2a1c9e6ec163af7eb5c2e36fd59e7b87035f20976a
6
+ metadata.gz: e3fa984d0d8742e780ed80619beb2333f7caa41f7435459c3d34d4cd5f883427c0f791e8e35547494f2c421cee65346b9119f30075800e52effbff1aff5bbf9f
7
+ data.tar.gz: c7c4332092d9ef57586b52f273518e4b40444e6a9b4fa8804ad0073a89f6fc35900c273d79a62efe283f6650c46bf50ddb25ab1ace09f2954de64cfd70a9690d
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.3.0"
2
+ ".": "0.3.1"
3
3
  }
data/.version.txt CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.1](https://github.com/rubyists/leopard/compare/v0.3.0...v0.3.1) (2026-10-08)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * Add empty line ([aedb08d](https://github.com/rubyists/leopard/commit/aedb08d7760beea26cd237c646a0860b04c25a68))
9
+ * enable jetstream endpoint to resolve stream from subject and add error logs ([1cdeaf6](https://github.com/rubyists/leopard/commit/1cdeaf699c15f6fffdd5de70cdf243325c5a0431))
10
+ * Enable jetstream endpoint to resolve stream from subject and add error logs ([923dda5](https://github.com/rubyists/leopard/commit/923dda50850698d4bc2f358c49ade4f15d0d104b))
11
+ * Pass endpoint name when durable is not available ([06e88c7](https://github.com/rubyists/leopard/commit/06e88c7a520c0f6dfec0f88110a039bea9b4c56f))
12
+ * Remove ensure_consumer and fallback on pull_subscrbe to resolve stream ([909230c](https://github.com/rubyists/leopard/commit/909230ca55b85b42fda3703aa06cb00e4726b089))
13
+ * Update integration test to reflect reliance on pull_subscribe ([b39fe75](https://github.com/rubyists/leopard/commit/b39fe75c9142dbdb2358e01d5ba6d96ec777c938))
14
+
3
15
  ## [0.3.0](https://github.com/rubyists/leopard/compare/v0.2.11...v0.3.0) (2026-09-18)
4
16
 
5
17
 
@@ -69,33 +69,27 @@ module Rubyists
69
69
  subscription = build_subscription(endpoint)
70
70
  subscriptions << subscription
71
71
  threads << @thread_factory.new { consume_endpoint(subscription, endpoint) }
72
+ rescue StandardError => e
73
+ @logger.error "JetStream endpoint #{endpoint.name} failed to start: ", e
74
+ raise
72
75
  end
73
76
 
74
- # Ensures the durable consumer exists and creates a pull subscription for it.
77
+ # Creates a pull subscription for the endpoint's durable consumer.
78
+ #
79
+ # No stream is passed, so nats-pure resolves the stream from the subject and adds the durable consumer
80
+ # (using {#consumer_config}) when it does not already exist.
75
81
  #
76
82
  # @param endpoint [NatsJetstreamEndpoint] The endpoint configuration to subscribe to.
77
83
  #
78
84
  # @return [Object] The JetStream pull subscription.
79
85
  def build_subscription(endpoint)
80
- ensure_consumer(endpoint)
81
86
  @jetstream.pull_subscribe(
82
87
  endpoint.subject,
83
- endpoint.durable,
84
- stream: endpoint.stream,
88
+ endpoint.durable || endpoint.name,
89
+ config: consumer_config(endpoint),
85
90
  )
86
91
  end
87
92
 
88
- # Verifies that the durable consumer exists, creating it when missing.
89
- #
90
- # @param endpoint [NatsJetstreamEndpoint] The endpoint configuration to ensure.
91
- #
92
- # @return [Object] Consumer metadata from `consumer_info` or `add_consumer`.
93
- def ensure_consumer(endpoint)
94
- @jetstream.consumer_info(endpoint.stream, endpoint.durable)
95
- rescue NATS::JetStream::Error::NotFound
96
- @jetstream.add_consumer(endpoint.stream, consumer_config(endpoint))
97
- end
98
-
99
93
  # Builds the JetStream consumer configuration for an endpoint.
100
94
  #
101
95
  # @param endpoint [NatsJetstreamEndpoint] The endpoint configuration to translate.
@@ -3,7 +3,7 @@
3
3
  module Rubyists
4
4
  module Leopard
5
5
  # x-release-please-start-version
6
- VERSION = '0.3.0'
6
+ VERSION = '0.3.1'
7
7
  # x-release-please-end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leopard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - bougyman