nokogiri 1.6.1 → 1.6.2.rc1

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.

Files changed (93) hide show
  1. checksums.yaml +7 -7
  2. data/.editorconfig +17 -0
  3. data/.travis.yml +4 -6
  4. data/CHANGELOG.ja.rdoc +37 -8
  5. data/CHANGELOG.rdoc +48 -3
  6. data/Gemfile +3 -3
  7. data/Manifest.txt +57 -1
  8. data/README.ja.rdoc +22 -16
  9. data/README.rdoc +24 -19
  10. data/ROADMAP.md +1 -2
  11. data/Rakefile +161 -58
  12. data/build_all +56 -31
  13. data/dependencies.yml +3 -3
  14. data/ext/nokogiri/extconf.rb +379 -121
  15. data/ext/nokogiri/html_document.c +2 -2
  16. data/ext/nokogiri/nokogiri.c +6 -1
  17. data/ext/nokogiri/xml_document.c +5 -4
  18. data/ext/nokogiri/xml_node.c +11 -4
  19. data/ext/nokogiri/xml_reader.c +1 -1
  20. data/ext/nokogiri/xml_sax_parser_context.c +40 -0
  21. data/ext/nokogiri/xml_syntax_error.c +10 -5
  22. data/ext/nokogiri/xml_syntax_error.h +1 -1
  23. data/ext/nokogiri/xml_xpath_context.c +2 -14
  24. data/ext/nokogiri/xslt_stylesheet.c +1 -1
  25. data/lib/nokogiri.rb +31 -22
  26. data/lib/nokogiri/css/node.rb +0 -50
  27. data/lib/nokogiri/css/parser.rb +213 -218
  28. data/lib/nokogiri/css/parser.y +21 -30
  29. data/lib/nokogiri/css/xpath_visitor.rb +62 -14
  30. data/lib/nokogiri/html/document.rb +97 -18
  31. data/lib/nokogiri/html/sax/parser.rb +2 -2
  32. data/lib/nokogiri/version.rb +1 -1
  33. data/lib/nokogiri/xml/builder.rb +1 -1
  34. data/lib/nokogiri/xml/document.rb +2 -2
  35. data/lib/nokogiri/xml/dtd.rb +10 -0
  36. data/lib/nokogiri/xml/node.rb +26 -1
  37. data/lib/nokogiri/xml/sax/parser.rb +1 -1
  38. data/ports/archives/libxslt-1.1.28.tar.gz +0 -0
  39. data/ports/patches/libxml2/0001-Fix-parser-local-buffers-size-problems.patch +265 -0
  40. data/ports/patches/libxml2/0002-Fix-entities-local-buffers-size-problems.patch +102 -0
  41. data/ports/patches/libxml2/0003-Fix-an-error-in-previous-commit.patch +26 -0
  42. data/ports/patches/libxml2/0004-Fix-potential-out-of-bound-access.patch +26 -0
  43. data/ports/patches/libxml2/0005-Detect-excessive-entities-expansion-upon-replacement.patch +158 -0
  44. data/ports/patches/libxml2/0006-Do-not-fetch-external-parsed-entities.patch +78 -0
  45. data/ports/patches/libxml2/0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch +480 -0
  46. data/ports/patches/libxml2/0008-Improve-handling-of-xmlStopParser.patch +315 -0
  47. data/ports/patches/libxml2/0009-Fix-a-couple-of-return-without-value.patch +37 -0
  48. data/ports/patches/libxslt/0001-Adding-doc-update-related-to-1.1.28.patch +222 -0
  49. data/ports/patches/libxslt/0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch +53 -0
  50. data/ports/patches/libxslt/0003-Initialize-pseudo-random-number-generator-with-curre.patch +60 -0
  51. data/ports/patches/libxslt/0004-EXSLT-function-str-replace-is-broken-as-is.patch +42 -0
  52. data/ports/patches/libxslt/0006-Fix-str-padding-to-work-with-UTF-8-strings.patch +164 -0
  53. data/ports/patches/libxslt/0007-Separate-function-for-predicate-matching-in-patterns.patch +587 -0
  54. data/ports/patches/libxslt/0008-Fix-direct-pattern-matching.patch +80 -0
  55. data/ports/patches/libxslt/0009-Fix-certain-patterns-with-predicates.patch +185 -0
  56. data/ports/patches/libxslt/0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch +126 -0
  57. data/ports/patches/libxslt/0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch +25 -0
  58. data/ports/patches/libxslt/0014-Fix-for-bug-436589.patch +43 -0
  59. data/ports/patches/libxslt/0015-Fix-mkdir-for-mingw.patch +41 -0
  60. data/suppressions/README.txt +1 -0
  61. data/suppressions/nokogiri_ree-1.8.7.358.supp +61 -0
  62. data/suppressions/nokogiri_ruby-1.8.7.370.supp +0 -0
  63. data/suppressions/nokogiri_ruby-1.9.2.320.supp +28 -0
  64. data/suppressions/nokogiri_ruby-1.9.3.327.supp +28 -0
  65. data/test/css/test_nthiness.rb +65 -2
  66. data/test/css/test_parser.rb +27 -10
  67. data/test/css/test_tokenizer.rb +1 -1
  68. data/test/css/test_xpath_visitor.rb +6 -1
  69. data/test/files/atom.xml +344 -0
  70. data/test/files/shift_jis_no_charset.html +9 -0
  71. data/test/helper.rb +10 -0
  72. data/test/html/test_document.rb +74 -7
  73. data/test/html/test_document_encoding.rb +10 -0
  74. data/test/html/test_document_fragment.rb +3 -3
  75. data/test/namespaces/test_namespaces_in_cloned_doc.rb +31 -0
  76. data/test/test_nokogiri.rb +6 -0
  77. data/test/test_reader.rb +7 -4
  78. data/test/test_xslt_transforms.rb +25 -0
  79. data/test/xml/sax/test_parser.rb +16 -0
  80. data/test/xml/sax/test_parser_context.rb +9 -0
  81. data/test/xml/test_builder.rb +9 -0
  82. data/test/xml/test_c14n.rb +12 -2
  83. data/test/xml/test_document.rb +66 -0
  84. data/test/xml/test_document_fragment.rb +5 -0
  85. data/test/xml/test_dtd.rb +84 -0
  86. data/test/xml/test_entity_reference.rb +3 -3
  87. data/test/xml/test_node.rb +21 -3
  88. data/test/xml/test_node_attributes.rb +17 -0
  89. data/test/xml/test_schema.rb +26 -0
  90. data/test/xml/test_xpath.rb +81 -0
  91. metadata +254 -174
  92. data/ports/archives/libxslt-1.1.26.tar.gz +0 -0
  93. data/tasks/cross_compile.rb +0 -134
