Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
inspec / lib / inspec / archive / zip.rb
Size: Mime:
# encoding: utf-8
# author: Christoph Hartmann
# author: Dominik Richter

require 'rubygems'
require 'zip'
require 'pathname'

module Inspec::Archive
  class ZipArchiveGenerator
    def archive(base_dir, files, archive)
      Zip::File.open(archive, Zip::File::CREATE) do |zipfile|
        files.each do |input_filename|
          zipfile.add(input_filename, Pathname.new(base_dir).join(input_filename))
        end
      end
    end
  end
end