Mitchell Hashimoto 47fe278667 vagrant box add works again. Box verification remove temporarily.
The built-in middleware sequences will now be hardcoded onto
Vagrant::Action. Other plugins can hook into these sequences to provide
verification and so on. So the VirtualBox plugin will hook into that
action sequence and add verification.
2012-08-18 16:13:14 -07:00

23 lines
641 B
Ruby

module Vagrant
module Downloaders
# Represents a base class for a downloader. A downloader handles
# downloading a box file to a temporary file.
class Base
include Vagrant::Util
def initialize(ui)
@ui = ui
end
# Tests whether a URL matches this download. Subclasses must
# override this and return `true` for any URLs they wish to
# handle.
def self.match?(url); false; end
# Downloads the source file to the destination file. It is up to
# implementors of this class to handle the logic.
def download!(source_url, destination_file); end
end
end
end