Project

unzipMe

0.0
No commit activity in last 3 years
No release in over 3 years
using system unzip command and then 7zip as failover
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.0.0
~> 1.8.4
~> 4.1
~> 2.14
 Project Readme

unzipMe¶ ↑

If your application is attempting to handle extracting Zip files with the system unzip command but has failures AND they can be unzipped by alternative means, this provides the 7zip failover as a second-in-line attempt at extraction.

UnzipmeUnzipper¶ ↑

set instance to UnzipmeUnzipper.new(path_and_filename, {:extract_to => path}). The second parameter is an optional hash with the :extract_to key. This is used if you want to extract the files to a different directory.

.new -> will validate the file being passed in, and if not readable through either unzip or 7za wil raise an UnzipmeException.

call instance.unzip -> this will extract the files. call instance.file_list -> this will return a clean array of filenames within the zip archive with the header and trailer information removed.

UnzipmeValidator¶ ↑

(The files are validated when initializing UnzipmeUnzipper, but this can be called just for testing the archive)

set instance to UnzipmeValidator.new(path_and_filename). This will test the archive but not return an exception if not valid. instance.valid_zip? -> returns true if readable by either unzip or 7zip. instance.command -> will return which command (unzip or 7ip that will be able to extract the file). instance.error_message -> will return a reable message that lists the system error message (determined by the exit code) for both unzip and 7za.

Contributing to unzipMe¶ ↑

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet.

  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it.

  • Fork the project.

  • Start a feature/bugfix branch.

  • Commit and push until you are happy with your contribution.

  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2012 Kendra Lawlor. See LICENSE.txt for further details.