Class: Confluence

Inherits:
Source show all
Defined in:
lib/blanket/plugins/sources/confluence.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Utils

included, #method_missing, #noop

Constructor Details

#initialize(reader) ⇒ Confluence

Returns a new instance of Confluence.



4
5
6
# File 'lib/blanket/plugins/sources/confluence.rb', line 4

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

.attribute_symbolsObject



8
9
10
# File 'lib/blanket/plugins/sources/confluence.rb', line 8

def self.attribute_symbols
  [:source_type, :host, :user, :password, :remote_directory, :local_directory ]
end

.default_hostObject



16
17
18
# File 'lib/blanket/plugins/sources/confluence.rb', line 16

def self.default_host
  "yourhost.com"
end

.default_local_directoryObject



32
33
34
# File 'lib/blanket/plugins/sources/confluence.rb', line 32

def self.default_local_directory
  "/path/to/local/confluence/backups"
end

.default_passwordObject



24
25
26
# File 'lib/blanket/plugins/sources/confluence.rb', line 24

def self.default_password
  "password"
end

.default_remote_directoryObject



28
29
30
# File 'lib/blanket/plugins/sources/confluence.rb', line 28

def self.default_remote_directory
  "/path/to/remote/confluence/backups"
end

.default_source_typeObject



12
13
14
# File 'lib/blanket/plugins/sources/confluence.rb', line 12

def self.default_source_type
  "Confluence"
end

.default_userObject



20
21
22
# File 'lib/blanket/plugins/sources/confluence.rb', line 20

def self.default_user
  "username"
end

.filenameObject



37
38
39
40
41
# File 'lib/blanket/plugins/sources/confluence.rb', line 37

def self.filename
  #On my system, they're named daily-backup-2008_02_24.zip
  today = Date.today
  "daily-backup-#{today.strftime("%Y_%m_%d")}.zip"
end

Instance Method Details

#cleanup_commandObject



55
56
57
# File 'lib/blanket/plugins/sources/confluence.rb', line 55

def cleanup_command
  noop
end

#local_backup_pathObject



47
48
49
# File 'lib/blanket/plugins/sources/confluence.rb', line 47

def local_backup_path
  [local_directory, Confluence.filename].join('/')
end

#prep_commandObject



51
52
53
# File 'lib/blanket/plugins/sources/confluence.rb', line 51

def prep_command
  noop
end

#remote_backup_pathObject



43
44
45
# File 'lib/blanket/plugins/sources/confluence.rb', line 43

def remote_backup_path
  [remote_directory, Confluence.filename].join('/')
end