From f0fa8aa5dfd8e9d9d0975f602cfbabbf4ba79454 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 12 Apr 2010 00:05:24 -0700 Subject: [PATCH] Export now uses proper function and has progress bar (like import) --- lib/vagrant/actions/vm/export.rb | 8 +++++++- test/vagrant/actions/vm/export_test.rb | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/actions/vm/export.rb b/lib/vagrant/actions/vm/export.rb index 38d6bee4b..a162f11e4 100644 --- a/lib/vagrant/actions/vm/export.rb +++ b/lib/vagrant/actions/vm/export.rb @@ -2,6 +2,8 @@ module Vagrant module Actions module VM class Export < Base + include Util::ProgressMeter + attr_reader :temp_dir def execute! @@ -33,7 +35,11 @@ module Vagrant def export logger.info "Exporting VM to #{ovf_path} ..." - @runner.vm.export(ovf_path, {}, true) + @runner.vm.export(ovf_path) do |progress| + update_progress(progress, 100) + end + + complete_progress end end end diff --git a/test/vagrant/actions/vm/export_test.rb b/test/vagrant/actions/vm/export_test.rb index bdf4eb72c..8c8bc72f9 100644 --- a/test/vagrant/actions/vm/export_test.rb +++ b/test/vagrant/actions/vm/export_test.rb @@ -55,7 +55,7 @@ class ExportActionTest < Test::Unit::TestCase end should "call export on the runner with the ovf path" do - @vm.expects(:export).with(@ovf_path, {}, true).once + @vm.expects(:export).with(@ovf_path).once @action.export end end