nokogiri 1.9.0.rc1-java → 1.9.1-java

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 (139) hide show
  1. checksums.yaml +4 -4
  2. data/lib/nokogiri/css/parser.rb +61 -61
  3. data/lib/nokogiri/nokogiri.jar +0 -0
  4. data/lib/nokogiri/version.rb +1 -1
  5. data/lib/nokogiri/xml/document_fragment.rb +1 -1
  6. metadata +4 -146
  7. data/.autotest +0 -22
  8. data/.cross_rubies +0 -8
  9. data/.editorconfig +0 -17
  10. data/.gemtest +0 -0
  11. data/.travis.yml +0 -63
  12. data/CHANGELOG.md +0 -1402
  13. data/CONTRIBUTING.md +0 -42
  14. data/C_CODING_STYLE.rdoc +0 -33
  15. data/Gemfile +0 -23
  16. data/Gemfile-libxml-ruby +0 -3
  17. data/Manifest.txt +0 -371
  18. data/ROADMAP.md +0 -111
  19. data/Rakefile +0 -358
  20. data/SECURITY.md +0 -19
  21. data/STANDARD_RESPONSES.md +0 -47
  22. data/Y_U_NO_GEMSPEC.md +0 -155
  23. data/appveyor.yml +0 -29
  24. data/build_all +0 -48
  25. data/patches/sort-patches-by-date +0 -25
  26. data/suppressions/README.txt +0 -1
  27. data/suppressions/nokogiri_ruby-2.supp +0 -10
  28. data/tasks/test.rb +0 -100
  29. data/test/css/test_nthiness.rb +0 -226
  30. data/test/css/test_parser.rb +0 -386
  31. data/test/css/test_tokenizer.rb +0 -215
  32. data/test/css/test_xpath_visitor.rb +0 -96
  33. data/test/decorators/test_slop.rb +0 -23
  34. data/test/files/2ch.html +0 -108
  35. data/test/files/GH_1042.html +0 -18
  36. data/test/files/address_book.rlx +0 -12
  37. data/test/files/address_book.xml +0 -10
  38. data/test/files/atom.xml +0 -344
  39. data/test/files/bar/bar.xsd +0 -4
  40. data/test/files/bogus.xml +0 -0
  41. data/test/files/dont_hurt_em_why.xml +0 -422
  42. data/test/files/encoding.html +0 -82
  43. data/test/files/encoding.xhtml +0 -84
  44. data/test/files/exslt.xml +0 -8
  45. data/test/files/exslt.xslt +0 -35
  46. data/test/files/foo/foo.xsd +0 -4
  47. data/test/files/metacharset.html +0 -10
  48. data/test/files/namespace_pressure_test.xml +0 -1684
  49. data/test/files/noencoding.html +0 -47
  50. data/test/files/po.xml +0 -32
  51. data/test/files/po.xsd +0 -66
  52. data/test/files/saml/saml20assertion_schema.xsd +0 -283
  53. data/test/files/saml/saml20protocol_schema.xsd +0 -302
  54. data/test/files/saml/xenc_schema.xsd +0 -146
  55. data/test/files/saml/xmldsig_schema.xsd +0 -318
  56. data/test/files/shift_jis.html +0 -10
  57. data/test/files/shift_jis.xml +0 -5
  58. data/test/files/shift_jis_no_charset.html +0 -9
  59. data/test/files/slow-xpath.xml +0 -25509
  60. data/test/files/snuggles.xml +0 -3
  61. data/test/files/staff.dtd +0 -10
  62. data/test/files/staff.xml +0 -59
  63. data/test/files/staff.xslt +0 -32
  64. data/test/files/test_document_url/bar.xml +0 -2
  65. data/test/files/test_document_url/document.dtd +0 -4
  66. data/test/files/test_document_url/document.xml +0 -6
  67. data/test/files/tlm.html +0 -851
  68. data/test/files/to_be_xincluded.xml +0 -2
  69. data/test/files/valid_bar.xml +0 -2
  70. data/test/files/xinclude.xml +0 -4
  71. data/test/helper.rb +0 -271
  72. data/test/html/sax/test_parser.rb +0 -168
  73. data/test/html/sax/test_parser_context.rb +0 -46
  74. data/test/html/sax/test_parser_text.rb +0 -163
  75. data/test/html/sax/test_push_parser.rb +0 -87
  76. data/test/html/test_attributes.rb +0 -85
  77. data/test/html/test_builder.rb +0 -164
  78. data/test/html/test_document.rb +0 -722
  79. data/test/html/test_document_encoding.rb +0 -143
  80. data/test/html/test_document_fragment.rb +0 -310
  81. data/test/html/test_element_description.rb +0 -105
  82. data/test/html/test_named_characters.rb +0 -14
  83. data/test/html/test_node.rb +0 -212
  84. data/test/html/test_node_encoding.rb +0 -91
  85. data/test/namespaces/test_additional_namespaces_in_builder_doc.rb +0 -14
  86. data/test/namespaces/test_namespaces_aliased_default.rb +0 -24
  87. data/test/namespaces/test_namespaces_in_builder_doc.rb +0 -75
  88. data/test/namespaces/test_namespaces_in_cloned_doc.rb +0 -31
  89. data/test/namespaces/test_namespaces_in_created_doc.rb +0 -75
  90. data/test/namespaces/test_namespaces_in_parsed_doc.rb +0 -80
  91. data/test/namespaces/test_namespaces_preservation.rb +0 -31
  92. data/test/test_convert_xpath.rb +0 -135
  93. data/test/test_css_cache.rb +0 -47
  94. data/test/test_encoding_handler.rb +0 -48
  95. data/test/test_memory_leak.rb +0 -226
  96. data/test/test_nokogiri.rb +0 -138
  97. data/test/test_soap4r_sax.rb +0 -52
  98. data/test/test_xslt_transforms.rb +0 -314
  99. data/test/xml/node/test_save_options.rb +0 -28
  100. data/test/xml/node/test_subclass.rb +0 -44
  101. data/test/xml/sax/test_parser.rb +0 -402
  102. data/test/xml/sax/test_parser_context.rb +0 -115
  103. data/test/xml/sax/test_parser_text.rb +0 -202
  104. data/test/xml/sax/test_push_parser.rb +0 -265
  105. data/test/xml/test_attr.rb +0 -96
  106. data/test/xml/test_attribute_decl.rb +0 -86
  107. data/test/xml/test_builder.rb +0 -353
  108. data/test/xml/test_c14n.rb +0 -180
  109. data/test/xml/test_cdata.rb +0 -54
  110. data/test/xml/test_comment.rb +0 -40
  111. data/test/xml/test_document.rb +0 -982
  112. data/test/xml/test_document_encoding.rb +0 -31
  113. data/test/xml/test_document_fragment.rb +0 -312
  114. data/test/xml/test_dtd.rb +0 -187
  115. data/test/xml/test_dtd_encoding.rb +0 -31
  116. data/test/xml/test_element_content.rb +0 -56
  117. data/test/xml/test_element_decl.rb +0 -73
  118. data/test/xml/test_entity_decl.rb +0 -122
  119. data/test/xml/test_entity_reference.rb +0 -262
  120. data/test/xml/test_namespace.rb +0 -96
  121. data/test/xml/test_node.rb +0 -1379
  122. data/test/xml/test_node_attributes.rb +0 -115
  123. data/test/xml/test_node_encoding.rb +0 -75
  124. data/test/xml/test_node_inheritance.rb +0 -32
  125. data/test/xml/test_node_reparenting.rb +0 -661
  126. data/test/xml/test_node_set.rb +0 -828
  127. data/test/xml/test_parse_options.rb +0 -64
  128. data/test/xml/test_processing_instruction.rb +0 -30
  129. data/test/xml/test_reader.rb +0 -620
  130. data/test/xml/test_reader_encoding.rb +0 -134
  131. data/test/xml/test_relax_ng.rb +0 -60
  132. data/test/xml/test_schema.rb +0 -142
  133. data/test/xml/test_syntax_error.rb +0 -36
  134. data/test/xml/test_text.rb +0 -69
  135. data/test/xml/test_unparented_node.rb +0 -483
  136. data/test/xml/test_xinclude.rb +0 -83
  137. data/test/xml/test_xpath.rb +0 -470
  138. data/test/xslt/test_custom_functions.rb +0 -133
  139. data/test/xslt/test_exception_handling.rb +0 -37
