Class: Capistrano::Distribution::Distributor::Tar

Inherits:
AbstractArchiver show all
Includes:
TarHelper
Defined in:
lib/capistrano/distribution/distributor/tar.rb

Overview

Deploys locally available Tar files.

Constant Summary

Constants inherited from AbstractArchiver

AbstractArchiver::EXT_MATCHER

Instance Attribute Summary

Attributes inherited from AbstractArchiver

#subtree

Attributes inherited from Abstract

#context, #repo_id, #target, #url

Instance Method Summary collapse

Methods included from TarHelper

#compression_opt, #strip_components_opt

Methods inherited from AbstractArchiver

#check, #ext_matcher, #initialize

Methods inherited from Abstract

#check, #initialize, #release_path, #repo_path

Constructor Details

This class inherits a constructor from Capistrano::Distribution::Distributor::AbstractArchiver

Instance Method Details

#distributenil

Extracts the content rooted under AbstractArchiver#subtree within the Tar file indicated by Abstract#url to the location indicated by Abstract#release_path.

Returns:

  • (nil)

See Also:



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/capistrano/distribution/distributor/tar.rb', line 20

def distribute
  context.execute 'mkdir', '-p', release_path
  context.execute 'tar', '-x',
                  compression_opt,
                  strip_components_opt,
                  '-C', release_path,
                  '-f', url.path,
                  subtree

  nil
end