Class: Vara::ProductArtifactZipper

Inherits:
Object
  • Object
show all
Includes:
Loggable
Defined in:
lib/vara/product_artifact_zipper.rb

Instance Method Summary collapse

Methods included from Loggable

included, #log

Constructor Details

#initialize(artifact_path, product_contents, options = {}) ⇒ ProductArtifactZipper

Returns a new instance of ProductArtifactZipper.



10
11
12
13
14
# File 'lib/vara/product_artifact_zipper.rb', line 10

def initialize(artifact_path, product_contents, options = {})
  @artifact_path = artifact_path
  @product_contents = product_contents
  @options = options
end

Instance Method Details

#zip!Object



16
17
18
19
20
21
22
23
# File 'lib/vara/product_artifact_zipper.rb', line 16

def zip!
  remove_previous_artifacts

  in_tmp_dir do
    copy_dirs_and_files
    create_zip!
  end
end