Class: Subversion

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

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Utils

included, #method_missing, #noop

Constructor Details

#initialize(reader) ⇒ Subversion

Returns a new instance of Subversion.



3
4
5
# File 'lib/blanket/plugins/sources/subversion.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

.attribute_symbolsObject



7
8
9
# File 'lib/blanket/plugins/sources/subversion.rb', line 7

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

.default_hostObject



15
16
17
# File 'lib/blanket/plugins/sources/subversion.rb', line 15

def self.default_host
  "yourhost.com"
end

.default_local_pathObject



35
36
37
# File 'lib/blanket/plugins/sources/subversion.rb', line 35

def self.default_local_path
  "/path/to/local/backup-file"
end

.default_passwordObject



23
24
25
# File 'lib/blanket/plugins/sources/subversion.rb', line 23

def self.default_password
  "password"
end

.default_remote_pathObject



31
32
33
# File 'lib/blanket/plugins/sources/subversion.rb', line 31

def self.default_remote_path
  "/path/to/remote/backup-file"
end

.default_repositoryObject



27
28
29
# File 'lib/blanket/plugins/sources/subversion.rb', line 27

def self.default_repository
  "/path/to/repo"
end

.default_source_typeObject



11
12
13
# File 'lib/blanket/plugins/sources/subversion.rb', line 11

def self.default_source_type
  "Subversion"
end

.default_userObject



19
20
21
# File 'lib/blanket/plugins/sources/subversion.rb', line 19

def self.default_user
  "username"
end

Instance Method Details

#cleanup_commandObject



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

def cleanup_command
  noop
end

#local_backup_pathObject



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

def local_backup_path
  local_path
end

#prep_commandObject



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

def prep_command
  "svnadmin dump #{repository} > #{remote_backup_path}"
end

#remote_backup_pathObject



39
40
41
# File 'lib/blanket/plugins/sources/subversion.rb', line 39

def remote_backup_path
  remote_path
end