drb_fileclient-reader 0.1.2 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/drb_fileclient-reader.rb +10 -5
- data.tar.gz.sig +0 -0
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de6a3b50827e3fe464e1b2ad65754ca33b8300a7dca175f8c766fe9e27862161
|
4
|
+
data.tar.gz: b2b685201d4151fb198af7cb8232dfc616fd992f48eebaeee9c6cd350111bf3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0370e96c8d9a9f7209150e2ecb734f071cab935a4c17904f22d8627e4d21571a00ae41613989ed959415421ffcea3f2af19e1d66544a8f023a9b2647be0107a5
|
7
|
+
data.tar.gz: 4f75275a2856d1589249a1d7fadd8ea41746a2eb49f25938cd23210d97a3f11ef67be4cff98679aa58f7ce5effa1c6e4f51fe6ba48d3a8364487ec273c56eb05
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -12,14 +12,15 @@ class DRbFileClientReader
|
|
12
12
|
def initialize(location=nil, host: nil, port: '61010', debug: false)
|
13
13
|
|
14
14
|
@debug = debug
|
15
|
+
@@file ||= nil
|
15
16
|
|
16
17
|
if location then
|
17
18
|
|
18
19
|
host = location[/(?<=^dfs:\/\/)[^\/:]+/]
|
19
20
|
port = location[/(?<=^dfs:\/\/)[^:]+:(\d+)/,1] || '61010'
|
20
|
-
@@directory
|
21
|
+
@@directory ||= location[/(?<=^dfs:\/\/)[^\/]+\/(.*)/,1]
|
21
22
|
else
|
22
|
-
@@directory
|
23
|
+
@@directory ||= nil
|
23
24
|
end
|
24
25
|
|
25
26
|
DRb.start_service
|
@@ -31,7 +32,10 @@ class DRbFileClientReader
|
|
31
32
|
return File.exists? filename unless @@directory or filename =~ /^dfs:\/\//
|
32
33
|
|
33
34
|
if filename =~ /^dfs:\/\// then
|
34
|
-
|
35
|
+
|
36
|
+
file, filename2 = parse_path(filename)
|
37
|
+
@@file ||= file
|
38
|
+
|
35
39
|
else
|
36
40
|
|
37
41
|
filename2 = File.join(@@directory, filename)
|
@@ -45,10 +49,11 @@ class DRbFileClientReader
|
|
45
49
|
|
46
50
|
def read(filename=@@filename)
|
47
51
|
|
48
|
-
return File.read
|
52
|
+
return File.read(filename) unless @@directory or filename =~ /^dfs:\/\//
|
49
53
|
|
50
54
|
if filename =~ /^dfs:\/\// then
|
51
|
-
|
55
|
+
file, path = parse_path(filename)
|
56
|
+
@@file ||= file
|
52
57
|
else
|
53
58
|
path = File.join(@@directory, filename)
|
54
59
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drb_fileclient-reader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
im+YlEcJfPax42Av6oEBmm6oUqxICcrKX8DdDuNFC44LAC66kmOdMTNiVdeS82BG
|
36
36
|
CGf+32hX61V/Gw6Jiazh7a6L
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2022-
|
38
|
+
date: 2022-08-18 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: c32
|
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: '0'
|
85
85
|
requirements: []
|
86
|
-
rubygems_version: 3.
|
86
|
+
rubygems_version: 3.3.7
|
87
87
|
signing_key:
|
88
88
|
specification_version: 4
|
89
89
|
summary: A DRb file reader client to access the DRb_fileserver service.
|
metadata.gz.sig
CHANGED
Binary file
|