commands/plugin: list puts plugin namein machine readable output

[GH-4506]
This commit is contained in:
Mitchell Hashimoto 2014-10-23 12:00:46 -07:00
parent 06defb37c7
commit f23c5ebc46
2 changed files with 14 additions and 3 deletions

View File

@ -4,6 +4,8 @@ IMPROVEMENTS:
- core: `has_plugin?` function now takes a second argument which is a
version constraint requirement. [GH-4650]
- commands/plugin: Plugin list machine-readable output contains the plugin
name as the target for versions and other info. [GH-4506]
- guests/arch: Support predictable network interface naming. [GH-4468]
- guests/suse: Support NFS client install, rsync setup. [GH-4492]
- guests/tinycore: Support changing host names. [GH-4469]

View File

@ -34,20 +34,29 @@ module VagrantPlugins
system = ", system" if plugin && plugin["system"]
env[:ui].info "#{spec.name} (#{spec.version}#{system})"
env[:ui].machine("plugin-name", spec.name)
env[:ui].machine("plugin-version", "#{spec.version}#{system}")
env[:ui].machine(
"plugin-version",
"#{spec.version}#{system}",
target: spec.name)
if plugin["gem_version"] && plugin["gem_version"] != ""
env[:ui].info(I18n.t(
"vagrant.commands.plugin.plugin_version",
version: plugin["gem_version"]))
env[:ui].machine("plugin-version-constraint", plugin["gem_version"])
env[:ui].machine(
"plugin-version-constraint",
plugin["gem_version"],
target: spec.name)
end
if plugin["require"] && plugin["require"] != ""
env[:ui].info(I18n.t(
"vagrant.commands.plugin.plugin_require",
require: plugin["require"]))
env[:ui].machine("plugin-custom-entrypoint", plugin["require"])
env[:ui].machine(
"plugin-custom-entrypoint",
plugin["require"],
target: spec.name)
end
end