mixlib-archive 0.4.18-universal-mingw32 → 1.0.6-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: de9ff0590dffce184e62081562f227982518bc36f2d464f4acd5eed2fed7d430
4
- data.tar.gz: d07765cb5842b125e3b04e7dbcb5797703245da166d4c5bcc2ade159e208e4fa
3
+ metadata.gz: 2d43fbed1c855ba114a727a3474a689cf6da09ea03307d270acbded6acb7946b
4
+ data.tar.gz: 894a876bb29beba9b0cd21136d6079c574d2da9ca615460f49c39e7a1f1af051
5
5
  SHA512:
6
- metadata.gz: 8adc47ad95a1c94c109fe14167c9e10ee708c6fd5a0c52a9f53fb933bf47384cc99b4954f850026e53dee136763b2100cef31ce9059a99123fe773ab4e142587
7
- data.tar.gz: 1f67f28595a46f016093754076af696c658e9ef363161a5353d119d6825be1c3dc6ec5ca1872d3775ca4ce70e7b9f4e645745498e05a45a256f1d5053b03ce4f
6
+ metadata.gz: a3a17c3e714b61e1a804892b7a2457416c4f7c7a4e26305b0e2e95a4d6beb8a13c19126452e84047951c274ccb45bc8738e97ff9bdf5db33adeda2224549d9f4
7
+ data.tar.gz: ae18dce043bc507c42f4ba466f07382429f8d4379cd4db27cfa5f60db7982181323d05abb247bdb9e89db3ae7f43e9bf75441193447937220cbd414d6d9a8f48
@@ -1,5 +1,5 @@
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
4
  require "find"
5
5
 
@@ -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
@@ -1,5 +1,5 @@
1
1
  require "rubygems/package"
2
- require "tempfile"
2
+ require "tempfile" unless defined?(Tempfile)
3
3
  require "zlib"
4
4
 
5
5
  module Mixlib
@@ -72,6 +72,7 @@ module Mixlib
72
72
  def create(files, gzip: false)
73
73
  tgt_dir = File.dirname(archive)
74
74
  target = Tempfile.new(File.basename(archive), tgt_dir)
75
+ target.binmode
75
76
 
76
77
  Gem::Package::TarWriter.new(target) do |tar|
77
78
  files.each do |fn|
@@ -1,5 +1,5 @@
1
1
  module Mixlib
2
2
  class Archive
3
- VERSION = "0.4.18".freeze
3
+ VERSION = "1.0.6".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.18
4
+ version: 1.0.6
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: 2018-10-18 00:00:00.000000000 Z
11
+ date: 2020-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-log
@@ -32,7 +32,6 @@ extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
34
  - LICENSE
35
- - README.md
36
35
  - distro/ruby_bin_folder/libarchive.dll
37
36
  - distro/ruby_bin_folder/liblzma-5.dll
38
37
  - distro/ruby_bin_folder/libxml2-2.dll
@@ -52,15 +51,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
52
51
  requirements:
53
52
  - - ">="
54
53
  - !ruby/object:Gem::Version
55
- version: '0'
54
+ version: '2.4'
56
55
  required_rubygems_version: !ruby/object:Gem::Requirement
57
56
  requirements:
58
57
  - - ">="
59
58
  - !ruby/object:Gem::Version
60
59
  version: '0'
61
60
  requirements: []
62
- rubyforge_project:
63
- rubygems_version: 2.7.6
61
+ rubygems_version: 3.0.3
64
62
  signing_key:
65
63
  specification_version: 4
66
64
  summary: A simple interface to various archive formats
data/README.md DELETED
@@ -1,78 +0,0 @@
1
- # Mixlib::Archive
2
-
3
- [![Build Status Master](https://travis-ci.org/chef/mixlib-archive.svg?branch=master)](https://travis-ci.org/chef/mixlib-archive) [![Gem Version](https://badge.fury.io/rb/mixlib-archive.svg)](https://badge.fury.io/rb/mixlib-archive)
4
-
5
- A very simple gem to extract archives.
6
-
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'mixlib-archive'
13
- ```
14
-
15
- And then execute:
16
-
17
- ```shell
18
- $ bundle
19
- ```
20
-
21
- Or install it yourself as:
22
-
23
- ```shell
24
- $ gem install mixlib-archive
25
- ```
26
-
27
- ## Usage
28
-
29
- To extract an archive
30
-
31
- ```ruby
32
- require "mixlib/archive"
33
- tar = Mixlib::Archive.new("/path/to/tar")
34
- tar.extract("/destination/directory")
35
- ```
36
-
37
- To create an archive
38
-
39
- ```ruby
40
- require "mixlib/archive"
41
- tar = Mixlib::Archive.new("/path/to/foo.tar.gz")
42
- tar.create(%w{ file.rb file2.rb }, gzip: true)
43
- ```
44
-
45
- ## Development
46
-
47
- After checking out the repo, run `bundle` to install dependencies. Then, run `bundle exec rake spec` to run the tests. You can also run `bundle console` for an interactive prompt that will allow you to experiment.
48
-
49
- ## Documentation
50
-
51
- All documentation is written using YARD. You can generate a by running:
52
-
53
- ```
54
- rake docs
55
- ```
56
-
57
- ## Contributing
58
-
59
- For information on contributing to this project please see our [Contributing Documentation](https://github.com/chef/chef/blob/master/CONTRIBUTING.md)
60
-
61
- ## License & Copyright
62
-
63
- - Copyright:: Copyright (c) 2017-2018 Chef Software, Inc.
64
- - License:: Apache License, Version 2.0
65
-
66
- ```text
67
- Licensed under the Apache License, Version 2.0 (the "License");
68
- you may not use this file except in compliance with the License.
69
- You may obtain a copy of the License at
70
-
71
- http://www.apache.org/licenses/LICENSE-2.0
72
-
73
- Unless required by applicable law or agreed to in writing, software
74
- distributed under the License is distributed on an "AS IS" BASIS,
75
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
76
- See the License for the specific language governing permissions and
77
- limitations under the License.
78
- ```