rzmq-enhancement 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.rspec +1 -0
- data/.semver +5 -0
- data/Gemfile +20 -0
- data/Gemfile.lock +132 -0
- data/LICENSE.txt +20 -0
- data/README.org +84 -0
- data/Rakefile +53 -0
- data/bin/rzmq +0 -0
- data/examples/push-pull.rb +30 -0
- data/lib/rzmq-enhancement.rb +67 -0
- data/rzmq-enhancement.gemspec +97 -0
- data/spec/rzmq-enhancement_spec.rb +7 -0
- data/spec/spec_helper.rb +29 -0
- metadata +275 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8aa4451bc61e19437a3beca41f893075926a3f06
|
4
|
+
data.tar.gz: f146bec0bbf0210e42623389bc9f195bbca7b313
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e0f08bcf7afa5015bd320737cfd983b88cbbb7f5f11a5197480775c866ba20c593ab181a22625aaccdb12caaceade36a653a333dd56c339fb7f6f2395683d8ec
|
7
|
+
data.tar.gz: deaf85707d0e88ea0c5366842a71810494790ea1f837c3a49790d94d15f701731af9d648c5cd035035a962a93acc1f35ba3ccbee8ccb9fc3e8ebddec9aa5f46b
|
data/.document
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.semver
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
gem "semver2", "~> 3"
|
4
|
+
gem 'ffi-rzmq'
|
5
|
+
gem 'awesome_print'
|
6
|
+
|
7
|
+
group :development do
|
8
|
+
gem "rspec", "~> 3"
|
9
|
+
gem "yard", "~> 0"
|
10
|
+
gem "rdoc", "~> 3"
|
11
|
+
gem "bundler", "~> 1"
|
12
|
+
gem "juwelier", "~> 2"
|
13
|
+
gem "simplecov", ">= 0"
|
14
|
+
gem "pry", "~> 0"
|
15
|
+
gem "pry-byebug", "~> 3"
|
16
|
+
gem "pry-doc", "~> 0"
|
17
|
+
gem "pry-remote", "~> 0"
|
18
|
+
gem "pry-rescue", "~> 1"
|
19
|
+
gem "pry-stack_explorer", "~> 0"
|
20
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
addressable (2.4.0)
|
5
|
+
awesome_print (1.7.0)
|
6
|
+
binding_of_caller (0.7.2)
|
7
|
+
debug_inspector (>= 0.0.1)
|
8
|
+
builder (3.2.3)
|
9
|
+
byebug (9.0.6)
|
10
|
+
coderay (1.1.1)
|
11
|
+
debug_inspector (0.0.3)
|
12
|
+
descendants_tracker (0.0.4)
|
13
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
14
|
+
diff-lcs (1.3)
|
15
|
+
docile (1.1.5)
|
16
|
+
faraday (0.9.2)
|
17
|
+
multipart-post (>= 1.2, < 3)
|
18
|
+
ffi (1.9.18)
|
19
|
+
ffi-rzmq (2.0.5)
|
20
|
+
ffi-rzmq-core (>= 1.0.6)
|
21
|
+
ffi-rzmq-core (1.0.6)
|
22
|
+
ffi
|
23
|
+
git (1.3.0)
|
24
|
+
github_api (0.17.0)
|
25
|
+
addressable (~> 2.4.0)
|
26
|
+
descendants_tracker (~> 0.0.4)
|
27
|
+
faraday (~> 0.8, < 0.10)
|
28
|
+
hashie (>= 3.4)
|
29
|
+
mime-types (>= 1.16, < 3.0)
|
30
|
+
oauth2 (~> 1.0)
|
31
|
+
hashie (3.5.5)
|
32
|
+
highline (1.7.8)
|
33
|
+
interception (0.5)
|
34
|
+
json (1.8.6)
|
35
|
+
juwelier (2.4.5)
|
36
|
+
builder
|
37
|
+
bundler (>= 1.13)
|
38
|
+
git (>= 1.2.5)
|
39
|
+
github_api
|
40
|
+
highline (>= 1.6.15)
|
41
|
+
kamelcase (~> 0)
|
42
|
+
nokogiri (>= 1.5.10)
|
43
|
+
psych (~> 2.2)
|
44
|
+
rake
|
45
|
+
rdoc
|
46
|
+
semver2
|
47
|
+
jwt (1.5.6)
|
48
|
+
kamelcase (0.0.0)
|
49
|
+
semver2 (~> 3)
|
50
|
+
method_source (0.8.2)
|
51
|
+
mime-types (2.99.3)
|
52
|
+
mini_portile2 (2.1.0)
|
53
|
+
multi_json (1.12.1)
|
54
|
+
multi_xml (0.6.0)
|
55
|
+
multipart-post (2.0.0)
|
56
|
+
nokogiri (1.7.2)
|
57
|
+
mini_portile2 (~> 2.1.0)
|
58
|
+
oauth2 (1.3.1)
|
59
|
+
faraday (>= 0.8, < 0.12)
|
60
|
+
jwt (~> 1.0)
|
61
|
+
multi_json (~> 1.3)
|
62
|
+
multi_xml (~> 0.5)
|
63
|
+
rack (>= 1.2, < 3)
|
64
|
+
pry (0.10.4)
|
65
|
+
coderay (~> 1.1.0)
|
66
|
+
method_source (~> 0.8.1)
|
67
|
+
slop (~> 3.4)
|
68
|
+
pry-byebug (3.4.2)
|
69
|
+
byebug (~> 9.0)
|
70
|
+
pry (~> 0.10)
|
71
|
+
pry-doc (0.10.0)
|
72
|
+
pry (~> 0.9)
|
73
|
+
yard (~> 0.9)
|
74
|
+
pry-remote (0.1.8)
|
75
|
+
pry (~> 0.9)
|
76
|
+
slop (~> 3.0)
|
77
|
+
pry-rescue (1.4.5)
|
78
|
+
interception (>= 0.5)
|
79
|
+
pry
|
80
|
+
pry-stack_explorer (0.4.9.2)
|
81
|
+
binding_of_caller (>= 0.7)
|
82
|
+
pry (>= 0.9.11)
|
83
|
+
psych (2.2.4)
|
84
|
+
rack (2.0.3)
|
85
|
+
rake (12.0.0)
|
86
|
+
rdoc (3.12.2)
|
87
|
+
json (~> 1.4)
|
88
|
+
rspec (3.6.0)
|
89
|
+
rspec-core (~> 3.6.0)
|
90
|
+
rspec-expectations (~> 3.6.0)
|
91
|
+
rspec-mocks (~> 3.6.0)
|
92
|
+
rspec-core (3.6.0)
|
93
|
+
rspec-support (~> 3.6.0)
|
94
|
+
rspec-expectations (3.6.0)
|
95
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
96
|
+
rspec-support (~> 3.6.0)
|
97
|
+
rspec-mocks (3.6.0)
|
98
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
99
|
+
rspec-support (~> 3.6.0)
|
100
|
+
rspec-support (3.6.0)
|
101
|
+
semver2 (3.4.2)
|
102
|
+
simplecov (0.14.1)
|
103
|
+
docile (~> 1.1.0)
|
104
|
+
json (>= 1.8, < 3)
|
105
|
+
simplecov-html (~> 0.10.0)
|
106
|
+
simplecov-html (0.10.1)
|
107
|
+
slop (3.6.0)
|
108
|
+
thread_safe (0.3.6)
|
109
|
+
yard (0.9.9)
|
110
|
+
|
111
|
+
PLATFORMS
|
112
|
+
ruby
|
113
|
+
|
114
|
+
DEPENDENCIES
|
115
|
+
awesome_print
|
116
|
+
bundler (~> 1)
|
117
|
+
ffi-rzmq
|
118
|
+
juwelier (~> 2)
|
119
|
+
pry (~> 0)
|
120
|
+
pry-byebug (~> 3)
|
121
|
+
pry-doc (~> 0)
|
122
|
+
pry-remote (~> 0)
|
123
|
+
pry-rescue (~> 1)
|
124
|
+
pry-stack_explorer (~> 0)
|
125
|
+
rdoc (~> 3)
|
126
|
+
rspec (~> 3)
|
127
|
+
semver2 (~> 3)
|
128
|
+
simplecov
|
129
|
+
yard (~> 0)
|
130
|
+
|
131
|
+
BUNDLED WITH
|
132
|
+
1.14.6
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2017 Fred Mitchell SB
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.org
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
* rzmq-enhancement :TOC_5_gh:
|
2
|
+
- [[#intro][Intro]]
|
3
|
+
- [[#note-well][NOTE WELL]]
|
4
|
+
- [[#preliminaries][Preliminaries]]
|
5
|
+
- [[#install][Install]]
|
6
|
+
- [[#usage][Usage]]
|
7
|
+
- [[#contributing-to-rzmq-enhancement][Contributing to rzmq-enhancement]]
|
8
|
+
- [[#copyright][Copyright]]
|
9
|
+
|
10
|
+
** Intro
|
11
|
+
|
12
|
+
The ffi-rzmq wraps ZeroMQ nicely, but not in a Ruby-friendly manner.
|
13
|
+
here, we take that one step further to present a more Ruby-friendy
|
14
|
+
interface. We also pass all objects as JSON, encoding and decoding
|
15
|
+
them automatically for you, so you don't have to be concered
|
16
|
+
with the details.
|
17
|
+
|
18
|
+
** NOTE WELL
|
19
|
+
This is still under development, and currently represents
|
20
|
+
only a minimal interface. For the versions of 0.0.x,
|
21
|
+
there will be "rapid" development and breaking changes.
|
22
|
+
|
23
|
+
Only when we reach version 0.1.0 or higher, the interfaces
|
24
|
+
and the API will be stable enough for general use.
|
25
|
+
|
26
|
+
Feel free to play with this for now, but don't put it in production
|
27
|
+
code just yet.
|
28
|
+
|
29
|
+
** Preliminaries
|
30
|
+
|
31
|
+
This is implemented as a DSLish Ruby-friendly interface. The
|
32
|
+
initial implementation shall be as "lean" as possible, basically
|
33
|
+
serving our needs at Sensorberg. Eventually, we'll flesh this
|
34
|
+
out to fully support most of the ffi-rzmq interface.
|
35
|
+
|
36
|
+
This is also "opinionated". We pass all objects as JSON
|
37
|
+
strings, which will probably suit most needs, and will
|
38
|
+
allow the receiving (and sending) ends to be language-agnostic,
|
39
|
+
as long as they use JSON as well.
|
40
|
+
|
41
|
+
** Install
|
42
|
+
|
43
|
+
Make sure the ZeroMQ library is already installed on your system. If you
|
44
|
+
are on a Mac, we recommend 'brew' or 'macports' to get it.
|
45
|
+
|
46
|
+
From command-line:
|
47
|
+
#+begin_src bash
|
48
|
+
gem install rzmq-enhancement
|
49
|
+
#+end_src
|
50
|
+
|
51
|
+
Or in you Gemfile:
|
52
|
+
#+begin_src ruby
|
53
|
+
gem 'rzmq-enhancement'
|
54
|
+
#+end_src
|
55
|
+
|
56
|
+
** Usage
|
57
|
+
Do not use "localhost". Use, instead, 127.0.0.1, example:
|
58
|
+
|
59
|
+
#+begin_src ruby
|
60
|
+
'tcp://127.0.0.1:2200'
|
61
|
+
#+end_src
|
62
|
+
|
63
|
+
Or if all the processes will be running on the same
|
64
|
+
machine,
|
65
|
+
|
66
|
+
#+begin_src ruby
|
67
|
+
'ipc://anynameyoulike.ipc'
|
68
|
+
#+end_src
|
69
|
+
|
70
|
+
|
71
|
+
** Contributing to rzmq-enhancement
|
72
|
+
|
73
|
+
- Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
74
|
+
- Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
75
|
+
- Fork the project.
|
76
|
+
- Start a feature/bugfix branch.
|
77
|
+
- Commit and push until you are happy with your contribution.
|
78
|
+
- Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
79
|
+
- Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
80
|
+
|
81
|
+
** Copyright
|
82
|
+
|
83
|
+
Copyright (c) 2017 Fred Mitchell and Sensorberg GbmH. See LICENSE.txt for
|
84
|
+
further details.
|
data/Rakefile
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'semver'
|
15
|
+
|
16
|
+
def s_version
|
17
|
+
SemVer.find.format "%M.%m.%p%s"
|
18
|
+
end
|
19
|
+
require 'juwelier'
|
20
|
+
Juwelier::Tasks.new do |gem|
|
21
|
+
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
|
22
|
+
gem.name = "rzmq-enhancement"
|
23
|
+
gem.homepage = "http://github.com/flajann2/rzmq-enhancement"
|
24
|
+
gem.license = "MIT"
|
25
|
+
gem.summary = %Q{Wrapper for the ffi-rzmq wrapper for ZeroMQ}
|
26
|
+
gem.description = %Q{
|
27
|
+
The ffi-rzmq wraps ZeroMQ nicely, but not in a Ruby-friendly manner.
|
28
|
+
here, we take that one step further to present a mor Ruby-Friendy
|
29
|
+
interface.}
|
30
|
+
gem.email = "frederick.mitchell@sensorberg.com"
|
31
|
+
gem.authors = ["Fred Mitchell", "Sensorberg GmbH"]
|
32
|
+
gem.version = s_version
|
33
|
+
|
34
|
+
# dependencies defined in Gemfile
|
35
|
+
end
|
36
|
+
|
37
|
+
Juwelier::RubygemsDotOrgTasks.new
|
38
|
+
require 'rspec/core'
|
39
|
+
require 'rspec/core/rake_task'
|
40
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
41
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
42
|
+
end
|
43
|
+
|
44
|
+
desc "Code coverage detail"
|
45
|
+
task :simplecov do
|
46
|
+
ENV['COVERAGE'] = "true"
|
47
|
+
Rake::Task['spec'].execute
|
48
|
+
end
|
49
|
+
|
50
|
+
task :default => :spec
|
51
|
+
|
52
|
+
require 'yard'
|
53
|
+
YARD::Rake::YardocTask.new
|
data/bin/rzmq
ADDED
File without changes
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'rzmq-enhancement'
|
2
|
+
require 'pp'
|
3
|
+
require 'thread'
|
4
|
+
|
5
|
+
include ZeroMQ
|
6
|
+
EP = 'ipc://pushpull.ipc'
|
7
|
+
thr = []
|
8
|
+
|
9
|
+
# push
|
10
|
+
thr << Thread.new {
|
11
|
+
(0..10).each do |i|
|
12
|
+
zeromq_push :push_example, EP do |ctx|
|
13
|
+
unless i == 10
|
14
|
+
[i, 'mississippi']
|
15
|
+
else
|
16
|
+
:end_of_stream
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
}
|
21
|
+
|
22
|
+
# pull
|
23
|
+
thr << Thread.new {
|
24
|
+
zeromq_pull_server :pull_example, EP do |payload|
|
25
|
+
pp payload
|
26
|
+
exit if payload == 'end_of_stream'
|
27
|
+
end
|
28
|
+
}
|
29
|
+
|
30
|
+
thr.each {|t| t.join }
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
require 'ffi-rzmq'
|
4
|
+
require 'awesome_print'
|
5
|
+
require 'ostruct'
|
6
|
+
require 'json'
|
7
|
+
|
8
|
+
Thread.abort_on_exception = true
|
9
|
+
|
10
|
+
module ZeroMQ
|
11
|
+
|
12
|
+
|
13
|
+
def zeromq_push name, endpoint = "ipc://#{name}.ipc", &block
|
14
|
+
init_sys
|
15
|
+
h = if @ctxh[name].nil?
|
16
|
+
h = (@ctxh[name] ||= OpenStruct.new)
|
17
|
+
h.ctx = ZMQ::Context.create(1)
|
18
|
+
h.push_sock = h.ctx.socket(ZMQ::PUSH)
|
19
|
+
error_check(h.push_sock.setsockopt(ZMQ::LINGER, 0))
|
20
|
+
rc = h.push_sock.bind(endpoint)
|
21
|
+
error_check(rc)
|
22
|
+
h
|
23
|
+
else
|
24
|
+
@ctxh[name]
|
25
|
+
end
|
26
|
+
|
27
|
+
if block_given?
|
28
|
+
payload = block.(h.ctx)
|
29
|
+
rc = h.push_sock.send_string(JSON.generate(payload))
|
30
|
+
error_check(rc)
|
31
|
+
end
|
32
|
+
h
|
33
|
+
end
|
34
|
+
|
35
|
+
# this does an endless loop as a "server"
|
36
|
+
def zeromq_pull_server name, endpoint = "ipc://#{name}.ipc", &block
|
37
|
+
init_sys
|
38
|
+
h = (@ctxh[name] ||= OpenStruct.new)
|
39
|
+
h.ctx = ZMQ::Context.create(1)
|
40
|
+
|
41
|
+
h.pull_sock = h.ctx.socket(ZMQ::PULL)
|
42
|
+
error_check(h.pull_sock.setsockopt(ZMQ::LINGER, 0))
|
43
|
+
|
44
|
+
rc = h.pull_sock.connect(endpoint)
|
45
|
+
error_check(rc)
|
46
|
+
|
47
|
+
loop do
|
48
|
+
rc = h.pull_sock.recv_string payload = ''
|
49
|
+
|
50
|
+
block.(JSON.parse(payload))
|
51
|
+
end if block_given?
|
52
|
+
h
|
53
|
+
end
|
54
|
+
|
55
|
+
private
|
56
|
+
def init_sys
|
57
|
+
@ctxh ||= {}
|
58
|
+
end
|
59
|
+
|
60
|
+
def error_check rc
|
61
|
+
if ZMQ::Util.resultcode_ok?(rc)
|
62
|
+
false
|
63
|
+
else
|
64
|
+
raise "Operation failed, errno [#{ZMQ::Util.errno}] description [#{ZMQ::Util.error_string}]"
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
# Generated by juwelier
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: rzmq-enhancement 0.0.4 ruby lib
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "rzmq-enhancement".freeze
|
9
|
+
s.version = "0.0.4"
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib".freeze]
|
13
|
+
s.authors = ["Fred Mitchell".freeze, "Sensorberg GmbH".freeze]
|
14
|
+
s.date = "2017-06-06"
|
15
|
+
s.description = "\n The ffi-rzmq wraps ZeroMQ nicely, but not in a Ruby-friendly manner.\n here, we take that one step further to present a mor Ruby-Friendy\n interface.".freeze
|
16
|
+
s.email = "frederick.mitchell@sensorberg.com".freeze
|
17
|
+
s.executables = ["rzmq".freeze]
|
18
|
+
s.extra_rdoc_files = [
|
19
|
+
"LICENSE.txt",
|
20
|
+
"README.org"
|
21
|
+
]
|
22
|
+
s.files = [
|
23
|
+
".document",
|
24
|
+
".rspec",
|
25
|
+
".semver",
|
26
|
+
"Gemfile",
|
27
|
+
"Gemfile.lock",
|
28
|
+
"LICENSE.txt",
|
29
|
+
"README.org",
|
30
|
+
"Rakefile",
|
31
|
+
"bin/rzmq",
|
32
|
+
"examples/push-pull.rb",
|
33
|
+
"lib/rzmq-enhancement.rb",
|
34
|
+
"rzmq-enhancement.gemspec",
|
35
|
+
"spec/rzmq-enhancement_spec.rb",
|
36
|
+
"spec/spec_helper.rb"
|
37
|
+
]
|
38
|
+
s.homepage = "http://github.com/flajann2/rzmq-enhancement".freeze
|
39
|
+
s.licenses = ["MIT".freeze]
|
40
|
+
s.rubygems_version = "2.6.11".freeze
|
41
|
+
s.summary = "Wrapper for the ffi-rzmq wrapper for ZeroMQ".freeze
|
42
|
+
|
43
|
+
if s.respond_to? :specification_version then
|
44
|
+
s.specification_version = 4
|
45
|
+
|
46
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
47
|
+
s.add_runtime_dependency(%q<semver2>.freeze, ["~> 3"])
|
48
|
+
s.add_runtime_dependency(%q<ffi-rzmq>.freeze, [">= 0"])
|
49
|
+
s.add_runtime_dependency(%q<awesome_print>.freeze, [">= 0"])
|
50
|
+
s.add_development_dependency(%q<rspec>.freeze, ["~> 3"])
|
51
|
+
s.add_development_dependency(%q<yard>.freeze, ["~> 0"])
|
52
|
+
s.add_development_dependency(%q<rdoc>.freeze, ["~> 3"])
|
53
|
+
s.add_development_dependency(%q<bundler>.freeze, ["~> 1"])
|
54
|
+
s.add_development_dependency(%q<juwelier>.freeze, ["~> 2"])
|
55
|
+
s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
|
56
|
+
s.add_development_dependency(%q<pry>.freeze, ["~> 0"])
|
57
|
+
s.add_development_dependency(%q<pry-byebug>.freeze, ["~> 3"])
|
58
|
+
s.add_development_dependency(%q<pry-doc>.freeze, ["~> 0"])
|
59
|
+
s.add_development_dependency(%q<pry-remote>.freeze, ["~> 0"])
|
60
|
+
s.add_development_dependency(%q<pry-rescue>.freeze, ["~> 1"])
|
61
|
+
s.add_development_dependency(%q<pry-stack_explorer>.freeze, ["~> 0"])
|
62
|
+
else
|
63
|
+
s.add_dependency(%q<semver2>.freeze, ["~> 3"])
|
64
|
+
s.add_dependency(%q<ffi-rzmq>.freeze, [">= 0"])
|
65
|
+
s.add_dependency(%q<awesome_print>.freeze, [">= 0"])
|
66
|
+
s.add_dependency(%q<rspec>.freeze, ["~> 3"])
|
67
|
+
s.add_dependency(%q<yard>.freeze, ["~> 0"])
|
68
|
+
s.add_dependency(%q<rdoc>.freeze, ["~> 3"])
|
69
|
+
s.add_dependency(%q<bundler>.freeze, ["~> 1"])
|
70
|
+
s.add_dependency(%q<juwelier>.freeze, ["~> 2"])
|
71
|
+
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
72
|
+
s.add_dependency(%q<pry>.freeze, ["~> 0"])
|
73
|
+
s.add_dependency(%q<pry-byebug>.freeze, ["~> 3"])
|
74
|
+
s.add_dependency(%q<pry-doc>.freeze, ["~> 0"])
|
75
|
+
s.add_dependency(%q<pry-remote>.freeze, ["~> 0"])
|
76
|
+
s.add_dependency(%q<pry-rescue>.freeze, ["~> 1"])
|
77
|
+
s.add_dependency(%q<pry-stack_explorer>.freeze, ["~> 0"])
|
78
|
+
end
|
79
|
+
else
|
80
|
+
s.add_dependency(%q<semver2>.freeze, ["~> 3"])
|
81
|
+
s.add_dependency(%q<ffi-rzmq>.freeze, [">= 0"])
|
82
|
+
s.add_dependency(%q<awesome_print>.freeze, [">= 0"])
|
83
|
+
s.add_dependency(%q<rspec>.freeze, ["~> 3"])
|
84
|
+
s.add_dependency(%q<yard>.freeze, ["~> 0"])
|
85
|
+
s.add_dependency(%q<rdoc>.freeze, ["~> 3"])
|
86
|
+
s.add_dependency(%q<bundler>.freeze, ["~> 1"])
|
87
|
+
s.add_dependency(%q<juwelier>.freeze, ["~> 2"])
|
88
|
+
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
89
|
+
s.add_dependency(%q<pry>.freeze, ["~> 0"])
|
90
|
+
s.add_dependency(%q<pry-byebug>.freeze, ["~> 3"])
|
91
|
+
s.add_dependency(%q<pry-doc>.freeze, ["~> 0"])
|
92
|
+
s.add_dependency(%q<pry-remote>.freeze, ["~> 0"])
|
93
|
+
s.add_dependency(%q<pry-rescue>.freeze, ["~> 1"])
|
94
|
+
s.add_dependency(%q<pry-stack_explorer>.freeze, ["~> 0"])
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
|
3
|
+
module SimpleCov::Configuration
|
4
|
+
def clean_filters
|
5
|
+
@filters = []
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
SimpleCov.configure do
|
10
|
+
clean_filters
|
11
|
+
load_adapter 'test_frameworks'
|
12
|
+
end
|
13
|
+
|
14
|
+
ENV["COVERAGE"] && SimpleCov.start do
|
15
|
+
add_filter "/.rvm/"
|
16
|
+
end
|
17
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
18
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
19
|
+
|
20
|
+
require 'rspec'
|
21
|
+
require 'rzmq-enhancement'
|
22
|
+
|
23
|
+
# Requires supporting files with custom matchers and macros, etc,
|
24
|
+
# in ./support/ and its subdirectories.
|
25
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
26
|
+
|
27
|
+
RSpec.configure do |config|
|
28
|
+
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,275 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rzmq-enhancement
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.4
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Fred Mitchell
|
8
|
+
- Sensorberg GmbH
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2017-06-06 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: semver2
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '3'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '3'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: ffi-rzmq
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
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: awesome_print
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
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: rspec
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '3'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '3'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: yard
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
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: rdoc
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - "~>"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '3'
|
91
|
+
type: :development
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - "~>"
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '3'
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: bundler
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - "~>"
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '1'
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - "~>"
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '1'
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: juwelier
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - "~>"
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '2'
|
119
|
+
type: :development
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - "~>"
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '2'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: simplecov
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
type: :development
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
140
|
+
- !ruby/object:Gem::Dependency
|
141
|
+
name: pry
|
142
|
+
requirement: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - "~>"
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0'
|
147
|
+
type: :development
|
148
|
+
prerelease: false
|
149
|
+
version_requirements: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - "~>"
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '0'
|
154
|
+
- !ruby/object:Gem::Dependency
|
155
|
+
name: pry-byebug
|
156
|
+
requirement: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - "~>"
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '3'
|
161
|
+
type: :development
|
162
|
+
prerelease: false
|
163
|
+
version_requirements: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - "~>"
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '3'
|
168
|
+
- !ruby/object:Gem::Dependency
|
169
|
+
name: pry-doc
|
170
|
+
requirement: !ruby/object:Gem::Requirement
|
171
|
+
requirements:
|
172
|
+
- - "~>"
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '0'
|
175
|
+
type: :development
|
176
|
+
prerelease: false
|
177
|
+
version_requirements: !ruby/object:Gem::Requirement
|
178
|
+
requirements:
|
179
|
+
- - "~>"
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0'
|
182
|
+
- !ruby/object:Gem::Dependency
|
183
|
+
name: pry-remote
|
184
|
+
requirement: !ruby/object:Gem::Requirement
|
185
|
+
requirements:
|
186
|
+
- - "~>"
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '0'
|
189
|
+
type: :development
|
190
|
+
prerelease: false
|
191
|
+
version_requirements: !ruby/object:Gem::Requirement
|
192
|
+
requirements:
|
193
|
+
- - "~>"
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: '0'
|
196
|
+
- !ruby/object:Gem::Dependency
|
197
|
+
name: pry-rescue
|
198
|
+
requirement: !ruby/object:Gem::Requirement
|
199
|
+
requirements:
|
200
|
+
- - "~>"
|
201
|
+
- !ruby/object:Gem::Version
|
202
|
+
version: '1'
|
203
|
+
type: :development
|
204
|
+
prerelease: false
|
205
|
+
version_requirements: !ruby/object:Gem::Requirement
|
206
|
+
requirements:
|
207
|
+
- - "~>"
|
208
|
+
- !ruby/object:Gem::Version
|
209
|
+
version: '1'
|
210
|
+
- !ruby/object:Gem::Dependency
|
211
|
+
name: pry-stack_explorer
|
212
|
+
requirement: !ruby/object:Gem::Requirement
|
213
|
+
requirements:
|
214
|
+
- - "~>"
|
215
|
+
- !ruby/object:Gem::Version
|
216
|
+
version: '0'
|
217
|
+
type: :development
|
218
|
+
prerelease: false
|
219
|
+
version_requirements: !ruby/object:Gem::Requirement
|
220
|
+
requirements:
|
221
|
+
- - "~>"
|
222
|
+
- !ruby/object:Gem::Version
|
223
|
+
version: '0'
|
224
|
+
description: |2-
|
225
|
+
|
226
|
+
The ffi-rzmq wraps ZeroMQ nicely, but not in a Ruby-friendly manner.
|
227
|
+
here, we take that one step further to present a mor Ruby-Friendy
|
228
|
+
interface.
|
229
|
+
email: frederick.mitchell@sensorberg.com
|
230
|
+
executables:
|
231
|
+
- rzmq
|
232
|
+
extensions: []
|
233
|
+
extra_rdoc_files:
|
234
|
+
- LICENSE.txt
|
235
|
+
- README.org
|
236
|
+
files:
|
237
|
+
- ".document"
|
238
|
+
- ".rspec"
|
239
|
+
- ".semver"
|
240
|
+
- Gemfile
|
241
|
+
- Gemfile.lock
|
242
|
+
- LICENSE.txt
|
243
|
+
- README.org
|
244
|
+
- Rakefile
|
245
|
+
- bin/rzmq
|
246
|
+
- examples/push-pull.rb
|
247
|
+
- lib/rzmq-enhancement.rb
|
248
|
+
- rzmq-enhancement.gemspec
|
249
|
+
- spec/rzmq-enhancement_spec.rb
|
250
|
+
- spec/spec_helper.rb
|
251
|
+
homepage: http://github.com/flajann2/rzmq-enhancement
|
252
|
+
licenses:
|
253
|
+
- MIT
|
254
|
+
metadata: {}
|
255
|
+
post_install_message:
|
256
|
+
rdoc_options: []
|
257
|
+
require_paths:
|
258
|
+
- lib
|
259
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
260
|
+
requirements:
|
261
|
+
- - ">="
|
262
|
+
- !ruby/object:Gem::Version
|
263
|
+
version: '0'
|
264
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
265
|
+
requirements:
|
266
|
+
- - ">="
|
267
|
+
- !ruby/object:Gem::Version
|
268
|
+
version: '0'
|
269
|
+
requirements: []
|
270
|
+
rubyforge_project:
|
271
|
+
rubygems_version: 2.6.11
|
272
|
+
signing_key:
|
273
|
+
specification_version: 4
|
274
|
+
summary: Wrapper for the ffi-rzmq wrapper for ZeroMQ
|
275
|
+
test_files: []
|