drb_fileclient-readwrite 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3e4060c863053e5bbc2fcbdb93448e88a9fcc456aca86d449e292a1f6eafed80
4
+ data.tar.gz: 7f9bc1de7c42157df9317cebbaf7d25dc84e89fa2d99a839dc722c2d4ffbac64
5
+ SHA512:
6
+ metadata.gz: 00c5e0522c6229a0704e0919624b124d2ac23083559ac87e2902b43fa01a0aeb43ee5fb6e0641294d076b7a3ac7f312ce42a4244d87e8f256999ef9d663e41e1
7
+ data.tar.gz: e53dea186b47578a7e2a047dc4a65d574d5d7c62e85561fe557e6b3ff7f4853eafc66f47dd5de0c4b895955112acd9d7fa76bb12ffcb02481cb13060357a3ab9
checksums.yaml.gz.sig ADDED
Binary file
@@ -0,0 +1,128 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # file: drb_fileclient-readwrite.rb
4
+
5
+ require 'drb_fileclient-reader'
6
+
7
+
8
+ class DRbFileClientReadWrite < DRbFileClientReader
9
+ using ColouredText
10
+
11
+ def glob(s)
12
+
13
+ if s =~ /^dfs:\/\// then
14
+ @file, s2 = parse_path(s)
15
+ else
16
+ s2 = File.join(@directory, s)
17
+ end
18
+
19
+ @file.glob s2
20
+
21
+ end
22
+
23
+ def mkdir(name)
24
+
25
+ return FileUtils.mkdir name unless @directory or name =~ /^dfs:\/\//
26
+
27
+ @file, path = parse_path(name)
28
+ @file.mkdir path
29
+ end
30
+
31
+ def mkdir_p(raw_path)
32
+
33
+ unless @directory or raw_path =~ /^dfs:\/\// then
34
+ return FileUtils.mkdir_p raw_path
35
+ end
36
+
37
+ if raw_path =~ /^dfs:\/\// then
38
+ @file, filepath = parse_path(raw_path)
39
+ else
40
+ filepath = File.join(@directory, raw_path)
41
+ end
42
+
43
+ @file.mkdir_p filepath
44
+ end
45
+
46
+ def rm(path)
47
+
48
+ return FileUtils.rm path unless @directory or path =~ /^dfs:\/\//
49
+
50
+ if path =~ /^dfs:\/\// then
51
+ @file, path2 = parse_path( path)
52
+ else
53
+ path2 = File.join(@directory, path)
54
+ end
55
+
56
+ @file.rm path2
57
+
58
+ end
59
+
60
+ def rm_r(path, force: false)
61
+
62
+ unless @directory or path =~ /^dfs:\/\// then
63
+ return FileUtils.rm_r(path, force: force)
64
+ end
65
+
66
+ if path =~ /^dfs:\/\// then
67
+ @file, path2 = parse_path( path)
68
+ else
69
+ path2 = File.join(@directory, path)
70
+ end
71
+
72
+ @file.rm_r(path2, force: force)
73
+
74
+ end
75
+
76
+ def touch(s, mtime: Time.now)
77
+
78
+ unless @directory or s =~ /^dfs:\/\// then
79
+ return FileUtils.touch(s, mtime: mtime)
80
+ end
81
+
82
+ if s =~ /^dfs:\/\// then
83
+ @file, s2 = parse_path(s)
84
+ else
85
+ s2 = File.join(@directory, s)
86
+ end
87
+
88
+ @file.touch s2, mtime: mtime
89
+
90
+ end
91
+
92
+ def write(filename=@filename, s)
93
+
94
+ return File.write filename, s unless @directory or filename =~ /^dfs:\/\//
95
+
96
+ if filename =~ /^dfs:\/\// then
97
+ @file, path = parse_path(filename)
98
+ else
99
+ path = File.join(@directory, filename)
100
+ end
101
+
102
+ @file.write path, s
103
+
104
+ end
105
+
106
+ end
107
+
108
+
109
+ def DfsFile.glob(s)
110
+ DRbFileClientReadWrite.new.glob(s)
111
+ end
112
+
113
+ def DfsFile.rm(filename)
114
+ DRbFileClientReadWrite.new.rm(filename)
115
+ end
116
+
117
+ def DfsFile.rm_r(filename, force: false)
118
+ DRbFileClientReadWrite.new.rm_r(filename, force: force)
119
+ end
120
+
121
+ def DfsFile.touch(filename, mtime: Time.now)
122
+ DRbFileClientReadWrite.new.touch(filename, mtime: mtime)
123
+ end
124
+
125
+ def DfsFile.write(filename, s)
126
+ DRbFileClientReadWrite.new.write(filename, s)
127
+ end
128
+
data.tar.gz.sig ADDED
Binary file
metadata ADDED
@@ -0,0 +1,90 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: drb_fileclient-readwrite
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - James Robertson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
14
+ YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMjIwMjIyMDAxNDAwWhcN
15
+ MjMwMjIyMDAxNDAwWjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
16
+ cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDmYoRy
17
+ 4h2bE63tME2y/7jV6eDRreRkiMt96vJdV5pKmyiuFt1pJy2ivE+iBcSZK4+l3fJM
18
+ qVRFiwcfD9Dya+10mLITnYdKzr4a4pZmqmmWZ9IQAqLKQ+QrG/19ZDoYQu9wT93V
19
+ r3RaiaZvIAlIO1oK25/XmpphA6PrfHS3C2PZa1xJxHiWfUTQitPSLAvL+Ph8h8xj
20
+ 1x8xi8jC6t0WoYG7sRQAaSpmqTnJCm45J9lpZeOKye9tXyFHyxJRczqiQjBrIXCs
21
+ GQE9ofhbtz4K6IRYkUwCuzf2iOrrWn7R9C5ZiTg6pAjAufzzfG13lO5C6OgQpqCa
22
+ D8FfXT8EbofhqD2xkRvJ5oXE2M2GRdYODI1U65n1ibZK6HNKleQXbPEXbTe901DI
23
+ dmyJxRy41tRcxgtUPsFaGP+nH9h9F2ZdD/JMvkGiHHz1TM+i05NuNQBY6qiuQ35o
24
+ LPAAD2IA0MXFyKEVVo+YXE9AIgHSqPYclbUJcoh1irF7cFYVanxPz7+e8fECAwEA
25
+ AaOBijCBhzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUz4bn0w/R
26
+ wEF/pkfsosGENpaBVWEwJgYDVR0RBB8wHYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0
27
+ c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1hc3RlckBqYW1lc3JvYmVydHNvbi5ldTAN
28
+ BgkqhkiG9w0BAQsFAAOCAYEA3m9GcsDlGewzb4kAPRVoqvxOqrTTe5b3wHY8nQsn
29
+ ISkXbAD6z48bITuozjrjLlgcgrj6EHsHHBSyCqoG1r4Ov2CejQj9+5j/Hjrq65Qp
30
+ 3j3VOOH7UH9LQufgP6glIMZ+AVDAVEhHJN2T9CoDkKa8vS6TVnJpOxUYEvWN/Xvt
31
+ lFRTDw2E4m2oBFlkb3t5oOQavAeoof8K91xEkDSW9+TdW7CBsU55OQlfrEvWaXYS
32
+ 5ABaTTP522vQNgJ2WOK1umtKG35oKY1SFXmpc4vrqA0AyeZOnLmaGER56EYnH/V1
33
+ YHx+uHks0nLSKsDl7vRwzSIhRiLNwePaf8R4dPoZRclur9JGcGIM+6834kRnBm95
34
+ cP9A96AkKcGgjFcXTniMZ389e7O4hACZDKc/eVLiiSsuXLgUVO7ERnYSOZYbZMmq
35
+ ILzVBTpjvSiaWCjFvxvVJFct97WGSbaR2jPvZ03xyAONtWdKkv2yceiyfAMaldSQ
36
+ eftJvciSPh0DHzyI46OGIkLX
37
+ -----END CERTIFICATE-----
38
+ date: 2022-02-22 00:00:00.000000000 Z
39
+ dependencies:
40
+ - !ruby/object:Gem::Dependency
41
+ name: drb_fileclient-reader
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '0.1'
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 0.1.0
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '0.1'
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 0.1.0
60
+ description:
61
+ email: digital.robertson@gmail.com
62
+ executables: []
63
+ extensions: []
64
+ extra_rdoc_files: []
65
+ files:
66
+ - lib/drb_fileclient-readwrite.rb
67
+ homepage: https://github.com/jrobertson/drb_fileclient-readwrite
68
+ licenses:
69
+ - MIT
70
+ metadata: {}
71
+ post_install_message:
72
+ rdoc_options: []
73
+ require_paths:
74
+ - lib
75
+ required_ruby_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ requirements: []
86
+ rubygems_version: 3.2.22
87
+ signing_key:
88
+ specification_version: 4
89
+ summary: A DRb file reader and writer client to access the DRb_fileserver service.
90
+ test_files: []
metadata.gz.sig ADDED
Binary file