No commit activity in last 3 years
No release in over 3 years
Turn AndFeathers archives into tgz archives
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

< 2, >= 1.0.0.pre
~> 1.3
>= 0
>= 0
 Project Readme

AndFeathers::GzippedTarball

Works with and_feathers to turn in-memory archives into gzipped tarballs.

Installation

Add this line to your application's Gemfile:

gem 'and_feathers-gzipped_tarball'

And then execute:

$ bundle

Or install it yourself as:

$ gem install and_feathers-gzipped_tarball

Usage

Writing a tarball to disk

require 'and_feathers'
require 'and_feathers/gzipped_tarball'

# This is a simple archive
archive = AndFeathers.build('archive') do |root|
  root.file('README')
end

File.open('archive.tgz', 'w+') do |f|
  f << archive.to_io(AndFeathers::GzippedTarball).read
end

Tar an existing directory, plus a few changes/additions

require 'and_feathers'
require 'and_feathers/gzipped_tarball'

archive = AndFeathers.from_path('spec') do |spec|
  spec.file('end_to_end_spec.rb') { '# whoops' }
  spec.file('spec_helper.rb') { '# everyone needs one of these' }
end

File.open('spec.zip', 'w+') do |f|
  f << archive.to_io(AndFeathers::GzippedTarball).read
end