From 4281af338f7d2d1a75c102233fab0e699eaab3a2 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 1 Dec 2013 22:20:51 -0800 Subject: [PATCH] core: use keyword args to simplify BoxCollection#add --- lib/vagrant/box_collection.rb | 2 +- test/unit/vagrant/box_collection_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/box_collection.rb b/lib/vagrant/box_collection.rb index cc2ce0d72..b03b6065b 100644 --- a/lib/vagrant/box_collection.rb +++ b/lib/vagrant/box_collection.rb @@ -70,7 +70,7 @@ module Vagrant # the box represents will be added. # @param [Boolean] force If true, any existing box with the same name # and provider will be replaced. - def add(path, name, formats=nil, force=false) + def add(path, name, formats=nil, force: false) formats = [formats] if formats && !formats.is_a?(Array) provider = nil diff --git a/test/unit/vagrant/box_collection_test.rb b/test/unit/vagrant/box_collection_test.rb index 9b098f39e..2bd621b7f 100644 --- a/test/unit/vagrant/box_collection_test.rb +++ b/test/unit/vagrant/box_collection_test.rb @@ -72,7 +72,7 @@ describe Vagrant::BoxCollection do # Attempt to add the box with the same name box_path = environment.box2_file(prev_box_provider, metadata: { "replaced" => "yes" }) - box = instance.add(box_path, prev_box_name, nil, true) + box = instance.add(box_path, prev_box_name, nil, force: true) box.metadata["replaced"].should == "yes" end