Sha256: d1b54565e1ce80e01b42a379565c794cf91ea92b7f1e55bebc7e5e513ade4ad1
Contents?: true
Size: 704 Bytes
Versions: 5
Compression:
Stored size: 704 Bytes
Contents
module OAuth class Consumer if RUBY_VERSION >= "2.0.0" # we got Module#prepend, let's use it module ClientCertificateExtensions def http super.tap do |http| http.cert = options[:ssl_client_cert] http.key = options[:ssl_client_key] end end end prepend ClientCertificateExtensions else def http_with_ssl_client_certificates(*args) @http ||= http_without_ssl_client_certificates(*args).tap do |http| http.cert = options[:ssl_client_cert] http.key = options[:ssl_client_key] end end alias_method_chain :http, :ssl_client_certificates end end end
Version data entries
5 entries across 5 versions & 1 rubygems