lib/aruba/processes/spawn_process.rb in aruba-1.0.0.pre.alpha.1 vs lib/aruba/processes/spawn_process.rb in aruba-1.0.0.pre.alpha.2

- old
+ new

@@ -62,10 +62,13 @@ @stderr_file = Tempfile.new('aruba-stderr-') @stdout_file.sync = true @stderr_file.sync = true + @stdout_file.binmode + @stderr_file.binmode + @exit_status = nil @duplex = true before_run @@ -88,13 +91,12 @@ after_run yield self if block_given? end - # rubocop:disable Metrics/MethodLength - # Access to stdout of process + # Access to stdin of process def stdin return if @process.exited? @process.io.stdin end @@ -247,13 +249,11 @@ def command_string # gather fully qualified path cmd = Aruba.platform.which(command, environment['PATH']) - # rubocop:disable Metrics/LineLength fail LaunchError, %(Command "#{command}" not found in PATH-variable "#{environment['PATH']}".) if cmd.nil? - # rubocop:enable Metrics/LineLength Aruba.platform.command_string.new(cmd) end def wait_for_io(time_to_wait, &block) @@ -265,10 +265,10 @@ file.flush file.rewind data = file.read file.close - data + data.force_encoding('UTF-8') end end end end