Class: Releasy::Packagers::Packager Abstract

Inherits:
Object
  • Object
show all
Includes:
Rake::DSL, Mixins::Log, Mixins::Utilities
Defined in:
lib/releasy/packagers/packager.rb

Overview

This class is abstract.

Archives a build folder.

Direct Known Subclasses

Dmg, Exe, SevenZip, TarPackager, Zip

Constant Summary

MD5_READ_SIZE =

MD5 likes 128 byte chunks.

128 * 64

Constants included from Mixins::Log

Mixins::Log::DEFAULT_LOG_LEVEL, Mixins::Log::LOG_LEVELS

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods included from Mixins::Log

log_level, log_level=

Constructor Details

- (Packager) initialize(project)

A new instance of Packager



31
32
33
34
# File 'lib/releasy/packagers/packager.rb', line 31

def initialize(project)
  @project = project
  @extension = self.class::DEFAULT_EXTENSION
end

Instance Attribute Details

- (String) extension

Extension of archive to be created (such as “.zip”).

Returns:

  • (String)

    the current value of extension



12
13
14
# File 'lib/releasy/packagers/packager.rb', line 12

def extension
  @extension
end

- (Project) project (readonly)

Project this Packager was created by.

Returns:

  • (Project)

    Project this Packager was created by.



20
21
22
# File 'lib/releasy/packagers/packager.rb', line 20

def project
  @project
end

Instance Method Details

- (Object) type



29
# File 'lib/releasy/packagers/packager.rb', line 29

def type; self.class::TYPE; end