omq-cli 0.14.4 → 0.14.6
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 +36 -1
- data/lib/omq/cli/base_runner.rb +12 -3
- 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: 6e3050d7165339cb111711aebe54240077303952ae7f8ff149bcbc04584bbd43
|
|
4
|
+
data.tar.gz: a58e91a00af3189aa8ac183d39637744e34311f8e99f53ffdfaf8c5681f0ab31
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e1c6dbcd552e0d808a0a130eab0cda40c90a03636df335c132da2d6ca754cc94be66edd8798d0768d74b698c9886b88d887ab71d7bc25ed5478035d20899fae1
|
|
7
|
+
data.tar.gz: 9ac43e61b051ae44e7475dc640109cc227dffc81cae115d515960880d0de95afadda75a993e1c965d73e4cbc13a770e94913c0b912f0355e7ec2084421577881
|
data/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,45 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.14.6 — 2026-04-14
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **Bare `omq push -c tcp://…` on a terminal no longer exits
|
|
8
|
+
immediately.** `BaseRunner#run_send_logic` only fell through to
|
|
9
|
+
`run_stdin_send` when `stdin_ready?` was true, and `stdin_ready?`
|
|
10
|
+
hard-codes `false` on a tty — so `omq push` / `omq pub` /
|
|
11
|
+
`omq scatter` / `omq radio` / `omq pair` with no `-d` / `-f` /
|
|
12
|
+
`-e` / `-I` connected, sent nothing, and disconnected. The
|
|
13
|
+
elsif now also matches `config.stdin_is_tty`, so an interactive
|
|
14
|
+
run reads lines from the terminal the way `omq req` and
|
|
15
|
+
`omq rep` already did.
|
|
16
|
+
|
|
17
|
+
## 0.14.5 — 2026-04-14
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- **Blank stdin lines are now a no-op instead of a zero-frame
|
|
22
|
+
"message".** 0.14.3 decoded a blank line to `[""]` so that REQ
|
|
23
|
+
would actually send *something* and not wedge in `recv_msg`.
|
|
24
|
+
That was the wrong shape of fix — on a tty, hitting Enter on an
|
|
25
|
+
empty prompt should behave like a shell's empty prompt and just
|
|
26
|
+
wait for the next line, not fire off an empty ZMTP frame to the
|
|
27
|
+
peer. `BaseRunner#read_stdin_input` now loops past blank lines
|
|
28
|
+
for the ascii/quoted/jsonl paths; decode goes back to returning
|
|
29
|
+
`[]` for a blank line and `Formatter::EMPTY_MSG` is gone. REQ
|
|
30
|
+
still cannot wedge because the blank line is never seen by
|
|
31
|
+
`run_loop` at all. `split("\t", -1)` / trailing-empty-frame
|
|
32
|
+
preservation is kept.
|
|
33
|
+
|
|
3
34
|
## 0.14.4 — 2026-04-14
|
|
4
35
|
|
|
5
36
|
### Fixed
|
|
6
37
|
|
|
7
|
-
- **`NameError`
|
|
38
|
+
- **`NameError` on load when requiring `omq/cli/formatter` without
|
|
39
|
+
`protocol/zmtp` already loaded.** 0.14.3 introduced
|
|
40
|
+
`Formatter::EMPTY_MSG = [::Protocol::ZMTP::Codec::EMPTY_BINARY]`
|
|
41
|
+
at class-body load time, which blew up with `uninitialized
|
|
42
|
+
constant Protocol` in the release gem.
|
|
8
43
|
|
|
9
44
|
## 0.14.3 — 2026-04-14
|
|
10
45
|
|
data/lib/omq/cli/base_runner.rb
CHANGED
|
@@ -207,7 +207,7 @@ module OMQ
|
|
|
207
207
|
elsif config.data || config.file
|
|
208
208
|
parts = eval_send_expr(read_next)
|
|
209
209
|
send_msg(parts) if parts
|
|
210
|
-
elsif stdin_ready?
|
|
210
|
+
elsif stdin_ready? || config.stdin_is_tty
|
|
211
211
|
run_stdin_send(n)
|
|
212
212
|
elsif @send_eval_proc
|
|
213
213
|
parts = eval_send_expr(nil)
|
|
@@ -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