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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/drb_fileclient.rb +24 -6
- metadata +23 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7791032610fc48fbc43c098cfb0c008d1c6e542fd3f3ef1ccda1ba64a0b4befc
|
4
|
+
data.tar.gz: c3f863c1476eb6ac680301ec2f896711ba3bb2c9a58414569a282596c53c0773
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4aa52bb2efab158d0accaff0081dfe6513b593be515b069952c60b4621151d6607c62f57b3ea7549afbeb99413402ea23a47c8dfc42728ef286b72a661471f54
|
7
|
+
data.tar.gz: aa37deba65cc9b8f7db9e98988244d137d52bd71829a812d8ce53548cfcf0d6491589ae674edfdd6379082a94bf0679bb4c0eb2e523e5da04f877c2a16a37431
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/drb_fileclient.rb
CHANGED
@@ -48,13 +48,31 @@ class DRbFileClient
|
|
48
48
|
return FileUtils.cp raw_path, raw_path2
|
49
49
|
end
|
50
50
|
|
51
|
-
|
52
|
-
|
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
|
-
|
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
|
-
|
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.
|
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-
|
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
|