mixlib-archive 0.4.8 → 0.4.13

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: 89f65f9ebf0b9670aa04782cab4ee5887c64ec8e609f96b5cb0979b328ee0a1a
4
- data.tar.gz: dd8460110ee8f6e20cfece1848f4420ebf4575c947b0133704ce8da0fd65ad9c
3
+ metadata.gz: 7e890314d0486efb10e07cdd98e93e988cd0c834f5d7bf9edfb04ac6b5515b68
4
+ data.tar.gz: ede93fcd80ad8727bee334de0e4f88a51780ec6d17d174de8fd587da118771de
5
5
  SHA512:
6
- metadata.gz: 128ed8853d6d686101c8a120ce7cd7e862f89877ba7bc5a8965ce60d690ee02139a8d4a0a964278331fdfc4ad5f00c3761f3b4cbbda09d6584ee581c107e04e4
7
- data.tar.gz: 7d394e01de3f3638c728e3e14bfd0b24bde6aea0488d3065f9cdd2b70e59173173cf652f41f60bce6b75adc1652851f7c1a83e6592494616717e061332bef459
6
+ metadata.gz: 0b1b9352ddcbbc2c63e81eb2df36ebba3badb2fa7744229983c2a04f4af8cadd94642a816de90f115520623f45e912d532889eb79fb37274133831b67ed29dd4
7
+ data.tar.gz: a03196e419a33aa8c72aad11e0a44f68d102d7f77c72385a2b2a9d1dc9cdaa9905f644e13a6085f60325a7b329c5ed012a0fd6fb33528ea636ca0cae5fb87b36
@@ -1,35 +1,41 @@
1
+ # Documentation available at https://expeditor.chef.io/docs/getting-started/
1
2
  ---
3
+ # Slack channel in Chef Software slack to send notifications about build failures, etc
2
4
  slack:
3
5
  notify_channel: chef-notify
4
6
 
7
+ # This publish is triggered by the `built_in:publish_rubygems` artifact_action.
8
+ rubygems:
9
+ - mixlib-archive
10
+
5
11
  github:
12
+ # This deletes the GitHub PR branch after successfully merged into the release branch
13
+ delete_branch_on_merge: true
14
+ # The tag format to use (e.g. v1.0.0)
6
15
  version_tag_format: "v{{version}}"
16
+ # allow bumping the minor release via label
7
17
  minor_bump_labels:
8
- - "Version: Bump Minor"
18
+ - "Expeditor: Bump Minor Version"
9
19
 
10
20
  changelog:
11
21
  rollup_header: Changes not yet released to rubygems.org
12
22
 
13
- rubygems:
14
- - mixlib-archive
15
-
23
+ # These actions are taken, in order they are specified, anytime a Pull Request is merged.
16
24
  merge_actions:
17
25
  - built_in:bump_version:
18
26
  ignore_labels:
19
- - "Version: Skip Bump"
27
+ - "Expeditor: Skip Version Bump"
20
28
  - "Expeditor: Skip All"
21
29
  - bash:.expeditor/update_version.sh:
22
- only_if:
23
- - built_in:bump_version
30
+ only_if: built_in:bump_version
24
31
  - built_in:update_changelog:
25
32
  ignore_labels:
26
- - "Changelog: Skip Update"
33
+ - "Expeditor: Exclude From Changelog"
27
34
  - "Expeditor: Skip All"
28
35
  - built_in:build_gem:
29
- only_if:
30
- - built_in:bump_version
36
+ only_if: built_in:bump_version
31
37
 
32
38
  promote:
33
- action:
34
- - built_in:publish_rubygems
39
+ actions:
35
40
  - built_in:rollover_changelog
