omq-cli 0.11.1 → 0.11.2
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 +4 -4
- data/CHANGELOG.md +13 -0
- data/lib/omq/cli/cli_parser.rb +32 -4
- data/lib/omq/cli/version.rb +1 -1
- metadata +7 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a9231c3553c8f0af98eec725d997292642820308bbf1f684200b45553ee36801
|
|
4
|
+
data.tar.gz: 0a019a39b38922dbcbc39dbb9e814e8358117dab4ef01e161bb2ca1078f3b0db
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c388f696b3dabbbea883c13b1d41e43114bd331691da0f08cc16294bb4fbbbba8b9ca38c3f33974a4b56fbf21b3bfb6f46a1c7b670dd991b6df20b4eeaaff11
|
|
7
|
+
data.tar.gz: a805770aea507a99cc962cb5d0c04c8ac2d2c5f0ea74cce9430285f0dfe9b954671941110eb91b410b63f3f6418a565cf77410de84a1551fe3636c3454a52ab2
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.11.2 — 2026-04-10
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **Endpoint normalization for `tcp://:PORT`.** Connects now normalize
|
|
8
|
+
to `tcp://localhost:PORT` (preserving Happy Eyeballs) instead of
|
|
9
|
+
`tcp://127.0.0.1:PORT`. Binds normalize to the loopback address
|
|
10
|
+
(`[::1]` on IPv6-capable hosts, `127.0.0.1` otherwise) instead of
|
|
11
|
+
`0.0.0.0` (all interfaces). `tcp://*:PORT` binds still expand to
|
|
12
|
+
`0.0.0.0`. Explicit addresses (`0.0.0.0`, `[::]`, `127.0.0.1`) pass
|
|
13
|
+
through unchanged. The macOS hang (IPv6 `connect(2)` stalling via
|
|
14
|
+
kqueue) is fixed by the connect timeout in omq v0.17.3.
|
|
15
|
+
|
|
3
16
|
## 0.11.0 — 2026-04-10
|
|
4
17
|
|
|
5
18
|
### Added
|
data/lib/omq/cli/cli_parser.rb
CHANGED
|
@@ -436,10 +436,23 @@ module OMQ
|
|
|
436
436
|
opts[:type_name] = type_name.downcase
|
|
437
437
|
end
|
|
438
438
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
439
|
+
# Normalize shorthand hostnames to concrete addresses.
|
|
440
|
+
#
|
|
441
|
+
# Binds: tcp://:PORT → loopback (::1 if IPv6 available, else 127.0.0.1)
|
|
442
|
+
# tcp://*:PORT → 0.0.0.0 (all interfaces, IPv4)
|
|
443
|
+
# tcp://0.0.0.0:PORT, tcp://[::]:PORT → pass through
|
|
444
|
+
#
|
|
445
|
+
# Connects: tcp://:PORT → localhost (Happy Eyeballs)
|
|
446
|
+
# tcp://*:PORT → localhost
|
|
447
|
+
#
|
|
448
|
+
# The hang on macOS (IPv6 connect(2) not getting ECONNREFUSED via
|
|
449
|
+
# kqueue) is fixed by the connect timeout in Engine::Reconnect.
|
|
450
|
+
loopback = self.class.loopback_bind_host
|
|
451
|
+
normalize_bind = ->(url) { url.sub(%r{\Atcp://\*:}, "tcp://0.0.0.0:").sub(%r{\Atcp://:}, "tcp://#{loopback}:") }
|
|
452
|
+
normalize_connect = ->(url) { url.sub(%r{\Atcp://(\*|):}, "tcp://localhost:") }
|
|
453
|
+
normalize_ep = ->(ep) { Endpoint.new(ep.bind? ? normalize_bind.call(ep.url) : normalize_connect.call(ep.url), ep.bind?) }
|
|
454
|
+
opts[:binds].map!(&normalize_bind)
|
|
455
|
+
opts[:connects].map!(&normalize_connect)
|
|
443
456
|
opts[:endpoints].map!(&normalize_ep)
|
|
444
457
|
opts[:in_endpoints].map!(&normalize_ep)
|
|
445
458
|
opts[:out_endpoints].map!(&normalize_ep)
|
|
@@ -526,6 +539,21 @@ module OMQ
|
|
|
526
539
|
dups = all_urls.tally.select { |_, n| n > 1 }.keys
|
|
527
540
|
abort "duplicate endpoint: #{dups.first}" if dups.any?
|
|
528
541
|
end
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
# Returns the loopback address for bind normalization.
|
|
545
|
+
# Prefers IPv6 loopback ([::1]) when the host has at least one
|
|
546
|
+
# non-loopback, non-link-local IPv6 address, otherwise 127.0.0.1.
|
|
547
|
+
#
|
|
548
|
+
def self.loopback_bind_host
|
|
549
|
+
@loopback_bind_host ||= begin
|
|
550
|
+
has_ipv6 = ::Socket.getifaddrs.any? { |ifa|
|
|
551
|
+
addr = ifa.addr
|
|
552
|
+
addr&.ipv6? && !addr.ipv6_loopback? && !addr.ipv6_linklocal?
|
|
553
|
+
}
|
|
554
|
+
has_ipv6 ? "[::1]" : "127.0.0.1"
|
|
555
|
+
end
|
|
556
|
+
end
|
|
529
557
|
end
|
|
530
558
|
end
|
|
531
559
|
end
|
data/lib/omq/cli/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omq-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.11.
|
|
4
|
+
version: 0.11.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Patrik Wenger
|
|
@@ -16,6 +16,9 @@ dependencies:
|
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
18
|
version: '0.17'
|
|
19
|
+
- - ">="
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: 0.17.3
|
|
19
22
|
type: :runtime
|
|
20
23
|
prerelease: false
|
|
21
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -23,6 +26,9 @@ dependencies:
|
|
|
23
26
|
- - "~>"
|
|
24
27
|
- !ruby/object:Gem::Version
|
|
25
28
|
version: '0.17'
|
|
29
|
+
- - ">="
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: 0.17.3
|
|
26
32
|
- !ruby/object:Gem::Dependency
|
|
27
33
|
name: omq-ffi
|
|
28
34
|
requirement: !ruby/object:Gem::Requirement
|