epdiff 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/epdiff.rb +8 -4
- data/lib/epdiff/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9f21aea99e5a4becaa324f02f96860a64ab72ed
|
4
|
+
data.tar.gz: 986f22c52ae6950a632b5ab171ee4fd3f022ec67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 447053f688a78686966ccd6e299982a823a3e0553e0078284c44605eb343f74b63c5d4bc1b9fbe41f46e9ffc209e9b000c2171f8f94ca67bcad527fefa9311a0
|
7
|
+
data.tar.gz: 7fd7587b0829fdbc55881451facbbe815f8f0ab9b83019c8c65209b621e896bd9bdbd907cb81c791e5c12e46abecc93c8a41a9dcfc5f0e49b070942756a72e8b
|
data/lib/epdiff.rb
CHANGED
@@ -9,11 +9,15 @@ module Epdiff
|
|
9
9
|
|
10
10
|
def unzip(filename, dir)
|
11
11
|
Zip::InputStream.open(filename) do |zio|
|
12
|
-
while
|
12
|
+
while entry = zio.get_next_entry
|
13
13
|
entry_filename = File.join(dir, entry.name)
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
if entry.name_is_directory?
|
15
|
+
FileUtils.mkdir_p File.dirname(entry_filename)
|
16
|
+
elsif entry.file?
|
17
|
+
FileUtils.mkdir_p File.dirname(entry_filename)
|
18
|
+
File.open(entry_filename, "wb") do |f|
|
19
|
+
f.write zio.read
|
20
|
+
end
|
17
21
|
end
|
18
22
|
end
|
19
23
|
end
|
data/lib/epdiff/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: epdiff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- takahashim
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|