Project

real_zip

0.0
No commit activity in last 3 years
No release in over 3 years
build zip files with given file structure and transfer files to it
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0

Runtime

< 1.0.0
 Project Readme

RealZip

Usage

require 'real_zip'

# create zip file with given file structure and transfer files to the directory of your choice within the zip file.


RealZip 'real.zip', {:dir1 => ["/path/to/file1"], :dir2 => ["path/to/folder/"], 'dir2/dir3' => ["path/to/file3"]}


## Use Cases


RealZip 'temp.zip', {:html => ["/home/Files/a.html"], :pdf => ["/home/Files/c.pdf"], :rb => ["/home/Files/b.rb"]}

# Results in
puts `unzip -l temp.zip | awk '{print $4}'`
===========================================

html/
pdf/
rb/
html/a.html
pdf/c.pdf
rb/b.rb

RealZip 'temp.zip', {'doc/html' => ["/home/Files/a.html"], 'doc/pdf' => ["/home/Files/c.pdf"], 'doc/pdf/rb' => ["/home/Files/b.rb"]}

# Results in
puts `unzip -l temp.zip | awk '{print $4}'`
===========================================
doc/html/
doc/pdf/
doc/pdf/rb/
doc/html/a.html
doc/pdf/c.pdf
doc/pdf/rb/b.rb

# Symlinks or Softlinks can also be used to reference files.

Installation

Add this line to your application's Gemfile:

gem 'real_zip'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install real_zip

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Acknowledgement

This software is built upon Alexander K's Fake_Zip gem. A hearty thanks to him for making it freely available. This project would not be possible without Ravi Baghele's major input in implementing the core file tranfer functionality. I would also like to thank Indrajeet Mishra for his valuable insights about testing and debugging the gem. Our team leader Mr. Pankaj Gupta has provided invaluable support and guidance throughout the project.