From 30b0399431ba533b30037c84d18036fc242fef85 Mon Sep 17 00:00:00 2001 From: Shawn Neal Date: Thu, 24 Apr 2014 08:26:38 -0700 Subject: [PATCH] Use new Ruby hash initializer syntax --- plugins/communicators/winrm/communicator.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/communicators/winrm/communicator.rb b/plugins/communicators/winrm/communicator.rb index 670748536..3bed39f72 100644 --- a/plugins/communicators/winrm/communicator.rb +++ b/plugins/communicators/winrm/communicator.rb @@ -57,12 +57,12 @@ module VagrantPlugins return 0 if command.empty? opts = { - :error_check => true, - :error_class => Errors::ExecutionError, - :error_key => :execution_error, - :command => command, - :shell => :powershell, - :elevated => false + error_check: true, + error_class: Errors::ExecutionError, + error_key: :execution_error, + command: command, + shell: :powershell, + elevated: false }.merge(opts || {}) if opts[:elevated] @@ -131,7 +131,7 @@ module VagrantPlugins # The error classes expect the translation key to be _key, but that makes for an ugly # configuration parameter, so we set it here from `error_key` msg = "Command execution failed with an exit code of #{output[:exitcode]}" - error_opts = opts.merge(:_key => opts[:error_key], :message => msg) + error_opts = opts.merge(_key: opts[:error_key], message: msg) raise opts[:error_class], error_opts end end #WinRM class