Sha256: 7d5a93b5460c7e089ff68737acf5a442dc0fc1f3069548ce6c20e402e801f95f

Contents?: true

Size: 686 Bytes

Versions: 18

Compression:

Stored size: 686 Bytes

Contents

module Brightbox
  command [:sql] do |product|
    product.command [:snapshots] do |cmd|
      cmd.default_command :list

      cmd.desc I18n.t("sql.snapshots.list.desc")
      cmd.arg_name "[snapshot-id...]"
      cmd.command [:list] do |c|
        c.action do |global_options, _options, args|
          snapshots = if args.empty?
                        DatabaseSnapshot.find(:all)
                      else
                        DatabaseSnapshot.find_or_call(args) do |id|
                          warn "Couldn't find snapshot #{id}"
                        end
                      end

          render_table(snapshots, global_options)
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
brightbox-cli-5.0.0 lib/brightbox-cli/commands/sql/snapshots_list.rb
brightbox-cli-5.0.0.rc2 lib/brightbox-cli/commands/sql/snapshots_list.rb
brightbox-cli-5.0.0.rc1 lib/brightbox-cli/commands/sql/snapshots_list.rb
brightbox-cli-5.0.0.alpha lib/brightbox-cli/commands/sql/snapshots_list.rb
brightbox-cli-4.8.0 lib/brightbox-cli/commands/sql/snapshots_list.rb
brightbox-cli-4.7.0 lib/brightbox-cli/commands/sql/snapshots_list.rb
brightbox-cli-4.6.0 lib/brightbox-cli/commands/sql/snapshots_list.rb
brightbox-cli-4.5.0 lib/brightbox-cli/commands/sql/snapshots_list.rb
brightbox-cli-4.5.0.rc1 lib/brightbox-cli/commands/sql/snapshots_list.rb
brightbox-cli-4.4.0 lib/brightbox-cli/commands/sql/snapshots_list.rb
brightbox-cli-4.3.2 lib/brightbox-cli/commands/sql/snapshots_list.rb
brightbox-cli-4.3.1 lib/brightbox-cli/commands/sql/snapshots_list.rb
brightbox-cli-4.3.0 lib/brightbox-cli/commands/sql/snapshots_list.rb
brightbox-cli-4.2.1 lib/brightbox-cli/commands/sql/snapshots_list.rb
brightbox-cli-4.2.0 lib/brightbox-cli/commands/sql/snapshots_list.rb
brightbox-cli-4.1.0 lib/brightbox-cli/commands/sql/snapshots_list.rb
brightbox-cli-4.0.0 lib/brightbox-cli/commands/sql/snapshots_list.rb
brightbox-cli-4.0.0.rc2 lib/brightbox-cli/commands/sql/snapshots_list.rb