lib/io_streams/paths/sftp.rb in iostreams-1.0.0 vs lib/io_streams/paths/sftp.rb in iostreams-1.1.0

- old
+ new

@@ -69,10 +69,10 @@ # IOStreams.path("sftp://test.com/path/file_name.csv", username: "jack", password: "OpenSesame").reader do |io| # puts io.read # end # # # When using the sftp executable use an identity file instead of a password to authenticate: - # IOStreams.path("sftp://test.com/path/file_name.csv", username: "jack", IdentityFile: "~/.ssh/private_key").reader do |io| + # IOStreams.path("sftp://test.com/path/file_name.csv", username: "jack", ssh_options: {IdentityFile: "~/.ssh/private_key"}).reader do |io| # puts io.read # end def initialize(url, username: nil, password: nil, ssh_options: {}) uri = Utils::URI.new(url) raise(ArgumentError, "Invalid URL. Required Format: 'sftp://<host_name>/<file_name>'") unless uri.scheme == 'sftp'