Class: Capistrano::Distribution::Distributor::CurlTar
- Inherits:
-
AbstractCurl
- Object
- Abstract
- AbstractArchiver
- AbstractCurl
- Capistrano::Distribution::Distributor::CurlTar
- Includes:
- TarHelper
- Defined in:
- lib/capistrano/distribution/distributor/curl_tar.rb
Overview
Deploys Tar files downloadable using the curl command.
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 Tar file indicated by Abstract#url to the location indicated by Abstract#release_path.
Methods included from TarHelper
#compression_opt, #strip_components_opt
Methods inherited from AbstractCurl
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 Tar file indicated by Abstract#url to the location indicated by Abstract#release_path. The Tar file is extracted as it is downloaded, so no local copy of the Tar file itself is ever created.
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/capistrano/distribution/distributor/curl_tar.rb', line 22 def distribute context.execute 'mkdir', '-p', release_path context.execute 'curl', '--fail', '--location', '--silent', url, '|', 'tar', '-x', compression_opt, strip_components_opt, '-C', release_path, subtree nil end |