rxfreadwrite 0.2.5 → 0.2.7

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: a413b0dff84c4e2bcbad1dd82fc0050ee3528a90c8ec47cd0cc5c80dec1d61cb
4
- data.tar.gz: 8a348a14dcafca0f419327e67ffe4a2bdbfc684125778726805c45dd64f75cba
3
+ metadata.gz: 105da8f9e3330a77c1c273dc69436ae00f0f6d5542985f6c6e6d5f5406d0e869
4
+ data.tar.gz: f11935bba72bac57e3f0de3239f51daa4df6401ce3e4ac914bcc1b278e67174c
5
5
  SHA512:
6
- metadata.gz: 2f13199d4ac7d9cde364173b822281c80f73445806413c7fd6d2172de1a1bbe2ea5f3e4ce3981305b55f5ee266e397267ca04e0f66b397e5bbb1580275fc4884
7
- data.tar.gz: ecfc56805572a2dd2571c4bdf866effb587b0f85583579ae99a5a7f2009f11b7acfd6572f87255d6b4bbe9b9a1273a72f5b99619b6ddc0efba0bb31fb6396a3a
6
+ metadata.gz: c0cd7c3ea7a12f2229843bac64b36f99c35fbf4d511b42c4b0c62fdc5e48e6459f110a49d770c20b2188fc63d9c766636aacba9f99b271a0c7282795668d247a
7
+ data.tar.gz: 453e21fb3744a626221591773696849eb800ad2613f026f5808c48d2c3e68233f01bf64c40459510ac6911fafb11909a3849b6e22eee55488e3029bf22d0b015
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/rxfreadwrite.rb CHANGED
@@ -40,7 +40,8 @@ module RXFReadWriteModule
40
40
 
41
41
  end
42
42
 
43
- def FileX.exists?(s) RXFReadWrite.exists?(s) end
43
+ def FileX.exist?(s) RXFReadWrite.exist?(s) end
44
+ def FileX.exists?(s) RXFReadWrite.exist?(s) end
44
45
  def FileX.mkdir(s) RXFReadWrite.mkdir(s) end
45
46
  def FileX.mkdir_p(s) RXFReadWrite.mkdir_p(s) end
46
47
  def FileX.pwd() RXFReadWrite.pwd() end
@@ -82,7 +83,7 @@ class RXFReadWrite < RXFReader
82
83
  # of explicitly stating the path each time. e.g. touch 'foo.txt'
83
84
  #
84
85
 
85
- if x[/^file:\/\//] or File.exists?(File.dirname(x)) then
86
+ if x[/^file:\/\//] or File.exist?(File.dirname(x)) then
86
87
 
87
88
  @@fs = :local
88
89
  FileUtils.chdir x
@@ -97,8 +98,8 @@ class RXFReadWrite < RXFReader
97
98
 
98
99
  end
99
100
 
100
- def self.exists?(filename)
101
-
101
+ def self.exist?(filename)
102
+ #puts 'inside readwrite exists?'
102
103
  type = self.filetype(filename)
103
104
 
104
105
  filex = case type
@@ -112,9 +113,13 @@ class RXFReadWrite < RXFReader
112
113
 
113
114
  return nil unless filex
114
115
 
115
- filex.exists? filename
116
+ filex.exist? filename
116
117
 
117
118
  end
119
+
120
+ def self.exists?(filename)
121
+ self.exist?(filename)
122
+ end
118
123
 
119
124
  def self.filetype(x)
120
125
 
@@ -127,7 +132,15 @@ class RXFReadWrite < RXFReader
127
132
  def self.glob(s)
128
133
 
129
134
  if s[/^dfs:\/\//] then
130
- DfsFile.glob(s)
135
+
136
+ basepath = s[/^(dfs:\/\/[^\/]+)/,1]
137
+ pos = s.length - basepath.length
138
+
139
+ DfsFile.glob(s).map do |x|
140
+ pos2 = x =~ /#{s[pos..-1]}/
141
+ basepath + x[pos2..-1]
142
+ end
143
+
131
144
  else
132
145
  Dir.glob(s)
133
146
  end
@@ -136,7 +149,7 @@ class RXFReadWrite < RXFReader
136
149
 
137
150
  def self.mkdir(x)
138
151
 
139
- if x[/^file:\/\//] or File.exists?(File.dirname(x)) then
152
+ if x[/^file:\/\//] or File.exist?(File.dirname(x)) then
140
153
  FileUtils.mkdir x
141
154
  elsif x[/^dfs:\/\//]
142
155
  DfsFile.mkdir x
@@ -236,7 +249,7 @@ class RXFReadWrite < RXFReader
236
249
 
237
250
  else
238
251
 
239
- if DfsFile.exists?(File.dirname(location)) then
252
+ if DfsFile.exist?(File.dirname(location)) then
240
253
  DfsFile.write location, s
241
254
  else
242
255
  File.write(location, s)
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rxfreadwrite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  gnYmJHVhKvNaFwL4ryulhkA+n8o3Ve6Kzo/AGlO2+Ge6H0bqIUbS8UisqDa7IwlY
36
36
  tvleW582+lzMrpAfWdGb4VFX
37
37
  -----END CERTIFICATE-----
38
- date: 2022-02-28 00:00:00.000000000 Z
38
+ date: 2023-01-19 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: rxfreader
@@ -43,20 +43,20 @@ dependencies:
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0.2'
46
+ version: '0.3'
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 0.2.1
49
+ version: 0.3.3
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - "~>"
55
55
  - !ruby/object:Gem::Version
56
- version: '0.2'
56
+ version: '0.3'
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: 0.2.1
59
+ version: 0.3.3
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: drb_fileclient-readwrite
62
62
  requirement: !ruby/object:Gem::Requirement
@@ -66,7 +66,7 @@ dependencies:
66
66
  version: '0.1'
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: 0.1.4
69
+ version: 0.1.6
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '0.1'
77
77
  - - ">="
78
78
  - !ruby/object:Gem::Version
79
- version: 0.1.4
79
+ version: 0.1.6
80
80
  description:
81
81
  email: digital.robertson@gmail.com
82
82
  executables: []
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
- rubygems_version: 3.2.22
106
+ rubygems_version: 3.4.4
107
107
  signing_key:
108
108
  specification_version: 4
109
109
  summary: Read and write files from remote locations (using the DFS protocol) as well
metadata.gz.sig CHANGED
Binary file