Skip to content

Commit

Permalink
Use Net::HTTP#use_ssl? instead of use_ssl which does not exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
mojombo committed Jan 13, 2012
1 parent c2020af commit 7d1d6c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/god/conditions/http_response_code.rb
Expand Up @@ -117,9 +117,9 @@ def test

connection = Net::HTTP.new(self.host, self.port)
connection.use_ssl = self.port == 443 ? true : self.ssl
connection.verify_mode = OpenSSL::SSL::VERIFY_NONE if connection.use_ssl
connection.verify_mode = OpenSSL::SSL::VERIFY_NONE if connection.use_ssl?

if connection.use_ssl && self.ca_file
if connection.use_ssl? && self.ca_file
pem = File.read(self.ca_file)
connection.ca_file = self.ca_file
connection.verify_mode = OpenSSL::SSL::VERIFY_PEER
Expand Down

0 comments on commit 7d1d6c0

Please sign in to comment.