@@ -76,6 +76,11 @@ module Nokogiri
76
76
  assert_instance_of klass, doc
77
77
  end
78
78
 
79
+ def test_unparented_text_node_parse
80
+ fragment = Nokogiri::XML::DocumentFragment.parse("foo")
81
+ fragment.children.after("<bar/>")
82
+ end
83
+
79
84
  def test_xml_fragment
80
85
  fragment = Nokogiri::XML.fragment("<div>a</div>")
81
86
  assert_equal "<div>a</div>", fragment.to_s
@@ -19,6 +19,90 @@ module Nokogiri
19
19
  assert_equal 'bar', dtd.external_id
20
20
  end
21
21
 
22
+ def test_html_dtd
23
+ {
24
+ 'MathML 2.0' => [
25
+ '<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">',
26
+ false,
27
+ false,
28
+ ],
29
+ 'HTML 2.0' => [
30
+ '<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">',
31
+ true,
32
+ false,
33
+ ],
34
+ 'HTML 3.2' => [
35
+ '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">',
36
+ true,
37
+ false,
38
+ ],
39
+ 'XHTML Basic 1.0' => [
40
+ '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">',
41
+ true,
42
+ false,
43
+ ],
44
+ 'XHTML 1.0 Strict' => [
45
+ '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
46
+ true,
47
+ false,
48
+ ],
49
+ 'XHTML + MathML + SVG Profile (XHTML as the host language)' => [
50
+ '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
51
+ true,
52
+ false,
53
+ ],
54
+ 'XHTML + MathML + SVG Profile (Using SVG as the host)' => [
55
+ '<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
56
+ false,
57
+ false,
58
+ ],
59
+ 'CHTML 1.0' => [
60
+ '<!DOCTYPE HTML PUBLIC "-//W3C//DTD Compact HTML 1.0 Draft//EN">',
61
+ true,
62
+ false,
63
+ ],
64
+ 'HTML 4.01 Strict' => [
65
+ '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
66
+ true,
67
+ false,
68
+ ],
69
+ 'HTML 4.01 Transitional' => [
70
+ '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
71
+ true,
72
+ false,
73
+ ],
74
+ 'HTML 4.01 Frameset' => [
75
+ '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
76
+ true,
77
+ false,
78
+ ],
79
+ 'HTML 5' => [
80
+ '<!DOCTYPE html>',
81
+ true,
82
+ true,
83
+ ],
84
+ 'HTML 5 legacy compatible' => [
85
+ '<!DOCTYPE HTML SYSTEM "about:legacy-compat">',
86
+ true,
87
+ true,
88
+ ],
89
+ }.each { |name, (dtd_str, html_p, html5_p)|
90
+ doc = Nokogiri(dtd_str)
91
+ dtd = doc.internal_subset
92
+ assert_instance_of Nokogiri::XML::DTD, dtd, name
93
+ if html_p
94
+ assert_send [dtd, :html_dtd?], name
95
+ else
96
+ assert_not_send [dtd, :html_dtd?], name
97
+ end
98
+ if html5_p
99
+ assert_send [dtd, :html5_dtd?], name
100
+ else
101
+ assert_not_send [dtd, :html5_dtd?], name
102
+ end
103
+ }
104
+ end
105
+
22
106
  def test_content
23
107
  assert_raise NoMethodError do
24
108
  @dtd.content
@@ -233,10 +233,10 @@ EOF
233
233
 
234
234
  test_relative_and_absolute_path :test_reader_entity_reference_without_dtdload do
235
235
  html = File.read xml_document
236
+ reader = Nokogiri::XML::Reader html, path do |cfg|
237
+ cfg.default_xml
238
+ end
236
239
  assert_raises(Nokogiri::XML::SyntaxError) do
