Class: Mechanize::CookieJar

Inherits:
Object
  • Object
show all
Defined in:
lib/monkey-patches/mechanize-patches.rb

Instance Method Summary collapse

Instance Method Details

#add(uri, cookie) ⇒ Object



11
12
13
14
# File 'lib/monkey-patches/mechanize-patches.rb', line 11

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

#old_addObject

hopefuly this alias approach will mean we capture changes in the mechanize method



10
# File 'lib/monkey-patches/mechanize-patches.rb', line 10

alias_method :old_add, :add