Sha256: 8e6ccd05d3a23868db1b2316841cfdda86d43a9ee51415a7913f6b68b386677e

Contents?: true

Size: 731 Bytes

Versions: 28

Compression:

Stored size: 731 Bytes

Contents

module Brightbox
  command [:config] do |cmd|

    cmd.desc I18n.t("config.client_default.desc")
    cmd.arg_name "alias"
    cmd.command [:client_default] do |c|

      c.action do |_global_options, _options, args|

        info "Using config file #{Brightbox.config.config_filename}"
        calias = args.shift

        if calias.nil?
          raise "You must specify the api alias you want to set as the default"
        end

        if Brightbox.config.client_named?(calias)
          info "Setting #{calias} as default api client"
          Brightbox.config.set_default_client(calias)
        else
          raise "An api client with the alias #{calias} does not exist in the config"
        end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
brightbox-cli-3.3.0 lib/brightbox-cli/commands/config/client-default.rb
brightbox-cli-3.2.0 lib/brightbox-cli/commands/config/client-default.rb
brightbox-cli-3.1.0 lib/brightbox-cli/commands/config/client-default.rb
brightbox-cli-3.0.1 lib/brightbox-cli/commands/config/client-default.rb
brightbox-cli-3.0.0 lib/brightbox-cli/commands/config/client-default.rb
brightbox-cli-2.12.0 lib/brightbox-cli/commands/config/client-default.rb
brightbox-cli-2.11.2 lib/brightbox-cli/commands/config/client-default.rb
brightbox-cli-2.11.1 lib/brightbox-cli/commands/config/client-default.rb
brightbox-cli-2.11.0 lib/brightbox-cli/commands/config/client-default.rb
brightbox-cli-2.10.0 lib/brightbox-cli/commands/config/client-default.rb
brightbox-cli-2.9.3 lib/brightbox-cli/commands/config/client-default.rb
brightbox-cli-2.9.2 lib/brightbox-cli/commands/config/client-default.rb
brightbox-cli-2.9.1 lib/brightbox-cli/commands/config/client-default.rb
brightbox-cli-2.9.0 lib/brightbox-cli/commands/config/client-default.rb
brightbox-cli-2.8.2 lib/brightbox-cli/commands/config/client-default.rb
brightbox-cli-2.8.1 lib/brightbox-cli/commands/config/client-default.rb
brightbox-cli-2.8.0 lib/brightbox-cli/commands/config/client-default.rb
brightbox-cli-2.7.1 lib/brightbox-cli/commands/config/client-default.rb
brightbox-cli-2.7.0 lib/brightbox-cli/commands/config/client-default.rb
brightbox-cli-2.6.0 lib/brightbox-cli/commands/config/client-default.rb