lib/graybook/importer/hotmail.rb in graybook-1.1.0 vs lib/graybook/importer/hotmail.rb in graybook-1.1.1

- old
+ new

@@ -49,14 +49,15 @@ page = agent.submit(form) # Check for login success if page.body =~ /The e-mail address or password is incorrect/ || page.body =~ /Sign in failed\./ - return Problem.new("Username and password were not accepted. Please check them and try again.") + return Graybook::Problem.new("Username and password were not accepted. Please check them and try again.") end @first_page = agent.get( page.body.scan(/http\:\/\/[^"]+/).first ) + true end ## # prepare this importer @@ -69,10 +70,10 @@ # Seems like a POST to directly fetch CSV contacts from options.aspx?subsection=26&n= # Seems like Hotmail addresses are now hosted on Windows Live. def scrape_contacts unless agent.cookies.find{|c| c.name == 'MSPPre' && c.value == options[:username]} - return Problem.new("Username and password were not accepted. Please check them and try again.") + return Graybook::Problem.new("Username and password were not accepted. Please check them and try again.") end page = agent.get('http://mail.live.com/') if page.iframes.detect { |f| f.src =~ /\/mail\/TodayLight.aspx/ }