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
@@ -1,134 +0,0 @@
1
- gem 'rake-compiler'
2
- require 'rake/extensioncompiler'
3
- HOST = Rake::ExtensionCompiler.mingw_host
4
-
5
- require 'resolv'
6
-
7
- require 'mini_portile'
8
- dependencies = YAML.load_file("dependencies.yml")
9
- $recipes = {}
10
- %w[zlib libiconv libxml2 libxslt].each do |lib|
11
- $recipes[lib] = MiniPortile.new lib, dependencies[lib]
12
- end
13
- $recipes.each { |_, recipe| recipe.host = HOST }
14
-
15
- file "lib/nokogiri/nokogiri.rb" do
16
- File.open("lib/nokogiri/nokogiri.rb", 'wb') do |f|
17
- f.write %Q{require "nokogiri/\#{RUBY_VERSION.sub(/\\.\\d+$/, '')}/nokogiri"\n}
18
- end
19
- end
20
-
21
- namespace :cross do
22
- task :zlib do
23
- recipe = $recipes["zlib"]
24
- recipe.files = ["http://zlib.net/#{recipe.name}-#{recipe.version}.tar.gz"]
25
- class << recipe
26
- def configure
27
- Dir.chdir work_path do
28
- mk = File.read 'win32/Makefile.gcc'
29
- File.open 'win32/Makefile.gcc', 'wb' do |f|
30
- f.puts "BINARY_PATH = #{CROSS_DIR}/bin"
31
- f.puts "LIBRARY_PATH = #{CROSS_DIR}/lib"
32
- f.puts "INCLUDE_PATH = #{CROSS_DIR}/include"
33
- f.puts mk.sub(/^PREFIX\s*=\s*$/, "PREFIX = #{HOST}-")
34
- end
35
- end
36
- end
37
-
38
- def configured?
39
- Dir.chdir work_path do
40
- !! (File.read('win32/Makefile.gcc') =~ /^BINARY_PATH/)
41
- end
42
- end
43
-
44
- def compile
45
- execute "compile", "make -f win32/Makefile.gcc"
46
- end
47
-
48
- def install
49
- execute "install", "make -f win32/Makefile.gcc install"
50
- end
51
- end
52
-
53
- checkpoint = "#{CROSS_DIR}/#{recipe.name}-#{recipe.version}-#{recipe.host}.installed"
54
- unless File.exist?(checkpoint)
55
- recipe.cook
56
- touch checkpoint
57
- end
58
- recipe.activate
59
- end
60
-
61
- task :libiconv do
62
- recipe = $recipes["libiconv"]
63
- recipe.files = ["http://ftp.gnu.org/pub/gnu/libiconv/#{recipe.name}-#{recipe.version}.tar.gz"]
64
- recipe.configure_options = [
65
- "--host=#{HOST}",
66
- "--enable-static",
67
- "--disable-shared",
68
- "CPPFLAGS='-mno-cygwin -Wall'",
69
- "CFLAGS='-mno-cygwin -O2 -g'",
70
- "CXXFLAGS='-mno-cygwin -O2 -g'",
71
- "LDFLAGS=-mno-cygwin"
72
- ]
73
-
74
- checkpoint = "#{CROSS_DIR}/#{recipe.name}-#{recipe.version}-#{recipe.host}.installed"
75
- unless File.exist?(checkpoint)
76
- recipe.cook
77
- touch checkpoint
78
- end
79
- recipe.activate
80
- end
81
-
82
- task :libxml2 => ["cross:zlib", "cross:libiconv"] do
83
- recipe = $recipes["libxml2"]
84
- recipe.files = ["ftp://ftp.xmlsoft.org/libxml2/#{recipe.name}-#{recipe.version}.tar.gz"]
85
- recipe.configure_options = [
86
- "--host=#{HOST}",
87
- "--enable-static",
88
- "--disable-shared",
89
- "--with-zlib=#{CROSS_DIR}",
90
- "--with-iconv=#{$recipes["libiconv"].path}",
91
- "--without-python",
92
- "--without-readline",
93
- "CFLAGS='-DIN_LIBXML'"
94
- ]
95
-
96
- checkpoint = "#{CROSS_DIR}/#{recipe.name}-#{recipe.version}-#{recipe.host}.installed"
97
- unless File.exist?(checkpoint)
98
- recipe.cook
99
- touch checkpoint
100
- end
101
- recipe.activate
102
- end
103
-
104
- task :libxslt => ['cross:libxml2'] do
105
- recipe = $recipes["libxslt"]
106
- recipe.files = ["ftp://ftp.xmlsoft.org/libxml2/#{recipe.name}-#{recipe.version}.tar.gz"]
107
- recipe.configure_options = [
108
- "--host=#{HOST}",
109
- "--enable-static",
110
- "--disable-shared",
111
- "--with-libxml-prefix=#{$recipes["libxml2"].path}",
112
- "--without-python",
113
- "--without-crypto",
114
- "CFLAGS='-DIN_LIBXML'"
115
- ]
116
-
117
- checkpoint = "#{CROSS_DIR}/#{recipe.name}-#{recipe.version}-#{recipe.host}.installed"
118
- unless File.exist?(checkpoint)
119
- recipe.cook
120
- touch checkpoint
121
- end
122
- recipe.activate
123
- end
124
-
125
- task :file_list do
126
- HOE.spec.files += Dir["lib/nokogiri/nokogiri.rb"]
127
- HOE.spec.files += Dir["lib/nokogiri/{1.9,2.0}/nokogiri.so"]
128
- end
129
- end
130
-
131
- require 'rake/clean'
132
- CLOBBER.include("#{CROSS_DIR}/*.installed", "#{CROSS_DIR}/#{HOST}", "tmp/#{HOST}")
133
-
134
- task :cross => ["cross:libxslt", "lib/nokogiri/nokogiri.rb", "cross:file_list"]