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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62a0aae2a895b559b8997c2c5e6b359fb647e7021763314b7965b7154cf1217d
4
- data.tar.gz: f6551a34ae064600305660fe8bf162b83be3d7438ff8cf14e832754696a3ce63
3
+ metadata.gz: cd86d5c024c71eab9c05b65c2a650423acf6e082f09e65167b87a07c2ec9c6d5
4
+ data.tar.gz: b4ee964dc4caa87255c2f4ca6eedd43e6a962112f9481696ead94314bd7c482f
5
5
  SHA512:
6
- metadata.gz: e40cdeea983fe0ebdf90a37fe3b3f3a93e1c24ab30e945a05096363a053bb7ff1cea329b9af589c9170634bb1dd4bd89fc90f9a76b7c24bfe23d2abf23a3b66d
7
- data.tar.gz: f8472ef8ed281c711d71985ecb7be07746573236f51c4eedac68328fb3196a10addb0dd4bbbb990a10702d0137552b310abdcc30d65785c877c2009c8d34cfc9
6
+ metadata.gz: 35e0e854d76bd8d579c2c3626a62474a7bd735df3f30f294068d0864c396d93957d3cba73b0fd4880c9e3035aca45aa31611e5ebdc9b9c73c68be5816b3cdb38
7
+ data.tar.gz: bb5610e6b77babfb94d535248de078674a5697cfcac3a0d37882da27455c9c7440f404d69127171628ec4ae320182d6ef34bc877a96957545593628545a8457c
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.1
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 &= EXTRACT_FFLAGS
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
 
@@ -1,3 +1,3 @@
1
1
  module Archive
2
- VERSION = "0.4.1".freeze
2
+ VERSION = "0.4.2".freeze
3
3
  end
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.1
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-06-11 00:00:00.000000000 Z
13
+ date: 2018-07-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ffi