Class: Capistrano::Distribution::Distributor::Zip

Inherits:
AbstractArchiver show all
Defined in:
lib/capistrano/distribution/distributor/zip.rb

Overview

Deploys locally available ZIP 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 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 ZIP file indicated by Abstract#url to the location indicated by Abstract#release_path.

Returns:

  • (nil)

See Also:



17
18
19
20
21
22
23
24
25
26
# File 'lib/capistrano/distribution/distributor/zip.rb', line 17

def distribute
  context.execute 'mkdir', '-p', repo_path
  context.execute 'unzip', '-q',
                  '-d', repo_path,
                  url.path,
                  subtree.join('\\*')
  context.execute 'mv', repo_path.join(subtree), release_path

  nil
end