Sha256: 6c31b22438b5a7bc13995f8d278cdb037a29235ef2f1e6ca6804ca7b1aade0de

Contents?: true

Size: 505 Bytes

Versions: 31

Compression:

Stored size: 505 Bytes

Contents

module VagrantPlugins
  module Parallels
    module Action
      # This middleware checks that the VM is created, and raises an exception
      # if it is not, notifying the user that creation is required.
      class CheckCreated
        def initialize(app, env)
          @app = app
        end

        def call(env)
          if env[:machine].state.id == :not_created
            raise Vagrant::Errors::VMNotCreatedError
          end

          @app.call(env)
        end
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
vagrant-parallels-1.0.9.rc1 lib/vagrant-parallels/action/check_created.rb
vagrant-parallels-1.0.8 lib/vagrant-parallels/action/check_created.rb
vagrant-parallels-1.0.7 lib/vagrant-parallels/action/check_created.rb
vagrant-parallels-1.0.6 lib/vagrant-parallels/action/check_created.rb
vagrant-parallels-1.0.6.rc1 lib/vagrant-parallels/action/check_created.rb
vagrant-parallels-1.0.5 lib/vagrant-parallels/action/check_created.rb
vagrant-parallels-1.0.4 lib/vagrant-parallels/action/check_created.rb
vagrant-parallels-1.0.3 lib/vagrant-parallels/action/check_created.rb
vagrant-parallels-1.0.2 lib/vagrant-parallels/action/check_created.rb
vagrant-parallels-1.0.1 lib/vagrant-parallels/action/check_created.rb
vagrant-parallels-1.0.0 lib/vagrant-parallels/action/check_created.rb
vagrant-parallels-0.2.2 lib/vagrant-parallels/action/check_created.rb
vagrant-parallels-0.2.2.rc1 lib/vagrant-parallels/action/check_created.rb
vagrant-parallels-0.2.1 lib/vagrant-parallels/action/check_created.rb
vagrant-parallels-0.2.0 lib/vagrant-parallels/action/check_created.rb
vagrant-parallels-0.1.3 lib/vagrant-parallels/action/check_created.rb
vagrant-parallels-0.1.2 lib/vagrant-parallels/action/check_created.rb
vagrant-parallels-0.1.1 lib/vagrant-parallels/action/check_created.rb
vagrant-parallels-0.1.0 lib/vagrant-parallels/action/check_created.rb
vagrant-parallels-0.0.9 lib/vagrant-parallels/action/check_created.rb