Sha256: 31b8b1f3cc1cc2e22cd60134025681b10f46044294bed54dddadd454d1270819
Contents?: true
Size: 952 Bytes
Versions: 1
Compression:
Stored size: 952 Bytes
Contents
module VagrantPlugins module Omnibus module Action # @author Mitchell Hashimoto <mitchell.hashimoto@gmail.com> # @author Seth Chisamore <schisamo@opscode.com> # # This action checks if the machine is up and running. # # This is a direct copy of # `VagrantPlugins::ProviderVirtualBox::Action::IsRunning` that is part of # the VirtualBox provider that ships in core Vagrant. # # @todo find out why this isn't part of `Vagrant::Action::Builtin` class IsRunning def initialize(app, env) @app = app end def call(env) # Set the result to be true if the machine is running. env[:result] = env[:machine].state.id == :running # Call the next if we have one (but we shouldn't, since this # middleware is built to run with the Call-type middlewares) @app.call(env) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vagrant-omnibus-1.0.0 | lib/vagrant-omnibus/action/is_running.rb |