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

Development

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

Runtime

 Project Readme

AndFeathers::Zip

Works with and-feathers to turn in-memory archives into zip files.

Installation

Add this line to your application's Gemfile:

gem 'and_feathers-zip'

And then execute:

$ bundle

Or install it yourself as:

$ gem install and_feathers-zip

Usage

Writing a ZIP to disk

require 'and_feathers'
require 'and_feathers/zip'

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

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

Zip an existing directory, plus a few changes/additions

require 'and_feathers'
require 'and_feathers/zip'

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::Zip).read
end