Class: Kontena::PluginManager::Loader

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/kontena/plugin_manager/loader.rb

Constant Summary collapse

CLI_GEM =
'krates'.freeze
MIN_CLI_VERSION =
'0.15.99'.freeze

Constants included from Common

Common::KRATES_PLUGIN

Instance Method Summary collapse

Methods included from Common

dummy_ui, gem_versions, install_dir, installed, installed?, plugin_debug?, plugins, prefix, rubygems_client, search_plugins, use_dummy_ui

Instance Method Details

#load_pluginsObject



16
17
18
19
20
21
22
23
24
# File 'lib/kontena/plugin_manager/loader.rb', line 16

def load_plugins
  Gem::Specification.to_a.each do |spec|
    plugin_path = plugin_require_path(spec)
    next unless plugin_path
    next if loaded_plugins.find { |p| p.name == spec.name }
    load_plugin(plugin_path, spec)
  end
  loaded_plugins
end

#loaded_pluginsObject



12
13
14
# File 'lib/kontena/plugin_manager/loader.rb', line 12

def loaded_plugins
  @loaded_plugins ||= []
end