Class: Sftp

Inherits:
Sink show all
Defined in:
lib/blanket/plugins/sinks/sftp.rb

Instance Attribute Summary

Attributes inherited from Sink

#backup_file

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Utils

included, #method_missing, #noop

Constructor Details

#initialize(reader) ⇒ Sftp

Returns a new instance of Sftp.



3
4
5
# File 'lib/blanket/plugins/sinks/sftp.rb', line 3

def initialize(reader)
  @reader = reader
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Utils

Class Method Details

.additional_requirementsObject



7
8
9
# File 'lib/blanket/plugins/sinks/sftp.rb', line 7

def self.additional_requirements
  "'capistrano/recipes/sftp'"
end

.attribute_symbolsObject



11
12
13
# File 'lib/blanket/plugins/sinks/sftp.rb', line 11

def self.attribute_symbols
  [:sink_type, :host, :user, :password, :remote_path, :local_path ]
end

.default_hostObject



19
20
21
# File 'lib/blanket/plugins/sinks/sftp.rb', line 19

def self.default_host
  "yourhost.com"
end

.default_local_pathObject



35
36
37
# File 'lib/blanket/plugins/sinks/sftp.rb', line 35

def self.default_local_path
  "/path/to/local/blanket"
end

.default_passwordObject



27
28
29
# File 'lib/blanket/plugins/sinks/sftp.rb', line 27

def self.default_password
  "password"
end

.default_remote_pathObject



31
32
33
# File 'lib/blanket/plugins/sinks/sftp.rb', line 31

def self.default_remote_path
  "/path/to/remote/backup/directory"
end

.default_sink_typeObject



15
16
17
# File 'lib/blanket/plugins/sinks/sftp.rb', line 15

def self.default_sink_type
  "Sftp"
end

.default_userObject



23
24
25
# File 'lib/blanket/plugins/sinks/sftp.rb', line 23

def self.default_user
  "username"
end

Instance Method Details

#cleanup_commandObject



39
40
41
# File 'lib/blanket/plugins/sinks/sftp.rb', line 39

def cleanup_command
  noop
end