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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3edd747165f0606765c30d7248d38fd9ec4cc520
4
- data.tar.gz: 828bd050102f0b1d226fac87473395efccb9b130
3
+ metadata.gz: f9f21aea99e5a4becaa324f02f96860a64ab72ed
4
+ data.tar.gz: 986f22c52ae6950a632b5ab171ee4fd3f022ec67
5
5
  SHA512:
6
- metadata.gz: 32692e555d3bd5b498e879587bc7631904f83b7aeb6a4226edae08b0f314f258eca5e1b7e9dd9730ab22438cacd8e811f74cef4f27798c345933b4a0ff726124
7
- data.tar.gz: 553bceb158a5d5654dbc436ebabc12bff98d9c86f789df060eb98e9371fa8fbe75a84a17807d5c31a7bd938dad440d96a3d4174ef9c1c9b0c2a97c08b79a39e1
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 (entry = zio.get_next_entry)
12
+ while entry = zio.get_next_entry
13
13
  entry_filename = File.join(dir, entry.name)
14
- FileUtils.mkdir_p File.dirname(entry_filename)
15
- File.open(entry_filename, "wb") do |f|
16
- f.write zio.read
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
@@ -1,3 +1,3 @@
1
1
  module Epdiff
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
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.1
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-25 00:00:00.000000000 Z
11
+ date: 2013-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip