lib/io_streams/paths/sftp.rb in iostreams-1.2.1 vs lib/io_streams/paths/sftp.rb in iostreams-1.3.0

- old
+ new

@@ -171,21 +171,27 @@ writer.puts "get #{remote_file_name} #{local_file_name}" writer.puts "bye" writer.close out = reader.read.chomp unless waith_thr.value.success? - raise(Errors::CommunicationsFailure, "Download failed calling #{self.class.sftp_bin} via #{self.class.sshpass_bin}: #{out}") + raise( + Errors::CommunicationsFailure, + "Download failed calling #{self.class.sftp_bin} via #{self.class.sshpass_bin}: #{out}" + ) end out rescue Errno::EPIPE out = begin reader.read.chomp rescue StandardError nil end - raise(Errors::CommunicationsFailure, "Download failed calling #{self.class.sftp_bin} via #{self.class.sshpass_bin}: #{out}") + raise( + Errors::CommunicationsFailure, + "Download failed calling #{self.class.sftp_bin} via #{self.class.sshpass_bin}: #{out}" + ) end end end end @@ -199,20 +205,26 @@ writer.puts "put #{local_file_name.inspect} #{remote_file_name.inspect}" writer.puts "bye" writer.close out = reader.read.chomp unless waith_thr.value.success? - raise(Errors::CommunicationsFailure, "Upload failed calling #{self.class.sftp_bin} via #{self.class.sshpass_bin}: #{out}") + raise( + Errors::CommunicationsFailure, + "Upload failed calling #{self.class.sftp_bin} via #{self.class.sshpass_bin}: #{out}" + ) end out rescue Errno::EPIPE out = begin reader.read.chomp rescue StandardError nil end - raise(Errors::CommunicationsFailure, "Upload failed calling #{self.class.sftp_bin} via #{self.class.sshpass_bin}: #{out}") + raise( + Errors::CommunicationsFailure, + "Upload failed calling #{self.class.sftp_bin} via #{self.class.sshpass_bin}: #{out}" + ) end end end end