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 +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/drb_reg_client.rb +31 -2
- metadata +27 -24
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '087bbabe7154cabc1f132496208ab1942c26ab56723fe48391d73e9747da304a'
|
4
|
+
data.tar.gz: 805bb6058b6f2954b690f0256944b8972fa9654c08f8b1f79070bd8a13df3695
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e138cb488294522de8d24e0e1779f1b4ae3271af222863725185aac93ebabc0555f8915849c45f098d990c3d31c6609ca550a9aa9c6ab4306a240584885c5c9
|
7
|
+
data.tar.gz: 483ef0db3d6472dafe764400163915bb05a0fd52c10a05ca5abddae39a64b6e336175753d1bbba14175deb87d09abd9a1fee31377624477dc6e2f029ac68d6c0
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/drb_reg_client.rb
CHANGED
@@ -10,16 +10,34 @@ require 'rexle'
|
|
10
10
|
class DRbRegClient
|
11
11
|
|
12
12
|
|
13
|
-
def initialize(host:
|
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.
|
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
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
+
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
13
|
+
MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsF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
BgkqhkiG9w0BAQsFAAOCAYEAKQT8WAqq5v56DZyaPNukMQI1a5l04NI7Cq+jgxxQ
|
29
|
+
6CVkjpiGV9JQGRwv95l0Yf7pISC3ilLGo/gEPdeA7qnkJdnIaeJ074pr2y1knSw1
|
30
|
+
Z9nWeB5g7w85acc0ihyWHc86bQkAXjQh/ebkhLdMBSX6+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:
|
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
|
-
|
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
|