Sha256: 11290588599fdd806e5428bdbd4b907be22d28255dce1fb9babd82a6b9c40a63

Contents?: true

Size: 525 Bytes

Versions: 9

Compression:

Stored size: 525 Bytes

Contents

module VagrantVbguest

  # A Vagrant middleware which checks the installed VirtualBox Guest
  # Additions to match the installed VirtualBox installation on the
  # host system.

  class Middleware
    def initialize(app, env, options = {})
      @app = app
      @env = env
      @vm  = env[:vm]
    end

    def call(env)
      options = @vm.config.vbguest.to_hash
      options[:auto_update] = true if options[:auto_update].nil?
      VagrantVbguest::Installer.new(@vm, options).run
      @app.call(env)
    end
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
vagrant-vbguest-0.3.5 lib/vagrant-vbguest/middleware.rb
vagrant-vbguest-0.3.4 lib/vagrant-vbguest/middleware.rb
vagrant-vbguest-0.3.3 lib/vagrant-vbguest/middleware.rb
vagrant-vbguest-0.3.3.a lib/vagrant-vbguest/middleware.rb
vagrant-vbguest-0.3.2 lib/vagrant-vbguest/middleware.rb
vagrant-vbguest-0.3.1 lib/vagrant-vbguest/middleware.rb
vagrant-vbguest-0.3.0 lib/vagrant-vbguest/middleware.rb
vagrant-vbguest-0.3.0.pre lib/vagrant-vbguest/middleware.rb
vagrant-vbguest-0.2.1 lib/vagrant-vbguest/middleware.rb