Sha256: 6c05ec0a1ecc66926243f7c57a48bd7dc5faadf1acdae45a709781f017fe3297

Contents?: true

Size: 512 Bytes

Versions: 1

Compression:

Stored size: 512 Bytes

Contents

require 'mechanize'
class Mechanize
  def set_ssl_client_certification(clientcert, clientkey, cacert)
    @cert, @key = clientcert, clientkey
    @ca_file = cacert if cacert
  end

  class CookieJar
    #hopefuly this alias approach will mean we capture changes in the mechanize method 
    alias_method :old_add, :add
    def add(uri, cookie)
      uri.host = uri.host.gsub(/:.*/,"") #if host contains a port remove it so cookie validation works e.g. sandbox:6081
      old_add(uri, cookie)
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
frameworks-capybara-0.1.5 lib/monkey-patches/mechanize-patches.rb