service_mesh 0.4.4 → 0.5.0

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: 0d1c22ba40201e6531617371be60f030c23976f3a31d06a536114a388c59a9f0
4
- data.tar.gz: c3e7fd9aedbc639cde6d3727e028799fa51d3222a0006826655084e9f6cb36ea
3
+ metadata.gz: edccbfa1e181934bed8df91ecb53d15849335cb10730450e088fee1e28ac44ef
4
+ data.tar.gz: 64cbe1ba2b464e7ccd1dc840066eedf2dd0cd4639804af86e0fde65615cf064c
5
5
  SHA512:
6
- metadata.gz: d9ebe5643e51f2aebb1ddb7896344b7db28ec0bced10a6cb759db597ffafea1c558dd7612daa9297d4fb4d36c413349c3b085a692770ea0c60742a892d1beffa
7
- data.tar.gz: a5d57ce5d40a07b3ce478ba55dead8115c62c7f6bb678115e90fce513ef27128e851d33f71dd408d318fae5411a1eb53b086d1b539b867bec225934ed7558071
6
+ metadata.gz: bdff9e8e86405e3fcca5df769e800d317df47307d4974c88f9161728c165242ecfa7acf72880bfb41b2606f310c30a6fd6cf35dbb56d22dab202d27e1201725f
7
+ data.tar.gz: c3513ecbc6ae3832509419f8f3b9e9c93c637199eb6d8fd9b9183ef4046bf75d53dd3cc1cc73ee6d16dcaa2b116626956068ce3e3569404aba69bb90e0bc3e7a
data/README.md CHANGED
@@ -23,8 +23,9 @@ Requires Ruby 3.3 or newer. The gem has no runtime dependencies.
23
23
  raises `KindMismatch`.
24
24
  - `Message#payload` is always `Encoding::BINARY`.
25
25
  - `Target#same_channel?` compares segments and kind and ignores metadata.
26
- - The configuration keys the specification defines: `DEPLOYMENT_GROUP_KEY`,
27
- `CONSUMER_GROUP_KEY`, and the value `CONSUMER_GROUP_NONE`.
26
+ - The configuration keys the specification defines. `DEPLOYMENT_GROUP_KEY` is runtime
27
+ configuration. `CONSUMER_GROUP_KEY`, with the value `CONSUMER_GROUP_NONE`, is `Endpoint` and
28
+ `Subscriber` metadata.
28
29
  - The errors defined by the specification as `ServiceMesh::Error`: `ServiceMesh::KindMismatch`,
29
30
  `ServiceMesh::InvalidTarget`, and `ServiceMesh::NoDeploymentGroup`.
30
31
  - A conformance suite a transport runs against its own `Client` and
@@ -161,14 +161,18 @@ RSpec.shared_examples "a service mesh transport" do
161
161
  end
162
162
  end
163
163
 
164
- it "honours a group set on the target rather than the binding" do
164
+ it "ignores a group set on the target, which carries none" do
165
165
  count = Queue.new
166
166
  %w[a b].each do |group|
167
167
  t = ServiceMesh::Target.new(segments: topic_target.segments, kind: :topic, metadata: {ServiceMesh::CONSUMER_GROUP_KEY => group})
168
168
  serve(config_for("same"), subscribers: [subscriber(t, ->(_) { count << true })])
169
169
  end
170
+
170
171
  client.publish(message(topic_target))
171
- wait_until { count.size == 2 }
172
+
173
+ wait_until { count.size >= 1 }
174
+ sleep 0.1 # let an unwanted extra delivery show up
175
+ expect(count.size).to eq(1)
172
176
  end
173
177
  end
174
178
 
@@ -4,7 +4,10 @@ module ServiceMesh
4
4
  KINDS = %i[route topic].freeze
5
5
 
6
6
  # Configuration keys the specification defines. Everything else belongs to
7
- # a transport.
7
+ # a transport. DEPLOYMENT_GROUP_KEY is runtime configuration, and nothing
8
+ # else carries it. CONSUMER_GROUP_KEY is Endpoint and Subscriber metadata;
9
+ # when it is unset or empty, the runtime's deployment group applies, and
10
+ # CONSUMER_GROUP_NONE means no group. A Target carries neither.
8
11
  DEPLOYMENT_GROUP_KEY = "deployment_group"
9
12
  CONSUMER_GROUP_KEY = "consumer_group"
10
13
  CONSUMER_GROUP_NONE = "none"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ServiceMesh
4
- VERSION = "0.4.4"
4
+ VERSION = "0.5.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: service_mesh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryant Morrill
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2026-09-29 00:00:00.000000000 Z
12
+ date: 2026-09-30 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: