librmdp 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MjdkMTlkOGQ3YjY5ZDliNWYyYWIzNTA2NzE4ZDhlYzVlYTI5ZTFmYw==
5
+ data.tar.gz: !binary |-
6
+ MzA0NGMwODViMDU3YTM2MmQwYzEzNjk5Yzk4YTlhYWE2Mzg5MzBkMQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ ZjFjN2ZlMjY5NjljYjE0ZDdkYWYxYjIzNWZiNmVmNDIyNDEwOGUxZWUxMzUw
10
+ YzFkMTk2NmE5MjA2YTU1NjIyZjU5OTMwZGQ5NDgyMzYwYjllOWVlNjE5Yjhj
11
+ YmJjNjVmZWI5Nzk2MmQxNDNhNGRjNDIzYjQ0ZDM2MjA0MmIwYmE=
12
+ data.tar.gz: !binary |-
13
+ OTkyMTNmMDgyNjg1MDAyNzFiZDA4NjU2NjhkMWM5ODA4ZTY1ZTAxMDdhOTI3
14
+ OTM0MTQxM2M3OGQ4ZGEyNjVhMjBlOGExMzg1ZjViYWQ5ZWMyMzAzNGFmOWI1
15
+ OWUxMTI1OThkMTljNWE3YWIxYWYwNDc5Y2Y0Mjk5OTE3ZWU4NmY=
@@ -6,8 +6,8 @@ module Majordomo
6
6
 
7
7
  attr_accessor :workers, :waiting, :services, :socket
8
8
 
9
- def initialize(bind = 'tcp://*:5555')
10
- @context = ZMQ::Context.new
9
+ def initialize(bind = 'tcp://*:5555', context = ZMQ::Context.new)
10
+ @context = context
11
11
  @socket = @context.socket(ZMQ::ROUTER)
12
12
  @poller = ZMQ::Poller.new
13
13
  @services = {}
@@ -2,8 +2,8 @@ module Majordomo
2
2
  class Client
3
3
  attr_accessor :timeout, :client
4
4
 
5
- def initialize(broker)
6
- @context = ZMQ::Context.new
5
+ def initialize(broker, context = ZMQ::Context.new)
6
+ @context = context
7
7
  @poller = ZMQ::Poller.new
8
8
  @broker = broker
9
9
 
@@ -1,3 +1,3 @@
1
1
  module Majordomo
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -2,8 +2,8 @@ module Majordomo
2
2
  class Worker
3
3
  attr_accessor :broker, :service, :worker, :heartbeat_at, :heartbeat, :liveness, :reconnect
4
4
 
5
- def initialize(broker, service)
6
- @context = ZMQ::Context.new
5
+ def initialize(broker, service, context = ZMQ::Context.new)
6
+ @context = context
7
7
  @poller = ZMQ::Poller.new
8
8
  @broker = broker
9
9
  @service = service
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: librmdp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Benoist
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-06-27 00:00:00.000000000 Z
11
+ date: 2013-10-20 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ! '>='
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: ffi-rzmq
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ! '>='
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ! '>='
60
53
  - !ruby/object:Gem::Version
@@ -85,27 +78,26 @@ files:
85
78
  homepage: https://github.com/benoist/librmdp
86
79
  licenses:
87
80
  - MIT
81
+ metadata: {}
88
82
  post_install_message:
89
83
  rdoc_options: []
90
84
  require_paths:
91
85
  - lib
92
86
  required_ruby_version: !ruby/object:Gem::Requirement
93
- none: false
94
87
  requirements:
95
88
  - - ! '>='
96
89
  - !ruby/object:Gem::Version
97
90
  version: '0'
98
91
  required_rubygems_version: !ruby/object:Gem::Requirement
99
- none: false
100
92
  requirements:
101
93
  - - ! '>='
102
94
  - !ruby/object:Gem::Version
103
95
  version: '0'
104
96
  requirements: []
105
97
  rubyforge_project:
106
- rubygems_version: 1.8.25
98
+ rubygems_version: 2.0.7
107
99
  signing_key:
108
- specification_version: 3
100
+ specification_version: 4
109
101
  summary: A ruby implementation of the ZeroMQ majordomo pattern v0.1
110
102
  test_files:
111
103
  - test/client_test.rb