No release in over 3 years
The archive-tar-external is a simple wrapper interface for creating tar files using your system's tar command. You can also easily compress your tar files with your system's compression programs such as zip, gzip, or bzip2.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 1.4
~> 3.9
 Project Readme

Ruby

Description

A simple tar & compress library that nicely wraps external system calls.

Installation

gem install archive-tar-external

Adding the trusted cert

gem cert --add <(curl -Ls https://raw.githubusercontent.com/djberg96/archive-tar-external/main/certs/djberg96_pub.pem)

Synopsis

require 'archive/tar/external' # or 'archive-tar-external'
   
# Create an archive of all files with an ".rb" extension, the long way.
t = Archive::Tar::External.new('test.tar')
t.create_archive('*.rb')
t.compress_archive('gzip')
   
# Same, but the short way.
t = Archive::Tar::External.new('test.tar', '*.rb', 'gzip')

Prerequisites

  • The 'tar' command line program.
  • At least one compression program, e.g. gzip, bzip2, zip, etc.

Known Issues

OSX

It appears that the BSD tar that ships on Mac does not implement the -u option properly by default, and will add a file to the archive even if the timestamp of the file hasn't changed.

The OSX issue was effectively addressed in version 1.5.0, where the default archive format was added and set to 'pax'.

If you come across any other issues, please report them on the project page at https://github.com/djberg96/archive-tar-external.

Windows

MS Windows did not have a tar commmand until part way through the Windows 10 lifecycle. If you do not have it then you will need to install it, either as a native command or use something like Cygwin.

Solaris

The tar program that comes with Solaris will not raise an error if you try to expand a file from an archive that does not contain that file.

Note that Solaris is essentially dead at this point, so I will generally not be accepting patches for it.

History

This project was originally named "archive-tarsimple", but was renamed on April 7, 2006. Versions of this gem prior to that date are no longer available.

License

Apache-2.0

Warranty

This package is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantability and fitness for a particular purpose.

Copyright

(C) 2003 - 2023 Daniel J. Berger All Rights Reserved

Author

Daniel J. Berger