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

Version Path
vagrantup-0.8.5 lib/vagrant/command/status.rb
vagrantup-0.8.4 lib/vagrant/command/status.rb
vagrantup-0.8.3 lib/vagrant/command/status.rb
vagrantup-0.8.2 lib/vagrant/command/status.rb
vagrantup-0.8.1 lib/vagrant/command/status.rb
vagrantup-0.8.0 lib/vagrant/command/status.rb
vagrantup-0.7.8 lib/vagrant/command/status.rb
vagrantup-0.7.7 lib/vagrant/command/status.rb
vagrantup-0.7.6 lib/vagrant/command/status.rb
vagrantup-0.7.5 lib/vagrant/command/status.rb
vagrantup-0.7.4 lib/vagrant/command/status.rb
vagrantup-0.7.3 lib/vagrant/command/status.rb
vagrantup-0.7.2 lib/vagrant/command/status.rb
vagrantup-0.7.1 lib/vagrant/command/status.rb
vagrantup-0.7.0 lib/vagrant/command/status.rb
vagrantup-0.6.9 lib/vagrant/command/status.rb
vagrantup-0.6.8 lib/vagrant/command/status.rb
vagrantup-0.6.7 lib/vagrant/command/status.rb
vagrant-0.8.5 lib/vagrant/command/status.rb
vagrant-0.8.2 lib/vagrant/command/status.rb