237
- reader = Nokogiri::XML::Reader html, path do |cfg|
238
- cfg.default_xml
239
- end
240
240
  reader.each { |n| n }
241
241
  end
242
242
  end
@@ -133,6 +133,12 @@ module Nokogiri
133
133
  node.parse('<baz><</baz>')
134
134
  end
135
135
 
136
+ def test_parse_with_unparented_text_context_node
137
+ doc = XML::Document.new
138
+ elem = XML::Text.new("foo", doc)
139
+ elem.parse("<bar/>")
140
+ end
141
+
136
142
  def test_subclass_dup
137
143
  subclass = Class.new(Nokogiri::XML::Node)
138
144
  node = subclass.new('foo', @xml).dup
@@ -1006,16 +1012,28 @@ EOXML
1006
1012
  <y xmlns:c='http://bazz.com/'>
1007
1013
  <a:div>hello a</a:div>
1008
1014
  <b:div>hello b</b:div>
1009
- <c:div>hello c</c:div>
1010
- <div>hello moon</div>
1015
+ <c:div x="1" b:y="2">hello c</c:div>
1016
+ <div x="1" xmlns="http://ns.example.com/d"/>
1017
+ <div x="1">hello moon</div>
1011
1018
  </y>
1012
1019
  </x>
1013
1020
  EOF
1014
1021
  set = xml.search("//y/*")
1015
1022
  assert_equal "a", set[0].namespace.prefix
1023
+ assert_equal 'http://foo.com/', set[0].namespace.href
1016
1024
  assert_equal "b", set[1].namespace.prefix
1025
+ assert_equal 'http://bar.com/', set[1].namespace.href
1017
1026
  assert_equal "c", set[2].namespace.prefix
1018
- assert_equal nil, set[3].namespace
1027
+ assert_equal 'http://bazz.com/', set[2].namespace.href
1028
+ assert_equal nil, set[3].namespace.prefix # default namespace
1029
+ assert_equal 'http://ns.example.com/d', set[3].namespace.href
1030
+ assert_equal nil, set[4].namespace # no namespace
1031
+
1032
+ assert_equal 'b', set[2].attributes['y'].namespace.prefix
1033
+ assert_equal 'http://bar.com/', set[2].attributes['y'].namespace.href
1034
+ assert_equal nil, set[2].attributes['x'].namespace
1035
+ assert_equal nil, set[3].attributes['x'].namespace
1036
+ assert_equal nil, set[4].attributes['x'].namespace
1019
1037
  end
1020
1038
 
1021
1039
  if Nokogiri.uses_libxml?
@@ -59,6 +59,23 @@ module Nokogiri
59
59
  assert_equal [], node.namespace_definitions.map(&:prefix)
60
60
  end
61
61
 
62
+ def test_append_child_element_with_prefixed_attributes
63
+ doc = Nokogiri::XML "<root/>"
64
+ node = doc.root
65
+
66
+ assert_equal [], node.namespace_definitions.map(&:prefix)
67
+
68
+
69
+ # assert_nothing_raised do
70
+ child_node = Nokogiri::XML::Node.new 'foo', doc
71
+ child_node['xml:lang'] = 'en-GB'
72
+
73
+ node << child_node
74
+ # end
75
+
76
+ assert_equal [], child_node.namespace_definitions.map(&:prefix)
77
+ end
78
+
62
79
  def test_namespace_key?
63
80
  doc = Nokogiri::XML <<-eoxml
64
81
  <root xmlns:tlm='http://tenderlovemaking.com/'>
@@ -14,6 +14,32 @@ module Nokogiri
14
14
  assert_instance_of Nokogiri::XML::Schema, xsd
15
15
  end
16
16
 
17
+ def test_invalid_schema_do_not_raise_exceptions
18
+ xsd = Nokogiri::XML::Schema.new <<EOF
19
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
20
+ <xs:group name="foo1">
21
+ <xs:sequence>
22
+ <xs:element name="bar" type="xs:boolean" />
23
+ </xs:sequence>
24
+ </xs:group>
25
+ <xs:group name="foo2">
26
+ <xs:sequence>
27
+ <xs:element name="bar" type="xs:string" />
28
+ </xs:sequence>
29
+ </xs:group>
30
+ <xs:element name="foo">
31
+ <xs:complexType>
32
+ <xs:choice>
33
+ <xs:group ref="foo1"/>
34
+ <xs:group ref="foo2"/>
35
+ </xs:choice>
36
+ </xs:complexType>
37
+ </xs:element>
38
+ </xs:schema>
39
+ EOF
40
+ assert_instance_of Nokogiri::XML::Schema, xsd
41
+ end
42
+
17
43
  def test_schema_from_document_node
18
44
  doc = Nokogiri::XML(File.open(PO_SCHEMA_FILE))
19
45
  assert doc
@@ -132,6 +132,45 @@ module Nokogiri
132
132
  assert_equal(['asdf'] * set.length, @handler.things)
133
133
  end
134
134
 
