drb_fileclient 0.6.3 → 0.7.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11e459b03b12daa5f495705cfe50f05e054c273a31fc1e6f71ba919fc24070b3
4
- data.tar.gz: 6b38f58bbdbff1b4da1129f70087cb2c7f60454d9ad4a7b9d44300a5a93eaa17
3
+ metadata.gz: d66acaefb595fe166f98c929cf925bc68481c16704e755fede8678154febd362
4
+ data.tar.gz: 559b0980b0351348caa2637918e397b8f6cdbe4545549ce67c2740fac56f825f
5
5
  SHA512:
6
- metadata.gz: 21558c01a3e3d3bbfa7e8c5d409d36d8575c844607a3904189e02554a24cc8c5c887d5663c3677399d2ddca44dae17b29f58ec3eac934b6dd22939db8fcdce56
7
- data.tar.gz: 0eb1319c6eead463b8ada4b4cf45b29bb0fb6a3b5ac0121d3d7261b30a162887d1f8f96e32c0c7f6a8d69a81db7690628b8c60f48c6c6c7a0ea8b4345821e2eb
6
+ metadata.gz: a3f9bddb2678b221a0fe668d849f4baf5cc2524c0335ced4310478fee4122fdf33e8985f3fb812edebf6f144d1f69b8d2c6a0096282fb9322db4f36c8700afa0
7
+ data.tar.gz: a68b5f2219c1003f67e5d9829a917e761cc2f9ef300fae11e3221d3ea2ffed9226e40082f07a77f62ac9f610f3cfc0a1cbc8b5585e840a6bd63b26205a642e9b
checksums.yaml.gz.sig CHANGED
Binary file
@@ -5,6 +5,9 @@
5
5
  require 'drb'
6
6
  require 'zip'
7
7
  require 'c32'
8
+ # Commented out to avoid bug with RXFHelper constants
9
+ #require 'dir-to-xml'
10
+
8
11
 
9
12
 
10
13
  class DRbFileClient
@@ -269,6 +272,39 @@ class DRbFileClient
269
272
 
270
273
  end
271
274
 
275
+ def ru(path)
276
+
277
+ return DirToXML.new(path, verbose: false).latest unless @directory \
278
+ or path =~ /^dfs:\/\//
279
+
280
+ if path =~ /^dfs:\/\// then
281
+ @file, path2, addr = parse_path(path)
282
+ else
283
+ path2 = File.join(@directory, path)
284
+ end
285
+
286
+ found = @file.ru path2
287
+ return (addr + found) if found and addr
288
+
289
+ end
290
+
291
+ def ru_r(path)
292
+
293
+ unless @directory or path =~ /^dfs:\/\// then
294
+ return DirToXML.new(path, recursive: true, verbose: false).latest
295
+ end
296
+
297
+ if path =~ /^dfs:\/\// then
298
+ @file, path2, addr = parse_path(path)
299
+ else
300
+ path2 = File.join(@directory, path)
301
+ end
302
+
303
+ found = @file.ru_r path2
304
+ return (addr + found) if found and addr
305
+
306
+ end
307
+
272
308
  def touch(s, mtime: Time.now)
273
309
 
274
310
  unless @directory or s =~ /^dfs:\/\// then
@@ -335,7 +371,7 @@ class DRbFileClient
335
371
  port = filename[/(?<=^dfs:\/\/)[^:]+:(\d+)/,1] || '61010'
336
372
 
337
373
  file_server = DRbObject.new nil, "druby://#{host || @host}:#{port}"
338
- [file_server, filename[/(?<=^dfs:\/\/)[^\/]+\/(.*)/,1]]
374
+ [file_server, filename[/(?<=^dfs:\/\/)[^\/]+\/(.*)/,1], ("dfs://%s:%s" % [host, port])]
339
375
 
340
376
  end
341
377
 
@@ -363,6 +399,9 @@ class DfsFile
363
399
  @client.rm_r(filename, force: force)
364
400
  end
365
401
 
402
+ def self.ru(path) @client.ru(path) end
403
+ def self.ru_r(path) @client.ru_r(path) end
404
+
366
405
  def self.touch(filename, mtime: Time.now)
367
406
  @client.touch(filename, mtime: mtime)
368
407
  end
data.tar.gz.sig CHANGED
Binary file
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.6.3
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  FGcgjmmz5fOIqq2sBxk6JW1yo2G43yIUzymWOYKT2Jh6RR0Gg3z66wWwYpFpx8yR
36
36
  00JTBNVAgW+s2sLpeBtyMDbb
37
37
  -----END CERTIFICATE-----
38
- date: 2022-02-09 00:00:00.000000000 Z
38
+ date: 2022-02-15 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: zip
@@ -61,22 +61,22 @@ dependencies:
61
61
  name: c32
62
62
  requirement: !ruby/object:Gem::Requirement
63
63
  requirements:
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- version: 0.3.0
67
64
  - - "~>"
68
65
  - !ruby/object:Gem::Version
69
66
  version: '0.3'
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: 0.3.0
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: 0.3.0
77
74
  - - "~>"
78
75
  - !ruby/object:Gem::Version
79
76
  version: '0.3'
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: 0.3.0
80
80
  description:
81
81
  email: digital.robertson@gmail.com
82
82
  executables: []
@@ -103,8 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
- rubyforge_project:
107
- rubygems_version: 2.7.10
106
+ rubygems_version: 3.2.22
108
107
  signing_key:
109
108
  specification_version: 4
110
109
  summary: Reads or writes files from a remote DRb server. Simple as DfsFile.read or
metadata.gz.sig CHANGED
Binary file