lib/ridley/host_connector/winrm/worker.rb in ridley-0.12.2 vs lib/ridley/host_connector/winrm/worker.rb in ridley-0.12.3

- old
+ new

@@ -85,9 +85,16 @@ end # @return [WinRM::WinRMWebService] def winrm @winrm_client ||= begin + require 'active_support/core_ext/kernel/reporting' + # Silencing warnings because not all versions of GSSAPI support all of the GSSAPI methods + # the gssapi gem attempts to attach to and these warnings are dumped to STDERR. + silence_warnings do + require 'winrm' + end + client = ::WinRM::WinRMWebService.new(winrm_endpoint, :plaintext, user: user, pass: password, disable_sspi: true, basic_auth_only: true) client.set_timeout(6000) client end