drb_fileserver 0.3.0 → 0.4.0
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_fileserver.rb +25 -3
- data.tar.gz.sig +0 -0
- metadata +23 -3
- 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: 542864be0f88eeadf95256272325e6119d6822b5183ea912a28953d1c043abb4
|
4
|
+
data.tar.gz: 87f4c4bd060da3c4a7204a710f1f2165d91e0d97806dc0dfbfecdba5215e9db3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37ee4756f920746753d623a2e07ca331c09f2a4df82cb01e0275f039e798e684d713b129f8c622eaf9c908741f8da49a045dd1f814e769decd8cb7c9ddae008f
|
7
|
+
data.tar.gz: c00a284ff88c7597be4c34702b0b716fc370064f437e6f5d9cb07f954f58bd718751bab2b983fd944c02108bf9262331744958b9dae92dac52b341c3b3976675
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/drb_fileserver.rb
CHANGED
@@ -5,17 +5,15 @@
|
|
5
5
|
require 'zip'
|
6
6
|
require 'drb'
|
7
7
|
require 'fileutils'
|
8
|
+
require 'dir-to-xml'
|
8
9
|
|
9
10
|
|
10
11
|
class DRbFileServer
|
11
12
|
|
12
13
|
class FileX
|
13
14
|
|
14
|
-
|
15
15
|
def initialize(path='.')
|
16
|
-
|
17
16
|
@path = path
|
18
|
-
|
19
17
|
end
|
20
18
|
|
21
19
|
def chmod(permissions, filename)
|
@@ -35,6 +33,10 @@ class DRbFileServer
|
|
35
33
|
File.exists? File.join(@path, filename)
|
36
34
|
end
|
37
35
|
|
36
|
+
def glob(s)
|
37
|
+
Dir.glob(File.join(@path, s))
|
38
|
+
end
|
39
|
+
|
38
40
|
# path can include a wildcard and the switch -ltr
|
39
41
|
#
|
40
42
|
def ls(rawpath)
|
@@ -76,12 +78,32 @@ class DRbFileServer
|
|
76
78
|
FileUtils.rm File.join(@path, filename)
|
77
79
|
end
|
78
80
|
|
81
|
+
def rm_r(filename, force: false)
|
82
|
+
FileUtils.rm_r File.join(@path, filename). force: force
|
83
|
+
end
|
84
|
+
|
85
|
+
# recently updated
|
86
|
+
#
|
87
|
+
def ru(path)
|
88
|
+
DirToXML.new(path, recursive: false, verbose: false).latest
|
89
|
+
end
|
90
|
+
|
91
|
+
# recently updated; checks subdirectories recursively
|
92
|
+
#
|
93
|
+
def ru_r(path)
|
94
|
+
DirToXML.new(path, recursive: true, verbose: false).latest
|
95
|
+
end
|
96
|
+
|
79
97
|
def stop()
|
80
98
|
puts 'stopping DFS service ...'
|
81
99
|
DRb.stop_service
|
82
100
|
'connection closed'
|
83
101
|
end
|
84
102
|
|
103
|
+
def touch(filename, mtime: Time.now)
|
104
|
+
FileUtils.touch File.join(@path, filename), mtime: mtime
|
105
|
+
end
|
106
|
+
|
85
107
|
def write(filename, s)
|
86
108
|
File.write File.join(@path, filename), s
|
87
109
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
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.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,8 +35,28 @@ cert_chain:
|
|
35
35
|
NN/dgV7x5FeaVb48TfoueqzxcT0Ga1Lhb/XQIX1yRPpvuBHlVeLpNByFHEf5U1Z0
|
36
36
|
8KciEAIqvYPTLfwcYW9z60vK
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2022-
|
39
|
-
dependencies:
|
38
|
+
date: 2022-02-10 00:00:00.000000000 Z
|
39
|
+
dependencies:
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: dir-to-xml
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '1.1'
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: 1.1.2
|
50
|
+
type: :runtime
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - "~>"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '1.1'
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: 1.1.2
|
40
60
|
description:
|
41
61
|
email: digital.robertson@gmail.com
|
42
62
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|