Sha256: 18d289cadb2e292ed3ce5f55d31d18fe990d05a402a44a3a5424e2f58ce84329

Contents?: true

Size: 737 Bytes

Versions: 25

Compression:

Stored size: 737 Bytes

Contents

module ThreeScaleToolbox
  module Commands
    module RemoteCommand
      class RemoteListSubcommand < Cri::CommandRunner
        include ThreeScaleToolbox::Command

        def self.command
          Cri::Command.define do
            name        'list'
            usage       'list'
            summary     'remote list'
            description 'List all defined remotes'
            runner RemoteListSubcommand
          end
        end

        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
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
3scale_toolbox-0.10.0 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.9.0 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.8.0 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.7.0 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.6.0 lib/3scale_toolbox/commands/remote_command/remote_list.rb