Sha256: fe27d6c51fd1d91b0066b3778c76572977f6907f6c8abdadc74ab40c39f9e28d

Contents?: true

Size: 660 Bytes

Versions: 53

Compression:

Stored size: 660 Bytes

Contents

require 'kontena/plugin_manager'
require_relative 'common'

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

    banner "List installed plugins"

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

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

    def execute
      print_table(plugin_list)
    end
  end
end

Version data entries

53 entries across 53 versions & 2 rubygems

Version Path
krates-1.7.11 lib/kontena/cli/plugins/list_command.rb
krates-1.7.10 lib/kontena/cli/plugins/list_command.rb
krates-1.7.9 lib/kontena/cli/plugins/list_command.rb
krates-1.7.8 lib/kontena/cli/plugins/list_command.rb
krates-1.7.7 lib/kontena/cli/plugins/list_command.rb
krates-1.7.6 lib/kontena/cli/plugins/list_command.rb
krates-1.7.5 lib/kontena/cli/plugins/list_command.rb
krates-1.7.4 lib/kontena/cli/plugins/list_command.rb
krates-1.7.3 lib/kontena/cli/plugins/list_command.rb
krates-1.7.2 lib/kontena/cli/plugins/list_command.rb
krates-1.7.1 lib/kontena/cli/plugins/list_command.rb
krates-1.7.0 lib/kontena/cli/plugins/list_command.rb
krates-1.6.9 lib/kontena/cli/plugins/list_command.rb
krates-1.6.8 lib/kontena/cli/plugins/list_command.rb
krates-1.6.7 lib/kontena/cli/plugins/list_command.rb
krates-1.6.6 lib/kontena/cli/plugins/list_command.rb
krates-1.6.5 lib/kontena/cli/plugins/list_command.rb
krates-1.6.4 lib/kontena/cli/plugins/list_command.rb
krates-1.6.3 lib/kontena/cli/plugins/list_command.rb
krates-1.6.2 lib/kontena/cli/plugins/list_command.rb