Module: Remoting::Task
- Defined in:
- lib/remoting/task.rb
Instance Method Summary collapse
- #_remoting_task_included ⇒ Object
- #config ⇒ Object
- #local(name, *args, &block) ⇒ Object
- #remote(name, login, *args, &block) ⇒ Object
- #run(commander, commands) ⇒ Object
- #shell ⇒ Object
Instance Method Details
#_remoting_task_included ⇒ Object
9 10 |
# File 'lib/remoting/task.rb', line 9 def _remoting_task_included end |
#local(name, *args, &block) ⇒ Object
16 17 18 19 20 21 |
# 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) ⇒ Object
23 24 25 26 27 28 |
# 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) ⇒ Object
30 31 32 |
# File 'lib/remoting/task.rb', line 30 def run(commander, commands) commander.exec(commands) end |