drb_fileclient 0.4.2 → 0.4.3

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: f07f8b9d2f18919f368565133d3663baabf745cecf413f46deaf71a139b9637c
4
- data.tar.gz: b75a6263ef07725cdbc676ecf9597192f3761119b23ebace0c10f4c31046dd66
3
+ metadata.gz: 7791032610fc48fbc43c098cfb0c008d1c6e542fd3f3ef1ccda1ba64a0b4befc
4
+ data.tar.gz: c3f863c1476eb6ac680301ec2f896711ba3bb2c9a58414569a282596c53c0773
5
5
  SHA512:
6
- metadata.gz: 90d3ea8cbd06e091a310a208f1bf8a2c4aa843f44f40c2c28d197bdab3da2c29c3f36743e759456b7ad371032fe95b26e3f5fceac7b44700d816d5a680850ce6
7
- data.tar.gz: f030cef9d5ff09292707acd11a5d576ebe38bc273a1dcccc1ea05094f24dd906dc5086b11df6146e51ba12e6b6755ae1a23cc8064037b6836a428d54b5e6d155
6
+ metadata.gz: 4aa52bb2efab158d0accaff0081dfe6513b593be515b069952c60b4621151d6607c62f57b3ea7549afbeb99413402ea23a47c8dfc42728ef286b72a661471f54
7
+ data.tar.gz: aa37deba65cc9b8f7db9e98988244d137d52bd71829a812d8ce53548cfcf0d6491589ae674edfdd6379082a94bf0679bb4c0eb2e523e5da04f877c2a16a37431
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -48,13 +48,31 @@ class DRbFileClient
48
48
  return FileUtils.cp raw_path, raw_path2
49
49
  end
50
50
 
51
- path, path2 = if raw_path =~ /^dfs:\/\// then
52
- [parse_path(raw_path), parse_path(raw_path2)]
51
+ if raw_path =~ /^dfs:\/\// then
52
+
53
+ if raw_path[/^dfs:\/\/([^\/]+)/] == raw_path2[/^dfs:\/\/([^\/]+)/] then
54
+
55
+ _, path = parse_path(raw_path)
56
+ @file, path2 = parse_path(raw_path2)
57
+ @file.cp path, path
58
+
59
+ else
60
+
61
+ @file, path = parse_path(raw_path)
62
+ file2, path2 = parse_path(raw_path2)
63
+ content = @file.read path
64
+
65
+ file2.write path2, content
66
+
67
+ end
68
+
53
69
  else
54
- [File.join(@directory, raw_path), File.join(@directory, raw_path2)]
70
+
71
+ @file.cp File.join(@directory, raw_path),
72
+ File.join(@directory, raw_path2)
73
+
55
74
  end
56
75
 
57
- @file.cp path, path2
58
76
  end
59
77
 
60
78
  def exists?(filename=@filename)
@@ -211,8 +229,8 @@ class DRbFileClient
211
229
  host = filename[/(?<=^dfs:\/\/)[^\/:]+/]
212
230
  port = filename[/(?<=^dfs:\/\/)[^:]+:(\d+)/,1] || '61010'
213
231
 
214
- @file = DRbObject.new nil, "druby://#{host}:#{port}"
215
- filename[/(?<=^dfs:\/\/)[^\/]+\/(.*)/,1]
232
+ file_server = DRbObject.new nil, "druby://#{host}:#{port}"
233
+ [file_server, filename[/(?<=^dfs:\/\/)[^\/]+\/(.*)/,1]]
216
234
 
217
235
  end
218
236
 
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.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -30,8 +30,28 @@ cert_chain:
30
30
  2aIZ9lf6/AT4LP07t9jB5oYLHlr2nBLIqtPXdJvg5RKKr79CQVmpJ5LCTjwTg9h+
31
31
  g1Q=
32
32
  -----END CERTIFICATE-----
33
- date: 2018-08-21 00:00:00.000000000 Z
34
- dependencies: []
33
+ date: 2018-08-23 00:00:00.000000000 Z
34
+ dependencies:
35
+ - !ruby/object:Gem::Dependency
36
+ name: zip
37
+ requirement: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '2.0'
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: 2.0.2
45
+ type: :runtime
46
+ prerelease: false
47
+ version_requirements: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - "~>"
50
+ - !ruby/object:Gem::Version
51
+ version: '2.0'
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 2.0.2
35
55
  description:
36
56
  email: james@jamesrobertson.eu
37
57
  executables: []
metadata.gz.sig CHANGED
Binary file