mixlib-archive 1.0.6-universal-mingw32 → 1.1.7-universal-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mixlib/archive.rb +1 -1
- data/lib/mixlib/archive/lib_archive.rb +9 -22
- data/lib/mixlib/archive/tar.rb +2 -2
- data/lib/mixlib/archive/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5619734dd5c35295c38eb37300faf46e715454bd664d38848320cc4d13f5321c
|
4
|
+
data.tar.gz: f09598356d9f850f0fba37f4f48d0fa0f27ccc2217efea648292f290194bbd1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6944d78e55588e124d4cf5799bc017d6dd8832237920b2b0a8465962782650a008b220e32e98d892650a30bdcc372f5d22bc13fec9b347302f0e71c80c0dd66a
|
7
|
+
data.tar.gz: 16a385274ab4fa239557b14944c349499bd3d6e5acc321a91a73d0155abf4b3f4e58d8067d3a4716dfdee160b6fa3cd2f201c6e0c3fa16d1cf2589459aadeb0e
|
data/lib/mixlib/archive.rb
CHANGED
@@ -6,12 +6,6 @@ module Mixlib
|
|
6
6
|
attr_reader :options
|
7
7
|
attr_reader :archive
|
8
8
|
|
9
|
-
class << self
|
10
|
-
attr_accessor :mutex_chdir
|
11
|
-
end
|
12
|
-
|
13
|
-
Mixlib::Archive::LibArchive.mutex_chdir = Mutex.new
|
14
|
-
|
15
9
|
def initialize(archive, options = {})
|
16
10
|
@archive = archive
|
17
11
|
@options = options
|
@@ -27,24 +21,17 @@ module Mixlib
|
|
27
21
|
flags = perms ? ::Archive::EXTRACT_PERM : nil
|
28
22
|
FileUtils.mkdir_p(destination)
|
29
23
|
|
30
|
-
|
31
|
-
# and must be synchronized.
|
32
|
-
# TODO: figure out a better alternative to chdir
|
33
|
-
Mixlib::Archive::LibArchive.mutex_chdir.synchronize do
|
34
|
-
Dir.chdir(destination) do
|
35
|
-
reader = ::Archive::Reader.open_filename(@archive)
|
24
|
+
reader = ::Archive::Reader.open_filename(@archive)
|
36
25
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
end
|
42
|
-
|
43
|
-
reader.extract(entry, flags.to_i)
|
44
|
-
end
|
45
|
-
reader.close
|
26
|
+
reader.each_entry do |entry|
|
27
|
+
if entry.pathname =~ ignore_re
|
28
|
+
Mixlib::Archive::Log.warn "ignoring entry #{entry.pathname}"
|
29
|
+
next
|
46
30
|
end
|
31
|
+
|
32
|
+
reader.extract(entry, flags.to_i, destination: destination.to_s)
|
47
33
|
end
|
34
|
+
reader.close
|
48
35
|
end
|
49
36
|
|
50
37
|
# Creates an archive with the given set of +files+
|
@@ -64,7 +51,7 @@ module Mixlib
|
|
64
51
|
entry.pathname = fn
|
65
52
|
stat = File.lstat(fn)
|
66
53
|
if File.file?(fn)
|
67
|
-
content = File.read(fn)
|
54
|
+
content = File.read(fn, mode: "rb")
|
68
55
|
entry.size = content.bytesize
|
69
56
|
end
|
70
57
|
entry.mode = stat.mode
|
data/lib/mixlib/archive/tar.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mixlib-archive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.7
|
5
5
|
platform: universal-mingw32
|
6
6
|
authors:
|
7
7
|
- Chef Software, Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-log
|
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: '0'
|
60
60
|
requirements: []
|
61
|
-
rubygems_version: 3.
|
61
|
+
rubygems_version: 3.1.4
|
62
62
|
signing_key:
|
63
63
|
specification_version: 4
|
64
64
|
summary: A simple interface to various archive formats
|