nokolexbor 0.5.4-x86-mingw32 → 0.6.0-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa9c0dcebe8ecb54d0feb8219d750aabd04f82d3b86e0c50941e84e8e4f4a3ee
4
- data.tar.gz: d31eee13cacffdeb61e2a66df795f6b107e0a14da893a13bd3eebe64518b3dd3
3
+ metadata.gz: dd5ce161e7e6eeaf065d39591eb35208d1478d7c255c935d3a27ea49d9e4482d
4
+ data.tar.gz: 46c3ee758d43e7acc4b0cecfcb4d323016ee84944e80484d699d08256053e5ac
5
5
  SHA512:
6
- metadata.gz: 5d8098e635c26676fa103bbf4f341254a4c77c1daad5002e505be0d8e90ab52cd396d2abab3759b274e758e6ff4d6ac2a9f18bf14cc9b346c589a125927826d8
7
- data.tar.gz: 20ab01e3d2560cc111a1e4a917db7b2fab5d213ef80a0c07af04ab516b36f49e34a66bc2c4aae29f56eec51f42d16937428dbca70f8a30bd806a810c78f587d2
6
+ metadata.gz: 6f65ebfcfd057bf8c2cabcf4a52653f05cbb12f92ba73b36b5a63a3e4d4ae6d96f300eb09637b830e889dfc3ae69b392ef58cefe6b410b6359dadb09ed976f55
7
+ data.tar.gz: f55dc0950cac6e350285ee7980699c3adc526928cfbba7a1a25b5704ac3c60a80e83d9c36eb9f663f29110f617a3fb850fa2183f8adb3e67875d061ad03ccaea
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -717,18 +717,38 @@ module Nokolexbor
717
717
 
718
718
  def xpath_query_from_css_rule(rule, ns)
719
719
  ensure_nokogiri
720
- if defined? Nokogiri::CSS::XPathVisitor::BuiltinsConfig
721
- visitor = Nokogiri::CSS::XPathVisitor.new(
722
- builtins: Nokogiri::CSS::XPathVisitor::BuiltinsConfig::OPTIMAL,
723
- doctype: :html4,
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
- visitor = Nokogiri::CSS::XPathVisitorOptimallyUseBuiltins.new
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nokolexbor
4
- VERSION = '0.5.4'
4
+ VERSION = '0.6.0'
5
5
  end
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.5.4
4
+ version: 0.6.0
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Yicheng Zhou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-22 00:00:00.000000000 Z
11
+ date: 2024-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
@@ -52,6 +52,7 @@ files:
52
52
  - lib/nokolexbor/3.1/nokolexbor.so
53
53
  - lib/nokolexbor/3.2/nokolexbor.so
54
54
  - lib/nokolexbor/3.3/nokolexbor.so
55
+ - lib/nokolexbor/3.4/nokolexbor.so
55
56
  - lib/nokolexbor/document.rb
56
57
  - lib/nokolexbor/document_fragment.rb
57
58
  - lib/nokolexbor/node.rb
@@ -74,7 +75,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
74
75
  version: '2.6'
75
76
  - - "<"
76
77
  - !ruby/object:Gem::Version
77
- version: 3.4.dev
78
+ version: 3.5.dev
78
79
  required_rubygems_version: !ruby/object:Gem::Requirement
79
80
  requirements:
80
81
  - - ">="