41
+ - built_in:publish_rubygems
@@ -0,0 +1,4 @@
1
+ # Order is important. The last matching pattern has the most precedence.
2
+
3
+ * @chef/client-maintainers
4
+ .expeditor/** @chef/jex-team
@@ -0,0 +1,21 @@
1
+ # Version:
2
+
3
+ [Version of the project installed]
4
+
5
+ # Environment: [Details about the environment such as the Operating System, cookbook details, etc...]
6
+
7
+ # Scenario:
8
+
9
+ [What you are trying to achieve and you can't?]
10
+
11
+ # Steps to Reproduce:
12
+
13
+ [If you are filing an issue what are the things we need to do in order to repro your problem?]
14
+
15
+ # Expected Result:
16
+
17
+ [What are you expecting to happen as the consequence of above reproduction steps?]
18
+
19
+ # Actual Result:
20
+
21
+ [What actually happens after the reproduction steps?]
@@ -0,0 +1,14 @@
1
+ ### Description
2
+
3
+ [Please describe what this change achieves]
4
+
5
+ ### Issues Resolved
6
+
7
+ [List any existing issues this PR resolves, or any Discourse or
8
+ StackOverflow discussion that's relevant]
9
+
10
+ ### Check List
11
+
12
+ - [ ] New functionality includes tests
13
+ - [ ] All tests pass
14
+ - [ ] All commits have been signed-off for the Developer Certificate of Origin. See <https://github.com/chef/chef/blob/master/CONTRIBUTING.md#developer-certification-of-origin-dco>
data/.gitignore CHANGED
@@ -1,9 +1,27 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
1
+ _yardoc
2
+ .bundle
3
+ .config
4
+ .DS_Store
5
+ .idea
6
+ .rake_tasks~
7
+ .rspec
8
+ .ruby-version
9
+ .rvmrc
10
+ .yardoc
11
+ .yardopts
12
+ *.gem
13
+ *.rbc
14
+ *.sw?
15
+ bin/
16
+ coverage
17
+ doc
18
+ Gemfile.local
19
+ Gemfile.lock
20
+ InstalledFiles
21
+ lib/bundler/man
22
+ pkg
23
+ spec/reports
24
+ test/tmp
25
+ test/version_tmp
26
+ tmp
27
+ vendor
data/.travis.yml CHANGED
@@ -9,16 +9,18 @@ addons:
9
9
 
10
10
  matrix:
11
11
  include:
12
+ - rvm: 2.3.7
12
13
  - rvm: 2.4.4
13
14
  - rvm: 2.5.1
14
15
  - rvm: ruby-head
15
16
  allow_failures:
16
17
  - rvm: ruby-head
18
+
17
19
  branches:
18
20
  only:
19
21
  - master
20
22
 
21
- bundler_args: --without changelog
23
+ bundler_args: --without docs development
22
24
 
23
25
  before_install:
24
26
  - gem install bundler
@@ -26,5 +28,4 @@ before_install:
26
28
  - gem update --system
27
29
  - gem --version
28
30
 
29
- script:
30
- - bundle exec rake ci
31
+ script: bundle exec rake
data/CHANGELOG.md CHANGED
@@ -1,26 +1,35 @@
1
1
  <!-- usage documentation: http://expeditor-docs.es.chef.io/configuration/changelog/ -->
2
2
  # Change Log
3
3
 
4
- <!-- latest_release 0.4.8 -->
5
- ## [v0.4.8](https://github.com/chef/mixlib-archive/tree/v0.4.8) (2018-06-21)
4
+ <!-- latest_release 0.4.13 -->
5
+ ## [v0.4.13](https://github.com/chef/mixlib-archive/tree/v0.4.13) (2018-08-03)
6
6
 
7
7
  #### Merged Pull Requests
8
- - Use the correct entry size for content with multi-byte characters. [#23](https://github.com/chef/mixlib-archive/pull/23) ([coderanger](https://github.com/coderanger))
8
+ - bugfix to make dir.chdir threadsafe [#29](https://github.com/chef/mixlib-archive/pull/29) ([stevenoneill](https://github.com/stevenoneill))
9
9
  <!-- latest_release -->
10
10
 
11
- <!-- release_rollup since=0.4.7 -->
11
+ <!-- release_rollup since=0.4.8 -->
12
12
  ### Changes not yet released to rubygems.org
13
13
 
14
14
  #### Merged Pull Requests
15
- - Use the correct entry size for content with multi-byte characters. [#23](https://github.com/chef/mixlib-archive/pull/23) ([coderanger](https://github.com/coderanger)) <!-- 0.4.8 -->
15
+ - bugfix to make dir.chdir threadsafe [#29](https://github.com/chef/mixlib-archive/pull/29) ([stevenoneill](https://github.com/stevenoneill)) <!-- 0.4.13 -->
16
+ - Update codeowners and add PR template [#27](https://github.com/chef/mixlib-archive/pull/27) ([tas50](https://github.com/tas50)) <!-- 0.4.12 -->
17
+ - Add github issue template &amp; standardize expeditor config [#26](https://github.com/chef/mixlib-archive/pull/26) ([tas50](https://github.com/tas50)) <!-- 0.4.11 -->
18
+ - Move deps to the Gemfile and expand Rake tasks [#25](https://github.com/chef/mixlib-archive/pull/25) ([tas50](https://github.com/tas50)) <!-- 0.4.10 -->
19
+ - add codeowners [#24](https://github.com/chef/mixlib-archive/pull/24) ([thommay](https://github.com/thommay)) <!-- 0.4.9 -->
16
20
  <!-- release_rollup -->
17
21
 
18
22
  <!-- latest_stable_release -->
23
+ ## [v0.4.8](https://github.com/chef/mixlib-archive/tree/v0.4.8) (2018-06-21)
24
+
25
+ #### Merged Pull Requests
26
+ - Use the correct entry size for content with multi-byte characters. [#23](https://github.com/chef/mixlib-archive/pull/23) ([coderanger](https://github.com/coderanger))
27
+ <!-- latest_stable_release -->
28
+
19
29
  ## [v0.4.7](https://github.com/chef/mixlib-archive/tree/v0.4.7) (2018-06-07)
20
30
 
21
31
  #### Merged Pull Requests
22
32
  - fixup strange edge case around tar magic reading [#22](https://github.com/chef/mixlib-archive/pull/22) ([spion06](https://github.com/spion06))
23
- <!-- latest_stable_release -->
24
33
 
25
34
  ## [v0.4.6](https://github.com/chef/mixlib-archive/tree/v0.4.6) (2018-05-08)
26
35
 
data/Gemfile CHANGED
@@ -1,6 +1,30 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- # Specify your gem's dependencies in mixlib-archive.gemspec
4
3
  gemspec
5
4
 
6
5
  gem "ffi-libarchive"
6
+
7
+ group :docs do
8
+ gem "yard"
9
+ gem "redcarpet"
10
+ gem "github-markup"
11
+ end
12
+
13
+ group :test do
14
+ gem "chefstyle", git: "https://github.com/chef/chefstyle.git", branch: "master"
15
+ gem "rspec", "~> 3.0"
16
+ gem "rake"
17
+ end
18
+
19
+ group :development do
20
+ gem "pry"
21
+ gem "pry-byebug"
22
+ gem "pry-stack_explorer"
23
+ gem "rb-readline"
24
+ end
25
+
26
+ instance_eval(ENV["GEMFILE_MOD"]) if ENV["GEMFILE_MOD"]
27
+
28
+ # If you want to load debugging tools into the bundle exec sandbox,
29
+ # add these additional dependencies into Gemfile.local
30
+ eval_gemfile(__FILE__ + ".local") if File.exist?(__FILE__ + ".local")
data/README.md CHANGED
@@ -46,10 +46,33 @@ tar.create(%w{ file.rb file2.rb }, gzip: true)
46
46
 
47
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
48
 
49
+ ## Documentation
50
+
51
+ All documentation is written using YARD. You can generate a by running:
52
+
53
+ ```
54
+ rake docs
55
+ ```
56
+
49
57
  ## Contributing
50
58
 
51
- Bug reports and pull requests are welcome on GitHub at <https://github.com/chef/mixlib-archive>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Community Guidelines](https://docs.chef.io/community_guidelines.html) code of conduct.
59
+ For information on contributing to this project please see our [Contributing Documentation](https://github.com/chef/chef/blob/master/CONTRIBUTING.md)
52
60
 
53
- ## License
61
+ ## License & Copyright
54
62
 
55
- The gem is available as open source under the terms of the Apache License, v2
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
+ ```
data/Rakefile CHANGED
@@ -1,13 +1,14 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rspec/core/rake_task"
3
- require "mixlib/archive/version"
4
3
 
5
- RSpec::Core::RakeTask.new(:spec)
4
+ task default: [:style, :spec]
6
5
 
7
- task :default => :spec
6
+ Bundler::GemHelper.install_tasks
8
7
 
9
- desc "Run tests for Travis CI"
10
- task ci: [:style, :spec]
8
+ desc "Run specs"
9
+ RSpec::Core::RakeTask.new(:spec) do |spec|
10
+ spec.pattern = "spec/**/*_spec.rb"
11
+ end
11
12
 
