lib/backup/cleaner.rb in backup-3.6.0 vs lib/backup/cleaner.rb in backup-3.7.0

- old
+ new

@@ -1,9 +1,11 @@ # encoding: utf-8 module Backup module Cleaner + class Error < Backup::Error; end + class << self ## # Logs warnings if any temporary files still exist # from the last time this model/trigger was run, @@ -35,11 +37,11 @@ EOS package_files.each {|file| FileUtils.rm_f(file) } end unless messages.empty? - Logger.warn Errors::CleanerError.new(<<-EOS) + Logger.warn Error.new(<<-EOS) Cleanup Warning #{ messages.join("\n") } Please check the log for messages and/or your notifications concerning this backup: '#{ model.label } (#{ model.trigger })' The temporary files which had to be removed should not have existed. @@ -91,10 +93,10 @@ #{ package_files.join("\n") } EOS end unless messages.empty? - Logger.warn Errors::CleanerError.new(<<-EOS) + Logger.warn Error.new(<<-EOS) Cleanup Warning #{ messages.join("\n") } Make sure you check these files before the next scheduled backup for '#{ model.label } (#{ model.trigger })' These files will be removed at that time!