Sha256: d4851ef2ccf6c34607b752e26d85c07788d652b6ae77039996936eba62972e6e
Contents?: true
Size: 684 Bytes
Versions: 37
Compression:
Stored size: 684 Bytes
Contents
module Vagrant module Command class StatusCommand < NamedBase register "status", "Shows the status of the current Vagrant environment." def route state = nil results = target_vms.collect do |vm| state = vm.created? ? vm.vm.state.to_s : "not_created" "#{vm.name.to_s.ljust(25)}#{state.gsub("_", " ")}" end state = target_vms.length == 1 ? state : "listing" env.ui.info(I18n.t("vagrant.commands.status.output", :states => results.join("\n"), :message => I18n.t("vagrant.commands.status.#{state}")), :prefix => false) end end end end
Version data entries
37 entries across 37 versions & 4 rubygems