Sha256: 7901872572da718ad0df960db6e498d2c9cc19d1599956c051c90add4aed7ba3

Contents?: true

Size: 608 Bytes

Versions: 24

Compression:

Stored size: 608 Bytes

Contents

require_relative 'common'

module Kontena::Cli::Plugins
  class ListCommand < Kontena::Command
    include Kontena::Cli::Common
    include Kontena::Cli::TableGenerator::Helper
    include Common

    banner "List installed plugins"

    def fields
      quiet? ? [:name] : %i(name version description)
    end

    def plugins
      Kontena::PluginManager.instance.plugins.map do |plugin|
        {
          name: short_name(plugin.name),
          version: plugin.version,
          description: plugin.description
        }
      end
    end

    def execute
      print_table(plugins)
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
kontena-cli-1.3.5 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.3.5.rc1 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.4.0.pre6 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.4.0.pre5 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.4.0.pre4 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.4.0.pre3 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.4.0.pre2 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.4.0.pre1 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.3.4 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.3.4.rc1 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.3.3 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.3.3.rc1 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.3.2 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.3.2.rc2 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.3.2.rc1 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.3.1 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.3.1.rc2 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.3.1.rc1 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.3.0 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.3.0.rc4 lib/kontena/cli/plugins/list_command.rb