Guest User

Untitled

a guest
Jul 22nd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. require 'rubygems'
  2. require 'find'
  3. require 'zip/zip'
  4.  
  5. output = "c:/temp/test.zip"
  6. path = "C:/projects/travel/cucumber/features/support/forge/keys/wwhomepage"
  7.  
  8. Zip::ZipFile.open(output, Zip::ZipFile::CREATE) do |zip|
  9. ::Find.find(path) do |file|
  10. next if File.directory?(file)
  11. entry = file.sub("#{path}/", '')
  12.  
  13. zip.add entry, file
  14. end
  15. end
Add Comment
Please, Sign In to add comment