diff --git a/app/views/devise/passwords/new.html.haml b/app/views/devise/passwords/new.html.haml index 9afd3d244cdfdc3f8e4be066317ae58c577c5d50..1d877b70ec2b62f19aa97c5d8a0487b9f46cbd30 100644 --- a/app/views/devise/passwords/new.html.haml +++ b/app/views/devise/passwords/new.html.haml @@ -3,7 +3,6 @@ = devise_error_messages! %p = f.label :email - %br/ = f.text_field :email %p = f.submit "Send me reset password instructions" diff --git a/lib/hcard.rb b/lib/hcard.rb index 9d318f05a01f4b616ce2d50b11816c7529200bab..e858bdfc6872a24011bde0f3e3567dd85f5e9ab4 100644 --- a/lib/hcard.rb +++ b/lib/hcard.rb @@ -3,11 +3,18 @@ # the COPYRIGHT file. module HCard - def self.find url - doc = Nokogiri::HTML(Net::HTTP.get URI.parse(url)) + def self.fetch url + Nokogiri::HTML(Net::HTTP.get URI.parse(url)) + end + + def self.parse doc {:given_name => doc.css(".given_name").text, :family_name => doc.css(".family_name").text, :url => doc.css("#pod_location").text, :photo => doc.css(".photo[src]").text} end + + def self.find url + self.parse self.fetch(url) + end end