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.0.rc3 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.3.0.rc2 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.3.0.rc1 lib/kontena/cli/plugins/list_command.rb
kontena-cli-1.3.0.pre2 lib/kontena/cli/plugins/list_command.rb