From 76e77c2bf11d53ec69678c393d187e46d12bb44e Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 8 Oct 2010 13:06:21 -0700 Subject: [PATCH 1/4] refactor hcard for faster testing --- lib/hcard.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 From 3754b519a7ea51a2fee61452ee19ebbe4ff90dcc Mon Sep 17 00:00:00 2001 From: Crimer Date: Fri, 8 Oct 2010 21:51:59 +0000 Subject: [PATCH 2/4] Solved issue #79 'Email Label in Forgot Password Appears Outside of Textbox'. --- app/views/devise/passwords/new.html.haml | 1 - 1 file changed, 1 deletion(-) 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" From 564217684f03dbcb75ca00f78a0e0c5ab090b038 Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Fri, 8 Oct 2010 14:14:39 -0600 Subject: [PATCH 3/4] Fail CI if exitstatus isn't 0. *sigh* --- lib/tasks/ci.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake index 070a314f3..e7bbae6c8 100644 --- a/lib/tasks/ci.rake +++ b/lib/tasks/ci.rake @@ -1,4 +1,5 @@ desc "Run all specs and features" task :ci => [:environment] do system "bundle exec rake" + raise "tests failed!" unless $?.exitstatus == 0 end \ No newline at end of file From 4e3e6d9562ee38d6d2c1748ce234722cc488d806 Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Fri, 8 Oct 2010 14:55:53 -0600 Subject: [PATCH 4/4] rake task starts a virtual framebuffer before running tests, stops it after --- lib/tasks/ci.rake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake index e7bbae6c8..d2ab4c8f2 100644 --- a/lib/tasks/ci.rake +++ b/lib/tasks/ci.rake @@ -1,5 +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" - raise "tests failed!" unless $?.exitstatus == 0 + exit_status = $?.exitstatus + system "/etc/init.d/xvfb stop" + raise "tests failed!" unless exit_status == 0 end \ No newline at end of file