Class: Nucleon::Action::Plugin::List
- Inherits:
-
Object
- Object
- Nucleon::Action::Plugin::List
- Defined in:
- lib/nucleon/action/plugin/list.rb
Class Method Summary collapse
-
.describe ⇒ Object
—————————————————————————– Info.
Instance Method Summary collapse
-
#arguments ⇒ Object
—.
-
#configure ⇒ Object
—————————————————————————– Settings.
-
#execute ⇒ Object
—————————————————————————– Operations.
Class Method Details
.describe ⇒ Object
Info
10 11 12 |
# File 'lib/nucleon/action/plugin/list.rb', line 10 def self.describe super(:plugin, :list, 15) end |
Instance Method Details
#arguments ⇒ Object
25 26 27 |
# File 'lib/nucleon/action/plugin/list.rb', line 25 def arguments [] end |
#configure ⇒ Object
Settings
17 18 19 20 21 |
# File 'lib/nucleon/action/plugin/list.rb', line 17 def configure super do end end |
#execute ⇒ Object
Operations
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/nucleon/action/plugin/list.rb', line 32 def execute super do |node| ensure_network do last_namespace = nil last_plugin_type = nil Nucleon.loaded_plugins.each do |namespace, plugins| info('------------------------------------------------------', { :i18n => false, :prefix => false }) (:info, ' ', 'namespace', { :namespace => purple(namespace), :prefix => false }) info("\n", { :i18n => false, :prefix => false }) provider_info = {} max_width = 10 plugins.each do |type, providers| (:info, ' ', 'plugin_type', { :type => blue(type), :prefix => false }) (:info, ' ', 'providers', { :prefix => false }) providers.keys.each do |name| width = name.to_s.size max_width = width if width > max_width end providers.each do |provider, plugin_info| info(" #{sprintf("%-#{max_width + 10}s", green(provider))} - #{yellow(plugin_info[:file])}", { :i18n => false, :prefix => false }) end info("\n", { :i18n => false, :prefix => false }) last_plugin_type = type end last_namespace = namespace end end end end |