A very simple gem to extract archives.
Add this line to your application's Gemfile:
gem 'mixlib-archive'And then execute:
$ bundleOr install it yourself as:
$ gem install mixlib-archiveTo extract an archive
require "mixlib/archive"
tar = Mixlib::Archive.new("/path/to/tar")
tar.extract("/destination/directory")To create an archive
require "mixlib/archive"
tar = Mixlib::Archive.new("/path/to/foo.tar.gz")
tar.create(%w{ file.rb file2.rb }, gzip: true)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.
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 code of conduct.
The gem is available as open source under the terms of the Apache License, v2