0mq 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- data/LICENSE +21 -0
- data/README.md +30 -0
- data/lib/0mq/socket.rb +5 -5
- metadata +107 -71
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
5
|
-
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
data/README.md
ADDED
@@ -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
|
data/lib/0mq/socket.rb
CHANGED
@@ -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(
|
105
|
-
|
106
|
-
|
107
|
-
|
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.
|
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
|
-
|
14
|
-
|
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
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
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
|
-
|
29
|
-
requirements:
|
30
|
-
-
|
31
|
-
-
|
32
|
-
|
33
|
-
|
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
|
-
|
40
|
-
requirements:
|
41
|
-
-
|
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
|
-
|
48
|
-
requirements:
|
49
|
-
-
|
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
|
-
|
56
|
-
requirements:
|
57
|
-
-
|
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
|
-
|
64
|
-
requirements:
|
65
|
-
-
|
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
|
-
|
72
|
-
requirements:
|
73
|
-
-
|
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
|
-
|
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
|
-
|
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
|
-
-
|
105
|
-
|
106
|
-
|
107
|
-
|
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.
|
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:
|