Sha256: bc0ff84449941330971661972e201496fc8d85098a2051c7d362d77247bce847

Contents?: true

Size: 524 Bytes

Versions: 8

Compression:

Stored size: 524 Bytes

Contents

module Brightbox
  desc "Authentication token management"
  command [:token] do |cmd|
    cmd.default_command :show

    cmd.desc "Show currently cached OAuth2 Bearer token"
    cmd.command [:show] do |c|
      c.desc "Either 'text', 'token', 'json' or 'curl'"
      c.arg_name "format"
      c.default_value "text"
      c.flag [:format]

      c.action do |global_options, options, args|
        token = Token.show(Brightbox.config, options)
        $stdout.puts token.format(options[:format])
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
brightbox-cli-2.11.2 lib/brightbox-cli/commands/token.rb
brightbox-cli-2.11.1 lib/brightbox-cli/commands/token.rb
brightbox-cli-2.11.0 lib/brightbox-cli/commands/token.rb
brightbox-cli-2.10.0 lib/brightbox-cli/commands/token.rb
brightbox-cli-2.9.3 lib/brightbox-cli/commands/token.rb
brightbox-cli-2.9.2 lib/brightbox-cli/commands/token.rb
brightbox-cli-2.9.1 lib/brightbox-cli/commands/token.rb
brightbox-cli-2.9.0 lib/brightbox-cli/commands/token.rb