135
+ def parse_params node
136
+ params={}
137
+ node.xpath('./param').each do |p|
138
+ subparams = parse_params p
139
+ if(subparams.length > 0)
140
+ if(not params.has_key? p.attributes['name'].value)
141
+ params[p.attributes['name'].value] = subparams
142
+ else
143
+ if(params[p.attributes['name'].value].is_a? Array)
144
+ params[p.attributes['name'].value] << subparams
145
+ else
146
+ value = params[p.attributes['name'].value]
147
+ params[p.attributes['name'].value] = [value,subparams]
148
+ end
149
+ end
150
+ else
151
+ params[p.attributes['name'].value]=p.text
152
+ end
153
+ end
154
+ params
155
+ end
156
+
157
+ # issue #741 (xpath() around 10x slower in JRuby)
158
+ def test_slow_jruby_xpath
159
+ doc = Nokogiri::XML(File.open(XPATH_FILE))
160
+ start = Time.now
161
+
162
+ doc.xpath('.//category').each do |c|
163
+ c.xpath('programformats/programformat').each do |p|
164
+ p.xpath('./modules/module').each do |m|
165
+ parse_params m
166
+ end
167
+ end
168
+ end
169
+ stop = Time.now
170
+ elapsed_time = stop - start
171
+ assert elapsed_time < 10, "XPath is taking too long"
172
+ end
173
+
135
174
  def test_custom_xpath_function_returns_string
136
175
  if Nokogiri.uses_libxml?
137
176
  result = @xml.xpath('thing("asdf")', @handler)
@@ -290,6 +329,48 @@ END
290
329
  onix = xml_doc.children.first
291
330
  assert_equal 'a', onix.at_xpath('xmlns:Product').at_xpath('xmlns:RecordReference').text
292
331
  end
332
+
333
+ def test_xpath_after_attribute_change
334
+ xml_string = %q{<?xml version="1.0" encoding="UTF-8"?>
335
+ <mods version="3.0" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-0.xsd" xmlns="http://www.loc.gov/mods/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
336
+ <titleInfo>
337
+ <nonSort>THE</nonSort>
338
+ <title xml:lang="eng">ARTICLE TITLE HYDRANGEA ARTICLE 1</title>
339
+ <subTitle>SUBTITLE</subTitle>
340
+ </titleInfo>
341
+ <titleInfo lang="finnish">
342
+ <title>Artikkelin otsikko Hydrangea artiklan 1</title>
343
+ </titleInfo>
344
+ </mods>}
345
+
346
+ xml_doc = Nokogiri::XML(xml_string)
347
+ ns_hash = {'mods'=>'http://www.loc.gov/mods/v3'}
348
+ node = xml_doc.at_xpath('//mods:titleInfo[1]',ns_hash)
349
+ node['lang'] = 'english'
350
+ assert_equal 1, xml_doc.xpath('//mods:titleInfo[1]/@lang',ns_hash).length
351
+ assert_equal 'english', xml_doc.xpath('//mods:titleInfo[1]/@lang',ns_hash).first.value
352
+ end
353
+
354
+ def test_xpath_after_element_removal
355
+ xml_string = %q{<?xml version="1.0" encoding="UTF-8"?>
356
+ <mods version="3.0" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-0.xsd" xmlns="http://www.loc.gov/mods/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
357
+ <titleInfo>
358
+ <nonSort>THE</nonSort>
359
+ <title xml:lang="eng">ARTICLE TITLE HYDRANGEA ARTICLE 1</title>
360
+ <subTitle>SUBTITLE</subTitle>
361
+ </titleInfo>
362
+ <titleInfo lang="finnish">
363
+ <title>Artikkelin otsikko Hydrangea artiklan 1</title>
364
+ </titleInfo>
365
+ </mods>}
366
+
367
+ xml_doc = Nokogiri::XML(xml_string)
368
+ ns_hash = {'mods'=>'http://www.loc.gov/mods/v3'}
369
+ node = xml_doc.at_xpath('//mods:titleInfo[1]',ns_hash)
370
+ node.remove
371
+ assert_equal 1, xml_doc.xpath('//mods:titleInfo',ns_hash).length
372
+ assert_equal 'finnish', xml_doc.xpath('//mods:titleInfo[1]/@lang',ns_hash).first.value
373
+ end
293
374
  end
294
375
  end
295
376
  end
metadata CHANGED
@@ -1,153 +1,204 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: nokogiri
3
- version: !ruby/object:Gem::Version
4
- version: 1.6.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.6.2.rc1
5
5
  platform: ruby
6
- authors:
6
+ authors:
7
7
  - Aaron Patterson
8
8
  - Mike Dalessio
9
9
  - Yoko Harada
10
10
  - Tim Elliott
11
+ - Akinori MUSHA
11
12
  autorequire:
12
13
  bindir: bin
13
14
  cert_chain: []
14
-
15
- date: 2013-12-14 00:00:00 Z
16
- dependencies:
17
- - !ruby/object:Gem::Dependency
18
- version_requirements: &id001 !ruby/object:Gem::Requirement
19
- requirements:
15
+ date: 2014-04-06 00:00:00.000000000 Z
16
+ dependencies:
17
+ - !ruby/object:Gem::Dependency
18
+ name: mini_portile
19
+ requirement: !ruby/object:Gem::Requirement
20
+ requirements:
20
21
  - - ~>
21
- - !ruby/object:Gem::Version
22
- version: 0.5.0
22
+ - !ruby/object:Gem::Version
23
+ version: 0.5.2
23
24
  type: :runtime
24
- name: mini_portile
25
25
  prerelease: false
