Sha256: 5c02165b8eebd7019c7b0449dc61da096547d71fb83b55cbd751134ff2867783

Contents?: true

Size: 705 Bytes

Versions: 21

Compression:

Stored size: 705 Bytes

Contents

require "ostruct"
require "time"
require "json"
require "securerandom"

require "snapshot_archive/stores"
require "snapshot_archive/archives"
require "snapshot_archive/formatters"

module SnapshotArchive
  class Cli
    class << self
      def backup(msg:, stores:)
        if msg.empty?
          Cfg.shell.warn("aborting due to empty message")
        else
          Cfg.repository.add(msg: msg, stores: stores)
        end
      end

      def restore(id:)
        Cfg.repository.restore(id)
      end

      def list
        Cfg.repository.list
      end

      def show(id)
        Cfg.repository.show(id)
      end

      def delete(id)
        Cfg.repository.delete(id)
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
snapshot_archive-0.22.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.21.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.20.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.19.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.18.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.17.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.16.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.15.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.14.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.13.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.12.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.11.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.10.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.9.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.8.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.7.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.6.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.5.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.3.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.2.0 lib/snapshot_archive/cli.rb