mixlib-archive 0.4.20-universal-mingw32 → 1.1.3-universal-mingw32

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: 8616a110d864d035ff76a3faddd13bb64777b5acdd4d3601a1a320337d6c5de1
4
- data.tar.gz: 78fd94ddebb97131339505f9e8f461b8881f44bcb123b20cc34b23c65bb5f888
3
+ metadata.gz: 13779d5480c520a8a45a85a6c6289fdce3ae054857b74ad0caa2717e68512117
4
+ data.tar.gz: 1c8aad78a4775decbbe9e473094d4a23094841447b89dcd75518e38154f17619
5
5
  SHA512:
6
- metadata.gz: c69e2026dbcd8617a4535b4015f6614f27067aabd532e228ffb27a7f4c34dc7506f9e2955190c7fe0e5ba3110c92a97670e665378000167dbbfc0344c975b843
7
- data.tar.gz: 5fc70d3ae8e4f1bc9f7322a4c45a8e9cab77ddc2901b4a605a5786f1573f7e221dab3731daa8a3e5114d87a04c8c3d6a1b3adcdea846eff3fbc1c47a196ee26b
6
+ metadata.gz: e87ff84cd1f4eaacee16a2e5cf011187e23628522386a40742f5251a99f6bdc3c3632b4f5c7bd6c23f87769e7fdc9684ad0ab55802ae4772846f4be52865ffad
7
+ data.tar.gz: db8b6fb840f42d0bf8363a22709c546c1f94d9574f706b573f84bae396be90deefe88aa0bbf692c8564b6dafe179151fda340a3cfb326cbb5df811508cc9f507
@@ -1,7 +1,7 @@
1
- require "mixlib/archive/tar"
2
- require "mixlib/archive/version"
1
+ require_relative "archive/tar"
2
+ require_relative "archive/version"
3
3
  require "mixlib/log"
4
- require "find"
4
+ require "find" unless defined?(Find.find)
5
5
 
6
6
  module Mixlib
7
7
  class Archive
@@ -21,7 +21,7 @@ module Mixlib
21
21
  archive = File.expand_path(archive)
22
22
  begin
23
23
  # we prefer to use libarchive, which supports a great big pile o' stuff
24
- require "mixlib/archive/lib_archive"
24
+ require_relative "archive/lib_archive"
25
25
  @archiver = Mixlib::Archive::LibArchive.new(archive)
26
26
  rescue LoadError
27
27
  # but if we can't use that, we'll fall back to ruby's native tar implementation
@@ -58,6 +58,7 @@ module Mixlib
58
58
  if @empty
59
59
  Dir.foreach(destination) do |entry|
60
60
  next if entry == "." || entry == ".."
61
+
61
62
  FileUtils.remove_entry_secure(File.join(destination, entry))
62
63
  end
63
64
  end
@@ -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
- # @note Dir.chdir is applied to the process, thus it is not thread-safe
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
- reader.each_entry do |entry|
38
- if entry.pathname =~ ignore_re
39
- Mixlib::Archive::Log.warn "ignoring entry #{entry.pathname}"
40
- next
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)
47
33
  end
34
+ reader.close
48
35
  end
49
36
 
50
37
  # Creates an archive with the given set of +files+
@@ -1,6 +1,6 @@
1
- require "rubygems/package"
2
- require "tempfile"
3
- require "zlib"
1
+ require "rubygems/package" unless defined?(Gem::Package)
2
+ require "tempfile" unless defined?(Tempfile)
3
+ require "zlib" unless defined?(Zlib)
4
4
 
5
5
  module Mixlib
6
6
  class Archive
@@ -1,5 +1,5 @@
1
1
  module Mixlib
2
2
  class Archive
3
- VERSION = "0.4.20".freeze
3
+ VERSION = "1.1.3".freeze
4
4
  end
5
5
  end
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: 0.4.20
4
+ version: 1.1.3
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: 2019-01-13 00:00:00.000000000 Z
11
+ date: 2021-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-log
@@ -51,15 +51,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '2.4'
55
55
  required_rubygems_version: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
59
  version: '0'
60
60
  requirements: []
61
- rubyforge_project:
62
- rubygems_version: 2.7.6
61
+ rubygems_version: 3.1.4
63
62
  signing_key:
64
63
  specification_version: 4
65
64
  summary: A simple interface to various archive formats