rake_remote_task.rb

Path: lib/rake_remote_task.rb
Last Update: Thu Mar 05 22:34:46 -0700 2009

Required files

rubygems   open4   rake   vlad  

Methods

host   put   remote_task   role   rsync   run   set   target_host  

Public Instance methods

Declare a remote host and its roles. Equivalent to role, but shorter for multiple roles.

Copy a (usually generated) file to remote_path. Contents of block are copied to remote_path and you may specify an optional base_name for the tempfile (aids in debugging).

Declare a Vlad task that will execute on all hosts by default. To limit that task to specific roles, use:

    remote_task :example, :roles => [:app, :web] do

Declare a role and assign a remote host to it. Equivalent to the host method; provided for capistrano compatibility.

Execute the given command on the target_host for the current task.

Declare a variable called name and assign it a value. A globally-visible method with the name of the variable is defined. If a block is given, it will be called when the variable is first accessed. Subsequent references to the variable will always return the same value. Raises ArgumentError if the name would conflict with an existing method.

Returns the name of the host that the current task is executing on. target_host can uniquely identify a particular task/host combination.

[Validate]