nokogiri 1.10.0-x64-mingw32 → 1.10.1-x64-mingw32

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9303c193ed62b1e25dab8835c9d58e1bf5df863ddc2badd0c69a2d172b75bf4
4
- data.tar.gz: 7f845c23e9171495c0ac421d2fa7f993361c826f7e9ba96adbb6887da0334cf2
3
+ metadata.gz: ba320ab0c8177a5f33380bda626a4b501a197ebe5668209cd25a05beba233002
4
+ data.tar.gz: 97f7a5bd46019bc50c1e4976575d3b10da88a2c29a5c3056ff5ff6221318df0a
5
5
  SHA512:
6
- metadata.gz: 87badc63a3df5043376093a435bee36e7ecd3344b49e42c1a3fadf571cbc4b473655b59474c33b06c39062908fd18fc5f67a7d57e5605cc2fa318f46717d6236
7
- data.tar.gz: '080f07d248a0ab3489f096d664a8b4785da4e72299e4ca1fdc5ffe16ac3fe923073c483f9af4ae5123a465e38337e7276f09c4f58aebf84dc61c92da1d29efce'
6
+ metadata.gz: 03f2fabed4d67da395935e9cb99d4a82f28cdda48da0ded0c3b3122ff2a30e6b5a35a28183a5a1fc2daab1d0cecf77492e889dd2337b2e716d649d023bf7b302
7
+ data.tar.gz: 32b8ef9d79029c74a53a9686f5908883f2fcfb13da48bab43d768786d8618ba95f98b2d1cda05aed472fa8d4bd9f24233b4d57aebba44387b897ca38733673f6
data/README.md CHANGED
@@ -12,14 +12,16 @@ or CSS3 selectors.
12
12
  * http://nokogiri.org
