nokogiri 1.4.7-x86-mswin32-60 → 1.5.0-x86-mswin32-60
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of nokogiri might be problematic. Click here for more details.
- data/CHANGELOG.ja.rdoc +59 -1
- data/CHANGELOG.rdoc +51 -2
- data/Manifest.txt +66 -66
- data/README.ja.rdoc +4 -0
- data/README.rdoc +31 -3
- data/Rakefile +111 -135
- data/bin/nokogiri +1 -2
- data/ext/nokogiri/extconf.rb +9 -3
- data/ext/nokogiri/nokogiri.c +21 -3
- data/ext/nokogiri/nokogiri.h +0 -2
- data/ext/nokogiri/xml_node.c +0 -6
- data/ext/nokogiri/xml_relax_ng.c +0 -7
- data/ext/nokogiri/xml_sax_parser.c +9 -4
- data/ext/nokogiri/xslt_stylesheet.c +5 -1
- data/lib/nokogiri.rb +19 -25
- data/lib/nokogiri/1.8/nokogiri.so +0 -0
- data/lib/nokogiri/1.9/nokogiri.so +0 -0
- data/lib/nokogiri/css.rb +0 -1
- data/lib/nokogiri/html.rb +1 -0
- data/lib/nokogiri/html/document.rb +9 -2
- data/lib/nokogiri/html/element_description_defaults.rb +671 -0
- data/lib/nokogiri/version.rb +76 -31
- data/lib/nokogiri/xml/attribute_decl.rb +1 -1
- data/lib/nokogiri/xml/builder.rb +7 -0
- data/lib/nokogiri/xml/document.rb +17 -1
- data/lib/nokogiri/xml/document_fragment.rb +14 -0
- data/lib/nokogiri/xml/dtd.rb +1 -1
- data/lib/nokogiri/xml/element_decl.rb +1 -1
- data/lib/nokogiri/xml/entity_decl.rb +1 -1
- data/lib/nokogiri/xml/node.rb +39 -15
- data/lib/nokogiri/xml/node/save_options.rb +14 -5
- data/lib/nokogiri/xml/node_set.rb +7 -0
- data/lib/nokogiri/xml/reader.rb +2 -2
- data/lib/nokogiri/xml/sax/document.rb +2 -2
- data/lib/nokogiri/xslt/stylesheet.rb +1 -1
- data/nokogiri_help_responses.md +40 -0
- data/tasks/cross_compile.rb +134 -155
- data/tasks/nokogiri.org.rb +18 -0
- data/tasks/test.rb +2 -2
- data/test/files/metacharset.html +10 -0
- data/test/files/noencoding.html +47 -0
- data/test/helper.rb +2 -1
- data/test/html/sax/test_parser.rb +22 -5
- data/test/html/test_document.rb +21 -2
- data/test/html/test_document_encoding.rb +9 -1
- data/test/html/test_document_fragment.rb +5 -3
- data/test/html/test_element_description.rb +4 -2
- data/test/test_memory_leak.rb +4 -39
- data/test/test_nokogiri.rb +14 -20
- data/test/test_reader.rb +12 -8
- data/test/xml/node/test_save_options.rb +10 -2
- data/test/xml/sax/test_parser.rb +14 -7
- data/test/xml/test_attribute_decl.rb +7 -3
- data/test/xml/test_builder.rb +17 -0
- data/test/xml/test_document.rb +31 -4
- data/test/xml/test_dtd.rb +13 -3
- data/test/xml/test_element_content.rb +1 -1
- data/test/xml/test_element_decl.rb +1 -1
- data/test/xml/test_entity_decl.rb +12 -10
- data/test/xml/test_namespace.rb +7 -5
- data/test/xml/test_node.rb +21 -10
- data/test/xml/test_node_reparenting.rb +16 -3
- data/test/xml/test_node_set.rb +34 -0
- data/test/xslt/test_custom_functions.rb +2 -2
- data/test/xslt/test_exception_handling.rb +37 -0
- metadata +110 -88
- data/lib/nokogiri/ffi/encoding_handler.rb +0 -42
- data/lib/nokogiri/ffi/html/document.rb +0 -28
- data/lib/nokogiri/ffi/html/element_description.rb +0 -81
- data/lib/nokogiri/ffi/html/entity_lookup.rb +0 -16
- data/lib/nokogiri/ffi/html/sax/parser_context.rb +0 -38
- data/lib/nokogiri/ffi/io_callbacks.rb +0 -42
- data/lib/nokogiri/ffi/libxml.rb +0 -420
- data/lib/nokogiri/ffi/structs/common_node.rb +0 -38
- data/lib/nokogiri/ffi/structs/html_elem_desc.rb +0 -24
- data/lib/nokogiri/ffi/structs/html_entity_desc.rb +0 -13
- data/lib/nokogiri/ffi/structs/xml_alloc.rb +0 -16
- data/lib/nokogiri/ffi/structs/xml_attr.rb +0 -20
- data/lib/nokogiri/ffi/structs/xml_attribute.rb +0 -27
- data/lib/nokogiri/ffi/structs/xml_buffer.rb +0 -16
- data/lib/nokogiri/ffi/structs/xml_char_encoding_handler.rb +0 -11
- data/lib/nokogiri/ffi/structs/xml_document.rb +0 -117
- data/lib/nokogiri/ffi/structs/xml_dtd.rb +0 -28
- data/lib/nokogiri/ffi/structs/xml_element.rb +0 -26
- data/lib/nokogiri/ffi/structs/xml_element_content.rb +0 -17
- data/lib/nokogiri/ffi/structs/xml_entity.rb +0 -32
- data/lib/nokogiri/ffi/structs/xml_enumeration.rb +0 -12
- data/lib/nokogiri/ffi/structs/xml_node.rb +0 -28
- data/lib/nokogiri/ffi/structs/xml_node_set.rb +0 -53
- data/lib/nokogiri/ffi/structs/xml_notation.rb +0 -11
- data/lib/nokogiri/ffi/structs/xml_ns.rb +0 -15
- data/lib/nokogiri/ffi/structs/xml_parser_context.rb +0 -20
- data/lib/nokogiri/ffi/structs/xml_parser_input.rb +0 -19
- data/lib/nokogiri/ffi/structs/xml_relax_ng.rb +0 -14
- data/lib/nokogiri/ffi/structs/xml_sax_handler.rb +0 -51
- data/lib/nokogiri/ffi/structs/xml_sax_push_parser_context.rb +0 -124
- data/lib/nokogiri/ffi/structs/xml_schema.rb +0 -13
- data/lib/nokogiri/ffi/structs/xml_syntax_error.rb +0 -31
- data/lib/nokogiri/ffi/structs/xml_text_reader.rb +0 -12
- data/lib/nokogiri/ffi/structs/xml_xpath_context.rb +0 -38
- data/lib/nokogiri/ffi/structs/xml_xpath_object.rb +0 -35
- data/lib/nokogiri/ffi/structs/xml_xpath_parser_context.rb +0 -20
- data/lib/nokogiri/ffi/structs/xslt_stylesheet.rb +0 -13
- data/lib/nokogiri/ffi/weak_bucket.rb +0 -40
- data/lib/nokogiri/ffi/xml/attr.rb +0 -41
- data/lib/nokogiri/ffi/xml/attribute_decl.rb +0 -27
- data/lib/nokogiri/ffi/xml/cdata.rb +0 -19
- data/lib/nokogiri/ffi/xml/comment.rb +0 -18
- data/lib/nokogiri/ffi/xml/document.rb +0 -174
- data/lib/nokogiri/ffi/xml/document_fragment.rb +0 -21
- data/lib/nokogiri/ffi/xml/dtd.rb +0 -67
- data/lib/nokogiri/ffi/xml/element_content.rb +0 -43
- data/lib/nokogiri/ffi/xml/element_decl.rb +0 -19
- data/lib/nokogiri/ffi/xml/entity_decl.rb +0 -36
- data/lib/nokogiri/ffi/xml/entity_reference.rb +0 -19
- data/lib/nokogiri/ffi/xml/namespace.rb +0 -44
- data/lib/nokogiri/ffi/xml/node.rb +0 -559
- data/lib/nokogiri/ffi/xml/node_set.rb +0 -150
- data/lib/nokogiri/ffi/xml/processing_instruction.rb +0 -20
- data/lib/nokogiri/ffi/xml/reader.rb +0 -236
- data/lib/nokogiri/ffi/xml/relax_ng.rb +0 -85
- data/lib/nokogiri/ffi/xml/sax/parser.rb +0 -143
- data/lib/nokogiri/ffi/xml/sax/parser_context.rb +0 -79
- data/lib/nokogiri/ffi/xml/sax/push_parser.rb +0 -51
- data/lib/nokogiri/ffi/xml/schema.rb +0 -109
- data/lib/nokogiri/ffi/xml/syntax_error.rb +0 -98
- data/lib/nokogiri/ffi/xml/text.rb +0 -18
- data/lib/nokogiri/ffi/xml/xpath.rb +0 -9
- data/lib/nokogiri/ffi/xml/xpath_context.rb +0 -153
- data/lib/nokogiri/ffi/xslt/stylesheet.rb +0 -77
- data/lib/nokogiri/version_warning.rb +0 -14
- data/test/ffi/test_document.rb +0 -35
@@ -6,7 +6,7 @@ module Nokogiri
|
|
6
6
|
# an XML::Document with a Stylesheet:
|
7
7
|
#
|
8
8
|
# doc = Nokogiri::XML(File.read('some_file.xml'))
|
9
|
-
# xslt =
|
9
|
+
# xslt = Nokogiri::XSLT(File.read('some_transformer.xslt'))
|
10
10
|
#
|
11
11
|
# puts xslt.transform(doc)
|
12
12
|
#
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# not-enough-information
|
2
|
+
|
3
|
+
Hello!
|
4
|
+
|
5
|
+
Thanks for asking this question! However, without more information,
|
6
|
+
Team Nokogiri cannot reproduce your issue, and so we cannot offer much
|
7
|
+
help.
|
8
|
+
|
9
|
+
Please provide us with:
|
10
|
+
|
11
|
+
* A self-contained script (one that we can run without modification,
|
12
|
+
and preferably without making external network connections).
|
13
|
+
|
14
|
+
* Please note that you need to include the XML/HTML that you are
|
15
|
+
operating on.
|
16
|
+
|
17
|
+
* The output of `nokogiri -v`, which will provide details about your
|
18
|
+
platform and versions of ruby, libxml2 and nokogiri.
|
19
|
+
|
20
|
+
For more information about requesting help or reporting bugs, please
|
21
|
+
take a look at http://bit.ly/nokohelp
|
22
|
+
|
23
|
+
Thank you so much!
|
24
|
+
|
25
|
+
# not-a-bug
|
26
|
+
|
27
|
+
Hello!
|
28
|
+
|
29
|
+
Thanks for asking this question! Your request for help will not go
|
30
|
+
unanswered!
|
31
|
+
|
32
|
+
However, Nokogiri's Github Issues is reserved for reporting bugs or
|
33
|
+
submitting patches. If you ask your question on the mailing list, Team
|
34
|
+
Nokogiri promises someone will provide you with an answer in a timely
|
35
|
+
manner.
|
36
|
+
|
37
|
+
If you'd like to read up on Team Nokogiri's rationale for this policy,
|
38
|
+
please go to http://bit.ly/nokohelp.
|
39
|
+
|
40
|
+
Thank you so much for understanding! And thank you for using Nokogiri.
|
data/tasks/cross_compile.rb
CHANGED
@@ -1,173 +1,152 @@
|
|
1
1
|
require 'rake/extensioncompiler'
|
2
2
|
HOST = Rake::ExtensionCompiler.mingw_host
|
3
|
-
TARGET = 'i386-pc-mingw32'
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
require 'mini_portile'
|
5
|
+
$recipes = {}
|
6
|
+
$recipes[:zlib] = MiniPortile.new "zlib", "1.2.5"
|
7
|
+
$recipes[:libiconv] = MiniPortile.new "libiconv", "1.13.1"
|
8
|
+
$recipes[:libxml2] = MiniPortile.new "libxml2", "2.7.7"
|
9
|
+
$recipes[:libxslt] = MiniPortile.new "libxslt", "1.1.26"
|
10
|
+
$recipes.each { |_, recipe| recipe.host = HOST }
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
file = ZLIB
|
16
|
-
url = "http://zlib.net/#{file}.tar.gz"
|
17
|
-
|
18
|
-
Dir.chdir('tmp/cross/download') do
|
19
|
-
sh "wget #{url} || curl -O #{url}"
|
20
|
-
sh "tar zxvf #{file}.tar.gz"
|
21
|
-
end
|
22
|
-
|
23
|
-
Dir.chdir t.name do
|
24
|
-
mk = File.read('win32/Makefile.gcc')
|
25
|
-
File.open('win32/Makefile.gcc', 'wb') do |f|
|
26
|
-
f.puts "BINARY_PATH = #{CROSS_DIR}/bin"
|
27
|
-
f.puts "LIBRARY_PATH = #{CROSS_DIR}/lib"
|
28
|
-
f.puts "INCLUDE_PATH = #{CROSS_DIR}/include"
|
29
|
-
|
30
|
-
f.puts mk.sub(/^PREFIX\s*=\s*$/, "PREFIX = #{HOST}-") #.
|
31
|
-
#sub(/^SHARED_MODE=0$/, 'SHARED_MODE=1').
|
32
|
-
#sub(/^IMPLIB\s*=.*$/, 'IMPLIB=libz.dll.a')
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
file 'tmp/cross/lib/libz.a' => "tmp/cross/download/#{ZLIB}" do |t|
|
38
|
-
Dir.chdir t.prerequisites.first do
|
39
|
-
sh 'make -f win32/Makefile.gcc'
|
40
|
-
sh 'make -f win32/Makefile.gcc install'
|
41
|
-
end
|
42
|
-
end
|
43
|
-
### End build zlib ###
|
44
|
-
|
45
|
-
### Build iconv ###
|
46
|
-
file "tmp/cross/download/#{ICONV}" do |t|
|
47
|
-
FileUtils.mkdir_p('tmp/cross/download')
|
48
|
-
|
49
|
-
file = ICONV
|
50
|
-
url = "http://ftp.gnu.org/pub/gnu/libiconv/#{file}.tar.gz"
|
51
|
-
|
52
|
-
Dir.chdir('tmp/cross/download') do
|
53
|
-
sh "wget #{url} || curl -O #{url}"
|
54
|
-
sh "tar zxvf #{file}.tar.gz"
|
55
|
-
end
|
56
|
-
|
57
|
-
Dir.chdir t.name do
|
58
|
-
sh "./configure --disable-shared --enable-static --host=#{HOST} --target=#{TARGET} --prefix=#{CROSS_DIR} CPPFLAGS='-mno-cygwin -Wall' CFLAGS='-mno-cygwin -O2 -g' CXXFLAGS='-mno-cygwin -O2 -g' LDFLAGS=-mno-cygwin"
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
file 'tmp/cross/bin/iconv.exe' => "tmp/cross/download/#{ICONV}" do |t|
|
63
|
-
Dir.chdir t.prerequisites.first do
|
64
|
-
sh 'make'
|
65
|
-
sh 'make install'
|
66
|
-
end
|
67
|
-
end
|
68
|
-
### End build iconv ###
|
69
|
-
|
70
|
-
### Build libxml2 ###
|
71
|
-
file "tmp/cross/download/#{LIBXML}" do |t|
|
72
|
-
FileUtils.mkdir_p('tmp/cross/download')
|
73
|
-
|
74
|
-
file = LIBXML
|
75
|
-
url = "ftp://ftp.xmlsoft.org/libxml2/#{file}.tar.gz"
|
76
|
-
|
77
|
-
Dir.chdir('tmp/cross/download') do
|
78
|
-
sh "wget #{url} || curl -O #{url}"
|
79
|
-
sh "tar zxvf #{file}.tar.gz"
|
80
|
-
end
|
81
|
-
|
82
|
-
Dir.chdir t.name do
|
83
|
-
sh "CFLAGS='-DIN_LIBXML' ./configure --host=#{HOST} --target=#{TARGET} --enable-static --disable-shared --prefix=#{CROSS_DIR} --with-zlib=#{CROSS_DIR} --with-iconv=#{CROSS_DIR} --without-python --without-readline"
|
12
|
+
file "lib/nokogiri/nokogiri.rb" do
|
13
|
+
File.open("lib/nokogiri/nokogiri.rb", 'wb') do |f|
|
14
|
+
f.write %Q{require "nokogiri/\#{RUBY_VERSION.sub(/\\.\\d+$/, '')}/nokogiri"\n}
|
84
15
|
end
|
85
16
|
end
|
86
17
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
18
|
+
namespace :cross do
|
19
|
+
task :zlib do
|
20
|
+
recipe = $recipes[:zlib]
|
21
|
+
recipe.files = ["http://zlib.net/#{recipe.name}-#{recipe.version}.tar.gz"]
|
22
|
+
class << recipe
|
23
|
+
def configure
|
24
|
+
Dir.chdir work_path do
|
25
|
+
mk = File.read 'win32/Makefile.gcc'
|
26
|
+
File.open 'win32/Makefile.gcc', 'wb' do |f|
|
27
|
+
f.puts "BINARY_PATH = #{CROSS_DIR}/bin"
|
28
|
+
f.puts "LIBRARY_PATH = #{CROSS_DIR}/lib"
|
29
|
+
f.puts "INCLUDE_PATH = #{CROSS_DIR}/include"
|
30
|
+
f.puts mk.sub(/^PREFIX\s*=\s*$/, "PREFIX = #{HOST}-")
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def configured?
|
36
|
+
Dir.chdir work_path do
|
37
|
+
!! (File.read('win32/Makefile.gcc') =~ /^BINARY_PATH/)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def compile
|
42
|
+
execute "compile", "make -f win32/Makefile.gcc"
|
43
|
+
end
|
44
|
+
|
45
|
+
def install
|
46
|
+
execute "install", "make -f win32/Makefile.gcc install"
|
47
|
+
end
|
48
|
+
end
|
111
49
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
50
|
+
checkpoint = "#{CROSS_DIR}/#{recipe.name}-#{recipe.version}.installed"
|
51
|
+
unless File.exist?(checkpoint)
|
52
|
+
recipe.cook
|
53
|
+
touch checkpoint
|
54
|
+
end
|
55
|
+
recipe.activate
|
56
|
+
end
|
57
|
+
|
58
|
+
task :libiconv do
|
59
|
+
recipe = $recipes[:libiconv]
|
60
|
+
recipe.files = ["http://ftp.gnu.org/pub/gnu/libiconv/#{recipe.name}-#{recipe.version}.tar.gz"]
|
61
|
+
recipe.configure_options = [
|
62
|
+
"--host=#{HOST}",
|
63
|
+
"--enable-static",
|
64
|
+
"--disable-shared",
|
65
|
+
"CPPFLAGS='-mno-cygwin -Wall'",
|
66
|
+
"CFLAGS='-mno-cygwin -O2 -g'",
|
67
|
+
"CXXFLAGS='-mno-cygwin -O2 -g'",
|
68
|
+
"LDFLAGS=-mno-cygwin"
|
69
|
+
]
|
70
|
+
|
71
|
+
checkpoint = "#{CROSS_DIR}/#{recipe.name}-#{recipe.version}.installed"
|
72
|
+
unless File.exist?(checkpoint)
|
73
|
+
recipe.cook
|
74
|
+
touch checkpoint
|
75
|
+
end
|
76
|
+
recipe.activate
|
77
|
+
end
|
78
|
+
|
79
|
+
task :libxml2 => ["cross:zlib", "cross:libiconv"] do
|
80
|
+
recipe = $recipes[:libxml2]
|
81
|
+
recipe.files = ["ftp://ftp.xmlsoft.org/libxml2/#{recipe.name}-#{recipe.version}.tar.gz"]
|
82
|
+
recipe.configure_options = [
|
83
|
+
"--host=#{HOST}",
|
84
|
+
"--enable-static",
|
85
|
+
"--disable-shared",
|
86
|
+
"--with-zlib=#{CROSS_DIR}",
|
87
|
+
"--with-iconv=#{$recipes[:libiconv].path}",
|
88
|
+
"--without-python",
|
89
|
+
"--without-readline",
|
90
|
+
"CFLAGS='-DIN_LIBXML'"
|
91
|
+
]
|
92
|
+
class << recipe
|
93
|
+
def download
|
94
|
+
Dir.chdir archives_path do
|
95
|
+
@files.each do |url|
|
96
|
+
sh "wget #{url} || curl -O #{url}"
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
119
101
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
end
|
102
|
+
checkpoint = "#{CROSS_DIR}/#{recipe.name}-#{recipe.version}.installed"
|
103
|
+
unless File.exist?(checkpoint)
|
104
|
+
recipe.cook
|
105
|
+
touch checkpoint
|
106
|
+
end
|
107
|
+
recipe.activate
|
108
|
+
end
|
109
|
+
|
110
|
+
task :libxslt => ['cross:libxml2'] do
|
111
|
+
recipe = $recipes[:libxslt]
|
112
|
+
recipe.files = ["ftp://ftp.xmlsoft.org/libxml2/#{recipe.name}-#{recipe.version}.tar.gz"]
|
113
|
+
recipe.configure_options = [
|
114
|
+
"--host=#{HOST}",
|
115
|
+
"--enable-static",
|
116
|
+
"--disable-shared",
|
117
|
+
"--with-libxml-prefix=#{$recipes[:libxml2].path}",
|
118
|
+
"--without-python",
|
119
|
+
"--without-crypto",
|
120
|
+
"CFLAGS='-DIN_LIBXML'"
|
121
|
+
]
|
122
|
+
class << recipe
|
123
|
+
def download
|
124
|
+
Dir.chdir archives_path do
|
125
|
+
@files.each do |url|
|
126
|
+
sh "wget #{url} || curl -O #{url}"
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
127
131
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
task :libxslt => ['cross:libxml2', 'tmp/cross/bin/xslt-config']
|
133
|
-
|
134
|
-
task :check => ["cross:libxslt"] do
|
135
|
-
unless File.directory?(RAKE_COMPILER_PKGCONFIG)
|
136
|
-
raise RuntimeError.new("looks like rake-compiler changed where pkgconfig info is kept. (#{RAKE_COMPILER_PKGCONFIG})")
|
132
|
+
checkpoint = "#{CROSS_DIR}/#{recipe.name}-#{recipe.version}.installed"
|
133
|
+
unless File.exist?(checkpoint)
|
134
|
+
recipe.cook
|
135
|
+
touch checkpoint
|
137
136
|
end
|
137
|
+
recipe.activate
|
138
138
|
end
|
139
139
|
|
140
140
|
task :file_list do
|
141
|
-
HOE.spec.
|
142
|
-
HOE.spec.files += Dir["lib
|
143
|
-
HOE.spec.files += Dir["lib/#{HOE.name}/1.{8,9}/#{HOE.name}.so"]
|
141
|
+
HOE.spec.files += Dir["lib/nokogiri/nokogiri.rb"]
|
142
|
+
HOE.spec.files += Dir["lib/nokogiri/1.{8,9}/nokogiri.so"]
|
144
143
|
end
|
145
144
|
end
|
146
145
|
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
Rake::Task[:cross].prerequisites << "cross:file_list"
|
153
|
-
end
|
146
|
+
HOE.clean_globs += [
|
147
|
+
"#{CROSS_DIR}/*.installed",
|
148
|
+
"#{CROSS_DIR}/#{HOST}",
|
149
|
+
"tmp/#{HOST}",
|
150
|
+
]
|
154
151
|
|
155
|
-
|
156
|
-
task "gem:windows" do
|
157
|
-
rake_compiler_config = YAML.load_file("#{ENV['HOME']}/.rake-compiler/config.yml")
|
158
|
-
|
159
|
-
# check that rake-compiler config contains the right patchlevels of 1.8.6 and 1.9.1. see #279.
|
160
|
-
["1.8.6-p383", "1.9.1-p243"].each do |version|
|
161
|
-
majmin, patchlevel = version.split("-")
|
162
|
-
rbconfig = "rbconfig-#{majmin}"
|
163
|
-
unless rake_compiler_config.key?(rbconfig) && rake_compiler_config[rbconfig] =~ /-#{patchlevel}/
|
164
|
-
raise "rake-compiler '#{rbconfig}' not #{patchlevel}. try running 'env --unset=HOST rake-compiler cross-ruby VERSION=#{version}'"
|
165
|
-
end
|
166
|
-
end
|
167
|
-
|
168
|
-
# verify that --export-all is in the 1.9.1 rbconfig. see #279,#374,#375.
|
169
|
-
rbconfig_191 = rake_compiler_config["rbconfig-1.9.1"]
|
170
|
-
raise "rbconfig #{rbconfig_191} needs --export-all in its DLDFLAGS value" if File.read(rbconfig_191).grep(/CONFIG\["DLDFLAGS"\].*--export-all/).empty?
|
171
|
-
|
172
|
-
system("env PKG_CONFIG_PATH=#{RAKE_COMPILER_PKGCONFIG} RUBY_CC_VERSION=1.8.6:1.9.1 rake cross native gem") || raise("build failed!")
|
173
|
-
end
|
152
|
+
task :cross => ["cross:libxslt", "lib/nokogiri/nokogiri.rb", "cross:file_list"]
|
@@ -0,0 +1,18 @@
|
|
1
|
+
namespace :docs do
|
2
|
+
desc "generate HTML docs for nokogiri.org"
|
3
|
+
task :website do
|
4
|
+
title = "#{HOE.name}-#{HOE.version} Documentation"
|
5
|
+
|
6
|
+
options = []
|
7
|
+
options << "--main=#{HOE.readme_file}"
|
8
|
+
options << '--format=activerecord'
|
9
|
+
options << '--threads=1'
|
10
|
+
options << "--title=#{title.inspect}"
|
11
|
+
|
12
|
+
options += HOE.spec.require_paths
|
13
|
+
options += HOE.spec.extra_rdoc_files
|
14
|
+
require 'rdoc/rdoc'
|
15
|
+
ENV['RAILS_ROOT'] ||= File.expand_path(File.join('..', 'nokogiri_ws'))
|
16
|
+
RDoc::RDoc.new.document options
|
17
|
+
end
|
18
|
+
end
|
data/tasks/test.rb
CHANGED
@@ -64,7 +64,7 @@ namespace :test do
|
|
64
64
|
end
|
65
65
|
|
66
66
|
Dir.chdir File.join(MULTI_XML, 'build', filename) do
|
67
|
-
system "./configure --prefix=#{install_dir}"
|
67
|
+
system "./configure --without-http --prefix=#{install_dir}"
|
68
68
|
system "make && make install"
|
69
69
|
end
|
70
70
|
end
|
@@ -73,7 +73,7 @@ namespace :test do
|
|
73
73
|
libxslt = Dir[File.join(MULTI_XML, 'install', 'libxslt*')].first
|
74
74
|
|
75
75
|
directories = ENV['MULTIXML2_DIR'] ? [ENV['MULTIXML2_DIR']] : Dir[File.join(MULTI_XML, 'install', '*')]
|
76
|
-
directories.sort.
|
76
|
+
directories.sort.reverse_each do |xml2_version|
|
77
77
|
next unless xml2_version =~ /libxml2/
|
78
78
|
extopts = "--with-xml2-include=#{xml2_version}/include/libxml2 --with-xml2-lib=#{xml2_version}/lib --with-xslt-dir=#{libxslt} --with-iconv-dir=/usr"
|
79
79
|
cmd = "#{$0} clean test EXTOPTS='#{extopts}' LD_LIBRARY_PATH='#{xml2_version}/lib'"
|
@@ -0,0 +1,47 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>I have no encoding declaration.</title>
|
5
|
+
</head>
|
6
|
+
<body>
|
7
|
+
<p>I want one.</p>
|
8
|
+
<p>I really want one.</p>
|
9
|
+
<p>I really really want one.</p>
|
10
|
+
<p>I really really really want one.</p>
|
11
|
+
<p>I really really really really want one.</p>
|
12
|
+
<p>I really really really really really want one.</p>
|
13
|
+
<p>I really really really really really really want one.</p>
|
14
|
+
<p>I really really really really really really really want one.</p>
|
15
|
+
<p>I really really really really really really really really want one.</p>
|
16
|
+
<p>I really really really really really really really really really want one.</p>
|
17
|
+
<p>I really really really really really really really really really really want one.</p>
|
18
|
+
<p>I really really really really really really really really really really really want one.</p>
|
19
|
+
<p>I really really really really really really really really really really really really want one.</p>
|
20
|
+
<p>I really really really really really really really really really really really really really want one.</p>
|
21
|
+
<p>I really really really really really really really really really really really really really really want one.</p>
|
22
|
+
<p>I really really really really really really really really really really really really really really really want one.</p>
|
23
|
+
<p>I really really really really really really really really really really really really really really really really want one.</p>
|
24
|
+
<p>I really really really really really really really really really really really really really really really really really want one.</p>
|
25
|
+
<p>I really really really really really really really really really really really really really really really really really really want one.</p>
|
26
|
+
<p>I really really really really really really really really really really really really really really really really really really really want one.</p>
|
27
|
+
<p>I really really really really really really really really really really really really really really really really really really really really want one.</p>
|
28
|
+
<p>I really really really really really really really really really really really really really really really really really really really really really want one.</p>
|
29
|
+
<p>I really really really really really really really really really really really really really really really really really really really really really really want one.</p>
|
30
|
+
<p>I really really really really really really really really really really really really really really really really really really really really really really really want one.</p>
|
31
|
+
<p>I really really really really really really really really really really really really really really really really really really really really really really really really want one.</p>
|
32
|
+
<p>I really really really really really really really really really really really really really really really really really really really really really really really really really want one.</p>
|
33
|
+
<p>I really really really really really really really really really really really really really really really really really really really really really really really really really really want one.</p>
|
34
|
+
<p>I really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.</p>
|
35
|
+
<p>I really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.</p>
|
36
|
+
<p>I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.</p>
|
37
|
+
<p>I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.</p>
|
38
|
+
<p>I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.</p>
|
39
|
+
<p>I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.</p>
|
40
|
+
<p>I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.</p>
|
41
|
+
<p>I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.</p>
|
42
|
+
<p>I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.</p>
|
43
|
+
<p>I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.</p>
|
44
|
+
<p>I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.</p>
|
45
|
+
<p>I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.</p>
|
46
|
+
</body>
|
47
|
+
</html>
|