Class: ThreeScaleToolbox::Commands::RemoteCommand::RemoteListSubcommand
- Inherits:
-
Cri::CommandRunner
- Object
- Cri::CommandRunner
- ThreeScaleToolbox::Commands::RemoteCommand::RemoteListSubcommand
show all
- Includes:
- ThreeScaleToolbox::Command
- Defined in:
- lib/3scale_toolbox/commands/remote_command/remote_list.rb
Class Method Summary
collapse
Instance Method Summary
collapse
#config, #config_file, #exit_with_message, #fetch_required_option, included, #remotes, #threescale_client, #verbose, #verify_ssl
Class Method Details
.command ⇒ Object
7
8
9
10
11
12
13
14
15
|
# File 'lib/3scale_toolbox/commands/remote_command/remote_list.rb', line 7
def self.command
Cri::Command.define do
name 'list'
usage 'list'
summary 'remote list'
description 'List all defined remotes'
runner RemoteListSubcommand
end
end
|
Instance Method Details
#run ⇒ Object
17
18
19
20
21
22
23
24
25
|
# File 'lib/3scale_toolbox/commands/remote_command/remote_list.rb', line 17
def run
if remotes.all.empty?
puts 'Empty remote list.'
else
remotes.all.each do |name, remote|
puts "#{name} #{remote[:endpoint]} #{remote[:authentication]}"
end
end
end
|