Class: Capistrano::Distribution::Distributor::AbstractCurl Abstract

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

Overview

This class is abstract.

Subclass and override Capistrano::Distribution::Distributor::Abstract#distribute to create a distributor that extracts archives reachable via curl command.

A convenience class for distributors that extract an archive downloaded using the curl command.

Direct Known Subclasses

CurlTar, CurlZip

Constant Summary

Constants inherited from AbstractArchiver

Capistrano::Distribution::Distributor::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

#ext_matcher, #initialize

Methods inherited from Abstract

#distribute, #initialize, #release_path, #repo_path

Constructor Details

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

Instance Method Details

#checkBoolean

Tests whether or not the archive indicated by Capistrano::Distribution::Distributor::Abstract#url is available via the curl command.

Returns:

  • (Boolean)

    true if the archive is available; otherwise, false.

See Also:



21
22
23
# File 'lib/capistrano/distribution/distributor/abstract_curl.rb', line 21

def check
  context.test 'curl', '--fail', '--location', '--silent', '--head', '--request', 'GET', url
end