Class: Rant::Generators::Archive::Tgz

Inherits:
Base show all
Defined in:
lib/rant/import/archive/tgz.rb

Overview

Use this class as a generator to create gzip compressed tar archives.

Direct Known Subclasses

Package::Tgz

Instance Attribute Summary

Attributes inherited from Base

#archive_path, #ch

Instance Method Summary collapse

Methods inherited from Base

#define_manifest_task, #get_archive_path, #get_files, #path, #rac, #rac=, rant_gen, #with_manifest

Methods included from MetaUtils

#rant_attr, #rant_flag, #redirect_accessor, #redirect_message, #redirect_reader, #redirect_writer, #string_attr, #valid_attr_name

Constructor Details

#initialize(*args) ⇒ Tgz

Returns a new instance of Tgz.



13
14
15
16
# File 'lib/rant/import/archive/tgz.rb', line 13

def initialize(*args)
    super
    @extension = ".tgz"
end

Instance Method Details

#define_taskObject

Ensure to set #rac first. Creates a file task wich invokes tar to create a tgz archive. Returns the created task.



20
21
22
23
24
25
26
# File 'lib/rant/import/archive/tgz.rb', line 20

def define_task
    if ::Rant::Env.have_tar?
	define_tar_task
    else
	define_minitar_task
    end
end