26
- requirement: *id001
27
- - !ruby/object:Gem::Dependency
28
- version_requirements: &id002 !ruby/object:Gem::Requirement
29
- requirements:
26
+ version_requirements: !ruby/object:Gem::Requirement
27
+ requirements:
30
28
  - - ~>
31
- - !ruby/object:Gem::Version
32
- version: "4.0"
33
- type: :development
29
+ - !ruby/object:Gem::Version
30
+ version: 0.5.2
31
+ - !ruby/object:Gem::Dependency
34
32
  name: rdoc
35
- prerelease: false
36
- requirement: *id002
37
- - !ruby/object:Gem::Dependency
38
- version_requirements: &id003 !ruby/object:Gem::Requirement
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- version: "1.1"
33
+ requirement: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '4.0'
43
38
  type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ version: '4.0'
45
+ - !ruby/object:Gem::Dependency
44
46
  name: hoe-bundler
47
+ requirement: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - '>='
50
+ - !ruby/object:Gem::Version
51
+ version: '1.1'
52
+ type: :development
45
53
  prerelease: false
46
- requirement: *id003
47
- - !ruby/object:Gem::Dependency
48
- version_requirements: &id004 !ruby/object:Gem::Requirement
49
- requirements:
50
- - - ">="
51
- - !ruby/object:Gem::Version
54
+ version_requirements: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - '>='
57
+ - !ruby/object:Gem::Version
58
+ version: '1.1'
59
+ - !ruby/object:Gem::Dependency
60
+ name: hoe-debugging
61
+ requirement: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - '>='
64
+ - !ruby/object:Gem::Version
52
65
  version: 1.0.3
53
66
  type: :development
54
- name: hoe-debugging
55
67
  prerelease: false
56
- requirement: *id004
57
- - !ruby/object:Gem::Dependency
58
- version_requirements: &id005 !ruby/object:Gem::Requirement
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: "1.0"
63
- type: :development
68
+ version_requirements: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - '>='
71
+ - !ruby/object:Gem::Version
72
+ version: 1.0.3
73
+ - !ruby/object:Gem::Dependency
64
74
  name: hoe-gemspec
65
- prerelease: false
66
- requirement: *id005
67
- - !ruby/object:Gem::Dependency
68
- version_requirements: &id006 !ruby/object:Gem::Requirement
69
- requirements:
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- version: "1.4"
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - '>='
78
+ - !ruby/object:Gem::Version
79
+ version: '1.0'
73
80
  type: :development
81
+ prerelease: false
82
+ version_requirements: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '1.0'
87
+ - !ruby/object:Gem::Dependency
74
88
  name: hoe-git
89
+ requirement: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '1.4'
94
+ type: :development
75
95
  prerelease: false
76
- requirement: *id006
77
- - !ruby/object:Gem::Dependency
78
- version_requirements: &id007 !ruby/object:Gem::Requirement
79
- requirements:
96
+ version_requirements: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - '>='
99
+ - !ruby/object:Gem::Version
100
+ version: '1.4'
101
+ - !ruby/object:Gem::Dependency
102
+ name: minitest
103
+ requirement: !ruby/object:Gem::Requirement
104
+ requirements:
80
105
  - - ~>
81
- - !ruby/object:Gem::Version
106
+ - !ruby/object:Gem::Version
82
107
  version: 2.2.2
83
108
  type: :development
84
- name: minitest
85
109
  prerelease: false
86
- requirement: *id007
87
- - !ruby/object:Gem::Dependency
88
- version_requirements: &id008 !ruby/object:Gem::Requirement
89
- requirements:
90
- - - ">="
91
- - !ruby/object:Gem::Version
92
- version: "0.9"
93
- type: :development
110
+ version_requirements: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ~>
113
+ - !ruby/object:Gem::Version
114
+ version: 2.2.2
115
+ - !ruby/object:Gem::Dependency
94
116
  name: rake
117
+ requirement: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - '>='
120
+ - !ruby/object:Gem::Version
121
+ version: '0.9'
122
+ type: :development
95
123
  prerelease: false
96
- requirement: *id008
97
- - !ruby/object:Gem::Dependency
98
- version_requirements: &id009 !ruby/object:Gem::Requirement
99
- requirements:
124
+ version_requirements: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - '>='
127
+ - !ruby/object:Gem::Version
128
+ version: '0.9'
129
+ - !ruby/object:Gem::Dependency
130
+ name: rake-compiler
131
+ requirement: !ruby/object:Gem::Requirement
132
+ requirements:
100
133
  - - ~>
101
- - !ruby/object:Gem::Version
102
- version: 0.8.0
134
+ - !ruby/object:Gem::Version
135
+ version: 0.9.2
103
136
  type: :development
104
- name: rake-compiler
105
137
  prerelease: false
106
- requirement: *id009
107
- - !ruby/object:Gem::Dependency
108
- version_requirements: &id010 !ruby/object:Gem::Requirement
109
- requirements:
110
- - - ">="
111
- - !ruby/object:Gem::Version
138
+ version_requirements: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - ~>
141
+ - !ruby/object:Gem::Version
142
+ version: 0.9.2
143
+ - !ruby/object:Gem::Dependency
144
+ name: racc
145
+ requirement: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - '>='
148
+ - !ruby/object:Gem::Version
112
149
  version: 1.4.6
