0mq 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +7 -7
  2. data/LICENSE +21 -0
  3. data/README.md +30 -0
  4. data/lib/0mq/socket.rb +5 -5
  5. metadata +107 -71
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 9804002690a57145812c94d81b0ac10f6b034401
4
- data.tar.gz: 369e72c53a0e9571f9d8cc105cdb9e61d8329e2c
5
- SHA512:
6
- metadata.gz: d3ab814c5981fd4aa48fc760b5f2ce40d0c02dc0534853d2400349f9812b06907728d11e47d0167c49d97600d1a44970bf92272547cb490d4f3fcaf3501ed6f4
7
- data.tar.gz: 58c50e1b3288430f6188af59f5ef5aa53387db01b0d7a90285f6a4cce45fbe45373736860511b2ca63c66abb4fb8943d3d5d88bbdba1f9e68887b9cb254ea59a
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5255703edba3faced3f3cc4cf411691e9a32657d
4
+ data.tar.gz: 70d06c893160bc3b09176cdec4626ec565e5637a
5
+ SHA512:
6
+ metadata.gz: 4114dc03d01056936a3bef1d4918e0f192616ee3283b4621d4249d4a4d8bb1dc05cc048ee7bf56a6c1167efc1636050839e59d83a762127d35c85e4df3558c62
7
+ data.tar.gz: 9f5f9c14f49b2f34e2018406d173f02627973cdea41f0a09873f99370d226bd8fc8b4ca454f789d50c804d81e6a50b0c73c8602ba3e83107d4c75f820ef71c1c
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Joe McIlvain, Alex McLain
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,30 @@
1
+ # 0mq
2
+
3
+ [![Build Status](https://travis-ci.org/jemc/0mq.png)](https://travis-ci.org/jemc/0mq)
4
+ [![Gem Version](https://badge.fury.io/rb/0mq.png)](http://badge.fury.io/rb/0mq)
5
+
6
+ A Ruby-like wrapper for ffi-rzmq-core (ZeroMQ)
7
+
8
+ ## Supported
9
+
10
+ Supported ZeroMQ (libzmq) versions:
11
+
12
+ - 3.x
13
+
14
+ - 4.x
15
+
16
+ Supported Ruby versions:
17
+
18
+ - MRI >= 1.9
19
+
20
+ - Rubinius 2.x
21
+
22
+ ## Feature Requests / Bug Reports
23
+
24
+ File them as issues or pull requests on [the github repository](https://github.com/jemc/0mq).
25
+
26
+ ## Authors
27
+
28
+ - Joe McIlvain
29
+
30
+ - Alex McLain
@@ -69,6 +69,7 @@ module ZMQ
69
69
 
70
70
  # Send a string to the socket
71
71
  def send_string(string, flags = 0)
72
+ string = string.to_s
72
73
  size = string.respond_to?(:bytesize) ? string.bytesize : string.size
73
74
  @msgbuf = LibC.malloc size
74
75
  @msgbuf.write_string string, size
@@ -101,11 +102,10 @@ module ZMQ
101
102
  end
102
103
 
103
104
  # Send a multipart message as an array of strings
104
- def send_array(ary)
105
- last = ary.last
106
-
107
- ary[0...-1].each { |str| send_string str, ZMQ::SNDMORE }
108
- send_string last
105
+ def send_array(array)
106
+ array = array.to_a
107
+ array[0...-1].each { |str| send_string str, ZMQ::SNDMORE }
108
+ send_string array.last
109
109
  end
110
110
 
111
111
  # Receive a multipart message as an array of strings
metadata CHANGED
@@ -1,87 +1,122 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: 0mq
3
- version: !ruby/object:Gem::Version
4
- version: 0.2.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.1
5
5
  platform: ruby
6
- authors:
6
+ authors:
7
7
  - Joe McIlvain
8
8
  - Alex McLain
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2014-03-04 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2014-03-04 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: ffi-rzmq-core
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
19
- requirements:
20
- - - ~>
21
- - !ruby/object:Gem::Version
22
- version: "1.0"
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '1.0'
23
21
  type: :runtime
24
- version_requirements: *id001
25
- - !ruby/object:Gem::Dependency
26
- name: bundler
27
22
  prerelease: false
28
- requirement: &id002 !ruby/object:Gem::Requirement
29
- requirements:
30
- - &id003
31
- - ">="
32
- - !ruby/object:Gem::Version
33
- version: "0"
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '1.0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: bundler
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
34
35
  type: :development
35
- version_requirements: *id002
36
- - !ruby/object:Gem::Dependency
37
- name: rake
38
36
  prerelease: false
39
- requirement: &id004 !ruby/object:Gem::Requirement
40
- requirements:
41
- - *id003
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rake
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
42
49
  type: :development
43
- version_requirements: *id004
44
- - !ruby/object:Gem::Dependency
45
- name: pry
46
50
  prerelease: false
47
- requirement: &id005 !ruby/object:Gem::Requirement
48
- requirements:
49
- - *id003
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: pry
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
50
63
  type: :development
51
- version_requirements: *id005
52
- - !ruby/object:Gem::Dependency
53
- name: pry-rescue
54
64
  prerelease: false
55
- requirement: &id006 !ruby/object:Gem::Requirement
56
- requirements:
57
- - *id003
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: pry-rescue
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
58
77
  type: :development
59
- version_requirements: *id006
60
- - !ruby/object:Gem::Dependency
61
- name: rspec
62
78
  prerelease: false
63
- requirement: &id007 !ruby/object:Gem::Requirement
64
- requirements:
65
- - *id003
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: rspec
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
66
91
  type: :development
67
- version_requirements: *id007
68
- - !ruby/object:Gem::Dependency
69
- name: fivemat
70
92
  prerelease: false
71
- requirement: &id008 !ruby/object:Gem::Requirement
72
- requirements:
73
- - *id003
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: fivemat
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
74
105
  type: :development
75
- version_requirements: *id008
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
76
112
  description: A Ruby-like wrapper for ffi-rzmq-core (ZeroMQ)
77
113
  email: joe.eli.mac@gmail.com
78
114
  executables: []
79
-
80
115
  extensions: []
81
-
82
116
  extra_rdoc_files: []
83
-
84
- files:
117
+ files:
118
+ - LICENSE
119
+ - README.md
85
120
  - lib/0mq.rb
86
121
  - lib/0mq/context.rb
87
122
  - lib/0mq/error_map.rb
@@ -90,27 +125,28 @@ files:
90
125
  - lib/0mq/socket.rb
91
126
  - lib/0mq/socket/options.rb
92
127
  homepage: https://github.com/jemc/0mq/
93
- licenses:
128
+ licenses:
94
129
  - MIT
95
130
  metadata: {}
96
-
97
131
  post_install_message:
98
132
  rdoc_options: []
99
-
100
- require_paths:
133
+ require_paths:
101
134
  - lib
102
- required_ruby_version: !ruby/object:Gem::Requirement
103
- requirements:
104
- - *id003
105
- required_rubygems_version: !ruby/object:Gem::Requirement
106
- requirements:
107
- - *id003
135
+ required_ruby_version: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ required_rubygems_version: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: '0'
108
145
  requirements: []
109
-
110
146
  rubyforge_project:
111
- rubygems_version: 2.2.2
147
+ rubygems_version: 2.2.0
112
148
  signing_key:
113
149
  specification_version: 4
114
150
  summary: 0mq
115
151
  test_files: []
116
-
152
+ has_rdoc: