Class: Redmine::Installer::Backup

Inherits:
Task
  • Object
show all
Defined in:
lib/redmine-installer/backup.rb

Constant Summary collapse

STEPS =
[
  step::RedmineRoot,
  step::Validation,
  step::Backup
]

Instance Attribute Summary collapse

Attributes inherited from Task

#env, #options, #settings, #steps, #tmp_redmine_root

Instance Method Summary collapse

Methods inherited from Task

#check_package, inherited, step

Constructor Details

#initialize(redmine_root, options = {}) ⇒ Backup

Returns a new instance of Backup.



36
37
38
39
# File 'lib/redmine-installer/backup.rb', line 36

def initialize(redmine_root, options={})
  self.redmine_root = redmine_root
  super(options)
end

Instance Attribute Details

#redmine_rootObject

Returns the value of attribute redmine_root.



34
35
36
# File 'lib/redmine-installer/backup.rb', line 34

def redmine_root
  @redmine_root
end

Instance Method Details

#runObject



41
42
43
44
45
# File 'lib/redmine-installer/backup.rb', line 41

def run
  Redmine::Installer::Profile.load(self, options[:profile])
  super
  Redmine::Installer::Profile.save(self) if options[:profile].nil?
end