12
13
  begin
13
14
  require "chefstyle"
@@ -16,16 +17,20 @@ begin
16
17
  task.options += ["--display-cop-names", "--no-color"]
17
18
  end
18
19
  rescue LoadError
19
- puts "chefstyle/rubocop is not available. gem install chefstyle to do style checking."
20
+ puts "chefstyle/rubocop is not available. bundle install first to make sure all dependencies are installed."
20
21
  end
21
22
 
22
23
  begin
23
- require "github_changelog_generator/task"
24
-
25
- GitHubChangelogGenerator::RakeTask.new :changelog do |config|
26
- config.issues = false
27
- config.future_release = Mixlib::Archive::VERSION
28
- end
24
+ require "yard"
25
+ YARD::Rake::YardocTask.new(:docs)
29
26
  rescue LoadError
30
- puts "github_changelog_generator is not available. gem install github_changelog_generator to generate changelogs"
27
+ puts "yard is not available. bundle install first to make sure all dependencies are installed."
28
+ end
29
+
30
+ task :console do
31
+ require "irb"
32
+ require "irb/completion"
33
+ require "mixlib/archive"
34
+ ARGV.clear
35
+ IRB.start
31
36
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.8
1
+ 0.4.13
@@ -6,6 +6,12 @@ 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
+
9
15
  def initialize(archive, options = {})
