Class: Vagrant::Action::Box::Verify

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant/action/box/verify.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ Verify

Returns a new instance of Verify.



5
6
7
8
# File 'lib/vagrant/action/box/verify.rb', line 5

def initialize(app, env)
  @app = app
  @env = env
end

Instance Method Details

#call(env) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/vagrant/action/box/verify.rb', line 10

def call(env)
  begin
    env.ui.info I18n.t("vagrant.actions.box.verify.verifying")
    VirtualBox::Appliance.new(env["box"].ovf_file.to_s)
  rescue Exception
    raise Errors::BoxVerificationFailed
  end

  @app.call(env)
end