drb_fileclient 0.3.0 → 0.4.0
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 +3 -3
- data.tar.gz.sig +0 -0
- data/lib/drb_fileclient.rb +26 -0
- metadata +2 -2
- 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: b2701a31776fa19fb41d2d7540dd932d88faf960b21c13cf27cbb545c40d376b
|
4
|
+
data.tar.gz: 1b82c97e9e3475831499972753f8867316df21633002f2599af9a33f0aa0091b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 375f4f0590d3937ab28446ef5968e06b5cb4cb1c36c370e37538eafbea7ed9f93326f28169151185d5fdb7c19f6f49d25f20143d5e42cb89e3267be39f1c0d7c
|
7
|
+
data.tar.gz: eecec313c0369426e52b1f41a1ae68f1f580bffa333a942065e2c2ffc3664eb02f778b5569ad7d14ae0814322bc3d31b5205b03113a22011534c915d75b7a546
|
checksums.yaml.gz.sig
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
;�4����nK-YSB��n5
|
2
|
+
��p��M��:�p��"�PN9#+�����z)�Ư����-1�
|
3
|
+
��a��hK��?��5�w���� �YS���u��8��[��!=�C���Ģ�V�-��kHa�୵�i!�Y�V�aI$����������T�?��lf��I�Z��N>o
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/drb_fileclient.rb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
# file: drb_fileclient.rb
|
4
4
|
|
5
5
|
require 'drb'
|
6
|
+
require 'zip'
|
6
7
|
|
7
8
|
|
8
9
|
class DRbFileClient
|
@@ -155,6 +156,30 @@ class DRbFileClient
|
|
155
156
|
@file.write path, s
|
156
157
|
|
157
158
|
end
|
159
|
+
|
160
|
+
def zip(filename_zip, a)
|
161
|
+
puts '@directory: ' + @directory.inspect
|
162
|
+
unless @directory or filename_zip =~ /^dfs:\/\// then
|
163
|
+
|
164
|
+
Zip::File.open(zipfile_zip, Zip::File::CREATE) do |x|
|
165
|
+
|
166
|
+
a.each do |filename, buffer|
|
167
|
+
x.get_output_stream(filename) {|os| os.write buffer }
|
168
|
+
end
|
169
|
+
|
170
|
+
end
|
171
|
+
|
172
|
+
end
|
173
|
+
|
174
|
+
filepath = if filename_zip =~ /^dfs:\/\// then
|
175
|
+
parse_path(filename_zip)
|
176
|
+
else
|
177
|
+
File.join(@directory, filename_zip)
|
178
|
+
end
|
179
|
+
|
180
|
+
@file.zip filepath, a
|
181
|
+
|
182
|
+
end
|
158
183
|
|
159
184
|
private
|
160
185
|
|
@@ -184,5 +209,6 @@ class DfsFile
|
|
184
209
|
def self.read(filename) @client.read(filename) end
|
185
210
|
def self.rm(filename) @client.rm(filename) end
|
186
211
|
def self.write(filename, s) @client.write(filename, s) end
|
212
|
+
def self.zip(filename, a) @client.zip(filename, a) end
|
187
213
|
|
188
214
|
end
|
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
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
2aIZ9lf6/AT4LP07t9jB5oYLHlr2nBLIqtPXdJvg5RKKr79CQVmpJ5LCTjwTg9h+
|
31
31
|
g1Q=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2018-08-
|
33
|
+
date: 2018-08-14 00:00:00.000000000 Z
|
34
34
|
dependencies: []
|
35
35
|
description:
|
36
36
|
email: james@jamesrobertson.eu
|
metadata.gz.sig
CHANGED
Binary file
|