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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f65052a8ec208715cd5be9a8865e0a8a2c7ef0c57b799fdb39fad3b31b053f56
4
- data.tar.gz: 0d314d66233ebc4f1c61d442aaf34c5d49e647109464326776a837b6f9281b82
3
+ metadata.gz: de6a3b50827e3fe464e1b2ad65754ca33b8300a7dca175f8c766fe9e27862161
4
+ data.tar.gz: b2b685201d4151fb198af7cb8232dfc616fd992f48eebaeee9c6cd350111bf3a
5
5
  SHA512:
6
- metadata.gz: e86c3cb71eb7002eaa79c2f8b474e69f63bbadeb54e358c76dd783d9889de6bf046a736441777d6a2b0d5fea45e36539be1a560fcabacc54a23a136e3ea90158
7
- data.tar.gz: fe612c741098e32c7e45f1f01fef494a6a70d3e3374ea089a22ee936a1c33665db9046ac1c52f3b72f94192019c141cbc1085f4a0b41772943ed55708eb92ec8
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 = location[/(?<=^dfs:\/\/)[^\/]+\/(.*)/,1]
21
+ @@directory ||= location[/(?<=^dfs:\/\/)[^\/]+\/(.*)/,1]
21
22
  else
22
- @@directory = nil
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
- @@file, filename2 = parse_path(filename)
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 filename, s unless @@directory or filename =~ /^dfs:\/\//
52
+ return File.read(filename) unless @@directory or filename =~ /^dfs:\/\//
49
53
 
50
54
  if filename =~ /^dfs:\/\// then
51
- @@file, path = parse_path(filename)
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.2
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-02-23 00:00:00.000000000 Z
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.2.22
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