rxfhelper 1.2.4 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b78603e8153b7dea1846f2eb4d0ea043f57b57482884427b6aace2084bbaf3e
4
- data.tar.gz: 587c9eaacf707615a39dbad35b2710e90a1ca4210e9b9ec0fa10ccaddb32f23c
3
+ metadata.gz: c09acbdad0836e95a7a30ff0e49ace74787f57a3c910264779e012e34741288a
4
+ data.tar.gz: 0fff150b1792ab38c2f288b1301547b3d43eae5159fe040ba28c35e13b4737a0
5
5
  SHA512:
6
- metadata.gz: 1dda34bd5be25db3997aad0e216c16f96de4634079d595b58a0856b64d731040e51aae82eaa159b43f27980170dcb99244ca3a90e487141e1963858a54f458d7
7
- data.tar.gz: 40e54dc7853bd4bbe6745ede8dd815aa8eb5f2f41be39f265d4e47ee1a9cdf55664abf8ea30deb86325487b2f2c1b408842f873053f7ffdc025fc02e4b8c99f3
6
+ metadata.gz: 39c5e6b76b33f7337adb7d8e2e023c7c94d5d0311094dd9bb3daa4b35d4124c5a9e9fc6acbbe6e337cd2598e009570861becc89d6c44ee321baa29bff2ef1938
7
+ data.tar.gz: d1b13799b9c20de200c9ccfaeda2110d485b2a747d3d627446674d6ac2e3f9c79270b1be1f6e2f8a018c6cf24e0ea5ee9f83eaf885f5850ef1d9d22d593a60fc
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/rxfhelper.rb CHANGED
@@ -9,6 +9,7 @@ require 'mymedia_ftp'
9
9
  require 'drb_fileclient'
10
10
  require 'drb_reg_client'
11
11
  require 'remote_dwsregistry'
12
+ require 'dir-to-xml'
12
13
 
13
14
 
14
15
 
@@ -111,6 +112,13 @@ module RXFHelperModule
111
112
  def self.read(x) RXFHelper.read(x).first end
112
113
  def self.rm(s) RXFHelper.rm(s) end
113
114
 
115
+ def self.rm_r(s, force: false)
116
+ RXFHelper.rm_r(s, force: force)
117
+ end
118
+
119
+ def self.ru(s) RXFHelper.ru(s) end
120
+ def self.ru_r(s) RXFHelper.ru_r(s) end
121
+
114
122
  def self.touch(s, mtime: Time.now)
115
123
  RXFHelper.touch(s, mtime: mtime)
116
124
  end
@@ -403,7 +411,84 @@ class RXFHelper
403
411
  when 'ftp'
404
412
  MyMediaFTP.rm filename
405
413
  else
406
- FileUtils.rm
414
+
415
+ if File.basename(filename) =~ /\*/ then
416
+
417
+ Dir.glob(filename).each do |file|
418
+
419
+ begin
420
+ FileUtils.rm file
421
+ rescue
422
+ puts ('RXFHelper#rm: ' + file + ' is a Directory').warning
423
+ end
424
+
425
+ end
426
+
427
+ else
428
+ FileUtils.rm filename
429
+ end
430
+
431
+ end
432
+
433
+ end
434
+
435
+ def self.rm_r(filename, force: false)
436
+
437
+ case filename[/^\w+(?=:\/\/)/]
438
+ when 'dfs'
439
+ DfsFile.rm_r filename, force: force
440
+ #when 'ftp'
441
+ # MyMediaFTP.rm filename
442
+ else
443
+
444
+ if File.basename(filename) =~ /\*/ then
445
+
446
+ Dir.glob(filename).each do |file|
447
+
448
+ begin
449
+ FileUtils.rm_r file, force: force
450
+ rescue
451
+ puts ('RXFHelper#rm: ' + file + ' is a Directory').warning
452
+ end
453
+
454
+ end
455
+
456
+ else
457
+ FileUtils.rm_r filename, force: force
458
+ end
459
+
460
+ end
461
+
462
+ end
463
+
464
+ # recently_updated
465
+ #
466
+ def self.ru(path='.')
467
+
468
+ case path[/^\w+(?=:\/\/)/]
469
+ when 'dfs'
470
+ DfsFile.ru path
471
+
472
+ else
473
+
474
+ DirToXML.new(path, recursive: false, verbose: false).latest
475
+
476
+ end
477
+
478
+ end
479
+
480
+ # recently updated recursively check directories
481
+ #
482
+ def self.ru_r(path='.')
483
+
484
+ case path[/^\w+(?=:\/\/)/]
485
+ when 'dfs'
486
+ DfsFile.ru_r path
487
+
488
+ else
489
+
490
+ DirToXML.new(path, recursive: true, verbose: false).latest
491
+
407
492
  end
408
493
 
409
494
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rxfhelper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  MrrH8cS6bqJRPQqEL1FsPmXfQpp86RvPSr0WqNSRnYEUCmqL0l2pYrXdPAyBLcji
36
36
  X1jPyhH0sl/QdPdaUnsigze+
37
37
  -----END CERTIFICATE-----
38
- date: 2022-02-08 00:00:00.000000000 Z
38
+ date: 2022-02-11 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: rsc
@@ -57,26 +57,6 @@ dependencies:
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
59
  version: 0.4.5
60
- - !ruby/object:Gem::Dependency
61
- name: drb_fileclient
62
- requirement: !ruby/object:Gem::Requirement
63
- requirements:
64
- - - "~>"
65
- - !ruby/object:Gem::Version
66
- version: '0.6'
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- version: 0.6.1
70
- type: :runtime
71
- prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - "~>"
75
- - !ruby/object:Gem::Version
76
- version: '0.6'
77
- - - ">="
78
- - !ruby/object:Gem::Version
79
- version: 0.6.1
80
60
  - !ruby/object:Gem::Dependency
81
61
  name: mymedia_ftp
82
62
  requirement: !ruby/object:Gem::Requirement
@@ -176,7 +156,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
176
156
  requirements:
177
157
  - - ">="
178
158
  - !ruby/object:Gem::Version
179
- version: 2.1.2
159
+ version: 3.0.2
180
160
  required_rubygems_version: !ruby/object:Gem::Requirement
181
161
  requirements:
182
162
  - - ">="
metadata.gz.sig CHANGED
Binary file