omq 0.1.1 → 0.2.0
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 +10 -0
- data/lib/omq/socket.rb +0 -5
- data/lib/omq/version.rb +1 -1
- data/lib/omq/zmtp/engine.rb +1 -21
- data/lib/omq/zmtp/options.rb +2 -10
- 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: fb02b0e08db21f4d0db4bb376a35759ca709ef80d175a306179c3710e8048e9d
|
|
4
|
+
data.tar.gz: 41bfa63e9868e6a5d10c97e9751ebe227f8937be734d9f9bc5c618619cb1906c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf95700a644923f1598944501e10775de5ba0cfd277c375f3701c93e09a5e1928e495acea2e09eb5224f87143e55526f851852c2ba67d92409a5e0da62ec5266
|
|
7
|
+
data.tar.gz: 9b299ca752fee2e1cba919d65bd7a377494e8067d111f27ac53c8dc2a35b3c9c3d0547386e38417656f58b746ea3dda6ea5b8292e1d9f9230736150561aad1b8
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.0 — 2026-03-26
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- `mechanism` option now holds the mechanism instance directly
|
|
8
|
+
(`Mechanism::Null.new` by default). For CURVE, use
|
|
9
|
+
`OMQ::Curve.server(pub, sec)` or `OMQ::Curve.client(pub, sec, server_key: k)`.
|
|
10
|
+
- Removed `curve_server`, `curve_server_key`, `curve_public_key`,
|
|
11
|
+
`curve_secret_key`, `curve_authenticator` socket options
|
|
12
|
+
|
|
3
13
|
## 0.1.1 — 2026-03-26
|
|
4
14
|
|
|
5
15
|
### Fixed
|
data/lib/omq/socket.rb
CHANGED
|
@@ -31,11 +31,6 @@ module OMQ
|
|
|
31
31
|
heartbeat_timeout heartbeat_timeout=
|
|
32
32
|
max_message_size max_message_size=
|
|
33
33
|
mechanism mechanism=
|
|
34
|
-
curve_server curve_server=
|
|
35
|
-
curve_server_key curve_server_key=
|
|
36
|
-
curve_public_key curve_public_key=
|
|
37
|
-
curve_secret_key curve_secret_key=
|
|
38
|
-
curve_authenticator curve_authenticator=
|
|
39
34
|
].each do |method|
|
|
40
35
|
define_method(method) { |*args| @options.public_send(method, *args) }
|
|
41
36
|
end
|
data/lib/omq/version.rb
CHANGED
data/lib/omq/zmtp/engine.rb
CHANGED
|
@@ -260,7 +260,7 @@ module OMQ
|
|
|
260
260
|
socket_type: @socket_type.to_s,
|
|
261
261
|
identity: @options.identity,
|
|
262
262
|
as_server: as_server,
|
|
263
|
-
mechanism:
|
|
263
|
+
mechanism: @options.mechanism,
|
|
264
264
|
heartbeat_interval: @options.heartbeat_interval,
|
|
265
265
|
heartbeat_ttl: @options.heartbeat_ttl,
|
|
266
266
|
heartbeat_timeout: @options.heartbeat_timeout,
|
|
@@ -305,26 +305,6 @@ module OMQ
|
|
|
305
305
|
end
|
|
306
306
|
|
|
307
307
|
|
|
308
|
-
def build_mechanism
|
|
309
|
-
case @options.mechanism
|
|
310
|
-
when :null
|
|
311
|
-
Mechanism::Null.new
|
|
312
|
-
when :curve
|
|
313
|
-
unless defined?(Mechanism::Curve)
|
|
314
|
-
raise LoadError, "require 'omq/curve' to use CURVE security"
|
|
315
|
-
end
|
|
316
|
-
Mechanism::Curve.new(
|
|
317
|
-
server_key: @options.curve_server_key,
|
|
318
|
-
public_key: @options.curve_public_key,
|
|
319
|
-
secret_key: @options.curve_secret_key,
|
|
320
|
-
as_server: @options.curve_server,
|
|
321
|
-
authenticator: @options.curve_authenticator,
|
|
322
|
-
)
|
|
323
|
-
else
|
|
324
|
-
raise ArgumentError, "unknown mechanism: #{@options.mechanism}"
|
|
325
|
-
end
|
|
326
|
-
end
|
|
327
|
-
|
|
328
308
|
def transport_for(endpoint)
|
|
329
309
|
case endpoint
|
|
330
310
|
when /\Atcp:\/\// then Transport::TCP
|
data/lib/omq/zmtp/options.rb
CHANGED
|
@@ -25,12 +25,7 @@ module OMQ
|
|
|
25
25
|
@heartbeat_ttl = nil # seconds, nil = use heartbeat_interval
|
|
26
26
|
@heartbeat_timeout = nil # seconds, nil = use heartbeat_interval
|
|
27
27
|
@max_message_size = nil # bytes, nil = unlimited
|
|
28
|
-
@mechanism =
|
|
29
|
-
@curve_server = false
|
|
30
|
-
@curve_server_key = nil # 32-byte binary (server's permanent public key)
|
|
31
|
-
@curve_public_key = nil # 32-byte binary (our permanent public key)
|
|
32
|
-
@curve_secret_key = nil # 32-byte binary (our permanent secret key)
|
|
33
|
-
@curve_authenticator = nil # nil = allow all, Set = allowlist, #call = custom
|
|
28
|
+
@mechanism = Mechanism::Null.new
|
|
34
29
|
end
|
|
35
30
|
|
|
36
31
|
attr_accessor :send_hwm, :recv_hwm,
|
|
@@ -40,10 +35,7 @@ module OMQ
|
|
|
40
35
|
:reconnect_interval,
|
|
41
36
|
:heartbeat_interval, :heartbeat_ttl, :heartbeat_timeout,
|
|
42
37
|
:max_message_size,
|
|
43
|
-
:mechanism
|
|
44
|
-
:curve_server, :curve_server_key,
|
|
45
|
-
:curve_public_key, :curve_secret_key,
|
|
46
|
-
:curve_authenticator
|
|
38
|
+
:mechanism
|
|
47
39
|
|
|
48
40
|
alias_method :router_mandatory?, :router_mandatory
|
|
49
41
|
alias_method :recv_timeout, :read_timeout
|