rinda2 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 +4 -4
- data/lib/rinda2.rb +1 -0
- data/lib/rinda2/service.rb +24 -0
- data/lib/rinda2/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29affc3a7745cd8d10c03500297400cd87093af2
|
4
|
+
data.tar.gz: 4ac4f998a68cbc9b7f67a2edf2ffc7f8e54df767
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4f9cc87deb2d340af25474fb3fe68a69e2670b448e7dbc412fb70b5f1c0e13146aaaa0b0a3c64989539f14ae5acf8a7194d9afdb8786ea141fffa82e2bdda79
|
7
|
+
data.tar.gz: 00425adfda74829e4fb657bca718cd4c22627dd9ff0f12644f77436cb6847d1c43ab78bb022c3b9d3b5e7c6c7cc9473ba2a69ee76c1878b20cad220030a280c2
|
data/lib/rinda2.rb
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
module Rinda
|
2
|
+
|
3
|
+
class Service
|
4
|
+
|
5
|
+
include DRb::DRbUndumped
|
6
|
+
|
7
|
+
class << self
|
8
|
+
attr_accessor :description
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.start (*args)
|
12
|
+
DRb.start_service
|
13
|
+
Rinda::RingProvider.new(self.name.to_sym, self.new(*args), description, Rinda::SimpleRenewer.new(5)).provide
|
14
|
+
DRb.thread.join
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.open (name)
|
18
|
+
DRb.start_service
|
19
|
+
Rinda::RingFinger.primary.read([:name, name, nil, nil])[2]
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
data/lib/rinda2/version.rb
CHANGED
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.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Baum
|
@@ -57,6 +57,7 @@ files:
|
|
57
57
|
- lib/rinda2/ring.rb
|
58
58
|
- lib/rinda2/ring/finger.rb
|
59
59
|
- lib/rinda2/ring/server.rb
|
60
|
+
- lib/rinda2/service.rb
|
60
61
|
- lib/rinda2/tuplespace.rb
|
61
62
|
- lib/rinda2/version.rb
|
62
63
|
- rinda2.gemspec
|