113
150
  type: :development
114
- name: racc
115
151
  prerelease: false
116
- requirement: *id010
117
- - !ruby/object:Gem::Dependency
118
- version_requirements: &id011 !ruby/object:Gem::Requirement
119
- requirements:
120
- - - ">="
121
- - !ruby/object:Gem::Version
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - '>='
155
+ - !ruby/object:Gem::Version
156
+ version: 1.4.6
157
+ - !ruby/object:Gem::Dependency
158
+ name: rexical
159
+ requirement: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - '>='
162
+ - !ruby/object:Gem::Version
122
163
  version: 1.0.5
123
164
  type: :development
124
- name: rexical
125
165
  prerelease: false
126
- requirement: *id011
127
- - !ruby/object:Gem::Dependency
128
- version_requirements: &id012 !ruby/object:Gem::Requirement
129
- requirements:
166
+ version_requirements: !ruby/object:Gem::Requirement
167
+ requirements:
168
+ - - '>='
169
+ - !ruby/object:Gem::Version
170
+ version: 1.0.5
171
+ - !ruby/object:Gem::Dependency
172
+ name: hoe
173
+ requirement: !ruby/object:Gem::Requirement
174
+ requirements:
130
175
  - - ~>
131
- - !ruby/object:Gem::Version
132
- version: "3.7"
176
+ - !ruby/object:Gem::Version
177
+ version: '3.7'
133
178
  type: :development
134
- name: hoe
135
179
  prerelease: false
136
- requirement: *id012
137
- description: "Nokogiri (\xE9\x8B\xB8) is an HTML, XML, SAX, and Reader parser. Among Nokogiri's\n\
138
- many features is the ability to search documents via XPath or CSS3 selectors.\n\n\
139
- XML is like violence - if it doesn\xE2\x80\x99t solve your problems, you are not using\n\
140
- enough of it."
141
- email:
180
+ version_requirements: !ruby/object:Gem::Requirement
181
+ requirements:
182
+ - - ~>
183
+ - !ruby/object:Gem::Version
184
+ version: '3.7'
185
+ description: |-
186
+ Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser. Among Nokogiri's
187
+ many features is the ability to search documents via XPath or CSS3 selectors.
188
+
189
+ XML is like violence - if it doesn’t solve your problems, you are not using
190
+ enough of it.
191
+ email:
142
192
  - aaronp@rubyforge.org
143
193
  - mike.dalessio@gmail.com
144
194
  - yokolet@gmail.com
145
195
  - tle@holymonkey.com
146
- executables:
196
+ - knu@idaemons.org
197
+ executables:
147
198
  - nokogiri
148
- extensions:
199
+ extensions:
149
200
  - ext/nokogiri/extconf.rb
150
- extra_rdoc_files:
201
+ extra_rdoc_files:
151
202
  - CHANGELOG.ja.rdoc
152
203
  - CHANGELOG.rdoc
153
204
  - C_CODING_STYLE.rdoc
@@ -157,6 +208,7 @@ extra_rdoc_files:
157
208
  - ROADMAP.md
158
209
  - STANDARD_RESPONSES.md
159
210
  - Y_U_NO_GEMSPEC.md
211
+ - suppressions/README.txt
160
212
  - ext/nokogiri/html_document.c
161
213
  - ext/nokogiri/html_element_description.c
162
214
  - ext/nokogiri/html_entity_lookup.c
@@ -191,8 +243,9 @@ extra_rdoc_files:
191
243
  - ext/nokogiri/xml_text.c
192
244
  - ext/nokogiri/xml_xpath_context.c
193
245
  - ext/nokogiri/xslt_stylesheet.c
194
- files:
246
+ files:
195
247
  - .autotest
248
+ - .editorconfig
196
249
  - .gemtest
197
250
  - .travis.yml
198
251
  - CHANGELOG.ja.rdoc
@@ -340,7 +393,34 @@ files:
340
393
  - lib/nokogiri/xslt.rb
341
394
  - lib/nokogiri/xslt/stylesheet.rb
342
395
  - lib/xsd/xmlparser/nokogiri.rb