@@ -1,133 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- require "helper"
4
-
5
- module Nokogiri
6
- module XSLT
7
- class TestCustomFunctions < Nokogiri::TestCase
8
- def setup
9
- super
10
- @xml = Nokogiri.XML(<<-EOXML)
11
- <?xml version="1.0" encoding="UTF-8"?>
12
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
13
- "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
14
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
15
- <head>
16
- <meta http-equiv="Content-type" content="application/xhtml+xml"/>
17
- <title>Foo</title>
18
- </head>
19
- <body>
20
- <h1>Foo</h1>
21
- <p>Lorem ipsum.</p>
22
- </body>
23
- </html>
24
- EOXML
25
- end
26
-
27
- def test_function
28
- skip("Pure Java version doesn't support this feature.") if !Nokogiri.uses_libxml?
29
- foo = Class.new do
30
- def capitalize nodes
31
- nodes.first.content.upcase
32
- end
33
- end
34
-
35
- XSLT.register "http://e.org/functions", foo
36
-
37
- xsl = Nokogiri.XSLT(<<-EOXSL)
38
- <?xml version="1.0"?>
39
- <xsl:stylesheet version="1.0"
40
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
41
- xmlns:f="http://e.org/functions"
42
- extension-element-prefixes="f">
43
-
44
- <xsl:template match="text()">
45
- <xsl:copy-of select="f:capitalize(.)"/>
46
- </xsl:template>
47
-
48
- <xsl:template match="@*|node()">
49
- <xsl:copy>
50
- <xsl:apply-templates select="@*|node()"/>
51
- <xsl:apply-imports/>
52
- </xsl:copy>
53
- </xsl:template>
54
-
55
- </xsl:stylesheet>
56
- EOXSL
57
- result = xsl.transform @xml
58
- assert_match(/FOO/, result.css('title').first.text)
59
- end
60
-
61
-
62
- def test_function_arguments
63
- skip("Pure Java version doesn't support this feature.") if !Nokogiri.uses_libxml?
64
- foo = Class.new do
65
- include MiniTest::Assertions
66
- # Minitest 5 uses `self.assertions` in `assert()` which is not
67
- # defined in the Minitest::Assertions module :-(
68
- attr_writer :assertions
69
- def assertions; @assertions ||= 0; end
70
-
71
- def multiarg *args
72
- assert_equal ["abc", "xyz"], args
73
- args.first
74
- end
75
-
76
- def numericarg arg
77
- assert_equal 42, arg
78
- arg
79
- end
80
- end
81
-
82
- xsl = Nokogiri.XSLT(<<-EOXSL, "http://e.org/functions" => foo)
83
- <?xml version="1.0"?>
84
- <xsl:stylesheet version="1.0"
85
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
86
- xmlns:f="http://e.org/functions"
87
- extension-element-prefixes="f">
88
-
89
- <xsl:template match="text()">
90
- <xsl:copy-of select="f:multiarg('abc', 'xyz')"/>
91
- <xsl:copy-of select="f:numericarg(42)"/>
92
- </xsl:template>
93
- </xsl:stylesheet>
94
- EOXSL
95
-
96
- xsl.transform @xml
97
- end
98
-
99
-
100
- def test_function_XSLT
101
- skip("Pure Java version doesn't support this feature.") if !Nokogiri.uses_libxml?
102
- foo = Class.new do
103
- def america nodes
104
- nodes.first.content.upcase
105
- end
106
- end
107
-
108
- xsl = Nokogiri.XSLT(<<-EOXSL, "http://e.org/functions" => foo)
109
- <?xml version="1.0"?>
110
- <xsl:stylesheet version="1.0"
111
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
112
- xmlns:f="http://e.org/functions"
113
- extension-element-prefixes="f">
114
-
115
- <xsl:template match="text()">
116
- <xsl:copy-of select="f:america(.)"/>
117
- </xsl:template>
118
-
119
- <xsl:template match="@*|node()">
120
- <xsl:copy>
121
- <xsl:apply-templates select="@*|node()"/>
122
- <xsl:apply-imports/>
123
- </xsl:copy>
124
- </xsl:template>
125
-
126
- </xsl:stylesheet>
127
- EOXSL
128
- result = xsl.transform @xml
129
- assert_match(/FOO/, result.css('title').first.text)
130
- end
131
- end
132
- end
133
- end
@@ -1,37 +0,0 @@
1
- require "helper"
2
-
3
- module Nokogiri
4
- module XSLT
5
- class TestExceptionHandling < Nokogiri::TestCase
6
- def test_java_exception_handling
7
- skip('This test is for Java only') if Nokogiri.uses_libxml?
8
-
9
- xml = Nokogiri.XML(<<-EOXML)
10
- <foo>
11
- <bar/>
12
- </foo>
13
- EOXML
14
-
15
- xsl = Nokogiri.XSLT(<<-EOXSL)
16
- <?xml version="1.0"?>
17
- <xsl:stylesheet version="1.0"
18
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
19
-
20
- <xsl:template match="/">
21
- <a/>
22
- <b/>
23
- </xsl:template>
24
- </xsl:stylesheet>
25
- EOXSL
26
-
27
- begin
28
- xsl.transform xml
29
- fail('It should not get here')
30
- rescue RuntimeError => e
31
- assert_match(/Can't have more than one root/, e.to_s, 'The exception message does not contain the expected information')
32
- end
33
- end
34
-
35
- end
36
- end
37
- end