From 3aad85fa30baa22bb189fabdc03cbd0377cfa396 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 11 Apr 2014 09:56:18 -0700 Subject: [PATCH] style --- lib/vagrant/action/builtin/box_add.rb | 3 ++- test/unit/vagrant/action/builtin/box_add_test.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/action/builtin/box_add.rb b/lib/vagrant/action/builtin/box_add.rb index 917fee237..f5f82b6d4 100644 --- a/lib/vagrant/action/builtin/box_add.rb +++ b/lib/vagrant/action/builtin/box_add.rb @@ -70,7 +70,8 @@ module Vagrant # Call the hook to transform URLs into authenticated URLs. # In the case we don't have a plugin that does this, then it # will just return the same URLs. - hook_env = env[:hook].call(:authenticate_box_url, box_urls: url.dup) + hook_env = env[:hook].call( + :authenticate_box_url, box_urls: url.dup) authed_urls = hook_env[:box_urls] if !authed_urls || authed_urls.length != url.length raise "Bad box authentication hook, did not generate proper results." diff --git a/test/unit/vagrant/action/builtin/box_add_test.rb b/test/unit/vagrant/action/builtin/box_add_test.rb index 44cf1b9b6..dce7fde02 100644 --- a/test/unit/vagrant/action/builtin/box_add_test.rb +++ b/test/unit/vagrant/action/builtin/box_add_test.rb @@ -354,7 +354,7 @@ describe Vagrant::Action::Builtin::BoxAdd do expect(name).to eq("foo/bar") expect(version).to eq("0.7") expect(checksum(path)).to eq(checksum(box_path)) - expect(opts[:metadata_url]).to eq(env[:box_url]) + expect(opts[:metadata_url]).to eq("foo") true }.and_return(box)