drb_fileclient-readwrite 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/drb_fileclient-readwrite.rb +30 -9
- data.tar.gz.sig +0 -0
- metadata +4 -4
- 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: cdee5be8a5a8f50bb64bac4b20be6580f95273a95b95efe1fa662df3c5937a9b
|
4
|
+
data.tar.gz: 9bc4201c35a3ae9745c0fb2c8be06237add99f6dea64c38ea51d1dab76d2b058
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 308835d9b6ef51e7ab8f02cc1943057d8168bfaa34d30d1c00d264c8de158d8ec055cb2bfd8f213d98279b5ff05626bed9f8ef7b08fb4f60dd8462fad7fc6405
|
7
|
+
data.tar.gz: 0e2d3ee0d6ec2c0429497b924be7adc7185f7800c6a785f04452ea8ba378dea54b83902c87bcc66aa0a94c90938fa8f939af0f41853386dc4b1f69c5a20eb158
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -11,24 +11,23 @@ class DRbFileClientReadWrite < DRbFileClientReader
|
|
11
11
|
def initialize()
|
12
12
|
@@directory ||= nil
|
13
13
|
@@file ||= nil
|
14
|
+
@@uri_prefix ||= nil
|
14
15
|
end
|
15
16
|
|
16
17
|
def chdir(raw_path)
|
17
|
-
puts 'inside chdir: ' + raw_path
|
18
18
|
|
19
19
|
return Dir.chdir raw_path unless @@directory or raw_path =~ /^dfs:\/\//
|
20
20
|
|
21
21
|
if raw_path[0] == '/' then
|
22
22
|
directory = raw_path[1..-1]
|
23
23
|
elsif raw_path =~ /^dfs:\/\//
|
24
|
-
@@file, directory = parse_path(raw_path)
|
24
|
+
@@file, directory, @@uri_prefix = parse_path(raw_path)
|
25
25
|
else
|
26
26
|
directory = File.join(@@directory, raw_path)
|
27
27
|
end
|
28
28
|
|
29
29
|
if @@file.exists? directory then
|
30
30
|
@@directory = directory
|
31
|
-
puts '@@directory:' + @@directory.inspect
|
32
31
|
else
|
33
32
|
'No such file or directory'
|
34
33
|
end
|
@@ -62,12 +61,26 @@ class DRbFileClientReadWrite < DRbFileClientReader
|
|
62
61
|
|
63
62
|
end
|
64
63
|
|
65
|
-
def mkdir(
|
64
|
+
def mkdir(raw_path)
|
66
65
|
|
67
|
-
|
66
|
+
unless @@directory or raw_path =~ /^dfs:\/\// then
|
67
|
+
return FileUtils.mkdir raw_path
|
68
|
+
end
|
69
|
+
|
70
|
+
if raw_path =~ /^dfs:\/\// then
|
71
|
+
@@file, filepath = parse_path(raw_path)
|
72
|
+
else
|
68
73
|
|
69
|
-
|
70
|
-
|
74
|
+
if @@uri_prefix then
|
75
|
+
@@file, filepath = parse_path(File.join(@@uri_prefix, @@directory,
|
76
|
+
raw_path))
|
77
|
+
else
|
78
|
+
filepath = File.join(@@directory, raw_path)
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
|
83
|
+
@@file.mkdir filepath
|
71
84
|
end
|
72
85
|
|
73
86
|
def mkdir_p(raw_path)
|
@@ -79,9 +92,17 @@ class DRbFileClientReadWrite < DRbFileClientReader
|
|
79
92
|
if raw_path =~ /^dfs:\/\// then
|
80
93
|
@@file, filepath = parse_path(raw_path)
|
81
94
|
else
|
82
|
-
|
95
|
+
|
96
|
+
if @@uri_prefix then
|
97
|
+
@@file, filepath = parse_path(File.join(@@uri_prefix, @@directory,
|
98
|
+
raw_path))
|
99
|
+
else
|
100
|
+
filepath = File.join(@@directory, raw_path)
|
101
|
+
end
|
102
|
+
|
83
103
|
end
|
84
104
|
|
105
|
+
puts 'drb_fileclient-readwrite inside mkdir_p: ' + filepath.inspect
|
85
106
|
@@file.mkdir_p filepath
|
86
107
|
end
|
87
108
|
|
@@ -164,7 +185,7 @@ def DfsFile.chdir(path)
|
|
164
185
|
end
|
165
186
|
|
166
187
|
def DfsFile.directory?(filename)
|
167
|
-
|
188
|
+
DRbFileClientReadWrite.new.directory?(filename)
|
168
189
|
end
|
169
190
|
|
170
191
|
def DfsFile.glob(s)
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drb_fileclient-readwrite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
ILzVBTpjvSiaWCjFvxvVJFct97WGSbaR2jPvZ03xyAONtWdKkv2yceiyfAMaldSQ
|
36
36
|
eftJvciSPh0DHzyI46OGIkLX
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2022-02-
|
38
|
+
date: 2022-02-25 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: drb_fileclient-reader
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
version: '0.1'
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.1.
|
49
|
+
version: 0.1.3
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -56,7 +56,7 @@ dependencies:
|
|
56
56
|
version: '0.1'
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: 0.1.
|
59
|
+
version: 0.1.3
|
60
60
|
description:
|
61
61
|
email: digital.robertson@gmail.com
|
62
62
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|