cztop 1.1.2 → 1.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/CHANGES.md +11 -0
- data/cztop.gemspec +2 -3
- data/lib/cztop/actor.rb +26 -22
- data/lib/cztop/certificate.rb +19 -11
- data/lib/cztop/message.rb +3 -3
- data/lib/cztop/send_receive_methods.rb +35 -6
- data/lib/cztop/socket/types.rb +18 -0
- data/lib/cztop/version.rb +1 -1
- data/lib/cztop/zsock_options.rb +10 -2
- metadata +3 -47
- data/.github/workflows/coverage.yml +0 -20
- data/.github/workflows/draft_api.yml +0 -27
- data/.github/workflows/stable_api.yml +0 -26
- data/.gitignore +0 -10
- data/.projections.json +0 -4
- data/.rspec +0 -2
- data/.rubocop.yml +0 -175
- data/.yardopts +0 -1
- data/Rakefile +0 -6
- data/ci/install-libczmq +0 -22
- data/ci/install-libzmq +0 -22
- data/examples/ruby_actor/actor.rb +0 -100
- data/examples/simple_req_rep/rep.rb +0 -12
- data/examples/simple_req_rep/req.rb +0 -35
- data/examples/taxi_system/.gitignore +0 -2
- data/examples/taxi_system/Makefile +0 -2
- data/examples/taxi_system/README.gsl +0 -115
- data/examples/taxi_system/README.md +0 -276
- data/examples/taxi_system/broker.rb +0 -97
- data/examples/taxi_system/client.rb +0 -34
- data/examples/taxi_system/generate_keys.rb +0 -24
- data/examples/taxi_system/start_broker.sh +0 -2
- data/examples/taxi_system/start_clients.sh +0 -11
- data/examples/weather_pub_sub/pub.rb +0 -24
- data/examples/weather_pub_sub/sub.rb +0 -33
- data/perf/README.md +0 -80
- data/perf/inproc_lat.rb +0 -49
- data/perf/inproc_thru.rb +0 -42
- data/perf/local_lat.rb +0 -35
- data/perf/remote_lat.rb +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a5218cd3606b597506aa29ea2bc0ccfe2ccd8030f1a0ce1c6ea90791fe7c88e
|
4
|
+
data.tar.gz: 3ad76dccf7e6bad9aff9a19f679bb3420dcf08ec742b109ff6c0a688f3fce4e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36ac2f1e2b1f0ddfb78f3cd77fc7fbfdb78591c1c379b3fb96b92d80566fc8e07e39f666c78b1b2aa6771fcd2fb22d6e6b7a173040b9c489053af27030689220
|
7
|
+
data.tar.gz: ef8061d7082e73bf757335d5c6cd550aeb39dfbdb54314b893e44350e9065ea96874d09b89720fbbe4b98873a0e1b575f76f91266025dcb2d5d45b88b5c11c90
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
1.2.0 (1/7/2024)
|
2
|
+
-----
|
3
|
+
* refactor waiting for socket readability/writability
|
4
|
+
* fix ROUTER socket hanging in busy loop if ZMQ_ROUTER_MANDATORY flag is set and sending a message while no peers are connected
|
5
|
+
* same for unconnected CLIENT sockets
|
6
|
+
* slim down packaged gem
|
7
|
+
* modernize examples
|
8
|
+
* require Ruby 3.2
|
9
|
+
* some exceptions changed from EAGAIN to IO::TimeoutError
|
10
|
+
* Certificate.load and .new_from raise NotImplementedError if CURVE is not available
|
11
|
+
|
1
12
|
1.1.2 (1/5/2024)
|
2
13
|
-----
|
3
14
|
* refactor to make code Fiber Scheduler agnostic
|
data/cztop.gemspec
CHANGED
@@ -12,13 +12,13 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = 'CZMQ binding based on the generated low-level FFI bindings of CZMQ'
|
13
13
|
spec.homepage = "https://rubygems.org/gems/cztop"
|
14
14
|
spec.license = "ISC"
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 3.
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 3.2.0")
|
16
16
|
|
17
17
|
spec.metadata["homepage_uri"] = spec.homepage
|
18
18
|
spec.metadata["source_code_uri"] = "https://github.com/paddor/cztop"
|
19
19
|
spec.metadata["changelog_uri"] = "https://github.com/paddor/cztop/blob/master/CHANGELOG.md"
|
20
20
|
|
21
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(
|
21
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match?(%r{^(\.|Rakefile|spec/|examples/|ci/|perf/)}) }
|
22
22
|
spec.bindir = "exe"
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ["lib"]
|
@@ -32,7 +32,6 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_development_dependency "rspec-given", "~> 3.8.0"
|
33
33
|
spec.add_development_dependency "pry"
|
34
34
|
spec.add_development_dependency "yard"
|
35
|
-
spec.add_development_dependency "rubocop", "~> 1.36.0"
|
36
35
|
|
37
36
|
if RUBY_VERSION >= '3.1'
|
38
37
|
spec.add_development_dependency "async", ">= 2.0.1"
|
data/lib/cztop/actor.rb
CHANGED
@@ -12,7 +12,7 @@ module CZTop
|
|
12
12
|
#
|
13
13
|
# = About termination
|
14
14
|
# Actors should be terminated explicitly, either by calling {#terminate}
|
15
|
-
# from the current process or sending them the
|
15
|
+
# from the current process or sending them the {TERMINATE} command (from
|
16
16
|
# outside). Not terminating them explicitly might make the process block at
|
17
17
|
# exit.
|
18
18
|
#
|
@@ -48,12 +48,20 @@ module CZTop
|
|
48
48
|
class DeadActorError < RuntimeError; end
|
49
49
|
|
50
50
|
|
51
|
+
# the command which causes an actor handler to terminate
|
52
|
+
TERMINATE = '$TERM'
|
53
|
+
|
54
|
+
|
55
|
+
# timeout to use when sending the actor a message
|
56
|
+
SEND_TIMEOUT = 20 # ms
|
57
|
+
|
58
|
+
|
51
59
|
# @return [Exception] the exception that crashed this actor, if any
|
52
60
|
attr_reader :exception
|
53
61
|
|
54
62
|
|
55
63
|
# Creates a new actor. Either pass a callback directly or a block. The
|
56
|
-
# block will be called for every received message.
|
64
|
+
# callback/block will be called for every received message.
|
57
65
|
#
|
58
66
|
# In case the given callback is an FFI::Pointer (to a C function), it's
|
59
67
|
# used as-is. It is expected to do the handshake (signal) itself.
|
@@ -71,8 +79,9 @@ module CZTop
|
|
71
79
|
@callback = callback || handler
|
72
80
|
@callback = shim(@callback) unless @callback.is_a? ::FFI::Pointer
|
73
81
|
ffi_delegate = Zactor.new(@callback, c_args)
|
82
|
+
|
74
83
|
attach_ffi_delegate(ffi_delegate)
|
75
|
-
options.sndtimeo =
|
84
|
+
options.sndtimeo = SEND_TIMEOUT # see #<<
|
76
85
|
end
|
77
86
|
|
78
87
|
|
@@ -83,11 +92,11 @@ module CZTop
|
|
83
92
|
# @raise [IO::EAGAINWaitWritable, RuntimeError] anything that could be
|
84
93
|
# raised by {Message#send_to}
|
85
94
|
# @note Normally this method is asynchronous, but if the message is
|
86
|
-
#
|
95
|
+
# {TERMINATE}, it blocks until the actor is terminated.
|
87
96
|
def <<(message)
|
88
97
|
message = Message.coerce(message)
|
89
98
|
|
90
|
-
if
|
99
|
+
if TERMINATE == message[0]
|
91
100
|
# NOTE: can't just send this to the actor. The sender might call
|
92
101
|
# #terminate immediately, which most likely causes a hang due to race
|
93
102
|
# conditions.
|
@@ -99,7 +108,7 @@ module CZTop
|
|
99
108
|
|
100
109
|
message.send_to(self)
|
101
110
|
end
|
102
|
-
rescue IO::EAGAINWaitWritable
|
111
|
+
rescue IO::EAGAINWaitWritable, IO::TimeoutError
|
103
112
|
# The sndtimeo has been reached.
|
104
113
|
#
|
105
114
|
# This should fix the race condition (mainly on JRuby) between
|
@@ -111,9 +120,8 @@ module CZTop
|
|
111
120
|
# at least when using a Ruby handler.
|
112
121
|
#
|
113
122
|
# In case of a C function handler, it MUST NOT crash and only
|
114
|
-
# terminate when being sent the
|
115
|
-
# #await_handler_death can set
|
116
|
-
# @running to false).
|
123
|
+
# terminate when being sent the {TERMINATE} message using #terminate (so
|
124
|
+
# #await_handler_death can set @running to false).
|
117
125
|
retry
|
118
126
|
end
|
119
127
|
end
|
@@ -138,13 +146,13 @@ module CZTop
|
|
138
146
|
# it.
|
139
147
|
# @param message [Message] the request to the actor
|
140
148
|
# @return [Message] the actor's response
|
141
|
-
# @raise [ArgumentError] if the message is
|
149
|
+
# @raise [ArgumentError] if the message is {TERMINATE} (use {#terminate})
|
142
150
|
def request(message)
|
143
151
|
@mtx.synchronize do
|
144
152
|
raise DeadActorError unless @running
|
145
153
|
|
146
154
|
message = Message.coerce(message)
|
147
|
-
raise ArgumentError, 'use #terminate' if
|
155
|
+
raise ArgumentError, 'use #terminate' if TERMINATE == message[0]
|
148
156
|
|
149
157
|
message.send_to(self)
|
150
158
|
Message.receive_from(self)
|
@@ -189,11 +197,11 @@ module CZTop
|
|
189
197
|
@mtx.synchronize do
|
190
198
|
return false unless @running
|
191
199
|
|
192
|
-
Message.new(
|
200
|
+
Message.new(TERMINATE).send_to(self)
|
193
201
|
await_handler_death
|
194
202
|
true
|
195
203
|
end
|
196
|
-
rescue IO::EAGAINWaitWritable
|
204
|
+
rescue IO::EAGAINWaitWritable, IO::TimeoutError
|
197
205
|
# same as in #<<
|
198
206
|
retry
|
199
207
|
end
|
@@ -236,8 +244,8 @@ module CZTop
|
|
236
244
|
end
|
237
245
|
|
238
246
|
process_messages(handler)
|
239
|
-
rescue Exception
|
240
|
-
@exception =
|
247
|
+
rescue Exception => e
|
248
|
+
@exception = e
|
241
249
|
ensure
|
242
250
|
signal_shimmed_handler_death
|
243
251
|
end
|
@@ -251,16 +259,12 @@ module CZTop
|
|
251
259
|
end
|
252
260
|
|
253
261
|
|
254
|
-
# the command which causes an actor handler to terminate
|
255
|
-
TERM = '$TERM'
|
256
|
-
|
257
|
-
|
258
262
|
# Successively receive messages that were sent to the actor and
|
259
263
|
# yield them to the given handler to process them. The a pipe (a
|
260
264
|
# {Socket::PAIR} socket) is also passed to the handler so it can send back
|
261
265
|
# the result of a command, if needed.
|
262
266
|
#
|
263
|
-
# When a message is
|
267
|
+
# When a message is {TERMINATE}, or when the waiting for a message is
|
264
268
|
# interrupted, execution is aborted and the actor will terminate.
|
265
269
|
#
|
266
270
|
# @param handler [Proc, #call] the handler used to process messages
|
@@ -274,7 +278,7 @@ module CZTop
|
|
274
278
|
rescue Interrupt
|
275
279
|
break
|
276
280
|
else
|
277
|
-
break if
|
281
|
+
break if TERMINATE == message[0]
|
278
282
|
end
|
279
283
|
|
280
284
|
handler.call(message, @pipe)
|
@@ -294,7 +298,7 @@ module CZTop
|
|
294
298
|
#
|
295
299
|
# This is needed to avoid the race condition between zactor_destroy()
|
296
300
|
# which will wait for a signal from the handler in case it was able to
|
297
|
-
# send the
|
301
|
+
# send the {TERMINATE} command, and the @callback which might still haven't
|
298
302
|
# returned, but doesn't receive any messages anymore.
|
299
303
|
#
|
300
304
|
# @return [void]
|
data/lib/cztop/certificate.rb
CHANGED
@@ -8,19 +8,15 @@ module CZTop
|
|
8
8
|
extend CZTop::HasFFIDelegate::ClassMethods
|
9
9
|
include ::CZMQ::FFI
|
10
10
|
|
11
|
-
unless ::CZMQ::FFI::Zsys.has_curve
|
12
|
-
def self.new(...)
|
13
|
-
fail NotImplementedError
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
|
18
11
|
# Warns if CURVE security isn't available.
|
19
|
-
# @return [
|
12
|
+
# @return [Boolean] whether it's available
|
20
13
|
def self.check_curve_availability
|
21
|
-
|
22
|
-
|
23
|
-
|
14
|
+
if Zsys.has_curve
|
15
|
+
true
|
16
|
+
else
|
17
|
+
warn "CZTop: CURVE isn't available. Consider installing libsodium."
|
18
|
+
false
|
19
|
+
end
|
24
20
|
end
|
25
21
|
|
26
22
|
|
@@ -57,6 +53,18 @@ module CZTop
|
|
57
53
|
from_ffi_delegate(ptr)
|
58
54
|
end
|
59
55
|
|
56
|
+
unless ::CZMQ::FFI::Zsys.has_curve
|
57
|
+
def self.new(...)
|
58
|
+
fail NotImplementedError
|
59
|
+
end
|
60
|
+
def self.load(...)
|
61
|
+
fail NotImplementedError
|
62
|
+
end
|
63
|
+
def self.new_from(...)
|
64
|
+
fail NotImplementedError
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
60
68
|
|
61
69
|
# Initialize a new in-memory certificate with random keys.
|
62
70
|
def initialize
|
data/lib/cztop/message.rb
CHANGED
@@ -49,7 +49,7 @@ module CZTop
|
|
49
49
|
# @raise [IO::EAGAINWaitWritable] if the send timeout has been reached
|
50
50
|
# (see {ZsockOptions::OptionsAccessor#sndtimeo=})
|
51
51
|
# @raise [SocketError] if the message can't be routed to the destination
|
52
|
-
# (either if
|
52
|
+
# (either if ZMQ_ROUTER_MANDATORY flag is set on a {Socket::ROUTER} socket
|
53
53
|
# and the peer isn't connected or its SNDHWM is reached (see
|
54
54
|
# {ZsockOptions::OptionsAccessor#router_mandatory=}, or if it's
|
55
55
|
# a {Socket::SERVER} socket and there's no connected CLIENT
|
@@ -61,7 +61,7 @@ module CZTop
|
|
61
61
|
# returns with failure. Please report as bug.
|
62
62
|
#
|
63
63
|
def send_to(destination)
|
64
|
-
destination.wait_writable
|
64
|
+
destination.wait_writable
|
65
65
|
|
66
66
|
rc = Zmsg.send(ffi_delegate, destination)
|
67
67
|
return if rc.zero?
|
@@ -81,7 +81,7 @@ module CZTop
|
|
81
81
|
# @raise [SystemCallError] for any other error code set after +zmsg_recv+
|
82
82
|
# returns with failure. Please report as bug.
|
83
83
|
def self.receive_from(source)
|
84
|
-
source.wait_readable
|
84
|
+
source.wait_readable
|
85
85
|
|
86
86
|
delegate = Zmsg.recv(source)
|
87
87
|
return from_ffi_delegate(delegate) unless delegate.null?
|
@@ -10,7 +10,7 @@ module CZTop
|
|
10
10
|
# Sends a message.
|
11
11
|
#
|
12
12
|
# @param message [Message, String, Array<parts>] the message to send
|
13
|
-
# @raise [IO::EAGAINWaitWritable] if send timeout has been reached (see
|
13
|
+
# @raise [IO::EAGAINWaitWritable, IO::TimeoutError] if send timeout has been reached (see
|
14
14
|
# {ZsockOptions::OptionsAccessor#sndtimeo=})
|
15
15
|
# @raise [Interrupt, ArgumentError, SystemCallError] anything raised by
|
16
16
|
# {Message#send_to}
|
@@ -26,7 +26,7 @@ module CZTop
|
|
26
26
|
# Receives a message.
|
27
27
|
#
|
28
28
|
# @return [Message]
|
29
|
-
# @raise [IO::EAGAINWaitReadable] if receive timeout has been reached (see
|
29
|
+
# @raise [IO::EAGAINWaitReadable, IO::TimeoutError] if receive timeout has been reached (see
|
30
30
|
# {ZsockOptions::OptionsAccessor#rcvtimeo=})
|
31
31
|
# @raise [Interrupt, ArgumentError, SystemCallError] anything raised by
|
32
32
|
# {Message.receive_from}
|
@@ -36,7 +36,13 @@ module CZTop
|
|
36
36
|
end
|
37
37
|
|
38
38
|
|
39
|
+
JIFFY = 0.015 # 15 ms
|
40
|
+
|
41
|
+
|
39
42
|
# Waits for socket to become readable.
|
43
|
+
# @param timeout [Numeric, nil] timeout in seconds
|
44
|
+
# @return [true] if readable within timeout
|
45
|
+
# @raise [IO::EAGAINWaitReadable, IO::TimeoutError] if timeout has been reached
|
40
46
|
def wait_readable(timeout = read_timeout)
|
41
47
|
return true if readable?
|
42
48
|
|
@@ -47,16 +53,29 @@ module CZTop
|
|
47
53
|
|
48
54
|
while true
|
49
55
|
@fd_io.wait_readable(timeout)
|
50
|
-
break if readable? # NOTE: ZMQ FD can't be trusted
|
56
|
+
break if readable? # NOTE: ZMQ FD can't be trusted
|
51
57
|
raise ::IO::TimeoutError if now >= timeout_at
|
58
|
+
|
59
|
+
# HACK for edge case: avoid hogging CPU if FD for socket type doesn't block and just insists
|
60
|
+
sleep JIFFY
|
52
61
|
end
|
53
62
|
else
|
54
|
-
|
63
|
+
until readable?
|
64
|
+
@fd_io.wait_readable
|
65
|
+
|
66
|
+
# HACK for edge case: avoid hogging CPU if FD for socket type doesn't block and just insists
|
67
|
+
sleep JIFFY
|
68
|
+
end
|
55
69
|
end
|
70
|
+
|
71
|
+
true
|
56
72
|
end
|
57
73
|
|
58
74
|
|
59
75
|
# Waits for socket to become writable.
|
76
|
+
# @param timeout [Numeric, nil] timeout in seconds
|
77
|
+
# @return [true] if writable within timeout
|
78
|
+
# @raise [IO::EAGAINWaitReadable, IO::TimeoutError] if timeout has been reached
|
60
79
|
def wait_writable(timeout = write_timeout)
|
61
80
|
return true if writable?
|
62
81
|
|
@@ -67,12 +86,22 @@ module CZTop
|
|
67
86
|
|
68
87
|
while true
|
69
88
|
@fd_io.wait_writable(timeout)
|
70
|
-
break if writable? # NOTE: ZMQ FD can't be trusted
|
89
|
+
break if writable? # NOTE: ZMQ FD can't be trusted
|
71
90
|
raise ::IO::TimeoutError if now >= timeout_at
|
91
|
+
|
92
|
+
# HACK for edge case: avoid hogging CPU if FD for socket type doesn't block and just insists
|
93
|
+
sleep JIFFY
|
72
94
|
end
|
73
95
|
else
|
74
|
-
|
96
|
+
until writable?
|
97
|
+
@fd_io.wait_writable
|
98
|
+
|
99
|
+
# HACK for edge case: avoid hogging CPU if FD for socket type doesn't block and just insists
|
100
|
+
sleep JIFFY
|
101
|
+
end
|
75
102
|
end
|
103
|
+
|
104
|
+
true
|
76
105
|
end
|
77
106
|
|
78
107
|
|
data/lib/cztop/socket/types.rb
CHANGED
@@ -76,6 +76,15 @@ module CZTop
|
|
76
76
|
attach_ffi_delegate(Zsock.new_client(endpoints))
|
77
77
|
end
|
78
78
|
|
79
|
+
|
80
|
+
# @raise [SocketError] if no peer is connected
|
81
|
+
def wait_writable(...)
|
82
|
+
if !writable?
|
83
|
+
fail SocketError, "no peer connected"
|
84
|
+
end
|
85
|
+
|
86
|
+
super
|
87
|
+
end
|
79
88
|
end
|
80
89
|
|
81
90
|
|
@@ -160,6 +169,15 @@ module CZTop
|
|
160
169
|
self << message
|
161
170
|
end
|
162
171
|
|
172
|
+
|
173
|
+
# @raise [SocketError] if ZMQ_ROUTER_MANDATORY option and message is currently not routable
|
174
|
+
def wait_writable(...)
|
175
|
+
if options.router_mandatory? && !writable?
|
176
|
+
fail SocketError, "no peer connected"
|
177
|
+
end
|
178
|
+
|
179
|
+
super
|
180
|
+
end
|
163
181
|
end
|
164
182
|
|
165
183
|
|
data/lib/cztop/version.rb
CHANGED
data/lib/cztop/zsock_options.rb
CHANGED
@@ -325,11 +325,19 @@ module CZTop
|
|
325
325
|
|
326
326
|
# @!endgroup
|
327
327
|
|
328
|
-
# Accept only routable messages on ROUTER sockets. Default is off.
|
329
|
-
# @param bool [Boolean] whether to
|
328
|
+
# ZMQ_ROUTER_MANDATORY: Accept only routable messages on ROUTER sockets. Default is off.
|
329
|
+
# @param bool [Boolean] whether to raise a SocketError if a message isn't routable
|
330
330
|
# (either if the that peer isn't connected or its SNDHWM is reached)
|
331
|
+
# @see https://libzmq.readthedocs.io/en/latest/zmq_setsockopt.html#_zmq_router_mandatory_accept_only_routable_messages_on_router_sockets
|
331
332
|
def router_mandatory=(bool)
|
332
333
|
Zsock.set_router_mandatory(@zocket, bool ? 1 : 0)
|
334
|
+
@router_mandatory = bool # NOTE: no way to read this option, so we need to remember
|
335
|
+
end
|
336
|
+
|
337
|
+
|
338
|
+
# @return [Boolean] whether ZMQ_ROUTER_MANDATORY has been set
|
339
|
+
def router_mandatory?
|
340
|
+
@router_mandatory
|
333
341
|
end
|
334
342
|
|
335
343
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cztop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrik Wenger
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: czmq-ffi-gen
|
@@ -122,20 +122,6 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: rubocop
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: 1.36.0
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - "~>"
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: 1.36.0
|
139
125
|
- !ruby/object:Gem::Dependency
|
140
126
|
name: async
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -159,39 +145,14 @@ executables:
|
|
159
145
|
extensions: []
|
160
146
|
extra_rdoc_files: []
|
161
147
|
files:
|
162
|
-
- ".github/workflows/coverage.yml"
|
163
|
-
- ".github/workflows/draft_api.yml"
|
164
|
-
- ".github/workflows/stable_api.yml"
|
165
|
-
- ".gitignore"
|
166
|
-
- ".projections.json"
|
167
|
-
- ".rspec"
|
168
|
-
- ".rubocop.yml"
|
169
|
-
- ".yardopts"
|
170
148
|
- AUTHORS
|
171
149
|
- CHANGES.md
|
172
150
|
- Gemfile
|
173
151
|
- LICENSE
|
174
152
|
- README.md
|
175
|
-
- Rakefile
|
176
153
|
- bin/console
|
177
154
|
- bin/setup
|
178
|
-
- ci/install-libczmq
|
179
|
-
- ci/install-libzmq
|
180
155
|
- cztop.gemspec
|
181
|
-
- examples/ruby_actor/actor.rb
|
182
|
-
- examples/simple_req_rep/rep.rb
|
183
|
-
- examples/simple_req_rep/req.rb
|
184
|
-
- examples/taxi_system/.gitignore
|
185
|
-
- examples/taxi_system/Makefile
|
186
|
-
- examples/taxi_system/README.gsl
|
187
|
-
- examples/taxi_system/README.md
|
188
|
-
- examples/taxi_system/broker.rb
|
189
|
-
- examples/taxi_system/client.rb
|
190
|
-
- examples/taxi_system/generate_keys.rb
|
191
|
-
- examples/taxi_system/start_broker.sh
|
192
|
-
- examples/taxi_system/start_clients.sh
|
193
|
-
- examples/weather_pub_sub/pub.rb
|
194
|
-
- examples/weather_pub_sub/sub.rb
|
195
156
|
- exe/z85decode
|
196
157
|
- exe/z85encode
|
197
158
|
- lib/cztop.rb
|
@@ -225,11 +186,6 @@ files:
|
|
225
186
|
- lib/cztop/z85/pipe.rb
|
226
187
|
- lib/cztop/zap.rb
|
227
188
|
- lib/cztop/zsock_options.rb
|
228
|
-
- perf/README.md
|
229
|
-
- perf/inproc_lat.rb
|
230
|
-
- perf/inproc_thru.rb
|
231
|
-
- perf/local_lat.rb
|
232
|
-
- perf/remote_lat.rb
|
233
189
|
homepage: https://rubygems.org/gems/cztop
|
234
190
|
licenses:
|
235
191
|
- ISC
|
@@ -245,7 +201,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
245
201
|
requirements:
|
246
202
|
- - ">="
|
247
203
|
- !ruby/object:Gem::Version
|
248
|
-
version: 3.
|
204
|
+
version: 3.2.0
|
249
205
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
250
206
|
requirements:
|
251
207
|
- - ">="
|
@@ -1,20 +0,0 @@
|
|
1
|
-
name: Coverage
|
2
|
-
|
3
|
-
on: [push,pull_request]
|
4
|
-
|
5
|
-
jobs:
|
6
|
-
build:
|
7
|
-
runs-on: ubuntu-22.04
|
8
|
-
steps:
|
9
|
-
- uses: actions/checkout@v4
|
10
|
-
- name: Set up Ruby
|
11
|
-
uses: ruby/setup-ruby@v1
|
12
|
-
with:
|
13
|
-
ruby-version: 3.3
|
14
|
-
- name: Install CZMQ
|
15
|
-
run: sudo apt-get install libczmq-dev
|
16
|
-
- name: Run the default task
|
17
|
-
run: |
|
18
|
-
gem install bundler
|
19
|
-
bundle install
|
20
|
-
env REPORT_COVERAGE=true bundle exec rake
|
@@ -1,27 +0,0 @@
|
|
1
|
-
name: DRAFT API
|
2
|
-
|
3
|
-
on: [push,pull_request]
|
4
|
-
|
5
|
-
jobs:
|
6
|
-
build:
|
7
|
-
runs-on: ubuntu-22.04
|
8
|
-
timeout-minutes: 15
|
9
|
-
steps:
|
10
|
-
- uses: actions/checkout@v4
|
11
|
-
- name: Set up Ruby
|
12
|
-
uses: ruby/setup-ruby@v1
|
13
|
-
with:
|
14
|
-
ruby-version: '3.3'
|
15
|
-
- name: Install ZMQ and CZMQ
|
16
|
-
run: |
|
17
|
-
export PKG_CONFIG_PATH=$HOME/lib/pkgconfig # custom libs (for linking)
|
18
|
-
env
|
19
|
-
env ZMQ_VERSION=HEAD ci/install-libzmq
|
20
|
-
env CZMQ_VERSION=HEAD ci/install-libczmq
|
21
|
-
- name: Run the default task
|
22
|
-
run: |
|
23
|
-
export LD_LIBRARY_PATH=$HOME/lib # custom libs (for execution)
|
24
|
-
env
|
25
|
-
gem install bundler
|
26
|
-
bundle install
|
27
|
-
bundle exec rake
|
@@ -1,26 +0,0 @@
|
|
1
|
-
name: STABLE API
|
2
|
-
|
3
|
-
on: [push,pull_request]
|
4
|
-
|
5
|
-
jobs:
|
6
|
-
build:
|
7
|
-
runs-on: ubuntu-22.04
|
8
|
-
strategy:
|
9
|
-
matrix:
|
10
|
-
ruby:
|
11
|
-
- '3.1'
|
12
|
-
- '3.2'
|
13
|
-
- '3.3'
|
14
|
-
steps:
|
15
|
-
- uses: actions/checkout@v4
|
16
|
-
- name: Set up Ruby ${{ matrix.ruby }}
|
17
|
-
uses: ruby/setup-ruby@v1
|
18
|
-
with:
|
19
|
-
ruby-version: ${{ matrix.ruby }}
|
20
|
-
- name: Install CZMQ
|
21
|
-
run: sudo apt-get install libczmq-dev
|
22
|
-
- name: Run the default task
|
23
|
-
run: |
|
24
|
-
gem install bundler
|
25
|
-
bundle install
|
26
|
-
bundle exec rake
|
data/.gitignore
DELETED
data/.projections.json
DELETED
data/.rspec
DELETED