rinda2 0.2.1 → 0.2.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: 29affc3a7745cd8d10c03500297400cd87093af2
4
- data.tar.gz: 4ac4f998a68cbc9b7f67a2edf2ffc7f8e54df767
3
+ metadata.gz: 0f1c02c602d44455d05070dbfbe20e4072c6a1fe
4
+ data.tar.gz: 6c48d6f6f71d4a33ab100986e1ac795aa66fc431
5
5
  SHA512:
6
- metadata.gz: f4f9cc87deb2d340af25474fb3fe68a69e2670b448e7dbc412fb70b5f1c0e13146aaaa0b0a3c64989539f14ae5acf8a7194d9afdb8786ea141fffa82e2bdda79
7
- data.tar.gz: 00425adfda74829e4fb657bca718cd4c22627dd9ff0f12644f77436cb6847d1c43ab78bb022c3b9d3b5e7c6c7cc9473ba2a69ee76c1878b20cad220030a280c2
6
+ metadata.gz: a9d138aa385dd963fd106f74e3ade180aeb0435c672aecee84386104219f409abfeffedb94700bbeca8d5709493e9b157fecda0783f083becc78b4a62b08e5d7
7
+ data.tar.gz: 7419586d09c2b5760dc8a81a356d091ea47d9c410907e7245cf0d46a1773bba4d5f10c21e96078c9ee947138254de84547ca3548e23eb7b8acc3548eb67d681c
data/lib/rinda2/ring.rb CHANGED
@@ -39,8 +39,8 @@ module Rinda
39
39
  ##
40
40
  # Advertises this service on the primary remote TupleSpace.
41
41
 
42
- def provide
43
- ts = Rinda::RingFinger.primary
42
+ def provide (addresses)
43
+ ts = Rinda::RingFinger.new(addresses).each.first
44
44
  ts.write(@tuple, @renewer)
45
45
  end
46
46
 
@@ -8,15 +8,15 @@ module Rinda
8
8
  attr_accessor :description
9
9
  end
10
10
 
11
- def self.start (*args)
11
+ def self.start (addresses, *args)
12
12
  DRb.start_service
13
13
  Rinda::RingProvider.new(self.name.to_sym, self.new(*args), description, Rinda::SimpleRenewer.new(5)).provide
14
14
  DRb.thread.join
15
15
  end
16
16
 
17
- def self.open (name)
17
+ def self.open (addresses, name)
18
18
  DRb.start_service
19
- Rinda::RingFinger.primary.read([:name, name, nil, nil])[2]
19
+ Rinda::RingFinger.new(addresses).each.first.read([:name, name, nil, nil])[2]
20
20
  end
21
21
 
22
22
  end
@@ -1,3 +1,3 @@
1
1
  module Rinda2
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rinda2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Baum