Sha256: 70b9b744232ee3ecc869a7ec2592e555530d2415676c3193ee8743fa8e8e58d6

Contents?: true

Size: 495 Bytes

Versions: 15

Compression:

Stored size: 495 Bytes

Contents

module VagrantPlugins
  module Skytap
    module Action
      # This can be used with "Call" built-in to check if the machine
      # is suspended and branch in the middleware.
      class IsSuspended
        def initialize(app, env)
          @app = app
          @logger = Log4r::Logger.new("vagrant_skytap::action::is_suspended")
        end

        def call(env)
          env[:result] = env[:machine].state.id == :suspended
          @app.call(env)
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
vagrant-skytap-0.2.3 lib/vagrant-skytap/action/is_suspended.rb
vagrant-skytap-0.2.2 lib/vagrant-skytap/action/is_suspended.rb
vagrant-skytap-0.2.1 lib/vagrant-skytap/action/is_suspended.rb
vagrant-skytap-0.2.0 lib/vagrant-skytap/action/is_suspended.rb
vagrant-skytap-0.1.11 lib/vagrant-skytap/action/is_suspended.rb
vagrant-skytap-0.1.10 lib/vagrant-skytap/action/is_suspended.rb
vagrant-skytap-0.1.9 lib/vagrant-skytap/action/is_suspended.rb
vagrant-skytap-0.1.8 lib/vagrant-skytap/action/is_suspended.rb
vagrant-skytap-0.1.7 lib/vagrant-skytap/action/is_suspended.rb
vagrant-skytap-0.1.6 lib/vagrant-skytap/action/is_suspended.rb
vagrant-skytap-0.1.5 lib/vagrant-skytap/action/is_suspended.rb
vagrant-skytap-0.1.4 lib/vagrant-skytap/action/is_suspended.rb
vagrant-skytap-0.1.3 lib/vagrant-skytap/action/is_suspended.rb
vagrant-skytap-0.1.2 lib/vagrant-skytap/action/is_suspended.rb
vagrant-skytap-0.1.1a lib/vagrant-skytap/action/is_suspended.rb