Sha256: 6407c0f2575052181581e965abc7be46d31b2be38562274ccced889ca6c1c60e

Contents?: true

Size: 514 Bytes

Versions: 82

Compression:

Stored size: 514 Bytes

Contents

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

82 entries across 75 versions & 13 rubygems

Version Path
vagrant-unbundled-1.8.1.2 plugins/providers/virtualbox/action/check_created.rb
vagrant-unbundled-1.8.1.1 plugins/providers/virtualbox/action/check_created.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-272fb27e0536/plugins/providers/virtualbox/action/check_created.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-1cf2a8db4ccb/plugins/providers/virtualbox/action/check_created.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-b421af58e8b3/plugins/providers/virtualbox/action/check_created.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-309e896975d1/plugins/providers/virtualbox/action/check_created.rb
vagrant-tiktalik-0.0.3 vendor/bundle/ruby/2.0.0/bundler/gems/vagrant-1e28f1ac31e7/plugins/providers/virtualbox/action/check_created.rb
tnargav-1.3.6 plugins/providers/virtualbox/action/check_created.rb
tnargav-1.3.3 plugins/providers/virtualbox/action/check_created.rb
vagrant-shell-0.2.9 demo/templates/vendor/bundle/ruby/1.9.1/gems/tnargav-1.2.2/plugins/providers/virtualbox/action/check_created.rb
tnargav-1.2.3 plugins/providers/virtualbox/action/check_created.rb
vagrant-shell-0.2.8 demo/templates/vendor/bundle/ruby/1.9.1/gems/tnargav-1.2.2/plugins/providers/virtualbox/action/check_created.rb
vagrant-shell-0.2.6 vendor/bundle/gems/tnargav-1.2.2/plugins/providers/virtualbox/action/check_created.rb
vagrant-shell-0.2.5 vendor/bundle/gems/tnargav-1.2.2/plugins/providers/virtualbox/action/check_created.rb
tnargav-1.2.2 plugins/providers/virtualbox/action/check_created.rb
vagrantup-1.1.3 plugins/providers/virtualbox/action/check_created.rb
vagrantup-1.1.2 plugins/providers/virtualbox/action/check_created.rb
vagrantup-1.1.1 plugins/providers/virtualbox/action/check_created.rb
vagrantup-1.1.0 plugins/providers/virtualbox/action/check_created.rb
vagrantup-1.1.4 plugins/providers/virtualbox/action/check_created.rb