13 Commits

Author SHA1 Message Date
Ray Ruvinskiy
5a7e00c5b1 Add HTTPS download options to box update and box outdated
Vagrant::Box.load_metadata did not provide a way to specify the HTTPS
download options that could be specified when downloading boxes
(ca cert, ca path, client cert, insecure). As a result, while it was
possible to add a box whose metadata file needed to be downloaded with one of
those options specified, it was impossible to check for updates. The following
changes have been made to address the situation:

1. Create a DownloadMixins module to provide the --insecure, --cacert, --capth,
   and --cert command line options to all of `vagrant box add`,
   `vagrant box update`, and `vagrant box outdated`.
2. Extend `Vagrant::Box.has_update?` and `Vagrant::Box.load_metadata` to accept
   said download options.
3. Extend `box outdated` and `box update` commands to pass download options
   down.
4. Extend `Vagrant::Builtin::Action::BoxCheckOutdated` to honour download
   options.
5. Options specified on the command line take precedence over options specified
   in the machine configuration, if any.
6. Fix bug in `vagrant box add` where client cert was being passed down using
   the wrong environment key.
7. Unit test coverage in update_test and box_check_outdated_test.

Resolves #4420
2014-09-07 23:57:34 -04:00
Mitchell Hashimoto
d1a26bf8ca core: add more logging to check box outdated 2014-05-07 17:21:17 -07:00
Mitchell Hashimoto
5f12126d32 core: network issues don't halt Vagrant during box update check [GH-3391] 2014-04-05 09:25:03 -07:00
Mitchell Hashimoto
af7a589231 core: outdated check checks local boxes [GH-3321] 2014-04-02 08:37:03 -07:00
Mitchell Hashimoto
36ad327ec1 core: ignore if box doesn't exist on update check [GH-3326] 2014-04-02 08:24:38 -07:00
Mitchell Hashimoto
751b4da2c6 core: if box is unversioned, check update does nothing 2014-02-05 21:20:32 -08:00
Mitchell Hashimoto
61a1082d65 core: BoxCheckOutdated is *much* simpler, unified logic, tests 2014-02-05 21:20:18 -08:00
Mitchell Hashimoto
bfca65b098 core: better output for BoxCheckOutdated 2014-02-05 21:20:16 -08:00
Mitchell Hashimoto
ea06202903 core: get rid of unnecessary lines 2014-02-05 21:20:15 -08:00
Mitchell Hashimoto
b5157df2cc core: BoxCheckOutdated only runs if told to 2014-02-05 21:20:14 -08:00
Mitchell Hashimoto
8cc16d14fa core: BoxCheckOutdated checks locally 2014-02-05 21:20:13 -08:00
Mitchell Hashimoto
d78194654d core: ability to hide success UI 2014-02-05 21:20:12 -08:00
Mitchell Hashimoto
e537e02d9d core: BoxCheckOutdated can check if a box is outdated 2014-02-05 21:20:11 -08:00