lobzique 0.1.0-aarch64-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE-NOKOGIRI.md +15 -0
- data/LICENSE.txt +21 -0
- data/README.md +144 -0
- data/ext/lobzique/clippy.toml +15 -0
- data/lib/lobzique/3.3/lobzique.so +0 -0
- data/lib/lobzique/3.4/lobzique.so +0 -0
- data/lib/lobzique/4.0/lobzique.so +0 -0
- data/lib/lobzique/action_text.rb +29 -0
- data/lib/lobzique/class_resolver.rb +33 -0
- data/lib/lobzique/css/selector_cache.rb +36 -0
- data/lib/lobzique/css/syntax_error.rb +12 -0
- data/lib/lobzique/css/xpath_visitor.rb +60 -0
- data/lib/lobzique/css.rb +57 -0
- data/lib/lobzique/extension.rb +31 -0
- data/lib/lobzique/html.rb +14 -0
- data/lib/lobzique/html4/document.rb +235 -0
- data/lib/lobzique/html4/document_fragment.rb +75 -0
- data/lib/lobzique/html4/encoding_reader.rb +374 -0
- data/lib/lobzique/html4.rb +35 -0
- data/lib/lobzique/html5/document.rb +106 -0
- data/lib/lobzique/html5/document_fragment.rb +113 -0
- data/lib/lobzique/html5/node.rb +66 -0
- data/lib/lobzique/html5.rb +92 -0
- data/lib/lobzique/html5ever.rb +14 -0
- data/lib/lobzique/rails_dom_testing.rb +95 -0
- data/lib/lobzique/sanitizer/concerns.rb +110 -0
- data/lib/lobzique/sanitizer/document.rb +14 -0
- data/lib/lobzique/sanitizer/document_fragment.rb +12 -0
- data/lib/lobzique/sanitizer/escape_raw_text_in_select.rb +31 -0
- data/lib/lobzique/sanitizer/scrubbers.rb +46 -0
- data/lib/lobzique/sanitizer.rb +96 -0
- data/lib/lobzique/syntax_error.rb +8 -0
- data/lib/lobzique/version.rb +6 -0
- data/lib/lobzique/xml/attr.rb +23 -0
- data/lib/lobzique/xml/cdata.rb +13 -0
- data/lib/lobzique/xml/character_data.rb +11 -0
- data/lib/lobzique/xml/document.rb +149 -0
- data/lib/lobzique/xml/document_fragment.rb +109 -0
- data/lib/lobzique/xml/dtd.rb +28 -0
- data/lib/lobzique/xml/namespace.rb +19 -0
- data/lib/lobzique/xml/node/save_options.rb +52 -0
- data/lib/lobzique/xml/node.rb +629 -0
- data/lib/lobzique/xml/node_set.rb +329 -0
- data/lib/lobzique/xml/parse_options.rb +89 -0
- data/lib/lobzique/xml/pp/character_data.rb +22 -0
- data/lib/lobzique/xml/pp/node.rb +73 -0
- data/lib/lobzique/xml/pp.rb +6 -0
- data/lib/lobzique/xml/searchable.rb +123 -0
- data/lib/lobzique/xml/syntax_error.rb +77 -0
- data/lib/lobzique/xml/text.rb +14 -0
- data/lib/lobzique/xml/xpath/syntax_error.rb +20 -0
- data/lib/lobzique/xml/xpath.rb +16 -0
- data/lib/lobzique/xml/xpath_context.rb +27 -0
- data/lib/lobzique/xml.rb +22 -0
- data/lib/lobzique.rb +15 -0
- metadata +106 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Adapted from Nokogiri 1.19.7, lib/nokogiri/xml/text.rb (MIT, see LICENSE-NOKOGIRI.md).
|
|
4
|
+
|
|
5
|
+
module Lobzique
|
|
6
|
+
module XML
|
|
7
|
+
class Text < CharacterData
|
|
8
|
+
# Sets the text as given. Node#content= would escape it.
|
|
9
|
+
def content=(string)
|
|
10
|
+
self.native_content = string.to_s
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Adapted from Nokogiri 1.19.7, lib/nokogiri/xml/xpath/syntax_error.rb (MIT, see LICENSE-NOKOGIRI.md).
|
|
4
|
+
|
|
5
|
+
module Lobzique
|
|
6
|
+
module XML
|
|
7
|
+
module XPath
|
|
8
|
+
class SyntaxError < XML::SyntaxError
|
|
9
|
+
def to_s
|
|
10
|
+
[super.chomp, str1].compact.join(": ")
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# lobzique: valid XPath outside the subset that lobzique evaluates
|
|
15
|
+
# (plan.md decision 2). The message names the construct.
|
|
16
|
+
class UnsupportedError < SyntaxError
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Adapted from Nokogiri 1.19.7, lib/nokogiri/xml/xpath.rb (MIT, see LICENSE-NOKOGIRI.md).
|
|
4
|
+
|
|
5
|
+
module Lobzique
|
|
6
|
+
module XML
|
|
7
|
+
module XPath
|
|
8
|
+
GLOBAL_SEARCH_PREFIX = "//"
|
|
9
|
+
ROOT_SEARCH_PREFIX = "/"
|
|
10
|
+
CURRENT_SEARCH_PREFIX = "./"
|
|
11
|
+
SUBTREE_SEARCH_PREFIX = ".//"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
require_relative "xpath/syntax_error"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Adapted from Nokogiri 1.19.7, lib/nokogiri/xml/xpath_context.rb (MIT, see LICENSE-NOKOGIRI.md).
|
|
4
|
+
|
|
5
|
+
module Lobzique
|
|
6
|
+
module XML
|
|
7
|
+
class XPathContext
|
|
8
|
+
def register_namespaces(namespaces)
|
|
9
|
+
namespaces.each do |key, value|
|
|
10
|
+
key = key.to_s.gsub(/.*:/, "") # strip off 'xmlns:' or 'xml:'
|
|
11
|
+
|
|
12
|
+
register_ns(key, value)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def register_variables(binds)
|
|
17
|
+
return if binds.nil?
|
|
18
|
+
|
|
19
|
+
binds.each do |key, value|
|
|
20
|
+
key = key.to_s
|
|
21
|
+
|
|
22
|
+
register_variable(key, value)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
data/lib/lobzique/xml.rb
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Adapted from Nokogiri 1.19.7, lib/nokogiri/xml.rb (MIT, see
|
|
4
|
+
# LICENSE-NOKOGIRI.md). XML parsing waits for plan.md decision 4. The XML
|
|
5
|
+
# classes are here because the HTML ones inherit from them.
|
|
6
|
+
|
|
7
|
+
require_relative "xml/pp"
|
|
8
|
+
require_relative "xml/parse_options"
|
|
9
|
+
require_relative "xml/searchable"
|
|
10
|
+
require_relative "xml/node"
|
|
11
|
+
require_relative "xml/character_data"
|
|
12
|
+
require_relative "xml/namespace"
|
|
13
|
+
require_relative "xml/attr"
|
|
14
|
+
require_relative "xml/dtd"
|
|
15
|
+
require_relative "xml/cdata"
|
|
16
|
+
require_relative "xml/text"
|
|
17
|
+
require_relative "xml/document"
|
|
18
|
+
require_relative "xml/document_fragment"
|
|
19
|
+
require_relative "xml/node_set"
|
|
20
|
+
require_relative "xml/syntax_error"
|
|
21
|
+
require_relative "xml/xpath"
|
|
22
|
+
require_relative "xml/xpath_context"
|
data/lib/lobzique.rb
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Adapted from Nokogiri 1.19.7, lib/nokogiri.rb (MIT, see LICENSE-NOKOGIRI.md).
|
|
4
|
+
# The extension defines the native classes first. These files reopen them.
|
|
5
|
+
|
|
6
|
+
require_relative "lobzique/extension"
|
|
7
|
+
|
|
8
|
+
require_relative "lobzique/version"
|
|
9
|
+
require_relative "lobzique/class_resolver"
|
|
10
|
+
require_relative "lobzique/syntax_error"
|
|
11
|
+
require_relative "lobzique/xml"
|
|
12
|
+
require_relative "lobzique/html4"
|
|
13
|
+
require_relative "lobzique/html"
|
|
14
|
+
require_relative "lobzique/css"
|
|
15
|
+
require_relative "lobzique/html5"
|
metadata
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: lobzique
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: aarch64-linux
|
|
6
|
+
authors:
|
|
7
|
+
- Jury Razumau
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 2026-11-28 00:00:00.000000000 Z
|
|
11
|
+
dependencies: []
|
|
12
|
+
email:
|
|
13
|
+
- mail@razumau.net
|
|
14
|
+
executables: []
|
|
15
|
+
extensions: []
|
|
16
|
+
extra_rdoc_files: []
|
|
17
|
+
files:
|
|
18
|
+
- CHANGELOG.md
|
|
19
|
+
- LICENSE-NOKOGIRI.md
|
|
20
|
+
- LICENSE.txt
|
|
21
|
+
- README.md
|
|
22
|
+
- ext/lobzique/clippy.toml
|
|
23
|
+
- lib/lobzique.rb
|
|
24
|
+
- lib/lobzique/3.3/lobzique.so
|
|
25
|
+
- lib/lobzique/3.4/lobzique.so
|
|
26
|
+
- lib/lobzique/4.0/lobzique.so
|
|
27
|
+
- lib/lobzique/action_text.rb
|
|
28
|
+
- lib/lobzique/class_resolver.rb
|
|
29
|
+
- lib/lobzique/css.rb
|
|
30
|
+
- lib/lobzique/css/selector_cache.rb
|
|
31
|
+
- lib/lobzique/css/syntax_error.rb
|
|
32
|
+
- lib/lobzique/css/xpath_visitor.rb
|
|
33
|
+
- lib/lobzique/extension.rb
|
|
34
|
+
- lib/lobzique/html.rb
|
|
35
|
+
- lib/lobzique/html4.rb
|
|
36
|
+
- lib/lobzique/html4/document.rb
|
|
37
|
+
- lib/lobzique/html4/document_fragment.rb
|
|
38
|
+
- lib/lobzique/html4/encoding_reader.rb
|
|
39
|
+
- lib/lobzique/html5.rb
|
|
40
|
+
- lib/lobzique/html5/document.rb
|
|
41
|
+
- lib/lobzique/html5/document_fragment.rb
|
|
42
|
+
- lib/lobzique/html5/node.rb
|
|
43
|
+
- lib/lobzique/html5ever.rb
|
|
44
|
+
- lib/lobzique/rails_dom_testing.rb
|
|
45
|
+
- lib/lobzique/sanitizer.rb
|
|
46
|
+
- lib/lobzique/sanitizer/concerns.rb
|
|
47
|
+
- lib/lobzique/sanitizer/document.rb
|
|
48
|
+
- lib/lobzique/sanitizer/document_fragment.rb
|
|
49
|
+
- lib/lobzique/sanitizer/escape_raw_text_in_select.rb
|
|
50
|
+
- lib/lobzique/sanitizer/scrubbers.rb
|
|
51
|
+
- lib/lobzique/syntax_error.rb
|
|
52
|
+
- lib/lobzique/version.rb
|
|
53
|
+
- lib/lobzique/xml.rb
|
|
54
|
+
- lib/lobzique/xml/attr.rb
|
|
55
|
+
- lib/lobzique/xml/cdata.rb
|
|
56
|
+
- lib/lobzique/xml/character_data.rb
|
|
57
|
+
- lib/lobzique/xml/document.rb
|
|
58
|
+
- lib/lobzique/xml/document_fragment.rb
|
|
59
|
+
- lib/lobzique/xml/dtd.rb
|
|
60
|
+
- lib/lobzique/xml/namespace.rb
|
|
61
|
+
- lib/lobzique/xml/node.rb
|
|
62
|
+
- lib/lobzique/xml/node/save_options.rb
|
|
63
|
+
- lib/lobzique/xml/node_set.rb
|
|
64
|
+
- lib/lobzique/xml/parse_options.rb
|
|
65
|
+
- lib/lobzique/xml/pp.rb
|
|
66
|
+
- lib/lobzique/xml/pp/character_data.rb
|
|
67
|
+
- lib/lobzique/xml/pp/node.rb
|
|
68
|
+
- lib/lobzique/xml/searchable.rb
|
|
69
|
+
- lib/lobzique/xml/syntax_error.rb
|
|
70
|
+
- lib/lobzique/xml/text.rb
|
|
71
|
+
- lib/lobzique/xml/xpath.rb
|
|
72
|
+
- lib/lobzique/xml/xpath/syntax_error.rb
|
|
73
|
+
- lib/lobzique/xml/xpath_context.rb
|
|
74
|
+
homepage: "https://github.com/razumau/lobzique"
|
|
75
|
+
licenses:
|
|
76
|
+
- MIT
|
|
77
|
+
metadata:
|
|
78
|
+
allowed_push_host: "https://rubygems.org"
|
|
79
|
+
homepage_uri: "https://github.com/razumau/lobzique"
|
|
80
|
+
source_code_uri: "https://github.com/razumau/lobzique"
|
|
81
|
+
changelog_uri: "https://github.com/razumau/lobzique/blob/main/CHANGELOG.md"
|
|
82
|
+
rubygems_mfa_required: "true"
|
|
83
|
+
rdoc_options: []
|
|
84
|
+
require_paths:
|
|
85
|
+
- lib
|
|
86
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
87
|
+
requirements:
|
|
88
|
+
-
|
|
89
|
+
- ">="
|
|
90
|
+
- !ruby/object:Gem::Version
|
|
91
|
+
version: "3.3"
|
|
92
|
+
-
|
|
93
|
+
- "<"
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: 4.1.dev
|
|
96
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
|
+
requirements:
|
|
98
|
+
-
|
|
99
|
+
- ">="
|
|
100
|
+
- !ruby/object:Gem::Version
|
|
101
|
+
version: "0"
|
|
102
|
+
requirements: []
|
|
103
|
+
rubygems_version: 4.1.1
|
|
104
|
+
specification_version: 4
|
|
105
|
+
summary: Rust-based Nokogiri replacement
|
|
106
|
+
test_files: []
|