Modify Remote::FS interface:
* Accept SFTP session in FS constructor; * Modify Remote to build the session required by FS; * Change TestEnvHelpers#build_remote in order to provided a test double as the remote FS.
This commit is contained in:
@@ -2,14 +2,10 @@ module Producer
|
||||
module Core
|
||||
class Remote
|
||||
class FS
|
||||
attr_reader :remote
|
||||
attr_reader :sftp
|
||||
|
||||
def initialize(remote)
|
||||
@remote = remote
|
||||
end
|
||||
|
||||
def sftp
|
||||
@sftp ||= @remote.session.sftp.connect
|
||||
def initialize(sftp)
|
||||
@sftp = sftp
|
||||
end
|
||||
|
||||
def dir?(path)
|
||||
|
Reference in New Issue
Block a user