Class: ThreeScaleToolbox::Commands::ApplicationCommand::Show::ShowSubcommand

Inherits:
Cri::CommandRunner
  • Object
show all
Includes:
ThreeScaleToolbox::Command
Defined in:
lib/3scale_toolbox/commands/application_command/show_command.rb

Constant Summary collapse

FIELDS_TO_SHOW =
%w[id name description state enabled account_id service_id plan_id
user_key application_id].freeze

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ThreeScaleToolbox::Command

#config, #config_file, #exit_with_message, #fetch_required_option, included, #keep_alive, #remotes, #threescale_client, #verbose, #verify_ssl

Class Method Details

.command ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/3scale_toolbox/commands/application_command/show_command.rb', line 11

def self.command
  Cri::Command.define do
    name        'show'
    usage       'show [opts] <remote> <application>'
    summary     'show application attributes'
    description "    Show application attributes\n    \\n Application param allows:\n    \\n * User_key (API key)\n    \\n * App_id (from app_id/app_key pair) or Client ID (for OAuth and OpenID Connect authentication modes)\n    \\n * Application internal id\n    HEREDOC\n\n    ThreeScaleToolbox::CLI.output_flag(self)\n\n    param       :remote\n    param       :application\n\n    runner ShowSubcommand\n  end\nend\n"

Instance Method Details

#run ⇒ Object



33
34
35
# File 'lib/3scale_toolbox/commands/application_command/show_command.rb', line 33

def run
  printer.print_record application.attrs
end