Sha256: 9777f342364a38039b6a7527978b81351a5d0ee5990b76a0ac0ad4a4e2f96776

Contents?: true

Size: 414 Bytes

Versions: 16

Compression:

Stored size: 414 Bytes

Contents

module VagrantPlugins
  module Shell
    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

16 entries across 16 versions & 1 rubygems

Version Path
vagrant-shell-0.2.22 lib/vagrant-shell/action/is_created.rb
vagrant-shell-0.2.21 lib/vagrant-shell/action/is_created.rb
vagrant-shell-0.2.20 lib/vagrant-shell/action/is_created.rb
vagrant-shell-0.2.19 lib/vagrant-shell/action/is_created.rb
vagrant-shell-0.2.17 lib/vagrant-shell/action/is_created.rb
vagrant-shell-0.2.16 lib/vagrant-shell/action/is_created.rb
vagrant-shell-0.2.15 lib/vagrant-shell/action/is_created.rb
vagrant-shell-0.2.14 lib/vagrant-shell/action/is_created.rb
vagrant-shell-0.2.13 lib/vagrant-shell/action/is_created.rb
vagrant-shell-0.2.12 lib/vagrant-shell/action/is_created.rb
vagrant-shell-0.2.9 lib/vagrant-shell/action/is_created.rb
vagrant-shell-0.2.8 lib/vagrant-shell/action/is_created.rb
vagrant-shell-0.2.6 lib/vagrant-shell/action/is_created.rb
vagrant-shell-0.2.5 lib/vagrant-shell/action/is_created.rb
vagrant-shell-0.2.4 lib/vagrant-shell/action/is_created.rb
vagrant-shell-0.2.3 lib/vagrant-shell/action/is_created.rb