From 063ea60d407ccabd1d0122dc74b1d4a62e841856 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 12 Feb 2010 19:53:34 -0800 Subject: [PATCH] Initial attempt at refactoring commands out into evented actions. Heavy documentation on the "vagrant/actions/base.rb" class. New VM action runner functionality is well tested, as well. --- lib/vagrant/actions/base.rb | 2 +- lib/vagrant/vm.rb | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/vagrant/actions/base.rb b/lib/vagrant/actions/base.rb index 411c13505..e621cd8cc 100644 --- a/lib/vagrant/actions/base.rb +++ b/lib/vagrant/actions/base.rb @@ -48,4 +48,4 @@ module Vagrant end end end -end \ No newline at end of file +end diff --git a/lib/vagrant/vm.rb b/lib/vagrant/vm.rb index 52ce232fa..2446dd949 100644 --- a/lib/vagrant/vm.rb +++ b/lib/vagrant/vm.rb @@ -151,13 +151,11 @@ error logger.info "Packaging VM into #{tar_path} ..." Zlib::GzipWriter.open(tar_path) do |gz| - first_file = true Dir.new(folder).each do |file| next if File.directory?(file) # Delimit the files, and guarantee new line for next file if not the first gz.write "#{delimiter}#{file}#{delimiter}" File.open(File.join(folder, file)).each { |line| gz.write(line) } - first_file = false end end