Class URI::Generic
In: lib/buildr/core/transports.rb  (CVS)
Parent: Object

Methods

download   proxy_uri   read   upload   write  

Public Instance methods

Downloads the resource to the target.

The target may be a file name (string or task), in which case the file is created from the resource. The target may also be any object that responds to write, e.g. File, StringIO, Pipe.

Use the progress bar when running in verbose mode.

Reads from the resource behind this URI. The first form returns the content of the resource, the second form yields to the block with each chunk of content (usually more than one).

For options, see URI::read.

Uploads from source to the resource.

The source may be a file name (string or task), in which case the file is uploaded to the resource. If the source is a directory, uploads all files inside the directory (including nested directories). The source may also be any object that responds to read (and optionally size), e.g. File, StringIO, Pipe.

Use the progress bar when running in verbose mode.

Writes to the resource behind the URI. The first form writes the content from a string or an object that responds to read and optionally size. The second form writes the content by yielding to the block. Each yield should return up to the specified number of bytes, the last yield returns nil.

For options, see URI::write.

Protected Instance methods

Returns the proxy server to use. Obtains the proxy from the relevant environment variable (e.g. HTTP_PROXY). Supports exclusions based on host name and port number from environment variable NO_PROXY.

[Validate]