Class: Net::HTTP

Inherits:
Object
  • Object
show all
Defined in:
lib/s3-backup.rb

Overview

To suppress “warning: peer certificate won’t be verified in this SSL session” errors, borrowed from www.5dollarwhitebox.org/drupal/node/64

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ HTTP

Returns a new instance of HTTP.



11
12
13
14
15
# File 'lib/s3-backup.rb', line 11

def initialize(*args)
  old_initialize(*args)
  @ssl_context = OpenSSL::SSL::SSLContext.new
  @ssl_context.verify_mode = OpenSSL::SSL::VERIFY_NONE
end

Instance Method Details

#old_initializeObject



10
# File 'lib/s3-backup.rb', line 10

alias_method :old_initialize, :initialize