Sha256: 8234af74d202023f1b4c524652fbab6b4d9e21156ebcce6e829d75d87485bc98

Contents?: true

Size: 412 Bytes

Versions: 37

Compression:

Stored size: 412 Bytes

Contents

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

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

Version data entries

37 entries across 37 versions & 10 rubygems

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