343
- - tasks/cross_compile.rb
396
+ - ports/archives/libxml2-2.8.0.tar.gz
397
+ - ports/archives/libxslt-1.1.28.tar.gz
398
+ - ports/patches/libxml2/0001-Fix-parser-local-buffers-size-problems.patch
399
+ - ports/patches/libxml2/0002-Fix-entities-local-buffers-size-problems.patch
400
+ - ports/patches/libxml2/0003-Fix-an-error-in-previous-commit.patch
401
+ - ports/patches/libxml2/0004-Fix-potential-out-of-bound-access.patch
402
+ - ports/patches/libxml2/0005-Detect-excessive-entities-expansion-upon-replacement.patch
403
+ - ports/patches/libxml2/0006-Do-not-fetch-external-parsed-entities.patch
404
+ - ports/patches/libxml2/0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch
405
+ - ports/patches/libxml2/0008-Improve-handling-of-xmlStopParser.patch
406
+ - ports/patches/libxml2/0009-Fix-a-couple-of-return-without-value.patch
407
+ - ports/patches/libxslt/0001-Adding-doc-update-related-to-1.1.28.patch
408
+ - ports/patches/libxslt/0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch
409
+ - ports/patches/libxslt/0003-Initialize-pseudo-random-number-generator-with-curre.patch
410
+ - ports/patches/libxslt/0004-EXSLT-function-str-replace-is-broken-as-is.patch
411
+ - ports/patches/libxslt/0006-Fix-str-padding-to-work-with-UTF-8-strings.patch
412
+ - ports/patches/libxslt/0007-Separate-function-for-predicate-matching-in-patterns.patch
413
+ - ports/patches/libxslt/0008-Fix-direct-pattern-matching.patch
414
+ - ports/patches/libxslt/0009-Fix-certain-patterns-with-predicates.patch
415
+ - ports/patches/libxslt/0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch
416
+ - ports/patches/libxslt/0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch
417
+ - ports/patches/libxslt/0014-Fix-for-bug-436589.patch
418
+ - ports/patches/libxslt/0015-Fix-mkdir-for-mingw.patch
419
+ - suppressions/README.txt
420
+ - suppressions/nokogiri_ree-1.8.7.358.supp
421
+ - suppressions/nokogiri_ruby-1.8.7.370.supp
422
+ - suppressions/nokogiri_ruby-1.9.2.320.supp
423
+ - suppressions/nokogiri_ruby-1.9.3.327.supp
344
424
  - tasks/nokogiri.org.rb
345
425
  - tasks/test.rb
346
426
  - test/css/test_nthiness.rb
@@ -351,6 +431,7 @@ files:
351
431
  - test/files/2ch.html
352
432
  - test/files/address_book.rlx
353
433
  - test/files/address_book.xml
434
+ - test/files/atom.xml
354
435
  - test/files/bar/bar.xsd
355
436
  - test/files/bogus.xml
356
437
  - test/files/dont_hurt_em_why.xml
@@ -369,6 +450,7 @@ files:
369
450
  - test/files/saml/xmldsig_schema.xsd
370
451
  - test/files/shift_jis.html
371
452
  - test/files/shift_jis.xml
453
+ - test/files/shift_jis_no_charset.html
372
454
  - test/files/snuggles.xml
373
455
  - test/files/staff.dtd
374
456
  - test/files/staff.xml
@@ -393,6 +475,7 @@ files:
393
475
  - test/html/test_node_encoding.rb
394
476
  - test/namespaces/test_additional_namespaces_in_builder_doc.rb
395
477
  - test/namespaces/test_namespaces_in_builder_doc.rb
478
+ - test/namespaces/test_namespaces_in_cloned_doc.rb
396
479
  - test/namespaces/test_namespaces_in_created_doc.rb
397
480
  - test/namespaces/test_namespaces_in_parsed_doc.rb
398
481
  - test/test_convert_xpath.rb
@@ -443,100 +526,97 @@ files:
443
526
  - test/xslt/test_custom_functions.rb
444
527
  - test/xslt/test_exception_handling.rb
445
528
  - test_all
446
- - ports/archives/libxml2-2.8.0.tar.gz
447
- - ports/archives/libxslt-1.1.26.tar.gz
448
529
  homepage: http://nokogiri.org
449
- licenses:
530
+ licenses:
450
531
  - MIT
451
532
  metadata: {}
452
-
453
533
  post_install_message:
454
- rdoc_options:
534
+ rdoc_options:
455
535
  - --main
456
536
  - README.rdoc
457
- require_paths:
537
+ require_paths:
458
538
  - lib
459
- required_ruby_version: !ruby/object:Gem::Requirement
460
- requirements:
461
- - - ">="
462
- - !ruby/object:Gem::Version
539
+ required_ruby_version: !ruby/object:Gem::Requirement
540
+ requirements:
541
+ - - '>='
542
+ - !ruby/object:Gem::Version
463
543
  version: 1.9.2
464
- required_rubygems_version: !ruby/object:Gem::Requirement
465
- requirements:
466
- - - ">="
467
- - !ruby/object:Gem::Version
468
- version: "0"
544
+ required_rubygems_version: !ruby/object:Gem::Requirement
545
+ requirements:
546
+ - - '>'
547
+ - !ruby/object:Gem::Version
548
+ version: 1.3.1
469
549
  requirements: []
470
-
471
550
  rubyforge_project: nokogiri
472
- rubygems_version: 2.0.13
551
+ rubygems_version: 2.2.2
473
552
  signing_key:
474
553
  specification_version: 4
475
- summary: "Nokogiri (\xE9\x8B\xB8) is an HTML, XML, SAX, and Reader parser"
476
- test_files:
477
- - test/decorators/test_slop.rb
478
- - test/test_encoding_handler.rb
479
- - test/css/test_parser.rb
480
- - test/css/test_nthiness.rb
481
- - test/css/test_tokenizer.rb
482
- - test/css/test_xpath_visitor.rb
483
- - test/xslt/test_exception_handling.rb
484
- - test/xslt/test_custom_functions.rb
485
- - test/test_reader.rb
486
- - test/xml/test_comment.rb
487
- - test/xml/test_unparented_node.rb
488
- - test/xml/test_processing_instruction.rb
489
- - test/xml/test_node_attributes.rb
490
- - test/xml/test_xpath.rb
491
- - test/xml/test_node_encoding.rb
554
+ summary: Nokogiri () is an HTML, XML, SAX, and Reader parser
555
+ test_files:
556
+ - test/test_nokogiri.rb
557
+ - test/test_memory_leak.rb
558
+ - test/test_convert_xpath.rb
559
+ - test/xml/test_element_content.rb
560
+ - test/xml/test_builder.rb
492
561
  - test/xml/test_element_decl.rb
