Sha256: 72fbcca2fb83257e58d8cf6ac489dabc9049473cc2c31351594ee4e5e542a321

Contents?: true

Size: 408 Bytes

Versions: 25

Compression:

Stored size: 408 Bytes

Contents

module VagrantPlugins
  module AWS
    module Action
      # This can be used with "Call" built-in to check if the machine
      # is stopped and branch in the middleware.
      class IsStopped
        def initialize(app, env)
          @app = app
        end

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

Version data entries

25 entries across 25 versions & 8 rubygems

Version Path
vagrant-aws-mscottford-0.8.2 lib/vagrant-aws/action/is_stopped.rb
vagrant-aws-mscottford-0.8.1 lib/vagrant-aws/action/is_stopped.rb
vagrant-aws-mscottford-0.8.0 lib/vagrant-aws/action/is_stopped.rb
vagrant-gecko-aws-0.8.0 lib/vagrant-aws/action/is_stopped.rb
vagrant-aws-mkubenka-0.7.2.pre.24 lib/vagrant-aws/action/is_stopped.rb
vagrant-aws-detiber-0.7.2.pre.4 lib/vagrant-aws/action/is_stopped.rb
vagrant-aws-detiber-0.7.2.pre.3 lib/vagrant-aws/action/is_stopped.rb
vagrant-aws-detiber-0.7.2.pre.2 lib/vagrant-aws/action/is_stopped.rb
vagrant-aws-mkubenka-0.7.2.pre.22 lib/vagrant-aws/action/is_stopped.rb
vagrant-aws-mkubenka-0.7.2.pre.16 lib/vagrant-aws/action/is_stopped.rb
vagrant-aws-iam-decoder-0.7.2 lib/vagrant-aws/action/is_stopped.rb
vagrant-aws-mkubenka-0.7.2.pre.14 lib/vagrant-aws/action/is_stopped.rb
vagrant-aws-mkubenka-0.7.2.pre.11 lib/vagrant-aws/action/is_stopped.rb
vagrant-aws-mkubenka-0.7.2.pre.10 lib/vagrant-aws/action/is_stopped.rb
vagrant-aws-mkubenka-0.7.2.pre.9 lib/vagrant-aws/action/is_stopped.rb
vagrant-aws-mkubenka-0.7.2.pre.8 lib/vagrant-aws/action/is_stopped.rb
vagrant-aws-0.7.2 lib/vagrant-aws/action/is_stopped.rb
vagrant-aws-0.7.1 lib/vagrant-aws/action/is_stopped.rb
vagrant-aws-0.7.0 lib/vagrant-aws/action/is_stopped.rb
vagrant-aws-0.6.0 lib/vagrant-aws/action/is_stopped.rb