[DRE-commits] [SCM] ruby-hpricot.git branch, master, updated. upstream/0.8.4-7-g82ce879
Cédric Boutillier
cedric.boutillier at gmail.com
Fri Aug 19 10:49:08 UTC 2011
The following commit has been merged in the master branch:
commit 8ce345f7a63cb0bdb1321805cbe44ffca9ca7c1b
Author: Cédric Boutillier <cedric.boutillier at gmail.com>
Date: Sun Aug 14 06:32:07 2011 +0200
two patches to run the test suite
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..845ca06
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.pc
diff --git a/debian/patches/01_tests_disable_rubygems.diff b/debian/patches/01_tests_disable_rubygems.diff
new file mode 100644
index 0000000..be3d285
--- /dev/null
+++ b/debian/patches/01_tests_disable_rubygems.diff
@@ -0,0 +1,31 @@
+Description: Disables usage of rubygems in nokogiri-bench.rb
+ This part of the test suite is in fact not run, because Hpricot support has
+ been dropped in nokogiri (>=1.4.0).
+Author: Cédric Boutillier <cedric.boutillier at gmail.com>
+Last-Update: 2011-08-14
+
+--- a/test/nokogiri-bench.rb
++++ b/test/nokogiri-bench.rb
+@@ -1,5 +1,5 @@
+ #!/usr/bin/env ruby
+-require 'rubygems'
++#require 'rubygems'
+ require 'open-uri'
+ require 'hpricot'
+ require 'nokogiri'
+@@ -9,11 +9,11 @@
+
+ N = 100
+
+-unless Gem.loaded_specs['hpricot'].version > Gem::Version.new('0.6.161')
+- abort "** Use higher than Hpricot 0.6.161!"
+-end
++#unless Gem.loaded_specs['hpricot'].version > Gem::Version.new('0.6.161')
++# abort "** Use higher than Hpricot 0.6.161!"
++#end
+
+-puts "Hpricot #{Gem.loaded_specs['hpricot'].version} vs. Nokogiri #{Gem.loaded_specs['nokogiri'].version}"
++#puts "Hpricot #{Gem.loaded_specs['hpricot'].version} vs. Nokogiri #{Gem.loaded_specs['nokogiri'].version}"
+ hdoc = Hpricot(content)
+ ndoc = Nokogiri.Hpricot(content)
+
diff --git a/debian/patches/02_fix_default_external_encoding.diff b/debian/patches/02_fix_default_external_encoding.diff
new file mode 100644
index 0000000..67d7d27
--- /dev/null
+++ b/debian/patches/02_fix_default_external_encoding.diff
@@ -0,0 +1,17 @@
+Description: fix default external encoding to utf-8 for tests
+ This is needed to run correctly the test suite in a clean building
+ environment (where LANG=C).
+Author: Cédric Boutillier
+Bug: https://github.com/hpricot/hpricot/issues/52
+Last-Update: 2011-08-19
+
+--- a/test/load_files.rb
++++ b/test/load_files.rb
+@@ -1,3 +1,7 @@
++if RUBY_VERSION =~ /1.9/
++ Encoding.default_external = Encoding::UTF_8
++end
++
+ module TestFiles
+ Dir.chdir(File.dirname(__FILE__)) do
+ Dir['files/*.{html,xhtml,xml}'].each do |fname|
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..50d936a
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+01_tests_disable_rubygems.diff
+02_fix_default_external_encoding.diff
diff --git a/debian/source/local-options b/debian/source/local-options
new file mode 100644
index 0000000..4aceb10
--- /dev/null
+++ b/debian/source/local-options
@@ -0,0 +1 @@
+unapply-patches
--
ruby-hpricot.git
More information about the Pkg-ruby-extras-commits
mailing list