Plugin listing is a bit more sophisticated, shows version
This commit is contained in:
parent
693b825eb1
commit
9690754983
|
@ -25,14 +25,23 @@ module VagrantPlugins
|
||||||
Gem::Specification.find_all
|
Gem::Specification.find_all
|
||||||
end
|
end
|
||||||
|
|
||||||
# Go through each spec and if it is an installed plugin, then
|
# Get the latest version of the installed plugins
|
||||||
# output it. This means that both the installed state and
|
installed_map = {}
|
||||||
# gem match up.
|
|
||||||
specs.each do |spec|
|
specs.each do |spec|
|
||||||
if installed.include?(spec.name)
|
# Ignore specs that aren't in our installed list
|
||||||
# TODO: Formatting
|
next if !installed.include?(spec.name)
|
||||||
env[:ui].info spec.name
|
|
||||||
end
|
# If we already have a newer version in our list of installed,
|
||||||
|
# then ignore it
|
||||||
|
next if installed_map.has_key?(spec.name) &&
|
||||||
|
installed_map[spec.name].version >= spec.version
|
||||||
|
|
||||||
|
installed_map[spec.name] = spec
|
||||||
|
end
|
||||||
|
|
||||||
|
# Output!
|
||||||
|
installed_map.values.each do |spec|
|
||||||
|
env[:ui].info "#{spec.name} (#{spec.version})"
|
||||||
end
|
end
|
||||||
|
|
||||||
@app.call(env)
|
@app.call(env)
|
||||||
|
|
|
@ -418,7 +418,7 @@ en:
|
||||||
`vagrantup.com` for more information on using Vagrant.
|
`vagrantup.com` for more information on using Vagrant.
|
||||||
plugin:
|
plugin:
|
||||||
installing: |-
|
installing: |-
|
||||||
Installing the '%{name}' plugin...
|
Installing the '%{name}' plugin. This can take a few minutes...
|
||||||
uninstalling: |-
|
uninstalling: |-
|
||||||
Uninstalling the '%{name}' plugin...
|
Uninstalling the '%{name}' plugin...
|
||||||
status:
|
status:
|
||||||
|
|
Loading…
Reference in New Issue