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-1.0.1 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-1.0.0 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.20.0 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.19.3 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.19.2 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.19.1 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.19.0 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.18.3 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.18.2 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.18.0 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.17.1 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.17.0 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.16.0 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.15.0 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.14.0 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.13.0 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.12.4 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.12.3 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.12.2 lib/3scale_toolbox/commands/remote_command/remote_list.rb
3scale_toolbox-0.11.0 lib/3scale_toolbox/commands/remote_command/remote_list.rb