drb_fileserver 0.2.2 → 0.2.3
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.tar.gz.sig +0 -0
- data/lib/drb_fileserver.rb +20 -4
- 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: 89b1ae73054385ea9962eab14a5e859d96a9e48b7f5a8789dc56b75f1ab3cda3
|
4
|
+
data.tar.gz: 4237e714ef973930b4ee53b3fa164150b4b816cf7f548d10b8d98d3b2fe3ea69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 853e1e7b4719a6b79a9da9d8d5b572f648597d5fbcfdda09ca56823e795e600838d1bc3d5def0d54fe9151121d6238ca25aa4a0383afec51e2dda5c84150de4c
|
7
|
+
data.tar.gz: 5979926956273ae6757a0cc4dc6bdb0dfd98ae5bab1f41fcf369b776f467d2f708c4ffdd99335666de67b6d24beaa19483413d72d4c5af595b873b64cb62112b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/drb_fileserver.rb
CHANGED
@@ -30,10 +30,26 @@ class DRbFileServer
|
|
30
30
|
def exists?(filename)
|
31
31
|
File.exists? File.join(@path, filename)
|
32
32
|
end
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
33
|
+
|
34
|
+
# path can include a wildcard and the switch -ltr
|
35
|
+
#
|
36
|
+
def ls(rawpath)
|
37
|
+
|
38
|
+
path, switch = rawpath.split(/\s+/,2)
|
39
|
+
wildcard = path.include?('*') ? '' : '*'
|
40
|
+
path = File.join(path, wildcard) if File.exists? File.join(@path, path)
|
41
|
+
|
42
|
+
a = Dir[File.join(@path, path)].map do |x|
|
43
|
+
|
44
|
+
File.basename(x)
|
45
|
+
end
|
46
|
+
|
47
|
+
if switch == '-ltr' then
|
48
|
+
a.sort_by {|x| File.mtime(File.join(@path, File.dirname(path), x)) }
|
49
|
+
else
|
50
|
+
a
|
51
|
+
end
|
52
|
+
|
37
53
|
end
|
38
54
|
|
39
55
|
def mkdir(name)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drb_fileserver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
CYk9iqpRnQJDnjCVAE3UbYCDhkJPASVjCdwNhKUUKiwlI14QHfOn9xxOTD26YWWx
|
36
36
|
cRdPsJYHMjfHdDDxkkkgPxTk
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2019-
|
38
|
+
date: 2019-08-18 00:00:00.000000000 Z
|
39
39
|
dependencies: []
|
40
40
|
description:
|
41
41
|
email: james@jamesrobertson.eu
|
metadata.gz.sig
CHANGED
Binary file
|