493
- - test/xml/test_entity_decl.rb
494
- - test/xml/test_namespace.rb
495
- - test/xml/test_cdata.rb
496
- - test/xml/test_node_inheritance.rb
497
- - test/xml/test_entity_reference.rb
498
- - test/xml/test_text.rb
499
- - test/xml/test_reader_encoding.rb
500
- - test/xml/test_dtd.rb
501
- - test/xml/test_xinclude.rb
502
562
  - test/xml/test_parse_options.rb
503
- - test/xml/test_schema.rb
504
- - test/xml/test_element_content.rb
505
- - test/xml/test_document.rb
506
- - test/xml/test_relax_ng.rb
507
- - test/xml/test_c14n.rb
508
563
  - test/xml/test_dtd_encoding.rb
509
- - test/xml/test_syntax_error.rb
510
564
  - test/xml/test_attribute_decl.rb
511
- - test/xml/test_node_set.rb
512
- - test/xml/test_builder.rb
513
- - test/xml/sax/test_parser.rb
514
- - test/xml/sax/test_push_parser.rb
515
- - test/xml/sax/test_parser_context.rb
516
- - test/xml/test_document_encoding.rb
517
- - test/xml/test_attr.rb
565
+ - test/xml/test_cdata.rb
518
566
  - test/xml/test_document_fragment.rb
519
- - test/xml/test_node.rb
567
+ - test/xml/test_dtd.rb
520
568
  - test/xml/test_node_reparenting.rb
569
+ - test/xml/test_c14n.rb
570
+ - test/xml/test_node_inheritance.rb
571
+ - test/xml/test_schema.rb
521
572
  - test/xml/node/test_save_options.rb
522
573
  - test/xml/node/test_subclass.rb
574
+ - test/xml/test_processing_instruction.rb
575
+ - test/xml/test_attr.rb
576
+ - test/xml/test_namespace.rb
577
+ - test/xml/test_relax_ng.rb
578
+ - test/xml/test_xpath.rb
579
+ - test/xml/test_reader_encoding.rb
580
+ - test/xml/test_node_encoding.rb
581
+ - test/xml/test_node_attributes.rb
582
+ - test/xml/test_text.rb
583
+ - test/xml/test_document.rb
584
+ - test/xml/test_entity_reference.rb
585
+ - test/xml/test_node.rb
586
+ - test/xml/test_document_encoding.rb
587
+ - test/xml/test_unparented_node.rb
588
+ - test/xml/test_syntax_error.rb
589
+ - test/xml/test_entity_decl.rb
590
+ - test/xml/test_comment.rb
591
+ - test/xml/sax/test_parser.rb
592
+ - test/xml/sax/test_parser_context.rb
593
+ - test/xml/sax/test_push_parser.rb
594
+ - test/xml/test_node_set.rb
595
+ - test/xml/test_xinclude.rb
523
596
  - test/test_css_cache.rb
524
- - test/test_soap4r_sax.rb
597
+ - test/xslt/test_exception_handling.rb
598
+ - test/xslt/test_custom_functions.rb
599
+ - test/decorators/test_slop.rb
600
+ - test/html/test_builder.rb
601
+ - test/html/test_document_fragment.rb
602
+ - test/html/test_named_characters.rb
603
+ - test/html/test_element_description.rb
525
604
  - test/html/test_node_encoding.rb
526
605
  - test/html/test_document.rb
527
- - test/html/test_named_characters.rb
528
- - test/html/test_builder.rb
606
+ - test/html/test_node.rb
607
+ - test/html/test_document_encoding.rb
529
608
  - test/html/sax/test_parser.rb
530
609
  - test/html/sax/test_parser_context.rb
531
- - test/html/test_document_encoding.rb
532
- - test/html/test_element_description.rb
533
- - test/html/test_document_fragment.rb
534
- - test/html/test_node.rb
535
- - test/test_memory_leak.rb
536
- - test/test_convert_xpath.rb
537
- - test/namespaces/test_namespaces_in_builder_doc.rb
610
+ - test/test_xslt_transforms.rb
611
+ - test/css/test_tokenizer.rb
612
+ - test/css/test_parser.rb
613
+ - test/css/test_nthiness.rb
614
+ - test/css/test_xpath_visitor.rb
615
+ - test/test_encoding_handler.rb
616
+ - test/namespaces/test_namespaces_in_parsed_doc.rb
617
+ - test/namespaces/test_namespaces_in_cloned_doc.rb
538
618
  - test/namespaces/test_namespaces_in_created_doc.rb
539
619
  - test/namespaces/test_additional_namespaces_in_builder_doc.rb
540
- - test/namespaces/test_namespaces_in_parsed_doc.rb
541
- - test/test_xslt_transforms.rb
542
- - test/test_nokogiri.rb
620
+ - test/namespaces/test_namespaces_in_builder_doc.rb
621
+ - test/test_soap4r_sax.rb
622
+ - test/test_reader.rb