12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/engineyard-local.rb', line 12
def call(env)
box_name = env[:vm].config.vm.box
raise Errors::BoxNotSpecified if !box_name
if !env[:box_collection].find(box_name)
box_url = env[:vm].config.vm.box_url
raise Errors::BoxSpecifiedDoesntExist, :name => box_name if !box_url
env[:ui].info I18n.t("vagrant.actions.vm.check_box.not_found", :name => box_name)
env[:box_collection].add(box_name, box_url)
env.env.vms.each do |name, vm|
vm.env.reload_config!
end
env[:vm].env.reload!
env[:vm] = env[:vm].env.vms[env[:vm].name]
end
@app.call(env)
end
|