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-0.5.0 lib/vagrant-aws/action/is_created.rb
vagrant-aws_stsmith-0.5.0.dev lib/vagrant-aws/action/is_created.rb
vagrant-aws-stsmith-0.5.0.dev lib/vagrant-aws/action/is_created.rb
vagrant-aws-0.4.1 lib/vagrant-aws/action/is_created.rb
vagrant-aws-0.4.0 lib/vagrant-aws/action/is_created.rb
tnargav-aws-0.3.0 lib/vagrant-aws/action/is_created.rb
vagrant-aws-0.3.0 lib/vagrant-aws/action/is_created.rb
vagrant-shell-0.2.6 vendor/bundle/gems/tnargav-aws-0.2.2/lib/vagrant-aws/action/is_created.rb
vagrant-shell-0.2.5 vendor/bundle/gems/tnargav-aws-0.2.2/lib/vagrant-aws/action/is_created.rb
tnargav-aws-0.2.2 lib/vagrant-aws/action/is_created.rb
vagrant-aws-0.2.2 lib/vagrant-aws/action/is_created.rb
vagrant-aws-0.2.1 lib/vagrant-aws/action/is_created.rb
vagrant-aws-0.2.0 lib/vagrant-aws/action/is_created.rb
vagrant-aws-0.1.3 lib/vagrant-aws/action/is_created.rb
vagrant-aws-0.1.2 lib/vagrant-aws/action/is_created.rb
vagrant-aws-0.1.1 lib/vagrant-aws/action/is_created.rb
vagrant-aws-0.1.0 lib/vagrant-aws/action/is_created.rb