raykit 0.0.459 → 0.0.461
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/raykit/zip.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1955e4631d8d6b8f74ef9209960e15eeb1c5a0f65298580770baa6c194e0f81a
|
4
|
+
data.tar.gz: 249f71291c48f3834d054b22a66fb871d0e1924fd5ef0c4eb281b6551f88c8a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e21696dee8ea2de879beebfea8475fdedd5d99e1570db42675ec62aa7ff54b5fea97b21beac9a0d957751008ac043e494a71ebbd194b1e13a777f01844fd8fdb
|
7
|
+
data.tar.gz: c8d5afb9649b215bf897ab4c5f2ee7705ee997e013e9bc76482fd81116e0cd5ebc07f254ff0b5667b3d9e6e668b47eb5803442ed092779199d053f0244dab0fd
|
data/lib/raykit/zip.rb
CHANGED
@@ -60,5 +60,14 @@ module Raykit
|
|
60
60
|
puts " added " << count.to_s << " files to " << @filename
|
61
61
|
}
|
62
62
|
end
|
63
|
+
|
64
|
+
def self.zip_directory(directory, zipfile_name, overwrite = true)
|
65
|
+
File.delete(zipfile_name) if File.exist?(zipfile_name) && overwrite
|
66
|
+
::Zip::File.open(zipfile_name, ::Zip::File::CREATE) do |zipfile|
|
67
|
+
Dir[File.join(directory, "**", "**")].each do |file|
|
68
|
+
zipfile.add(file.sub(directory + "/", ""), file)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
63
72
|
end
|
64
73
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raykit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.461
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lou Parslow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|