omq-cli 0.14.4 → 0.14.5
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 +22 -1
- data/lib/omq/cli/base_runner.rb +11 -2
- data/lib/omq/cli/formatter.rb +2 -8
- data/lib/omq/cli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f14ffbc99fefdb889511848a42e32bd4ae40d99c7cce460d258fdb7748957fe9
|
|
4
|
+
data.tar.gz: 96d840a2f4c357a44ca5984a6ec1e25e17f732afdd73336561da1d434c3a5ae0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0aff99845b46f61efcd3b1c46a7a3a8de7457a8ff669db1563d2191b086c1cc9344ec1b26937486626d53953e16c5754b8d08dd22f7a44bbe1a0038f0a6aa39a
|
|
7
|
+
data.tar.gz: 23e995ee4b1e8cbbf2ad3389e5d94f5d5d8215eed0e8b73522242c4ac99b2edc7cbc77f39d83fbb07379236ad03f2ecc3a99cecef775d1075d83d471ff06a954
|
data/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.14.5 — 2026-04-14
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **Blank stdin lines are now a no-op instead of a zero-frame
|
|
8
|
+
"message".** 0.14.3 decoded a blank line to `[""]` so that REQ
|
|
9
|
+
would actually send *something* and not wedge in `recv_msg`.
|
|
10
|
+
That was the wrong shape of fix — on a tty, hitting Enter on an
|
|
11
|
+
empty prompt should behave like a shell's empty prompt and just
|
|
12
|
+
wait for the next line, not fire off an empty ZMTP frame to the
|
|
13
|
+
peer. `BaseRunner#read_stdin_input` now loops past blank lines
|
|
14
|
+
for the ascii/quoted/jsonl paths; decode goes back to returning
|
|
15
|
+
`[]` for a blank line and `Formatter::EMPTY_MSG` is gone. REQ
|
|
16
|
+
still cannot wedge because the blank line is never seen by
|
|
17
|
+
`run_loop` at all. `split("\t", -1)` / trailing-empty-frame
|
|
18
|
+
preservation is kept.
|
|
19
|
+
|
|
3
20
|
## 0.14.4 — 2026-04-14
|
|
4
21
|
|
|
5
22
|
### Fixed
|
|
6
23
|
|
|
7
|
-
- **`NameError`
|
|
24
|
+
- **`NameError` on load when requiring `omq/cli/formatter` without
|
|
25
|
+
`protocol/zmtp` already loaded.** 0.14.3 introduced
|
|
26
|
+
`Formatter::EMPTY_MSG = [::Protocol::ZMTP::Codec::EMPTY_BINARY]`
|
|
27
|
+
at class-body load time, which blew up with `uninitialized
|
|
28
|
+
constant Protocol` in the release gem.
|
|
8
29
|
|
|
9
30
|
## 0.14.3 — 2026-04-14
|
|
10
31
|
|
data/lib/omq/cli/base_runner.rb
CHANGED
|
@@ -418,8 +418,17 @@ module OMQ
|
|
|
418
418
|
data = $stdin.read
|
|
419
419
|
data.nil? || data.empty? ? nil : [data]
|
|
420
420
|
else
|
|
421
|
-
|
|
422
|
-
line
|
|
421
|
+
# Skip blank input lines — they are a no-op "wait for next
|
|
422
|
+
# line" rather than a zero-frame message. Stops REQ from
|
|
423
|
+
# wedging in recv after an accidental Enter on a tty, and
|
|
424
|
+
# stops PUSH/etc. from silently dropping the iteration via
|
|
425
|
+
# send_msg's `return if parts.empty?` guard.
|
|
426
|
+
loop do
|
|
427
|
+
line = $stdin.gets
|
|
428
|
+
return nil if line.nil?
|
|
429
|
+
next if line.chomp.empty?
|
|
430
|
+
return @fmt.decode(line)
|
|
431
|
+
end
|
|
423
432
|
end
|
|
424
433
|
end
|
|
425
434
|
|
data/lib/omq/cli/formatter.rb
CHANGED
|
@@ -7,10 +7,6 @@ module OMQ
|
|
|
7
7
|
# (omq-rfc-zstd) once enabled via +socket.compression=+; the
|
|
8
8
|
# formatter sees plaintext frames in both directions.
|
|
9
9
|
class Formatter
|
|
10
|
-
# Single empty frame — used as the decoded form of a blank input line.
|
|
11
|
-
EMPTY_MSG = [''.b.freeze].freeze
|
|
12
|
-
|
|
13
|
-
|
|
14
10
|
# @param format [Symbol] wire format (:ascii, :quoted, :raw, :jsonl, :msgpack, :marshal)
|
|
15
11
|
def initialize(format)
|
|
16
12
|
@format = format
|
|
@@ -49,11 +45,9 @@ module OMQ
|
|
|
49
45
|
def decode(line)
|
|
50
46
|
case @format
|
|
51
47
|
when :ascii, :marshal
|
|
52
|
-
|
|
53
|
-
parts.empty? ? EMPTY_MSG : parts
|
|
48
|
+
line.chomp.split("\t", -1)
|
|
54
49
|
when :quoted
|
|
55
|
-
|
|
56
|
-
parts.empty? ? EMPTY_MSG : parts
|
|
50
|
+
line.chomp.split("\t", -1).map { |p| "\"#{p}\"".undump }
|
|
57
51
|
when :raw
|
|
58
52
|
[line]
|
|
59
53
|
when :jsonl
|
data/lib/omq/cli/version.rb
CHANGED