module Remoting::Task

Public Instance Methods

_remoting_task_included() click to toggle source
# File lib/remoting/task.rb, line 9
def _remoting_task_included
end
config() click to toggle source
# File lib/remoting/task.rb, line 12
def config
  ::Remoting.config
end
local(name, *args, &block) click to toggle source
# File lib/remoting/task.rb, line 16
def local(name, *args, &block)
  bold("Executing '#{name}' on local ...")
  commands  = ::Remoting::Dsl::ScriptBuilder.build(&block)
  commander = LocalCommander.new(*args)
  run(commander, commands) 
end
remote(name, login, *args, &block) click to toggle source
# File lib/remoting/task.rb, line 23
def remote(name, login, *args, &block)
  bold("Executing '#{name}' on '#{login}' ...")
  commands = ::Remoting::Dsl::ScriptBuilder.build(&block)      
  commander = RemoteCommander.new(login, *args)
  run(commander, commands)
end
run(commander, commands) click to toggle source
# File lib/remoting/task.rb, line 30
def run(commander, commands)
  commander.exec(commands)
end
shell() click to toggle source
# File lib/remoting/task.rb, line 34
def shell
  @shell ||= ::Remoting::Shell.new
end