From 661657c63fe5008203f898cc318fc1273ef1dbc6 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 6 Jan 2015 10:57:25 -0800 Subject: [PATCH] provisioners/chef: fix failing test --- plugins/provisioners/chef/provisioner/chef_apply.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/provisioners/chef/provisioner/chef_apply.rb b/plugins/provisioners/chef/provisioner/chef_apply.rb index a4fdcc145..1ff4790b6 100644 --- a/plugins/provisioners/chef/provisioner/chef_apply.rb +++ b/plugins/provisioners/chef/provisioner/chef_apply.rb @@ -42,7 +42,8 @@ module VagrantPlugins # The destination (on the guest) where the recipe will live # @return [String] - def target_recipe_path(key) + def target_recipe_path + key = Digest::MD5.hexdigest(config.recipe) File.join(config.upload_path, "recipe-#{key}.rb") end @@ -55,9 +56,7 @@ module VagrantPlugins file.rewind # Upload the tempfile to the guest - @machine.communicate.upload( - file.path, - target_recipe_path(Digest::MD5.hexdigest(config.recipe))) + @machine.communicate.upload(file.path, target_recipe_path) ensure # Delete our template file.close