ffi-libarchive 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/ffi-libarchive/reader.rb +1 -1
- data/lib/ffi-libarchive/version.rb +1 -1
- data/test/sets/ts_read.rb +27 -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: cd86d5c024c71eab9c05b65c2a650423acf6e082f09e65167b87a07c2ec9c6d5
|
4
|
+
data.tar.gz: b4ee964dc4caa87255c2f4ca6eedd43e6a962112f9481696ead94314bd7c482f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35e0e854d76bd8d579c2c3626a62474a7bd735df3f30f294068d0864c396d93957d3cba73b0fd4880c9e3035aca45aa31611e5ebdc9b9c73c68be5816b3cdb38
|
7
|
+
data.tar.gz: bb5610e6b77babfb94d535248de078674a5697cfcac3a0d37882da27455c9c7440f404d69127171628ec4ae320182d6ef34bc877a96957545593628545a8457c
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.2
|
@@ -57,7 +57,7 @@ module Archive
|
|
57
57
|
raise ArgumentError, "Expected Archive::Entry as first argument" unless entry.is_a? Entry
|
58
58
|
raise ArgumentError, "Expected Integer as second argument" unless flags.is_a? Integer
|
59
59
|
|
60
|
-
flags
|
60
|
+
flags |= EXTRACT_FFLAGS
|
61
61
|
raise Error, @archive if C.archive_read_extract(archive, entry.entry, flags) != C::OK
|
62
62
|
end
|
63
63
|
|
data/test/sets/ts_read.rb
CHANGED
@@ -91,6 +91,33 @@ class TS_ReadArchive < Test::Unit::TestCase
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
94
|
+
def test_extract_no_additional_flags
|
95
|
+
Dir.mktmpdir do |dir|
|
96
|
+
Archive.read_open_filename("data/test.tar.gz") do |ar|
|
97
|
+
Dir.chdir(dir) do
|
98
|
+
ar.each_entry do |e|
|
99
|
+
ar.extract(e)
|
100
|
+
assert_not_equal File.mtime(e.pathname), e.mtime
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
def test_extract_extract_time
|
108
|
+
Dir.mktmpdir do |dir|
|
109
|
+
Archive.read_open_filename("data/test.tar.gz") do |ar|
|
110
|
+
Dir.chdir(dir) do
|
111
|
+
ar.each_entry do |e|
|
112
|
+
ar.extract(e, Archive::EXTRACT_TIME.to_i)
|
113
|
+
next if e.directory? || e.symbolic_link?
|
114
|
+
assert_equal File.mtime(e.pathname), e.mtime
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
94
121
|
private
|
95
122
|
|
96
123
|
def verify_content(ar)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi-libarchive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Bellone
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-07-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ffi
|