class Really::Drivers::Local
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
Really::Drivers::DriverBase::new
# File lib/really/drivers/local.rb, line 6 def initialize(*args) # Super does an instance_eval on the given block, so we need to call # super *after* setting up our internal state. super *args end
Protected Instance Methods
execute_command(command, options = {})
click to toggle source
# File lib/really/drivers/local.rb, line 14 def execute_command(command, options = {}) stdin, stdout, stderr, thread = Open3.popen3(command.command) exit_status = thread.value.exitstatus stdout_string = stdout.read stderr_string = stderr.read if options[:log_output] # FIXME: centralize this in DriverBase? logger.status "Output of #{command}:", header: arrow stdout.each_line { |line| logger.status line, header: :arrow } stderr.each_line { |line| logger.status line, header: :arrow } end command_exited_with_exit_code exit_status, options end
transfer_file(source_path, destination_path, options = {})
click to toggle source
# File lib/really/drivers/local.rb, line 31 def transfer_file(source_path, destination_path, options = {}) # FIXME: transfer file end