nokolexbor 0.5.4-x64-mingw32 → 0.6.0-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nokolexbor/2.6/nokolexbor.so +0 -0
- data/lib/nokolexbor/2.7/nokolexbor.so +0 -0
- data/lib/nokolexbor/3.0/nokolexbor.so +0 -0
- data/lib/nokolexbor/node.rb +30 -10
- data/lib/nokolexbor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f13e9f8397f9f74786eb4f54f5fac959f9612222cdbabc20cc841a376b639896
|
4
|
+
data.tar.gz: 887b33d32a04162e664444be8e337b9c842937c930b5ce5ce648e51cd45d6c58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b558f51c10ac2bc831f84a34a37c841df748962aa5dad755f551ed1ed04f1ef7378c6ea432c5d88a3cd7dd66c3d5310c6ad4ece910e72d07321afa426793a4bf
|
7
|
+
data.tar.gz: 1b4c47484ac087bc5439cf1c8fa7bb5c93599a81cc37e8885f17f3a6e02b448918e7b4f54a2d90b5b78935b0d898ffcf9c7689e664c941ca1473c6bd5d6510b0
|
Binary file
|
Binary file
|
Binary file
|
data/lib/nokolexbor/node.rb
CHANGED
@@ -717,18 +717,38 @@ module Nokolexbor
|
|
717
717
|
|
718
718
|
def xpath_query_from_css_rule(rule, ns)
|
719
719
|
ensure_nokogiri
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
720
|
+
|
721
|
+
unless defined?(Gem)
|
722
|
+
require 'rubygems'
|
723
|
+
end
|
724
|
+
|
725
|
+
v_1_17_0 = Gem::Version.new("1.17.0")
|
726
|
+
current_version = Gem::Version.new(Nokogiri::VERSION)
|
727
|
+
|
728
|
+
if current_version < v_1_17_0
|
729
|
+
if defined? Nokogiri::CSS::XPathVisitor::BuiltinsConfig
|
730
|
+
visitor = Nokogiri::CSS::XPathVisitor.new(
|
731
|
+
builtins: Nokogiri::CSS::XPathVisitor::BuiltinsConfig::OPTIMAL,
|
732
|
+
doctype: :html4,
|
733
|
+
)
|
734
|
+
else
|
735
|
+
visitor = Nokogiri::CSS::XPathVisitorOptimallyUseBuiltins.new
|
736
|
+
end
|
737
|
+
self.class::IMPLIED_XPATH_CONTEXTS.map do |implied_xpath_context|
|
738
|
+
Nokogiri::CSS.xpath_for(rule.to_s, { prefix: implied_xpath_context, ns: ns,
|
739
|
+
visitor: visitor, })
|
740
|
+
end.join(" | ")
|
725
741
|
else
|
726
|
-
|
742
|
+
self.class::IMPLIED_XPATH_CONTEXTS.map do |implied_xpath_context|
|
743
|
+
visitor = Nokogiri::CSS::XPathVisitor.new(
|
744
|
+
builtins: Nokogiri::CSS::XPathVisitor::BuiltinsConfig::OPTIMAL,
|
745
|
+
doctype: :html4,
|
746
|
+
prefix: implied_xpath_context,
|
747
|
+
namespaces: ns,
|
748
|
+
)
|
749
|
+
Nokogiri::CSS.xpath_for(rule.to_s, visitor: visitor)
|
750
|
+
end.join(" | ")
|
727
751
|
end
|
728
|
-
self.class::IMPLIED_XPATH_CONTEXTS.map do |implied_xpath_context|
|
729
|
-
Nokogiri::CSS.xpath_for(rule.to_s, { prefix: implied_xpath_context, ns: ns,
|
730
|
-
visitor: visitor, })
|
731
|
-
end.join(" | ")
|
732
752
|
end
|
733
753
|
|
734
754
|
def extract_params(params)
|
data/lib/nokolexbor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nokolexbor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: x64-mingw32
|
6
6
|
authors:
|
7
7
|
- Yicheng Zhou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|