multi_zip 0.1.6 → 0.1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/CHANGELOG.md +4 -0
- data/Gemfile +7 -1
- data/lib/multi_zip/backend/archive_zip.rb +4 -4
- data/lib/multi_zip/backend/cli/info_zip.rb +4 -4
- data/lib/multi_zip/backend/zipruby.rb +4 -4
- data/lib/multi_zip/version.rb +1 -1
- data/spec/backend_shared_example.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43c45cf26b23aca7ac4e0b1c7dc5a32c0e378818
|
4
|
+
data.tar.gz: 7493aa2e557ba6384d99d3a2329727ab61fdc12c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fff3a6a79913309ab09aabbd7b1a90dd88d7aa5ceccc47d0c1afd3e2fde7d4507658b5775c54c0cd9e9b5aa60de5187219b23bbe4b73b24dfdb8f87f2235ea7
|
7
|
+
data.tar.gz: 02c871901c57a50c789309a04e477766749d4fcdb9b2d2a00f178bbe78c4e2d8c6366bd41ae4dd10a882a2dd4e8337ce222f8e987159052a237e66c4daa6009c
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -10,7 +10,13 @@ end
|
|
10
10
|
|
11
11
|
# rubyzip requires ruby >= 1.9.2
|
12
12
|
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("1.9.2")
|
13
|
-
|
13
|
+
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.0.0")
|
14
|
+
# rubyzip 1.2.1 drops support for 1.9.3:
|
15
|
+
# https://github.com/rubyzip/rubyzip/pull/256#issuecomment-155860478
|
16
|
+
gem 'rubyzip', '1.2.0', :require => nil, :platforms => :ruby
|
17
|
+
else
|
18
|
+
gem 'rubyzip', '~> 1.2.1', :require => nil, :platforms => :ruby
|
19
|
+
end
|
14
20
|
gem 'zip-zip', '~>0.3', :require => nil, :platforms => :ruby
|
15
21
|
end
|
16
22
|
|
@@ -103,10 +103,10 @@ module MultiZip::Backend::ArchiveZip
|
|
103
103
|
member = zip.find{|m| m.zip_path == member_path}
|
104
104
|
if member
|
105
105
|
return {
|
106
|
-
path
|
107
|
-
size
|
108
|
-
type
|
109
|
-
original
|
106
|
+
:path => member.zip_path,
|
107
|
+
:size => member.expected_data_descriptor.uncompressed_size.to_i,
|
108
|
+
:type => member.ftype,
|
109
|
+
:original => member
|
110
110
|
}
|
111
111
|
else
|
112
112
|
zip.close
|
@@ -69,10 +69,10 @@ module MultiZip::Backend::Zipruby
|
|
69
69
|
member_stats = zip.get_stat(member_location)
|
70
70
|
|
71
71
|
{
|
72
|
-
path
|
73
|
-
size
|
74
|
-
type
|
75
|
-
original
|
72
|
+
:path => member_stats.name,
|
73
|
+
:size => member_stats.size.to_i,
|
74
|
+
:type => member_stats.directory? ? :directory : :file,
|
75
|
+
:original => member_stats
|
76
76
|
}
|
77
77
|
end
|
78
78
|
end
|
data/lib/multi_zip/version.rb
CHANGED
@@ -207,9 +207,9 @@ shared_examples 'zip backend' do |backend_name|
|
|
207
207
|
info = subject.member_info(member_file)
|
208
208
|
expect(info).to include(
|
209
209
|
{
|
210
|
-
path
|
211
|
-
size
|
212
|
-
type
|
210
|
+
:path => member_file,
|
211
|
+
:size => archive_member_size(member_file),
|
212
|
+
:type => :file
|
213
213
|
}
|
214
214
|
)
|
215
215
|
|
@@ -228,9 +228,9 @@ shared_examples 'zip backend' do |backend_name|
|
|
228
228
|
subject.member_info(archive_member_directories.first)
|
229
229
|
).to include(
|
230
230
|
{
|
231
|
-
path
|
232
|
-
size
|
233
|
-
type
|
231
|
+
:path => archive_member_directories.first,
|
232
|
+
:size => archive_member_size(archive_member_directories.first).to_i,
|
233
|
+
:type => :directory
|
234
234
|
}
|
235
235
|
)
|
236
236
|
end
|