Sha256: 1b8a81410e85ec234403c1feef6d36befe62501289c7481c756d5da988632342

Contents?: true

Size: 463 Bytes

Versions: 6

Compression:

Stored size: 463 Bytes

Contents

# 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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
inspec-2.1.81 lib/inspec/archive/zip.rb
inspec-2.1.21 lib/inspec/archive/zip.rb
inspec-2.1.10 lib/inspec/archive/zip.rb
inspec-2.0.32 lib/inspec/archive/zip.rb
inspec-2.0.17 lib/inspec/archive/zip.rb
inspec-1.51.15 lib/inspec/archive/zip.rb