Sha256: b0f1181ccb8c5cf048da1fcc76f6b46e6ae3d212925d0a1790fa603f8f5458e6

Contents?: true

Size: 500 Bytes

Versions: 15

Compression:

Stored size: 500 Bytes

Contents

module VagrantPlugins
  module VCloud
    module Action
      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

15 entries across 15 versions & 1 rubygems

Version Path
vagrant-vcloud-0.5.0 lib/vagrant-vcloud/action/is_running.rb
vagrant-vcloud-0.4.7 lib/vagrant-vcloud/action/is_running.rb
vagrant-vcloud-0.4.6 lib/vagrant-vcloud/action/is_running.rb
vagrant-vcloud-0.4.4 lib/vagrant-vcloud/action/is_running.rb
vagrant-vcloud-0.4.3 lib/vagrant-vcloud/action/is_running.rb
vagrant-vcloud-0.4.2 lib/vagrant-vcloud/action/is_running.rb
vagrant-vcloud-0.4.1 lib/vagrant-vcloud/action/is_running.rb
vagrant-vcloud-0.4.0 lib/vagrant-vcloud/action/is_running.rb
vagrant-vcloud-0.3.3 lib/vagrant-vcloud/action/is_running.rb
vagrant-vcloud-0.3.2 lib/vagrant-vcloud/action/is_running.rb
vagrant-vcloud-0.3.1 lib/vagrant-vcloud/action/is_running.rb
vagrant-vcloud-0.3.0 lib/vagrant-vcloud/action/is_running.rb
vagrant-vcloud-0.2.2 lib/vagrant-vcloud/action/is_running.rb
vagrant-vcloud-0.2.1 lib/vagrant-vcloud/action/is_running.rb
vagrant-vcloud-0.2.0 lib/vagrant-vcloud/action/is_running.rb