diff --git a/app/views/devise/passwords/new.html.haml b/app/views/devise/passwords/new.html.haml index 9afd3d244..1d877b70e 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 9d318f05a..e858bdfc6 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 diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake index 070a314f3..d2ab4c8f2 100644 --- a/lib/tasks/ci.rake +++ b/lib/tasks/ci.rake @@ -1,4 +1,9 @@ desc "Run all specs and features" task :ci => [:environment] do + system "export DISPLAY=:99" + system "/etc/init.d/xvfb start" system "bundle exec rake" + exit_status = $?.exitstatus + system "/etc/init.d/xvfb stop" + raise "tests failed!" unless exit_status == 0 end \ No newline at end of file