drb_fileserver 0.3.2 → 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/lib/drb_fileserver.rb +23 -3
- data.tar.gz.sig +0 -0
- metadata +24 -5
- 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: 7fecb53595b579a11841f4ba815db371ab0cd6e9f46f21443b08dc8177e63771
|
4
|
+
data.tar.gz: 42deedaa333c2d919574a77376184ea5fe043a410887f48bb27d0c8312646b4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c2063a946ad0f3d009ac277fa505bcee8179a475185d6affd5141c7345b7fc8af7f5473cabc483e4b43cad1a3d01346fec1893448ec406e31d469c86d3f03c3
|
7
|
+
data.tar.gz: 932da5f02b8a2ebe7618806fabbdf279c37f6866a5a6295fee02030be110fba4f58682fa1e8cdd4ac20852b333c5300c394d9397622ee54cf37570d9534dce72
|
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)
|
@@ -80,6 +78,28 @@ class DRbFileServer
|
|
80
78
|
FileUtils.rm File.join(@path, filename)
|
81
79
|
end
|
82
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
|
+
found = DirToXML.new(File.join(@path, path), recursive: false,
|
89
|
+
verbose: false).latest
|
90
|
+
found.sub(/^#{@path}/,'') if found
|
91
|
+
end
|
92
|
+
|
93
|
+
# recently updated; checks subdirectories recursively
|
94
|
+
#
|
95
|
+
def ru_r(path)
|
96
|
+
|
97
|
+
found = DirToXML.new(File.join(@path, path), recursive: true,
|
98
|
+
verbose: false).latest
|
99
|
+
found.sub(/^#{@path}/,'') if found
|
100
|
+
|
101
|
+
end
|
102
|
+
|
83
103
|
def stop()
|
84
104
|
puts 'stopping DFS service ...'
|
85
105
|
DRb.stop_service
|
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.2
|
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-02-
|
39
|
-
dependencies:
|
38
|
+
date: 2022-02-15 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.3
|
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.3
|
40
60
|
description:
|
41
61
|
email: digital.robertson@gmail.com
|
42
62
|
executables: []
|
@@ -63,8 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
63
83
|
- !ruby/object:Gem::Version
|
64
84
|
version: '0'
|
65
85
|
requirements: []
|
66
|
-
|
67
|
-
rubygems_version: 2.7.10
|
86
|
+
rubygems_version: 3.2.22
|
68
87
|
signing_key:
|
69
88
|
specification_version: 4
|
70
89
|
summary: A DRb server to read or write local files.
|
metadata.gz.sig
CHANGED
Binary file
|