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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aac348c86f08cf6f20fd37f2f04e125ce315528d121933e443f64245203977be
4
- data.tar.gz: fd32cc6aed4ade30ef24be66b4dc1ff8a479f2bdb08051657f49b40be790524f
3
+ metadata.gz: b2701a31776fa19fb41d2d7540dd932d88faf960b21c13cf27cbb545c40d376b
4
+ data.tar.gz: 1b82c97e9e3475831499972753f8867316df21633002f2599af9a33f0aa0091b
5
5
  SHA512:
6
- metadata.gz: 178d73ea28d13d710cafd3342ff635d46d2bfb7a7ccaec458954f776753e1aedbeb89c851dcc7f16f4c4894c6d79b129f0c876a551da79d2b136dfb1b94b60c3
7
- data.tar.gz: e6732e09f650c4b8ddb25697de21d37c66c5b2ea2a237f9c0ddff90a78b3501ab96c26f1c75e40bdd403f3a037e2c58d8d4269b6bbff36cc0ce1d16bc8ebf30e
6
+ metadata.gz: 375f4f0590d3937ab28446ef5968e06b5cb4cb1c36c370e37538eafbea7ed9f93326f28169151185d5fdb7c19f6f49d25f20143d5e42cb89e3267be39f1c0d7c
7
+ data.tar.gz: eecec313c0369426e52b1f41a1ae68f1f580bffa333a942065e2c2ffc3664eb02f778b5569ad7d14ae0814322bc3d31b5205b03113a22011534c915d75b7a546
@@ -1,3 +1,3 @@
1
- Q,�E�
2
- � �΋f��Fptw�I�K���:`��P�Q��򴖍��nu����Z7 qN�Uw���'�����δ� >�NE��WTh!!}�{1W߮h�% :���wIr��TU����:WPMz�Ҕ��U^�OQ)e!���lo-'�>j�+ �7�$�6,G�~#��>�e��
3
- ��+I6��n 2��􂘁o8Ft-oa=�r�ذ���Р�w0f�Nj?��*Ո�!����jsO�����:���
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�VaI$����������T�?��lf��IZ��N>o
data.tar.gz.sig CHANGED
Binary file
@@ -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.3.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-12 00:00:00.000000000 Z
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