Class: Capistrano::Distribution::Distributor::Zip
- Inherits:
-
AbstractArchiver
- Object
- Abstract
- AbstractArchiver
- Capistrano::Distribution::Distributor::Zip
- Defined in:
- lib/capistrano/distribution/distributor/zip.rb
Overview
Deploys locally available ZIP files.
Constant Summary
Constants inherited from AbstractArchiver
Instance Attribute Summary
Attributes inherited from AbstractArchiver
Attributes inherited from Abstract
#context, #repo_id, #target, #url
Instance Method Summary collapse
-
#distribute ⇒ nil
Extracts the content rooted under AbstractArchiver#subtree within the ZIP file indicated by Abstract#url to the location indicated by Abstract#release_path.
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
#distribute ⇒ nil
Extracts the content rooted under AbstractArchiver#subtree within the ZIP file indicated by Abstract#url to the location indicated by Abstract#release_path.
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 |