Class: Omnibus::Compressor::Base

Inherits:
Packager::Base show all
Defined in:
lib/omnibus/compressors/base.rb

Direct Known Subclasses

DMG, Null, TGZ

Constant Summary

Constants included from Util

Util::SHELLOUT_OPTIONS

Constants included from NullArgumentable

NullArgumentable::NULL

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Packager::Base

build, #exclusions, id, #id, #install_dir, #package_name, #package_path, #resource_path, #resources_path, #run!, setup, #skip_packager, #staging_dir, #staging_dir_path

Methods included from Util

#compiler_safe_path, #copy_file, #create_directory, #create_file, #create_link, included, #path_key, #remove_directory, #remove_file, #retry_block, #shellout, #shellout!, #windows_safe_path

Methods included from Templating

included, #render_template, #render_template_content

Methods included from Sugarable

extended, included, #node

Methods included from NullArgumentable

included, #null?

Methods included from Logging

included

Methods included from Instrumentation

#measure

Methods included from Digestable

#digest, #digest_directory, included

Constructor Details

#initialize(project) ⇒ Base

Create a new compressor object from the given packager.

Parameters:



32
33
34
35
36
37
38
39
40
# File 'lib/omnibus/compressors/base.rb', line 32

def initialize(project)
  @project = project

  # There can now be multiple packagers per platform
  # but windows is the only platform that uses multiple
  # packagers and it does not use a compressor. So for now,
  # we ignore this multi packaging reality in compressors
  @packager = project.packagers_for_system[0]
end

Instance Attribute Details

#packagerObject (readonly)

The Packager::Base instance that produced the compressed file



25
26
27
# File 'lib/omnibus/compressors/base.rb', line 25

def packager
  @packager
end

#projectObject (readonly)

The Project instance that we are compressing



22
23
24
# File 'lib/omnibus/compressors/base.rb', line 22

def project
  @project
end