cztop 0.11.4 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 737bf702970c9bc85413e43c9340034109bcc0cd
4
- data.tar.gz: ca4204c6d146761fa61f66cc9940e3a90f4a83c6
3
+ metadata.gz: b009960a5b7c09cabdb6469cc19b222c629a789f
4
+ data.tar.gz: 7317488f6e23afa25223396f03d47ead3b1fb15c
5
5
  SHA512:
6
- metadata.gz: 15265e743fd3df515036ac61d2a30cbc44db34550eaaa0776e1042f8fc973f6965da0c0e506ca98cadabc17ae4c1c5410722480ee641d5bedb5de00ae002fbc8
7
- data.tar.gz: 1ae41c40c6b71ab63ebdf29df384e694154204584e578d86fbf3ca16e6dab0b6c5d116bfad6375ebaee88f940ed52ae03cba44566c2a206d170bdc467b96a403
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.3.1
9
- - 2.2.5
9
+ - 2.4.0
10
+ - 2.3.3
11
+ - 2.2.6
10
12
  - jruby-head
11
- - rbx
13
+ - rubinius-3.69
12
14
  env:
13
- # recognized by czmq-ffi-gen's ci-scripts
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: rbx
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) < Actor
45
- * [Beacon](http://www.rubydoc.info/gems/cztop/CZTop/Beacon) < Actor
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) < Actor
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) < Actor
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)
@@ -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)
@@ -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
@@ -50,6 +50,8 @@ module CZTop
50
50
  CLOSE_FAILED
51
51
  DISCONNECTED
52
52
  MONITOR_STOPPED
53
+ HANDSHAKE_FAILED
54
+ HANDSHAKE_SUCCEED
53
55
  ALL
54
56
  ]
55
57
 
@@ -197,8 +197,8 @@ module CZTop
197
197
  end
198
198
  end
199
199
 
200
- # Stream socket for the native pattern over. This is useful when
201
- # communicating with a non-ZMQ peer, done over TCP.
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
@@ -1,3 +1,3 @@
1
1
  module CZTop
2
- VERSION = "0.11.4"
2
+ VERSION = "0.12.0"
3
3
  end
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 algorithm.
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
- - `inproc_thr.rb` measures the throughput of the inproc transport
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
- - `local_thr.rb` and `remote_thr.rb` measure the throughput of other transports (TODO)
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.11.4
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-01-06 00:00:00.000000000 Z
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.5.1
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