Sha256: 3dacf383d7e5acc6c35f8344d51356a6083284c9c0f6586e6ee59d523be6de21

Contents?: true

Size: 651 Bytes

Versions: 13

Compression:

Stored size: 651 Bytes

Contents

module VagrantPlugins
  module Parallels
    module Action
      class CheckAccessible
        def initialize(app, env)
          @app = app
        end

        def call(env)
          if env[:machine].state.id == :inaccessible
            # The VM we are attempting to manipulate is inaccessible. This
            # is a very bad situation and can only be fixed by the user. It
            # also prohibits us from actually doing anything with the virtual
            # machine, so we raise an error.
            raise VagrantPlugins::Parallels::Errors::VMInaccessible
          end

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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
vagrant-parallels-1.0.9.rc1 lib/vagrant-parallels/action/check_accessible.rb
vagrant-parallels-1.0.8 lib/vagrant-parallels/action/check_accessible.rb
vagrant-parallels-1.0.7 lib/vagrant-parallels/action/check_accessible.rb
vagrant-parallels-1.0.6 lib/vagrant-parallels/action/check_accessible.rb
vagrant-parallels-1.0.6.rc1 lib/vagrant-parallels/action/check_accessible.rb
vagrant-parallels-1.0.5 lib/vagrant-parallels/action/check_accessible.rb
vagrant-parallels-1.0.4 lib/vagrant-parallels/action/check_accessible.rb
vagrant-parallels-1.0.3 lib/vagrant-parallels/action/check_accessible.rb
vagrant-parallels-1.0.2 lib/vagrant-parallels/action/check_accessible.rb
vagrant-parallels-1.0.1 lib/vagrant-parallels/action/check_accessible.rb
vagrant-parallels-1.0.0 lib/vagrant-parallels/action/check_accessible.rb
vagrant-parallels-0.2.2 lib/vagrant-parallels/action/check_accessible.rb
vagrant-parallels-0.2.2.rc1 lib/vagrant-parallels/action/check_accessible.rb