drb_fileclient 0.4.3 → 0.4.4

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: 7791032610fc48fbc43c098cfb0c008d1c6e542fd3f3ef1ccda1ba64a0b4befc
4
- data.tar.gz: c3f863c1476eb6ac680301ec2f896711ba3bb2c9a58414569a282596c53c0773
3
+ metadata.gz: aac4c5bf2603750af085ade9036fd20874b0cca8cbfbbb36e51a774c5943cc3f
4
+ data.tar.gz: fb4483969bc3717fa84838f2a636de99c8b97f8e0e56b3736190b7f9a4ec5250
5
5
  SHA512:
6
- metadata.gz: 4aa52bb2efab158d0accaff0081dfe6513b593be515b069952c60b4621151d6607c62f57b3ea7549afbeb99413402ea23a47c8dfc42728ef286b72a661471f54
7
- data.tar.gz: aa37deba65cc9b8f7db9e98988244d137d52bd71829a812d8ce53548cfcf0d6491589ae674edfdd6379082a94bf0679bb4c0eb2e523e5da04f877c2a16a37431
6
+ metadata.gz: f697ca6f319dda244a197c48911f91697b17c7deaf920d54ec03bcbc04ff31ad1236f3e547370d16635baa2ef70eabbce2c10b3767828316bd44a3a4cc1cbad8
7
+ data.tar.gz: 0ae4f1f63619bf461d5e39fa602194f2cbe24c81d742a01ae9c8d91dd17ee8b376fc13a0ec3929b2eb43fc2eb74af63028e72ca39a4021fc24d3a0f85b61c35a
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -26,12 +26,12 @@ class DRbFileClient
26
26
 
27
27
  return Dir.chdir raw_path unless @directory or raw_path =~ /^dfs:\/\//
28
28
 
29
- directory = if raw_path[0] == '/' then
30
- raw_path[1..-1]
29
+ if raw_path[0] == '/' then
30
+ directory = raw_path[1..-1]
31
31
  elsif raw_path =~ /^dfs:\/\//
32
- parse_path(raw_path)
32
+ @file, directory = parse_path(raw_path)
33
33
  else
34
- File.join(@directory, raw_path)
34
+ directory = File.join(@directory, raw_path)
35
35
  end
36
36
 
37
37
  if @file.exists? directory then
@@ -79,11 +79,11 @@ class DRbFileClient
79
79
 
80
80
  return File.exists? filename unless @directory or filename =~ /^dfs:\/\//
81
81
 
82
- filename2 = if filename =~ /^dfs:\/\// then
83
- parse_path(filename)
82
+ if filename =~ /^dfs:\/\// then
83
+ @file, filename2 = parse_path(filename)
84
84
  else
85
85
 
86
- File.join(@directory, filename)
86
+ filename2 = File.join(@directory, filename)
87
87
  end
88
88
 
89
89
  @file.exists?(filename2)
@@ -96,12 +96,12 @@ class DRbFileClient
96
96
 
97
97
  return Dir[raw_path] unless @directory or raw_path =~ /^dfs:\/\//
98
98
 
99
- path = if raw_path[0] == '/' then
100
- raw_path[1..-1]
99
+ if raw_path[0] == '/' then
100
+ path = raw_path[1..-1]
101
101
  elsif raw_path =~ /^dfs:\/\//
102
- parse_path(raw_path)
102
+ @file, path = parse_path(raw_path)
103
103
  else
104
- File.join(@directory, raw_path)
104
+ path = File.join(@directory, raw_path)
105
105
  end
106
106
 
107
107
  @file.ls path
@@ -112,7 +112,7 @@ class DRbFileClient
112
112
 
113
113
  return FileUtils.mkdir name unless @directory or name =~ /^dfs:\/\//
114
114
 
115
- path = parse_path(name)
115
+ @file, path = parse_path(name)
116
116
  @file.mkdir path
117
117
  end
118
118
 
@@ -122,10 +122,10 @@ class DRbFileClient
122
122
  return FileUtils.mkdir_p raw_path
123
123
  end
124
124
 
125
- filepath = if raw_path =~ /^dfs:\/\// then
126
- parse_path(raw_path)
125
+ if raw_path =~ /^dfs:\/\// then
126
+ @file, filepath = parse_path(raw_path)
127
127
  else
128
- File.join(@directory, raw_path)
128
+ filepath = File.join(@directory, raw_path)
129
129
  end
130
130
 
131
131
  @file.mkdir_p filepath
@@ -137,10 +137,12 @@ class DRbFileClient
137
137
  return FileUtils.mv raw_path, raw_path2
138
138
  end
139
139
 
140
- path, path2 = if raw_path =~ /^dfs:\/\// then
141
- [parse_path(raw_path), parse_path(raw_path2)]
140
+ if raw_path =~ /^dfs:\/\// then
141
+ _, path = parse_path(raw_path)
142
+ @file, path2 = parse_path(raw_path2)
142
143
  else
143
- [File.join(@directory, raw_path), File.join(@directory, raw_path2)]
144
+ path = File.join(@directory, raw_path)
145
+ path2 = File.join(@directory, raw_path2)
144
146
  end
145
147
 
146
148
  @file.mv path, path2
@@ -158,10 +160,10 @@ class DRbFileClient
158
160
 
159
161
  return File.read filename, s unless @directory or filename =~ /^dfs:\/\//
160
162
 
161
- path = if filename =~ /^dfs:\/\// then
162
- parse_path(filename)
163
+ if filename =~ /^dfs:\/\// then
164
+ @file, path = parse_path(filename)
163
165
  else
164
- File.join(@directory, filename)
166
+ path = File.join(@directory, filename)
165
167
  end
166
168
 
167
169
  @file.read path
@@ -171,10 +173,10 @@ class DRbFileClient
171
173
 
172
174
  return FileUtils.rm path unless @directory or path =~ /^dfs:\/\//
173
175
 
174
- path2 = if path =~ /^dfs:\/\// then
175
- parse_path( path)
176
+ if path =~ /^dfs:\/\// then
177
+ @file, path2 = parse_path( path)
176
178
  else
177
- File.join(@directory, path)
179
+ path2 = File.join(@directory, path)
178
180
  end
179
181
 
180
182
  @file.rm path2
@@ -185,13 +187,12 @@ class DRbFileClient
185
187
 
186
188
  return File.write filename, s unless @directory or filename =~ /^dfs:\/\//
187
189
 
188
- path = if filename =~ /^dfs:\/\// then
189
- parse_path(filename)
190
+ if filename =~ /^dfs:\/\// then
191
+ @file, path = parse_path(filename)
190
192
  else
191
- File.join(@directory, filename)
193
+ path = File.join(@directory, filename)
192
194
  end
193
195
 
194
-
195
196
  @file.write path, s
196
197
 
197
198
  end
@@ -212,10 +213,10 @@ class DRbFileClient
212
213
 
213
214
  end
214
215
 
215
- filepath = if filename_zip =~ /^dfs:\/\// then
216
- parse_path(filename_zip)
216
+ if filename_zip =~ /^dfs:\/\// then
217
+ @file, filepath = parse_path(filename_zip)
217
218
  else
218
- File.join(@directory, filename_zip)
219
+ filepath = File.join(@directory, filename_zip)
219
220
  end
220
221
 
221
222
  @file.zip filepath, a
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.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file