Skip to content
Browse files

Remove hpricot, upgrade nokogiri for windows compat (I hope). Fixes #34.

  • Loading branch information...
1 parent 1ae421a commit 5a52fba2f553195435e2adf0133eb2cf14221c79 @xaviershay committed Nov 12, 2011
Showing with 5 additions and 10 deletions.
  1. +1 −1 Gemfile
  2. +3 −7 Gemfile.lock
  3. +1 −2 spec/support/be_valid_html5.rb
View
2 Gemfile
@@ -43,5 +43,5 @@ group :development, :test do
gem 'factory_girl'
gem 'rspec'
gem 'rspec-rails'
- gem 'hpricot'
+ gem 'nokogiri', '~> 1.5.0'
end
View
10 Gemfile.lock
@@ -58,8 +58,6 @@ GEM
json (~> 1.4.6)
gherkin (2.3.3-java)
json (~> 1.4.6)
- hpricot (0.8.3)
- hpricot (0.8.3-java)
i18n (0.5.0)
jdbc-sqlite3 (3.7.2)
jruby-openssl (0.7.4)
@@ -74,9 +72,8 @@ GEM
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
- nokogiri (1.4.4)
- nokogiri (1.4.4-java)
- weakling (>= 0.0.3)
+ nokogiri (1.5.0)
+ nokogiri (1.5.0-java)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
@@ -126,7 +123,6 @@ GEM
trinidad_jars (>= 1.0.1)
trinidad_jars (1.0.1)
tzinfo (0.3.24)
- weakling (0.0.4-java)
webrat (0.7.3)
nokogiri (>= 1.2.0)
rack (>= 1.0)
@@ -145,9 +141,9 @@ DEPENDENCIES
cucumber-rails
factory_girl
formtastic
- hpricot
jruby-openssl
lesstile
+ nokogiri (~> 1.5.0)
rack-openid
rails (= 3.0.4)
rspec
View
3 spec/support/be_valid_html5.rb
@@ -1,7 +1,6 @@
# Paste me into spec_helper.rb, or save me somewhere else and require me in.
require 'net/http'
require 'digest/md5'
-require 'hpricot'
class BeValidHtml5
@@ -59,7 +58,7 @@ def matches?(rendered)
unless markup_is_valid
fragment.split($/).each_with_index{|line, index| message << "#{'%04i' % (index+1)} : #{line}#{$/}"} if @@display_invalid_content
@message = "Invalid markup:\n"
- @elements = Hpricot(response.body.force_encoding('utf-8')).search("li.msg_err > span.msg")
+ @elements = Nokogiri::HTML(response.body.force_encoding('utf-8')).css("li.msg_err > span.msg")
(@elements).each { |span| @message << CGI.unescapeHTML(span.inner_html) + "\n" }
end
if markup_is_valid

0 comments on commit 5a52fba

Please sign in to comment.
Something went wrong with that request. Please try again.