10
16
  @archive = archive
11
17
  @options = options
@@ -20,18 +26,24 @@ module Mixlib
20
26
  ignore_re = Regexp.union(ignore)
21
27
  flags = perms ? ::Archive::EXTRACT_PERM : nil
22
28
  FileUtils.mkdir_p(destination)
23
- Dir.chdir(destination) do
24
- reader = ::Archive::Reader.open_filename(@archive)
25
29
 
26
- reader.each_entry do |entry|
27
- if entry.pathname =~ ignore_re
28
- Mixlib::Archive::Log.warn "ignoring entry #{entry.pathname}"
29
- next
30
- end
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)
31
36
 
32
- reader.extract(entry, flags.to_i)
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
33
46
  end
34
- reader.close
35
47
  end
36
48
  end
37
49
 
@@ -5,7 +5,7 @@ require "zlib"
5
5
  module Mixlib
6
6
  class Archive
7
7
  class Tar
8
- TAR_LONGLINK = "././@LongLink"
8
+ TAR_LONGLINK = "././@LongLink".freeze
9
9
 
10
10
  attr_reader :options
11
11
  attr_reader :archive
@@ -1,5 +1,5 @@
1
1
  module Mixlib
2
2
  class Archive
3
- VERSION = "0.4.8"
3
+ VERSION = "0.4.13".freeze
4
4
  end
5
5
  end
@@ -12,13 +12,10 @@ Gem::Specification.new do |spec|
12
12
  spec.summary = %q{A simple interface to various archive formats}
13
13
  spec.description = spec.summary
14
14
  spec.homepage = "https://chef.io"
15
- spec.license = "APACHE-2.0"
15
+ spec.license = "Apache-2.0"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.add_development_dependency "rake", "~> 12"
21
- spec.add_development_dependency "rspec", "~> 3.0"
22
- spec.add_development_dependency "chefstyle"
23
20
  spec.add_dependency "mixlib-log"
24
21
  end
metadata CHANGED
@@ -1,57 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mixlib-archive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef Software, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-21 00:00:00.000000000 Z
11
+ date: 2018-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rake
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '12'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '12'
27
- - !ruby/object:Gem::Dependency
28
- name: rspec
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '3.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '3.0'
41
- - !ruby/object:Gem::Dependency
42
- name: chefstyle
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
13
  - !ruby/object:Gem::Dependency
56
14
  name: mixlib-log
57
15
  requirement: !ruby/object:Gem::Requirement
@@ -75,6 +33,9 @@ extra_rdoc_files: []
75
33
  files:
76
34
  - ".expeditor/config.yml"
77
35
  - ".expeditor/update_version.sh"
36
+ - ".github/CODEOWNERS"
37
+ - ".github/ISSUE_TEMPLATE.md"
38
+ - ".github/PULL_REQUEST_TEMPLATE.md"
78
39
  - ".gitignore"
79
40
  - ".rspec"
80
41
  - ".travis.yml"
@@ -91,7 +52,7 @@ files:
91
52
  - mixlib-archive.gemspec
92
53
  homepage: https://chef.io
93
54
  licenses:
94
- - APACHE-2.0
55
+ - Apache-2.0
95
56
  metadata: {}
96
57
  post_install_message:
97
58
  rdoc_options: []