Permalink
Browse files

Merge pull request #26 from dlee/aliases_for_cert_and_key

Added #cert and #key aliases
  • Loading branch information...
2 parents ddf0cbb + 3a4f3cd commit c8ad9da09999f415e59653084fb38ab49b95823e @drbrain committed Oct 17, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 lib/net/http/persistent.rb
View
@@ -237,6 +237,9 @@ def self.detect_idle_timeout uri, max = 10
attr_reader :certificate
+ # For Net::HTTP parity
+ alias cert certificate
+
##
# An SSL certificate authority. Setting this will set verify_mode to
# VERIFY_PEER.
@@ -316,6 +319,9 @@ def self.detect_idle_timeout uri, max = 10
attr_reader :private_key
+ # For Net::HTTP parity
+ alias key private_key
+
##
# The URL through which requests will be proxied
@@ -467,6 +473,9 @@ def certificate= certificate
reconnect_ssl
end
+ # For Net::HTTP parity
+ alias cert= certificate=
+
##
# Sets the SSL certificate authority file.
@@ -727,6 +736,9 @@ def private_key= key
reconnect_ssl
end
+ # For Net::HTTP parity
+ alias key= private_key=
+
##
# Sets the proxy server. The +proxy+ may be the URI of the proxy server,
# the symbol +:ENV+ which will read the proxy from the environment or nil to

0 comments on commit c8ad9da

Please sign in to comment.