Sha256: 29992af4eba61bdaecf5692a34c90e6a12f65d418a61daca0da31382cddb3971
Contents?: true
Size: 812 Bytes
Versions: 2
Compression:
Stored size: 812 Bytes
Contents
require "imap/backup/account/backup" module Imap; end module Imap::Backup class CLI::Backup < Thor include Thor::Actions include CLI::Helpers attr_reader :options def initialize(options) super([]) @options = options end no_commands do def run config = load_config(**options) requested_accounts(config).each do |account| backup = Account::Backup.new(account: account, refresh: refresh) backup.run rescue StandardError => e message = "Backup for account '#{account.username}' " \ "failed with error #{e}" Logger.logger.warn message next end end def refresh options.key?(:refresh) ? !!options[:refresh] : false end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
imap-backup-11.0.0.rc1 | lib/imap/backup/cli/backup.rb |
imap-backup-10.0.1 | lib/imap/backup/cli/backup.rb |