13
13
  * [Installation Help](http://nokogiri.org/tutorials/installing_nokogiri.html)
14
14
  * [Tutorials](http://nokogiri.org)
15
+ * [Cheat Sheet](https://github.com/sparklemotion/nokogiri/wiki/Cheat-sheet)
15
16
  * [GitHub](https://github.com/sparklemotion/nokogiri)
16
17
  * [Mailing List](https://groups.google.com/group/nokogiri-talk)
17
- * [Bug Reports](https://github.com/sparklemotion/nokogiri/issues)
18
18
  * [Chat/Gitter](https://gitter.im/sparklemotion/nokogiri)
19
19
 
20
20
  [![Concourse CI](https://ci.nokogiri.org/api/v1/teams/nokogiri-core/pipelines/nokogiri/jobs/ruby-2.4-system/badge)](https://ci.nokogiri.org/teams/nokogiri-core/pipelines/nokogiri?groups=master)
21
+
21
22
  [![Code Climate](https://codeclimate.com/github/sparklemotion/nokogiri.svg)](https://codeclimate.com/github/sparklemotion/nokogiri)
22
- [![Join the chat at https://gitter.im/sparklemotion/nokogiri](https://badges.gitter.im/sparklemotion/nokogiri.svg)](https://gitter.im/sparklemotion/nokogiri?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
23
+ [![Gem Version](https://badge.fury.io/rb/nokogiri.svg)](https://rubygems.org/gems/nokogiri)
24
+ [![SemVer compatibility](https://api.dependabot.com/badges/compatibility_score?dependency-name=nokogiri&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score.html?dependency-name=nokogiri&package-manager=bundler&version-scheme=semver)
23
25
  [![Tidelift dependencies](https://tidelift.com/badges/github/sparklemotion/nokogiri)](https://tidelift.com/subscription/pkg/rubygems-nokogiri?utm_source=rubygems-nokogiri&utm_medium=referral&utm_campaign=readme)
24
26
 
25
27
 
@@ -177,6 +179,12 @@ explicitly setting the encoding to EUC-JP on the parser:
177
179
  bundle exec rake
178
180
  ```
179
181
 
182
+
183
+ ## Code of Conduct
184
+
185
+ We've adopted the Contributor Covenant code of conduct, which you can read in full in [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md).
186
+
187
+
180
188
  ## License
181
189
 
182
190
  This project is licensed under the terms of the MIT license.
@@ -392,6 +392,10 @@ when arg_config('--clean')
392
392
  do_clean
393
393
  end
394
394
 
395
+ if darwin?
396
+ ENV['CFLAGS'] = "#{ENV['CFLAGS']} -I /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2"
397
+ end
398
+
395
399
  if openbsd? && !using_system_libraries?
396
400
  if `#{ENV['CC'] || '/usr/bin/cc'} -v 2>&1` !~ /clang/
397
401
  ENV['CC'] ||= find_executable('egcc') or
@@ -51,10 +51,6 @@ static void relink_namespace(xmlNodePtr reparented)
51
51
 
52
52
  ns = xmlSearchNs(reparented->doc, reparented, prefix);
53
53
 
54
- if (ns == NULL && reparented->parent) {
55
- ns = xmlSearchNs(reparented->doc, reparented->parent, prefix);
56
- }
57
-
58
54
  if (ns != NULL) {
59
55
  xmlNodeSetName(reparented, name);
60
56
  xmlSetNs(reparented, ns);
@@ -1133,7 +1129,8 @@ static VALUE set_native_content(VALUE self, VALUE content)
1133
1129
  * call-seq:
1134
1130
  * content
1135
1131
  *
1136
- * Returns the content for this Node
1132
+ * Returns the plaintext content for this Node. Note that entities will always
1133
+ * be expanded in the returned string.
1137
1134
  */
1138
1135
  static VALUE get_native_content(VALUE self)
1139
1136
  {
@@ -165,7 +165,7 @@ static VALUE transform(int argc, VALUE* argv, VALUE self)
165
165
 
166
166
  errstr = rb_str_new(0, 0);
167
167
  xsltSetGenericErrorFunc((void *)errstr, xslt_generic_error_handler);
168
- xmlSetGenericErrorFunc(NULL, (xmlGenericErrorFunc)&swallow_superfluous_xml_errors);
168
+ xmlSetGenericErrorFunc((void *)errstr, xslt_generic_error_handler);
169
169
 
170
170
  result = xsltApplyStylesheet(wrapper->ss, xml, params);
171
171
  free(params);
Binary file
Binary file
Binary file
Binary file
@@ -51,7 +51,7 @@ module Nokogiri
51
51
  when /^comment\(/
52
52
  "comment()"
53
53
  when /^has\(/
54
- node.value[1].accept(self)
54
+ ".//#{node.value[1].accept(self)}"
55
55
  else
56
56
  args = ['.'] + node.value[1..-1]
57
57
  "#{node.value.first}#{args.join(', ')})"
@@ -1,6 +1,6 @@
1
1
  module Nokogiri
2
2
  # The version of Nokogiri you are using
3
- VERSION = '1.10.0'
3
+ VERSION = '1.10.1'
4
4
 
5
5
  class VersionInfo # :nodoc:
6
6
  def jruby?
@@ -41,7 +41,7 @@ module Nokogiri
41
41
  #
42
42
  # Nokogiri.XML() is a convenience method which will call this method.
43
43
  #
44
- def self.parse string_or_io, url = nil, encoding = nil, options = ParseOptions::DEFAULT_XML, &block
44
+ def self.parse string_or_io, url = nil, encoding = nil, options = ParseOptions::DEFAULT_XML
45
45
  options = Nokogiri::XML::ParseOptions.new(options) if Integer === options
46
46
  # Give the options to the user
47
47
  yield options if block_given?
@@ -495,7 +495,7 @@ module Nokogiri
495
495
  end
496
496
 
497
497
  ###
498
- # Returns a Hash of {prefix => value} for all namespaces on this
498
+ # Returns a Hash of +{prefix => value}+ for all namespaces on this
499
499
  # node and its ancestors.
500
500
  #
501
501
  # This method returns the same namespaces as #namespace_scopes.
@@ -807,7 +807,7 @@ module Nokogiri
807
807
  # Do xinclude substitution on the subtree below node. If given a block, a
808
808
  # Nokogiri::XML::ParseOptions object initialized from +options+, will be
809
809
  # passed to it, allowing more convenient modification of the parser options.
810
- def do_xinclude options = XML::ParseOptions::DEFAULT_XML, &block
810
+ def do_xinclude options = XML::ParseOptions::DEFAULT_XML
811
811
  options = Nokogiri::XML::ParseOptions.new(options) if Integer === options
812
812
 
813
813
  # give options to user
@@ -44,7 +44,7 @@ module Nokogiri
44
44
 
45
45
  ###
46
46
  # Returns the index of the first node in self that is == to +node+ or meets the given block. Returns nil if no match is found.
47
- def index(node = nil, &block)
47
+ def index(node = nil)
48
48
  if node
49
49
  warn "given block not used" if block_given?
50
50
  each_with_index { |member, j| return j if member == node }
@@ -171,16 +171,50 @@ module Nokogiri
171
171
  end
172
172
 
173
173
  ###
174
- # Set the attribute +key+ to +value+ or the return value of +blk+
175
- # on all Node objects in the NodeSet.
176
- def attr key, value = nil, &blk
177
- unless Hash === key || key && (value || blk)
178
- return first.attribute(key)
174
+ # Set attributes on each Node in the NodeSet, or get an
175
+ # attribute from the first Node in the NodeSet.
176
+ #
177
+ # To get an attribute from the first Node in a NodeSet:
178
+ #
179
+ # node_set.attr("href") # => "https://www.nokogiri.org"
180
+ #
181
+ # Note that an empty NodeSet will return nil when +#attr+ is called as a getter.
182
+ #
183
+ # To set an attribute on each node, +key+ can either be an
184
+ # attribute name, or a Hash of attribute names and values. When
185
+ # called as a setter, +#attr+ returns the NodeSet.
186
+ #
187
+ # If +key+ is an attribute name, then either +value+ or +block+
188
+ # must be passed.
189
+ #
190
+ # If +key+ is a Hash then attributes will be set for each
191
+ # key/value pair:
192
+ #
193
+ # node_set.attr("href" => "https://www.nokogiri.org", "class" => "member")
194
+ #
195
+ # If +value+ is passed, it will be used as the attribute value
196
+ # for all nodes:
197
+ #
198
+ # node_set.attr("href", "https://www.nokogiri.org")
199
+ #
200
+ # If +block+ is passed, it will be called on each Node object in
201
+ # the NodeSet and the return value used as the attribute value
202
+ # for that node:
203
+ #
204
+ # node_set.attr("class") { |node| node.name }
205
+ #
206
+ def attr key, value = nil, &block
207
+ unless key.is_a?(Hash) || (key && (value || block))
208
+ return first ? first.attribute(key) : nil
179
209
  end
180
210
 
181
211
  hash = key.is_a?(Hash) ? key : { key => value }
182
212
 
183
- hash.each { |k,v| each { |el| el[k] = v || blk[el] } }
213
+ hash.each do |k,v|
214
+ each do |node|
215
+ node[k] = v || block.call(node)
216
+ end
217
+ end
184
218
 
185
219
  self
186
220
  end
@@ -197,7 +231,7 @@ module Nokogiri
197
231
 
198
232
  ###
199
233
  # Iterate over each node, yielding to +block+
200
- def each(&block)
234
+ def each
201
235
  return to_enum unless block_given?
202
236
 
203
237
  0.upto(length - 1) do |x|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogiri
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.10.1
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - Aaron Patterson
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2019-01-04 00:00:00.000000000 Z
17
+ date: 2019-01-13 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: mini_portile2
@@ -30,6 +30,20 @@ dependencies:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.4.0
33
+ - !ruby/object:Gem::Dependency
34
+ name: concourse
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '0.15'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '0.15'
33
47
  - !ruby/object:Gem::Dependency
34
48
  name: hoe-bundler
35
49
  requirement: !ruby/object:Gem::Requirement
@@ -92,70 +106,70 @@ dependencies:
92
106
  requirements:
93
107
  - - "~>"
94
108
  - !ruby/object:Gem::Version
95
- version: 5.8.4
109
+ version: '5.8'
96
110
  type: :development
97
111
  prerelease: false
98
112
  version_requirements: !ruby/object:Gem::Requirement
99
113
  requirements:
100
114
  - - "~>"
101
115
  - !ruby/object:Gem::Version
102
- version: 5.8.4
116
+ version: '5.8'
103
117
  - !ruby/object:Gem::Dependency
104
- name: rake
118
+ name: racc
105
119
  requirement: !ruby/object:Gem::Requirement
106
120
  requirements:
107
121
  - - "~>"
108
122
  - !ruby/object:Gem::Version
109
- version: '12.0'
123
+ version: 1.4.14
110
124
  type: :development
111
125
  prerelease: false
112
126
  version_requirements: !ruby/object:Gem::Requirement
113
127
  requirements:
114
128
  - - "~>"
115
129
  - !ruby/object:Gem::Version
116
- version: '12.0'
130
+ version: 1.4.14
117
131
  - !ruby/object:Gem::Dependency
118
- name: rake-compiler
132
+ name: rake
119
133
  requirement: !ruby/object:Gem::Requirement
120
134
  requirements:
121
135
  - - "~>"
122
136
  - !ruby/object:Gem::Version
123
- version: 1.0.3
137
+ version: '12.0'
124
138
  type: :development
125
139
  prerelease: false
126
140
  version_requirements: !ruby/object:Gem::Requirement
127
141
  requirements:
128
142
  - - "~>"
129
143
  - !ruby/object:Gem::Version
130
- version: 1.0.3
144
+ version: '12.0'
131
145
  - !ruby/object:Gem::Dependency
132
- name: rake-compiler-dock
146
+ name: rake-compiler
133
147
  requirement: !ruby/object:Gem::Requirement
134
148
  requirements:
135
149
  - - "~>"
136
150
  - !ruby/object:Gem::Version
137
- version: 0.7.0
151
+ version: 1.0.3
138
152
  type: :development
139
153
  prerelease: false
140
154
  version_requirements: !ruby/object:Gem::Requirement
141
155
  requirements:
142
156
  - - "~>"
143
157
  - !ruby/object:Gem::Version
144
- version: 0.7.0
158
+ version: 1.0.3
145
159
  - !ruby/object:Gem::Dependency
146
- name: racc
160
+ name: rake-compiler-dock
147
161
  requirement: !ruby/object:Gem::Requirement
148
162
  requirements:
149
163
  - - "~>"
150
164
  - !ruby/object:Gem::Version
151
- version: 1.4.14
165
+ version: 0.7.0
152
166
  type: :development
153
167
  prerelease: false
154
168
  version_requirements: !ruby/object:Gem::Requirement
155
169
  requirements:
156
170
  - - "~>"
157
171
  - !ruby/object:Gem::Version
158
- version: 1.4.14
172
+ version: 0.7.0
159
173
  - !ruby/object:Gem::Dependency
160
174
  name: rexical
161
175
  requirement: !ruby/object:Gem::Requirement
@@ -171,19 +185,19 @@ dependencies:
171
185
  - !ruby/object:Gem::Version
172
186
  version: 1.0.5
173
187
  - !ruby/object:Gem::Dependency
174
- name: concourse
188
+ name: simplecov
175
189
  requirement: !ruby/object:Gem::Requirement
176
190
  requirements:
177
191
  - - "~>"
178
192
  - !ruby/object:Gem::Version
179
- version: '0.15'
193
+ version: '0.16'
180
194
  type: :development
181
195
  prerelease: false
182
196
  version_requirements: !ruby/object:Gem::Requirement
183
197
  requirements:
184
198
  - - "~>"
185
199
  - !ruby/object:Gem::Version
186
- version: '0.15'
200
+ version: '0.16'
187
201
  - !ruby/object:Gem::Dependency
188
202
  name: rdoc
189
203
  requirement: !ruby/object:Gem::Requirement