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.
This commit is contained in:
parent
dd5abc5452
commit
063ea60d40
|
@ -151,13 +151,11 @@ error
|
||||||
|
|
||||||
logger.info "Packaging VM into #{tar_path} ..."
|
logger.info "Packaging VM into #{tar_path} ..."
|
||||||
Zlib::GzipWriter.open(tar_path) do |gz|
|
Zlib::GzipWriter.open(tar_path) do |gz|
|
||||||
first_file = true
|
|
||||||
Dir.new(folder).each do |file|
|
Dir.new(folder).each do |file|
|
||||||
next if File.directory?(file)
|
next if File.directory?(file)
|
||||||
# Delimit the files, and guarantee new line for next file if not the first
|
# Delimit the files, and guarantee new line for next file if not the first
|
||||||
gz.write "#{delimiter}#{file}#{delimiter}"
|
gz.write "#{delimiter}#{file}#{delimiter}"
|
||||||
File.open(File.join(folder, file)).each { |line| gz.write(line) }
|
File.open(File.join(folder, file)).each { |line| gz.write(line) }
|
||||||
first_file = false
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue