omq 0.3.1 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d77750001a2c45808301e5a005f83c8a6f4df44ffa033aa121cc9229b597347
4
- data.tar.gz: b009c94d5ea30d5e0983831fb443e1ceb31e8980725b1b9c75b9403814a7a469
3
+ metadata.gz: 27a1d700594261a36d3212b00ff84e15be3053a32db07a04a48aa0eb52fec902
4
+ data.tar.gz: 2797e4863af5cfcde9fe446c79929705e6ab17656ba016532b54d6c6b57564b9
5
5
  SHA512:
6
- metadata.gz: e6612b16ae23874f1539154f108359190ac70eeaf9691c326deb4b2545151590e4458071912a987258b9d59cf80c5015024fbfa546d1f5bbcd979564be5cdffe
7
- data.tar.gz: 7706e73997b1a96446e6c5e6053756e57e4b33d6b084a82c49f78e40b9454aa26aed1d5e3ca14207c450be75864707618c3a87cf27c750020064393dbe85c71f
6
+ metadata.gz: a116b039dc996a0099bbb86e8c138fd71f03051bd23c142b653e1c8e932e541245476bed51a47183ecb3723f9f86b30f36b6e3956b77494f8d77c924354f39ad
7
+ data.tar.gz: bdd7a62bb68390c942ebb1517981ca69d0efab007f3be7d3149fcccb525ad9b2cb279689ba2ec640db0f6057d6d7219e804074bb5ba4eb4d8339517bf6de5805
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.2 — 2026-03-26
4
+
5
+ ### Improved
6
+
7
+ - Hide the warning about the experimental `IO::Buffer` (used by io-stream)
8
+
3
9
  ## 0.3.1 — 2026-03-26
4
10
 
5
11
  ### Improved
data/README.md CHANGED
@@ -137,6 +137,52 @@ Benchmarked with benchmark-ips on Linux x86_64 (Ruby 4.0.1 +YJIT):
137
137
 
138
138
  See [`bench/`](bench/) for full results and scripts.
139
139
 
140
+ ## omqcat — CLI tool
141
+
142
+ `omqcat` is a command-line tool for sending and receiving messages on any OMQ socket. Like `nngcat` from libnng, but with Ruby superpowers.
143
+
144
+ ```sh
145
+ # Echo server in one line
146
+ omqcat rep -b tcp://:5555 -e '$F.map(&:upcase)'
147
+
148
+ # Client
149
+ echo "hello" | omqcat req -c tcp://localhost:5555
150
+ # => HELLO
151
+
152
+ # PUB/SUB
153
+ omqcat sub -b tcp://:5556 -s "weather." &
154
+ echo "weather.nyc 72F" | omqcat pub -c tcp://localhost:5556 -d 0.3
155
+
156
+ # Pipeline with filtering
157
+ tail -f /var/log/syslog | omqcat push -c tcp://collector:5557
158
+ omqcat pull -b tcp://:5557 -e '$F.first.include?("error") ? $F : nil'
159
+
160
+ # Multipart messages via tabs
161
+ printf "routing-key\tpayload data" | omqcat push -c tcp://localhost:5557
162
+ omqcat pull -b tcp://:5557
163
+ # => routing-key payload data
164
+
165
+ # JSONL for structured data
166
+ echo '["key","value"]' | omqcat push -c tcp://localhost:5557 -J
167
+ omqcat pull -b tcp://:5557 -J
168
+
169
+ # Zstandard compression
170
+ omqcat push -c tcp://remote:5557 -z < data.txt
171
+ omqcat pull -b tcp://:5557 -z
172
+
173
+ # CURVE encryption (auto-detected from env vars)
174
+ SERVER_KEY=... omqcat req -c tcp://secure:5555 -D "secret"
175
+ ```
176
+
177
+ The `-e` flag runs Ruby inside the socket instance — the full socket API (`self <<`, `send`, `subscribe`, ...) is available. Use `-r` to require gems:
178
+
179
+ ```sh
180
+ omqcat sub -c tcp://localhost:5556 -s "" -r json \
181
+ -e 'JSON.parse($F.first)["temperature"]'
182
+ ```
183
+
184
+ Formats: `--ascii` (default, tab-separated), `--quoted`, `--raw`, `--jsonl`, `--msgpack`. See `omqcat --help` for all options.
185
+
140
186
  ## Interop with native ZMQ
141
187
 
142
188
  OMQ speaks ZMTP 3.1 on the wire and interoperates with libzmq, CZMQ, pyzmq, etc. over **tcp** and **ipc**. The `inproc://` transport is OMQ-internal (in-process Ruby queues) and is not visible to native ZMQ running in the same process — use `ipc://` to talk across library boundaries.
data/exe/omqcat CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
+ Warning[:experimental] = false
3
4
 
4
5
  #
5
6
  # omqcat — command-line access to OMQ (ZeroMQ) sockets.
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.3.1"
4
+ VERSION = "0.3.2"
5
5
  end
@@ -35,7 +35,7 @@ module OMQ
35
35
  engine.handle_accepted(IO::Stream::Buffered.wrap(client, minimum_write_size: 0), endpoint: endpoint)
36
36
  rescue ProtocolError, *ZMTP::CONNECTION_LOST
37
37
  # peer disconnected during handshake
38
- rescue => e
38
+ rescue
39
39
  client&.close rescue nil
40
40
  raise
41
41
  end
@@ -32,7 +32,7 @@ module OMQ
32
32
  engine.handle_accepted(IO::Stream::Buffered.wrap(client, minimum_write_size: 0), endpoint: resolved)
33
33
  rescue ProtocolError, *ZMTP::CONNECTION_LOST
34
34
  # peer disconnected during handshake
35
- rescue => e
35
+ rescue
36
36
  client&.close rescue nil
37
37
  raise
38
38
  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.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrik Wenger