Top Level Namespace

Defined Under Namespace

Modules: PatchAssertions, Win32, WinRM, WinrmS Classes: HTTPClient

Instance Method Summary collapse

Instance Method Details

#validate_patchObject



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/winrm/http/auth.rb', line 23

def validate_patch
  # The code below patches the httpclient library to add support
  # for encrypt/decrypt as described below.
  # Add few restriction to make sure the patched methods are still
  # available, but still give a way to consciously use later versions
  PatchAssertions.assert_major_version("httpclient", [2.6,2.7], "USE_HTTPCLIENT_MAJOR")
  PatchAssertions.assert_arity_of_patched_method(HTTPClient::WWWAuth, "filter_request", 1)
  PatchAssertions.assert_arity_of_patched_method(HTTPClient::WWWAuth, "filter_response", 2)
  PatchAssertions.assert_arity_of_patched_method(HTTPClient::SSPINegotiateAuth, "set", -1)
  PatchAssertions.assert_arity_of_patched_method(HTTPClient::SSPINegotiateAuth, "get", 1)
end

#windows?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/winrm-s.rb', line 21

def windows?
  !!(RUBY_PLATFORM =~ /mswin|mingw|windows/)
end