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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f23287f91efcdf6b8dbdd11e8b0913c6739cf133
4
- data.tar.gz: d556c379195055cec95457e55477bb11750c229a
3
+ metadata.gz: 29affc3a7745cd8d10c03500297400cd87093af2
4
+ data.tar.gz: 4ac4f998a68cbc9b7f67a2edf2ffc7f8e54df767
5
5
  SHA512:
6
- metadata.gz: 41702362cfae06f7822c6849861a5c21d6652888f99cfc3b8b34651664439be6be8c2a702eb9ba6b82ee87bf52bfea26df4c4638eb0f9fd67638ee794e20426c
7
- data.tar.gz: 64afa0d0fc633c205596b21573ee68cb222f1d345d63c2d1a3db7f94184c0f6e6974ad5febb85fb25d5a2d74d8a1ddd93b61174863fcf108fd5c346089ac5325
6
+ metadata.gz: f4f9cc87deb2d340af25474fb3fe68a69e2670b448e7dbc412fb70b5f1c0e13146aaaa0b0a3c64989539f14ae5acf8a7194d9afdb8786ea141fffa82e2bdda79
7
+ data.tar.gz: 00425adfda74829e4fb657bca718cd4c22627dd9ff0f12644f77436cb6847d1c43ab78bb022c3b9d3b5e7c6c7cc9473ba2a69ee76c1878b20cad220030a280c2
@@ -2,6 +2,7 @@ require_relative "rinda2/version"
2
2
  require_relative "rinda2/ring"
3
3
  require_relative "rinda2/rinda"
4
4
  require_relative "rinda2/tuplespace"
5
+ require_relative "rinda2/service"
5
6
 
6
7
  module Rinda2
7
8
  # Your code goes here...
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Rinda2
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
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.0
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