Class Sprout::SSHTask
In: sprout/lib/sprout/tasks/ssh_task.rb
Parent: Rake::Task

The SSHTask allows you to execute arbitrary commands on a remote host.

  ssh :update_gem_index do |t|
    t.host = 'dev.projectsprouts.com'
    t.username = 'someUser'
    t.commands << 'cd /var/www/projectsprouts/current/gems'
    t.commands << 'gem generate_index -d .'
  end

Methods

new  

Attributes

commands  [RW]  Array of commands that will be executed on the remote machine
host  [RW]  Host name of the server to connect to with no protocol prefix, like: sub.yourhost.com
password  [RW]  Password to send to the remote host. You will be prompted for this value if it is left null.

NOTE: You should never check a file into version control with this field filled in, it is provided here as a convenience for getting set up.

username  [RW]  Username to send to the remote host. You will be prompted for this value if it is left null.

Public Class methods

[Source]

# File sprout/lib/sprout/tasks/ssh_task.rb, line 66
    def initialize(task_name, app)
      super(task_name, app)
      @name = name
      @host = nil
      @queue = []
      @commands = []
    end

[Validate]