drb_fileclient 0.4.1 → 0.4.2

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: 2907fc7d7eadafd999496b17cc58f9bc43e7951f295f5175a1ae2935d0f21d27
4
- data.tar.gz: a99fcb56d7d443c316a9c73c361ff14fea5b5bd5f6c35319862ba40e0e5ae667
3
+ metadata.gz: f07f8b9d2f18919f368565133d3663baabf745cecf413f46deaf71a139b9637c
4
+ data.tar.gz: b75a6263ef07725cdbc676ecf9597192f3761119b23ebace0c10f4c31046dd66
5
5
  SHA512:
6
- metadata.gz: ce133cc67158a1d7bd22d532cf9256b99bc3e7ea026e4c5bbea42769c24cabfae65b666e79e00c169c9e6a93013a03d95cc56761050c51921aa7bf92c4cb2a0a
7
- data.tar.gz: 9ff35d40c9403df53310a52e3c6ca148810e1b837a3d30233c801ffae524d542128ca4e39a03c9495687950e53c09d3f24c5d6a14058e7c898548b6dc7cd28f9
6
+ metadata.gz: 90d3ea8cbd06e091a310a208f1bf8a2c4aa843f44f40c2c28d197bdab3da2c29c3f36743e759456b7ad371032fe95b26e3f5fceac7b44700d816d5a680850ce6
7
+ data.tar.gz: f030cef9d5ff09292707acd11a5d576ebe38bc273a1dcccc1ea05094f24dd906dc5086b11df6146e51ba12e6b6755ae1a23cc8064037b6836a428d54b5e6d155
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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.1
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-17 00:00:00.000000000 Z
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