omq 0.6.4 → 0.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 77a41ed459e51dc42f2dcec6976284b7fcbacc2b2a5e946234b76fbf93af74c0
4
- data.tar.gz: b12af7e7377465ee799c9ff213b2d1b1604bec635fd9d48bfb7af8112fb6a4a9
3
+ metadata.gz: 94402697e206444e39655869c1382cea2a2839732d373d6cbcc237dcb125cd44
4
+ data.tar.gz: dbcaa10eb1213e935325d0290611716552d28394dd479d8fc79564a0af6f0e4d
5
5
  SHA512:
6
- metadata.gz: 44b729c9f970e4fd1c3203dad3cde213464d00d010513d983ca019a577fc123953cc5b6de520b64a821e8fabcfb7778db3a50876416ac19e5ee3b0082804af37
7
- data.tar.gz: a83241f60938d62edf6241ab6de7719594689cfaa551988d852a39043d297464b7f64405d661ea3c7fdd3d198143f6f263fa930c48490cd73cf45547d566c3f2
6
+ metadata.gz: 9a4b4eab9767b52f874bf85816589558bf42e9730da827220490e80ca9dd499ae5ae604c06022d3db07402042a1b52ea1c88737e2c1556b4d78af90391dc1d2f
7
+ data.tar.gz: e2db5e6aaea16af48024be90af8353a81f4d77a4b0b1973131f74dbd915b9aaf52fdd06d08cc57749ffb74b6bd70214ffb2ab04063925887c8a1b72afd4582cb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.5 — 2026-03-30
4
+
5
+ ### Fixed
6
+
7
+ - **CLI error path** — use `Kernel#exit` instead of `Process.exit!`
8
+
3
9
  ## 0.6.4 — 2026-03-30
4
10
 
5
11
  ### Added
data/README.md CHANGED
@@ -107,18 +107,18 @@ end
107
107
 
108
108
  ## Socket Types
109
109
 
110
- | Pattern | Classes | Direction |
111
- |---------|---------|-----------|
112
- | Request/Reply | `REQ`, `REP` | bidirectional |
113
- | Publish/Subscribe | `PUB`, `SUB`, `XPUB`, `XSUB` | unidirectional |
114
- | Pipeline | `PUSH`, `PULL` | unidirectional |
115
- | Routing | `DEALER`, `ROUTER` | bidirectional |
116
- | Exclusive pair | `PAIR` | bidirectional |
117
- | Client/Server | `CLIENT`, `SERVER` | bidirectional |
118
- | Group messaging | `RADIO`, `DISH` | unidirectional |
119
- | Pipeline (draft) | `SCATTER`, `GATHER` | unidirectional |
120
- | Peer-to-peer | `PEER` | bidirectional |
121
- | Channel (draft) | `CHANNEL` | bidirectional |
110
+ | Pattern | Classes | Direction | Multipart |
111
+ |---------|---------|-----------|-----------|
112
+ | Request/Reply | `REQ`, `REP` | bidirectional | yes |
113
+ | Publish/Subscribe | `PUB`, `SUB`, `XPUB`, `XSUB` | unidirectional | yes |
114
+ | Pipeline | `PUSH`, `PULL` | unidirectional | yes |
115
+ | Routing | `DEALER`, `ROUTER` | bidirectional | yes |
116
+ | Exclusive pair | `PAIR` | bidirectional | yes |
117
+ | Client/Server | `CLIENT`, `SERVER` | bidirectional | no |
118
+ | Group messaging | `RADIO`, `DISH` | unidirectional | no |
119
+ | Pipeline (draft) | `SCATTER`, `GATHER` | unidirectional | no |
120
+ | Peer-to-peer | `PEER` | bidirectional | no |
121
+ | Channel (draft) | `CHANNEL` | bidirectional | no |
122
122
 
123
123
  All classes live under `OMQ::`. For the purists, `ØMQ` is an alias:
124
124
 
@@ -163,16 +163,16 @@ echo "hello" | omq req -c tcp://localhost:5555
163
163
  omq sub -b tcp://:5556 -s "weather." &
164
164
  echo "weather.nyc 72F" | omq pub -c tcp://localhost:5556 -d 0.3
165
165
 
166
- # Pipeline with filtering
166
+ # Pipeline with filtering ($F = message parts, $_ = first part)
167
+ # /regexp/ matches against $_, next skips, break stops
167
168
  tail -f /var/log/syslog | omq push -c tcp://collector:5557
168
- omq pull -b tcp://:5557 -e '$F.first.include?("error") ? $F : nil'
169
+ omq pull -b tcp://:5557 -e 'next unless /error/; $F'
169
170
 
170
171
  # Pipe: PULL → eval → PUSH in one process
171
172
  omq pipe -c ipc://@work -c ipc://@sink -e '$F.map(&:upcase)'
172
173
 
173
- # Pipe with 4 Ractor workers for CPU parallelism
174
- omq pipe -c ipc://@work -c ipc://@sink -P 4 \
175
- -r ./fib.rb -e 'fib(Integer($_)).to_s'
174
+ # Pipe with Ractor workers for CPU parallelism (-P = all CPUs)
175
+ omq pipe -c ipc://@work -c ipc://@sink -P -r./fib -e 'fib(Integer($_)).to_s'
176
176
 
177
177
  # Exit when all peers disconnect (pipeline workers, sinks)
178
178
  omq pipe -c ipc://@work -c ipc://@sink --transient -e '$F'
@@ -412,7 +412,7 @@ module OMQ
412
412
  end
413
413
  rescue => e
414
414
  $stderr.puts "omq: -e error: #{e.message} (#{e.class})"
415
- Process.exit!(3)
415
+ exit 3
416
416
  end
417
417
 
418
418
  # ── Logging ─────────────────────────────────────────────────────
data/lib/omq/cli/pipe.rb CHANGED
@@ -237,7 +237,7 @@ module OMQ
237
237
  end
238
238
  rescue => e
239
239
  $stderr.puts "omq: -e error: #{e.message} (#{e.class})"
240
- Process.exit!(3)
240
+ exit 3
241
241
  end
242
242
 
243
243
 
data/lib/omq/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OMQ
4
- VERSION = "0.6.4"
4
+ VERSION = "0.6.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrik Wenger