Skip to content

Commit

Permalink
Remove hpricot, upgrade nokogiri for windows compat (I hope). Fixes x…
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviershay committed Nov 13, 2011
1 parent 1ae421a commit 5a52fba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -43,5 +43,5 @@ group :development, :test do
gem 'factory_girl'
gem 'rspec'
gem 'rspec-rails'
gem 'hpricot'
gem 'nokogiri', '~> 1.5.0'
end
10 changes: 3 additions & 7 deletions Gemfile.lock
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions 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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5a52fba

Please sign in to comment.