5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/dutiful/commands/restore.rb', line 5
def execute
Dutiful::Logger.set quiet?, verbose?
Dutiful::Logger.info "Storage: #{Dutiful::Config.storage.name}\n\n"
Dutiful::Application.each do |application|
Dutiful::Logger.info "#{application.name}:\n" if application.has_backup? || verbose?
application.restore do |file, result|
if result
if result.success?
Dutiful::Logger.success " #{file.name} ✔"
else
Dutiful::Logger.error " #{file.name} ✖ - #{result.error}"
end
elsif verbose?
Dutiful::Logger.info " #{file}"
end
end
end
end
|