drb_reg_client 0.1.2 → 0.1.3

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
- SHA1:
3
- metadata.gz: fbd3d9dbf2a86da75b902aeff728fa5fe3a13e8d
4
- data.tar.gz: c30d2be9d5f7e88132314fafb6558cd336e78c20
2
+ SHA256:
3
+ metadata.gz: '087bbabe7154cabc1f132496208ab1942c26ab56723fe48391d73e9747da304a'
4
+ data.tar.gz: 805bb6058b6f2954b690f0256944b8972fa9654c08f8b1f79070bd8a13df3695
5
5
  SHA512:
6
- metadata.gz: b1f8f2fc5e3fe6a333690a9a652c198a829f1c7552a06a92d04f53db6cf3800867e34bab8897429faea775f09be3a70c4c12c86f3e745e7000444371e7cda7fb
7
- data.tar.gz: 4491d72f87a62af2242e684b0a4af7056ae4ad39035b15d9e8c735f5023591718a37ca3257d652c791e7110ce0c1e6f63426c7ef7787a08bfb5f747b22a622d4
6
+ metadata.gz: 2e138cb488294522de8d24e0e1779f1b4ae3271af222863725185aac93ebabc0555f8915849c45f098d990c3d31c6609ca550a9aa9c6ab4306a240584885c5c9
7
+ data.tar.gz: 483ef0db3d6472dafe764400163915bb05a0fd52c10a05ca5abddae39a64b6e336175753d1bbba14175deb87d09abd9a1fee31377624477dc6e2f029ac68d6c0
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -10,16 +10,34 @@ require 'rexle'
10
10
  class DRbRegClient
11
11
 
12
12
 
13
- def initialize(host: 'localhost', port: '59500')
13
+ def initialize(host: nil, port: '59500', debug: false)
14
+
15
+ @port, @debug = port, debug
14
16
  DRb.start_service
15
17
 
16
18
  # attach to the DRb server via a URI given on the command line
17
- @reg = DRbObject.new nil, "druby://#{host}:#{port}"
19
+ @reg = DRbObject.new nil, "druby://#{host}:#{port}" if host
18
20
  end
19
21
 
20
22
  def delete_key(path)
21
23
  @reg.delete_key path
22
24
  end
25
+
26
+ def get(s)
27
+
28
+ raw_uri, path = s[/(?<=reg:\/\/).*/].split('/',2)
29
+ host, port = raw_uri.split(':')
30
+ port ||= @port
31
+
32
+ if @debug
33
+ puts 'host:' + host.inspect
34
+ puts 'port:' + port.inspect
35
+ end
36
+
37
+ @reg = DRbObject.new nil, "druby://#{host}:#{port}"
38
+ get_key(path)
39
+
40
+ end
23
41
 
24
42
  def get_key(key='', auto_detect_type: false)
25
43
 
@@ -72,6 +90,17 @@ class DRbRegClient
72
90
  def import(s)
73
91
  @reg.import s
74
92
  end
93
+
94
+ def set(s, value)
95
+
96
+ raw_uri, path = s[/(?<=reg:\/\/).*/].split('/',2)
97
+ host, port = raw_uri.split(':')
98
+ port ||= @port
99
+
100
+ @reg = DRbObject.new nil, "druby://#{host}:#{port}"
101
+ set_key(path, value)
102
+
103
+ end
75
104
 
76
105
  def set_key(key, value)
77
106
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drb_reg_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -10,28 +10,32 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
- YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
15
- 8ixkARkWAmV1MB4XDTE3MDEwMTIzNTIzMFoXDTE4MDEwMTIzNTIzMFowSDESMBAG
16
- A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
17
- EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
18
- ggEBAJiYL33oFY3yHPjGqsHcYx8SMP5MZ5ofrbn+5cAy3dzYrwfHWWuUOidiIc2d
19
- COXrECjbs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dMBSX6+mdx6jctKmXKDu6bcN/5
31
+ 3WgFtr5rp3V4mptZ8hdjRUbUNaZnGkqyphZXrJ9xGEi9iSk/EN9MZlKFNdUl1+qR
32
+ p2tGsE04OqRZ2PA28CUbR1CsskMl67a8Cq32icD1gynVKW4C4fObUAlH5CTFMLR6
33
+ XZ/t2+RsBFLhQU5TV3ZYcNskfBswHmGcS7at3nIBSgGFgbG1yDBgeJIbhQ8al0Aj
34
+ ZnYTHMKVpGEKGRaaciz01qan67D75sxQaQbJzMJ8o9P5FFBz5SnPIZAGtrVQVbwk
35
+ Q8EYGbOAqtb0phUBPLNTXJ8ToIk7zuFB7wu7K3L9gLHolnbnZ6fZOLsmhHuOAXue
36
+ w7VTDsV1LRF3S+/km8Tt5tpO
33
37
  -----END CERTIFICATE-----
34
- date: 2017-08-30 00:00:00.000000000 Z
38
+ date: 2020-06-08 00:00:00.000000000 Z
35
39
  dependencies:
36
40
  - !ruby/object:Gem::Dependency
37
41
  name: rexle
@@ -79,8 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
83
  - !ruby/object:Gem::Version
80
84
  version: '0'
81
85
  requirements: []
82
- rubyforge_project:
83
- rubygems_version: 2.6.8
86
+ rubygems_version: 3.0.3
84
87
  signing_key:
85
88
  specification_version: 4
86
89
  summary: Provides a DWS_registry service using DRb; Requires a drb_reg_server to be
metadata.gz.sig CHANGED
Binary file