zip_dir 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zip_dir/unzipper.rb +8 -1
- data/lib/zip_dir/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1dc7143713cd26a4cbaf2ca5995e9bc7cf032cea
|
4
|
+
data.tar.gz: 15faeef4d8857ed27ef8096053be6b780cdce1cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e466840b0cbdcb230a3ba12cb37c43f6e1677e83b13358d95e940e36e39326ecbcbbbafcf2683cb78921fb4a7b38f9053569164b3baa722303f7bb7a6ef93b6a
|
7
|
+
data.tar.gz: a8780a73ce554571ed041ead65a875922de9fbd0326b0bafcc224d902e0ab39b091c15f5820054ba9b0b3e449dc48f58314a87e90ff1232744045179d9d397bb
|
data/lib/zip_dir/unzipper.rb
CHANGED
@@ -23,10 +23,17 @@ module ZipDir
|
|
23
23
|
::Zip::File.open(zip_path) do |zip_file|
|
24
24
|
zip_file.each do |entry|
|
25
25
|
file_path = "#{@unzip_path}/#{entry.name}"
|
26
|
+
|
27
|
+
# Fixes:
|
28
|
+
# Errno::ENOENT:
|
29
|
+
# No such file or directory @ rb_sysopen - /var/folders/6c/s4snqy051jqdpbjw7f7tsn940000gn/T/d20160209-56123-1o14n5n/Niveaux/Fondations.png
|
30
|
+
dir_path = File.dirname(file_path).to_s
|
31
|
+
FileUtils.mkdir_p dir_path unless File.exists?(dir_path)
|
32
|
+
|
26
33
|
entry.extract(file_path) unless File.exists?(file_path)
|
27
34
|
end
|
28
35
|
end
|
29
36
|
@unzipped = true
|
30
37
|
end
|
31
38
|
end
|
32
|
-
end
|
39
|
+
end
|
data/lib/zip_dir/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zip_dir
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Chung
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
66
|
version: '0'
|
67
67
|
requirements: []
|
68
68
|
rubyforge_project:
|
69
|
-
rubygems_version: 2.
|
69
|
+
rubygems_version: 2.5.1
|
70
70
|
signing_key:
|
71
71
|
specification_version: 4
|
72
72
|
summary: Zip and unzip directories.
|