Class: RestClient::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/conjur/api.rb

Overview

Monkey patch RestClient::Request so it always uses :ssl_cert_store. (RestClient::Resource uses Request to send requests, so it sees :ssl_cert_store, too).

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Request

Returns a new instance of Request.



62
63
64
# File 'lib/conjur/api.rb', line 62

def initialize args
  initialize_without_defaults default_args.merge(args)
end

Instance Method Details

#default_argsObject



56
57
58
59
60
# File 'lib/conjur/api.rb', line 56

def default_args
  {
    ssl_cert_store: OpenSSL::SSL::SSLContext::DEFAULT_CERT_STORE
  }
end

#initialize_without_defaultsObject



54
# File 'lib/conjur/api.rb', line 54

alias_method :initialize_without_defaults, :initialize