drb_fileclient 0.4.1 → 0.4.2
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.tar.gz.sig +0 -0
- data/lib/drb_fileclient.rb +17 -0
- metadata +2 -2
- 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: f07f8b9d2f18919f368565133d3663baabf745cecf413f46deaf71a139b9637c
|
4
|
+
data.tar.gz: b75a6263ef07725cdbc676ecf9597192f3761119b23ebace0c10f4c31046dd66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90d3ea8cbd06e091a310a208f1bf8a2c4aa843f44f40c2c28d197bdab3da2c29c3f36743e759456b7ad371032fe95b26e3f5fceac7b44700d816d5a680850ce6
|
7
|
+
data.tar.gz: f030cef9d5ff09292707acd11a5d576ebe38bc273a1dcccc1ea05094f24dd906dc5086b11df6146e51ba12e6b6755ae1a23cc8064037b6836a428d54b5e6d155
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/drb_fileclient.rb
CHANGED
@@ -74,6 +74,22 @@ class DRbFileClient
|
|
74
74
|
|
75
75
|
alias exist? exists?
|
76
76
|
|
77
|
+
def ls(raw_path)
|
78
|
+
|
79
|
+
return Dir[raw_path] unless @directory or raw_path =~ /^dfs:\/\//
|
80
|
+
|
81
|
+
path = if raw_path[0] == '/' then
|
82
|
+
raw_path[1..-1]
|
83
|
+
elsif raw_path =~ /^dfs:\/\//
|
84
|
+
parse_path(raw_path)
|
85
|
+
else
|
86
|
+
File.join(@directory, raw_path)
|
87
|
+
end
|
88
|
+
|
89
|
+
@file.ls path
|
90
|
+
|
91
|
+
end
|
92
|
+
|
77
93
|
def mkdir(name)
|
78
94
|
|
79
95
|
return FileUtils.mkdir name unless @directory or name =~ /^dfs:\/\//
|
@@ -209,6 +225,7 @@ class DfsFile
|
|
209
225
|
def self.exists?(filename) @client.exists?(filename) end
|
210
226
|
def self.chdir(path) @client.chdir(path) end
|
211
227
|
def self.cp(path, path2) @client.cp(path, path2) end
|
228
|
+
def self.ls(path) @client.ls(path) end
|
212
229
|
def self.mkdir(name) @client.mkdir(name) end
|
213
230
|
def self.mkdir_p(path) @client.mkdir_p(path) end
|
214
231
|
def self.mv(path, path2) @client.mv(path, path2) end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drb_fileclient
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
2aIZ9lf6/AT4LP07t9jB5oYLHlr2nBLIqtPXdJvg5RKKr79CQVmpJ5LCTjwTg9h+
|
31
31
|
g1Q=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2018-08-
|
33
|
+
date: 2018-08-21 00:00:00.000000000 Z
|
34
34
|
dependencies: []
|
35
35
|
description:
|
36
36
|
email: james@jamesrobertson.eu
|
metadata.gz.sig
CHANGED
Binary file
|