Class: Gemvault::CLI::Commands::Upgrade

Inherits:
Gemvault::CLI::Command show all
Defined in:
lib/gemvault/cli/commands/upgrade.rb

Overview

Upgrades a vault to the current storage format (e.g. a SQLite Dbvault to a Tarvault), preserving every gem and its timestamp.

Instance Method Summary collapse

Instance Method Details

#run(vault) ⇒ Object



20
21
22
23
24
25
26
27
28
# File 'lib/gemvault/cli/commands/upgrade.rb', line 20

def run(vault)
  begin
    upgrade = build_upgrade(vault)
    dispatch(vault:, upgrade:)
  rescue Gemvault::Vault::Error => e
    print_error(e.message)
    exit(1)
  end
end