Class: VagrantPlugins::Bindler::PluginCommand::List
- Inherits:
-
CommandPlugin::Command::List
- Object
- CommandPlugin::Command::List
- VagrantPlugins::Bindler::PluginCommand::List
show all
- Includes:
- Logging
- Defined in:
- lib/bindler/plugin_command/list.rb
Overview
Override the built in ‘plugin list` command to output project specific plugins information
Instance Method Summary
collapse
Methods included from Logging
#bindler_debug, #bindler_info
Instance Method Details
#display(plugin, version = nil) ⇒ Object
35
36
37
38
39
|
# File 'lib/bindler/plugin_command/list.rb', line 35
def display(plugin, version = nil)
label = " -> #{plugin}"
label << " #{version}" if version
@env.ui.info label
end
|
#execute ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/bindler/plugin_command/list.rb', line 11
def execute
return unless super == 0
if @env.bindler_plugins_file
bindler_debug "#{@env.bindler_plugins_file} data: #{@env.bindler_plugins.inspect}"
if @env.bindler_plugins.any?
@env.ui.info "\nProject dependencies:"
@env.bindler_plugins.each do |plugin|
if plugin.is_a?(String)
display plugin
else
display *plugin.first
end
end
end
else
@env.ui.info "\nNo project specific plugins manifest file found!"
end
0
end
|