cztop 0.11.4 → 0.12.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/.travis.yml +16 -5
- data/CHANGES.md +6 -0
- data/README.md +5 -4
- data/lib/cztop/authenticator.rb +0 -3
- data/lib/cztop/cert_store.rb +11 -0
- data/lib/cztop/config.rb +2 -0
- data/lib/cztop/config/traversing.rb +1 -1
- data/lib/cztop/message.rb +0 -8
- data/lib/cztop/monitor.rb +2 -0
- data/lib/cztop/socket/types.rb +2 -2
- data/lib/cztop/version.rb +1 -1
- data/lib/cztop/z85.rb +1 -1
- data/perf/README.md +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b009960a5b7c09cabdb6469cc19b222c629a789f
|
4
|
+
data.tar.gz: 7317488f6e23afa25223396f03d47ead3b1fb15c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58ca2e092017f6cbbb5ab2b269a2f62081b06a31f0b39aedcf99a818cda2af9874f532cd3c9b94bb12d3f6ab46a06bb47d650e8a17d1d408c46347c13d2d4aeb
|
7
|
+
data.tar.gz: e4538cb6904b94313dd303fd3429e8584960f0b6bed0f986423157370e3b50311aea99d6953d98c4d9f8b19d373fd93c88caac88a0afa7a3c905e625a475d31b
|
data/.travis.yml
CHANGED
@@ -1,21 +1,32 @@
|
|
1
1
|
language: ruby
|
2
|
+
dist: trusty
|
2
3
|
sudo: false
|
3
4
|
cache:
|
4
5
|
directories:
|
5
6
|
- $HOME/.ccache
|
6
7
|
- $HOME/.bundle
|
7
8
|
rvm:
|
8
|
-
- 2.
|
9
|
-
- 2.
|
9
|
+
- 2.4.0
|
10
|
+
- 2.3.3
|
11
|
+
- 2.2.6
|
10
12
|
- jruby-head
|
11
|
-
-
|
13
|
+
- rubinius-3.69
|
12
14
|
env:
|
13
|
-
# recognized by czmq-ffi-gen's
|
15
|
+
# NOTE: These are recognized by czmq-ffi-gen's CI scripts.
|
14
16
|
- CZMQ_VERSION=HEAD ZMQ_VERSION=HEAD
|
15
17
|
- CZMQ_VERSION=stable ZMQ_VERSION=stable
|
16
18
|
matrix:
|
19
|
+
exclude:
|
20
|
+
- rvm: 2.3.3
|
21
|
+
env: CZMQ_VERSION=HEAD ZMQ_VERSION=HEAD
|
22
|
+
- rvm: 2.2.6
|
23
|
+
env: CZMQ_VERSION=HEAD ZMQ_VERSION=HEAD
|
24
|
+
- rvm: jruby-head
|
25
|
+
env: CZMQ_VERSION=HEAD ZMQ_VERSION=HEAD
|
26
|
+
- rvm: rubinius-3.69
|
27
|
+
env: CZMQ_VERSION=HEAD ZMQ_VERSION=HEAD
|
17
28
|
allow_failures:
|
18
|
-
- rvm:
|
29
|
+
- rvm: rubinius-3.69
|
19
30
|
before_install:
|
20
31
|
- PATH="/usr/lib/ccache:$PATH" # enable ccache
|
21
32
|
- export LD_LIBRARY_PATH=$HOME/lib # custom libs (for execution)
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
0.12.0 (11/23/2017)
|
2
|
+
-----
|
3
|
+
* CZTop::Monitor#listen: accept HANDSHAKE_FAILED and HANDSHAKE_SUCCEED events
|
4
|
+
* remove shim classes for IO::EAGAINWaitWritable and IO::EAGAINWaitReadable
|
5
|
+
missing in Ruby < 2.1
|
6
|
+
|
1
7
|
0.11.4 (01/06/2017)
|
2
8
|
-----
|
3
9
|
* Socket#inspect: don't raise if native object has been destroyed
|
data/README.md
CHANGED
@@ -41,15 +41,16 @@ Here's an overview of the core classes:
|
|
41
41
|
|
42
42
|
* [CZTop](http://www.rubydoc.info/gems/cztop/CZTop)
|
43
43
|
* [Actor](http://www.rubydoc.info/gems/cztop/CZTop)
|
44
|
-
* [Authentiator](http://www.rubydoc.info/gems/cztop/CZTop/Authenticator)
|
45
|
-
* [Beacon](http://www.rubydoc.info/gems/cztop/CZTop/Beacon)
|
44
|
+
* [Authentiator](http://www.rubydoc.info/gems/cztop/CZTop/Authenticator)
|
45
|
+
* [Beacon](http://www.rubydoc.info/gems/cztop/CZTop/Beacon)
|
46
46
|
* [Certificate](http://www.rubydoc.info/gems/cztop/CZTop/Certificate)
|
47
|
+
* [CertStore](http://www.rubydoc.info/gems/cztop/CZTop/CertStore)
|
47
48
|
* [Config](http://www.rubydoc.info/gems/cztop/CZTop/Config)
|
48
49
|
* [Frame](http://www.rubydoc.info/gems/cztop/CZTop/Frame)
|
49
50
|
* [Message](http://www.rubydoc.info/gems/cztop/CZTop/Message)
|
50
|
-
* [Monitor](http://www.rubydoc.info/gems/cztop/CZTop/Monitor)
|
51
|
+
* [Monitor](http://www.rubydoc.info/gems/cztop/CZTop/Monitor)
|
51
52
|
* [Metadata](http://www.rubydoc.info/gems/cztop/CZTop/Metadata)
|
52
|
-
* [Proxy](http://www.rubydoc.info/gems/cztop/CZTop/Proxy)
|
53
|
+
* [Proxy](http://www.rubydoc.info/gems/cztop/CZTop/Proxy)
|
53
54
|
* [Poller](http://www.rubydoc.info/gems/cztop/CZTop/Poller) (based on `zmq_poller_*()` functions)
|
54
55
|
* [Aggregated](http://www.rubydoc.info/gems/cztop/CZTop/Poller/Aggregated)
|
55
56
|
* [ZPoller](http://www.rubydoc.info/gems/cztop/CZTop/Poller/ZPoller)
|
data/lib/cztop/authenticator.rb
CHANGED
@@ -20,9 +20,6 @@ module CZTop
|
|
20
20
|
# and all _PLAIN_ and _CURVE_ connections are denied.
|
21
21
|
#
|
22
22
|
# @param cert_store [CertStore] a custom certificate store
|
23
|
-
# @note If you pass a {CertStore}, its native object will be owned by the
|
24
|
-
# actor (and freed by it when the actor terminates). That means you MUST
|
25
|
-
# disale auto free in the CertStore object.
|
26
23
|
def initialize(cert_store = nil)
|
27
24
|
if cert_store
|
28
25
|
raise ArgumentError unless cert_store.is_a?(CertStore)
|
data/lib/cztop/cert_store.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'set'
|
2
|
+
|
1
3
|
module CZTop
|
2
4
|
|
3
5
|
# A store for CURVE security certificates, either backed by files on disk or
|
@@ -32,11 +34,20 @@ module CZTop
|
|
32
34
|
|
33
35
|
# Inserts a new certificate into the store.
|
34
36
|
#
|
37
|
+
# @note The same public key must not be inserted more than once.
|
35
38
|
# @param cert [Certificate] the certificate to insert
|
36
39
|
# @return [void]
|
40
|
+
# @raise [ArgumentError] if the given certificate is not a Certificate
|
41
|
+
# object or has been inserted before already
|
37
42
|
def insert(cert)
|
38
43
|
raise ArgumentError unless cert.is_a?(Certificate)
|
44
|
+
|
45
|
+
@_inserted_pubkeys ||= Set.new
|
46
|
+
pubkey = cert.public_key
|
47
|
+
raise ArgumentError if @_inserted_pubkeys.include? pubkey
|
48
|
+
|
39
49
|
ffi_delegate.insert(cert.ffi_delegate)
|
50
|
+
@_inserted_pubkeys << pubkey
|
40
51
|
end
|
41
52
|
end
|
42
53
|
end
|
data/lib/cztop/config.rb
CHANGED
@@ -37,6 +37,8 @@ module CZTop
|
|
37
37
|
|
38
38
|
# Gets the name.
|
39
39
|
# @return [String] name of the config item
|
40
|
+
# @return [nil] for unnamed elements (like freshly initialized without
|
41
|
+
# a name)
|
40
42
|
def name
|
41
43
|
ptr = ffi_delegate.name
|
42
44
|
return nil if ptr.null? # NOTE: for unnamed elements
|
@@ -122,7 +122,7 @@ module CZTop::Config::Traversing
|
|
122
122
|
# a block.
|
123
123
|
# @param name [String] name for new config item
|
124
124
|
# @param value [String] value for new config item
|
125
|
-
# @yieldparam [Config] the new config item, if block was given
|
125
|
+
# @yieldparam config [Config] the new config item, if block was given
|
126
126
|
# @return [Config] the new config item
|
127
127
|
def new(name = nil, value = nil)
|
128
128
|
config = CZTop::Config.new(name, value, parent: @config)
|
data/lib/cztop/message.rb
CHANGED
@@ -32,14 +32,6 @@ module CZTop
|
|
32
32
|
content_size.zero?
|
33
33
|
end
|
34
34
|
|
35
|
-
# Support Ruby 2.0
|
36
|
-
unless defined?(::IO::EAGAINWaitWritable)
|
37
|
-
class ::IO::EAGAINWaitWritable < Errno::EAGAIN
|
38
|
-
end
|
39
|
-
class ::IO::EAGAINWaitReadable < Errno::EAGAIN
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
35
|
# Send {Message} to a {Socket} or {Actor}.
|
44
36
|
#
|
45
37
|
# @note Do NOT use this {Message} anymore afterwards. Its native
|
data/lib/cztop/monitor.rb
CHANGED
data/lib/cztop/socket/types.rb
CHANGED
@@ -197,8 +197,8 @@ module CZTop
|
|
197
197
|
end
|
198
198
|
end
|
199
199
|
|
200
|
-
# Stream socket for the native pattern
|
201
|
-
# communicating with a non-ZMQ peer
|
200
|
+
# Stream socket for the native pattern. This is useful when
|
201
|
+
# communicating with a non-ZMQ peer over TCP.
|
202
202
|
# @see http://api.zeromq.org/4-2:zmq-socket#toc16
|
203
203
|
class STREAM < Socket
|
204
204
|
# @param endpoints [String] endpoints to connect to
|
data/lib/cztop/version.rb
CHANGED
data/lib/cztop/z85.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module CZTop
|
2
2
|
# Represents a CZMQ::FFI::Zarmour in Z85 mode.
|
3
3
|
#
|
4
|
-
# Use this class to encode to and from the Z85 encoding
|
4
|
+
# Use this class to encode to and from the Z85 encoding scheme.
|
5
5
|
# @see http://rfc.zeromq.org/spec:32
|
6
6
|
class Z85
|
7
7
|
include HasFFIDelegate
|
data/perf/README.md
CHANGED
@@ -3,9 +3,9 @@
|
|
3
3
|
This directory contains simple performance measurement utilities:
|
4
4
|
|
5
5
|
- `inproc_lat.rb` measures the latency of the inproc transport
|
6
|
-
- `
|
6
|
+
- `inproc_thru.rb` measures the throughput of the inproc transport
|
7
7
|
- `local_lat.rb` and `remote_lat.rb` measure the latency of other transports
|
8
|
-
- `
|
8
|
+
- `local_thru.rb` and `remote_thru.rb` measure the throughput of other transports (TODO)
|
9
9
|
|
10
10
|
## Example Output
|
11
11
|
|
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: 0.
|
4
|
+
version: 0.12.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: 2017-
|
11
|
+
date: 2017-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: czmq-ffi-gen
|
@@ -303,7 +303,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
303
303
|
version: '0'
|
304
304
|
requirements: []
|
305
305
|
rubyforge_project:
|
306
|
-
rubygems_version: 2.
|
306
|
+
rubygems_version: 2.6.8
|
307
307
|
signing_key:
|
308
308
|
specification_version: 4
|
309
309
|
summary: CZMQ Ruby binding, based on the generated low-level FFI bindings of CZMQ
|