cztop 0.11.1 → 0.11.2

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: 8f1316481428acef63d4abeb76be289cd66c68b8
4
- data.tar.gz: af1ab69820e817b6610d5aa776974c89d492e3d4
3
+ metadata.gz: '099d1517d316101f3f2c431c593e42bc34d3966e'
4
+ data.tar.gz: 96dec497b84793fe275db9c375dff270168028f4
5
5
  SHA512:
6
- metadata.gz: cfab10569af81b300ba07b378daddab55ff32445b4002af600c8dbe44e6c79908f740f53a5c20f09dac6db477c32a7486e66237d503741b04c8d03045264e8aa
7
- data.tar.gz: d8160d639ede7013d1163c7ca770fbfa1a2fa7ef985c3b8cb5a6b1ca8ffea012e78e27223ddf2a85b0ccda03f18dc85734c3fd039e64a41e97bb80296d69789b
6
+ metadata.gz: 8c8ad8f41d8c809a4f0292eddc3712c474b0c0ecac6b18de95a5859c5be0553912963848db0710fa75b62c3cd3a53a7d4f5707e7bd3948f19494ceeae4e18598
7
+ data.tar.gz: '033068a505754652237616df301ab282d3f007a6f644e2b72f0b957fb089371048b3f924d415689af57a02b30191698ccd9acda8bc9c759b0b50cd84dc633999'
data/CHANGES.md CHANGED
@@ -1,3 +1,8 @@
1
+ 0.11.2 (11/16/2016)
2
+ -----
3
+ * ZsockOptions#identity=: instead of asserting in CZMQ, raise ArgumentError if
4
+ identity is invalid
5
+
1
6
  0.11.1 (11/16/2016)
2
7
  -----
3
8
  * Metadata.load: check for incomplete property names and values
data/lib/cztop/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module CZTop
2
- VERSION = "0.11.1"
2
+ VERSION = "0.11.2"
3
3
  end
@@ -231,7 +231,13 @@ module CZTop
231
231
  # @return [String] current socket identity
232
232
  def identity() Zsock.identity(@zocket).read_string end
233
233
  # @param identity [String] new socket identity
234
- def identity=(identity) Zsock.set_identity(@zocket, identity) end
234
+ # @raise [ArgumentError] if identity is invalid
235
+ def identity=(identity)
236
+ raise ArgumentError, "zero-length identity" if identity.bytesize.zero?
237
+ raise ArgumentError, "identity too long" if identity.bytesize > 255
238
+ raise ArgumentError, "invalid identity" if identity.start_with? "\0"
239
+ Zsock.set_identity(@zocket, identity)
240
+ end
235
241
 
236
242
  # @return [Integer] current value of Type of Service
237
243
  def tos() Zsock.tos(@zocket) end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cztop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrik Wenger