omq-cli 0.14.6 → 0.14.8

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: 6e3050d7165339cb111711aebe54240077303952ae7f8ff149bcbc04584bbd43
4
- data.tar.gz: a58e91a00af3189aa8ac183d39637744e34311f8e99f53ffdfaf8c5681f0ab31
3
+ metadata.gz: 108eeb712d98cda6762591002a5a7a6e24d341b579c6f9734f5a8d78adb2e481
4
+ data.tar.gz: a603b8c354cb14b6cfa8aed2a13798f9e9a51ecf34c31ab83b6119a36e9a88bb
5
5
  SHA512:
6
- metadata.gz: e1c6dbcd552e0d808a0a130eab0cda40c90a03636df335c132da2d6ca754cc94be66edd8798d0768d74b698c9886b88d887ab71d7bc25ed5478035d20899fae1
7
- data.tar.gz: 9ac43e61b051ae44e7475dc640109cc227dffc81cae115d515960880d0de95afadda75a993e1c965d73e4cbc13a770e94913c0b912f0355e7ec2084421577881
6
+ metadata.gz: 03210f226733ee6baa9acf26fc5e37617dbe6ca8040bd73529701d60994999d1a0baa8571b10852654892e1add49333c6c8bc38c442d91a349c4c0e49a749379
7
+ data.tar.gz: bfd7327cb515ae2133de3ec152b3c6f7ee5c68398b74f46fbd00d4ae060569bc782d4332e043e4b9eb1f0a53dd0ba5fa33ab84a72c322708e3aceee5febaad89
data/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.14.8 — 2026-04-14
4
+
5
+ ### Changed
6
+
7
+ - **`BaseRunner#log` lines now carry the `omq:` prefix and honor
8
+ `--timestamps`.** `log "Peer connected"` used to emit a bare
9
+ `Peer connected` to stderr, while every other stderr line went
10
+ through `Term` and rendered as `omq: connecting to …`,
11
+ `omq: disconnected …`, etc. Mixing the two was jarring — a
12
+ single `omq push` run produced both `omq: connecting to …` and
13
+ `Peer connected` back-to-back. `#log` now routes through
14
+ `Term.log_prefix` and emits `{prefix}omq: {msg}`, and the three
15
+ existing messages are lowercased to match the rest of the
16
+ stderr vocabulary (`peer connected`, `subscriber joined`,
17
+ `all peers disconnected, exiting`).
18
+
19
+ ## 0.14.7 — 2026-04-14
20
+
21
+ ### Fixed
22
+
23
+ - **v0.14.6 regression: `-e`/`-E` pure-generator mode broke on a
24
+ TTY.** The new `config.stdin_is_tty` fallback was inserted into
25
+ the same `elsif` as `stdin_ready?`, so a bare `omq push -E '"foo"'`
26
+ on a terminal routed into `run_stdin_send` instead of firing the
27
+ generator once. `run_send_logic` now checks `@send_eval_proc`
28
+ before the TTY fallback, and the fallback is only taken when no
29
+ other send source is configured. Surfaced by the
30
+ "marshal send path: PushRunner sends raw object" trace-order
31
+ test in CI.
32
+
3
33
  ## 0.14.6 — 2026-04-14
4
34
 
5
35
  ### Fixed
@@ -148,7 +148,7 @@ module OMQ
148
148
  def wait_for_peer
149
149
  wait_body = proc do
150
150
  @sock.peer_connected.wait
151
- log "Peer connected"
151
+ log "peer connected"
152
152
  wait_for_subscriber
153
153
  apply_grace_period
154
154
  end
@@ -164,7 +164,7 @@ module OMQ
164
164
  def wait_for_subscriber
165
165
  return unless %w[pub xpub].include?(config.type_name)
166
166
  @sock.subscriber_joined.wait
167
- log "Subscriber joined"
167
+ log "subscriber joined"
168
168
  end
169
169
 
170
170
 
@@ -207,11 +207,16 @@ 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? || config.stdin_is_tty
210
+ elsif stdin_ready?
211
211
  run_stdin_send(n)
212
212
  elsif @send_eval_proc
213
+ # Pure generator: -e/-E with no stdin input, fire once.
213
214
  parts = eval_send_expr(nil)
214
215
  send_msg(parts) if parts
216
+ elsif config.stdin_is_tty
217
+ # Bare interactive invocation on a terminal: read lines from
218
+ # the tty until the user hits ^D.
219
+ run_stdin_send(n)
215
220
  end
216
221
  end
217
222
 
@@ -524,7 +529,8 @@ module OMQ
524
529
 
525
530
 
526
531
  def log(msg)
527
- $stderr.write("#{msg}\n") if config.verbose >= 1
532
+ return unless config.verbose >= 1
533
+ $stderr.write("#{Term.log_prefix(config.timestamps)}omq: #{msg}\n")
528
534
  end
529
535
 
530
536
 
@@ -19,7 +19,7 @@ module OMQ
19
19
  task.async do
20
20
  @barrier.wait
21
21
  sock.all_peers_gone.wait unless sock.connection_count == 0
22
- log_fn.call("All peers disconnected, exiting")
22
+ log_fn.call("all peers disconnected, exiting")
23
23
  sock.reconnect_enabled = false
24
24
  if config.send_only?
25
25
  task.stop
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OMQ
4
4
  module CLI
5
- VERSION = "0.14.6"
5
+ VERSION = "0.14.8"
6
6
  end
7
7
  end
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.14.6
4
+ version: 0.14.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrik Wenger