diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fff29d84..70426ceae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Use numeric uid/gid in mounting shared folders to increase portability. [GH-252] - HTTP downloading follows redirects. [GH-163] + - Downloaders have clearer output to note what they're doing. ## 0.7.0.beta (December 24, 2010) diff --git a/lib/vagrant/action/box/download.rb b/lib/vagrant/action/box/download.rb index 0e03f3648..32b008bc9 100644 --- a/lib/vagrant/action/box/download.rb +++ b/lib/vagrant/action/box/download.rb @@ -64,7 +64,6 @@ module Vagrant end def download_to(f) - @env.ui.info I18n.t("vagrant.actions.box.download.copying") @downloader.download!(@env["box"].uri, f) end end diff --git a/lib/vagrant/downloaders/file.rb b/lib/vagrant/downloaders/file.rb index 1b7f47568..e527dcec5 100644 --- a/lib/vagrant/downloaders/file.rb +++ b/lib/vagrant/downloaders/file.rb @@ -14,6 +14,7 @@ module Vagrant end def download!(source_url, destination_file) + env.ui.info I18n.t("vagrant.downloaders.file.download") FileUtils.cp(source_url, destination_file.path) end end diff --git a/lib/vagrant/downloaders/http.rb b/lib/vagrant/downloaders/http.rb index 1463de34e..0cd042fec 100644 --- a/lib/vagrant/downloaders/http.rb +++ b/lib/vagrant/downloaders/http.rb @@ -25,11 +25,12 @@ module Vagrant end http.start do |h| + env.ui.info I18n.t("vagrant.downloaders.http.download", :url => source_url) + h.request_get(uri.request_uri) do |response| if response.is_a?(Net::HTTPRedirection) # Follow the HTTP redirect. # TODO: Error on some redirect limit - env.ui.info I18n.t("vagrant.downloaders.http.follow_redirect", :url => response["Location"]) download!(response["Location"], destination_file) return end diff --git a/templates/locales/en.yml b/templates/locales/en.yml index d5a10fd0a..6c0e13e5f 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -370,7 +370,6 @@ en: download: with: "Downloading with %{class}..." cleaning: "Cleaning up downloaded box..." - copying: "Copying box to temporary location..." unknown_type: "Unknown or unsupported URI type given for box download." unpackage: extracting: "Extracting box..." @@ -401,9 +400,10 @@ en: downloaders: file: + download: "Copying box to temporary location..." file_missing: "The specified path to a file doesn't exist." http: - follow_redirect: "Download following redirect: %{url}" + download: "Downloading box: %{url}" socket_error: |- An error occurred while trying to download the specified box. This most often happens if there is no internet connection or the address is