canon 0.3.69 → 0.3.71
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 +4 -4
- data/docs/features/environment-configuration/index.adoc +11 -0
- data/lib/canon/comparison/xml_comparator.rb +8 -10
- data/lib/canon/version.rb +1 -1
- data/lib/canon/xml/digest_gate.rb +16 -18
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 958eeca178b78a0f3de23eb6ab23674aacb3fee50c6671da8911b1225431278f
|
|
4
|
+
data.tar.gz: e9d9cee428547b4117a7b15e335f9b31ae0c76bb9120c76b0f362e5a499dfde8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 17f11eed81fe5f50ef94ca58ea8ce3932281b0b478a8143439c148e15fd4519abe0d754e9a14d23b294f366523668c97ac21d96418190fbc7c65e3a86373b77a
|
|
7
|
+
data.tar.gz: 7a3cf3fb1b732e84a7167a7f184cd2085afa43023829f77021e91197c40c4e8d9f9910847ca18d641d144c3c7aecb55cea5657441e726f95833210f333bbc705
|
|
@@ -342,6 +342,17 @@ puts "Defaults: #{resolver.defaults.inspect}"
|
|
|
342
342
|
puts "Source of algorithm: #{resolver.source_for(:algorithm)}"
|
|
343
343
|
----
|
|
344
344
|
|
|
345
|
+
=== Engine digests: LEPTRIS_DIGEST_ATTR_ORDER
|
|
346
|
+
|
|
347
|
+
Canon's XML digest gate reads one *engine-level* variable that belongs to
|
|
348
|
+
libleptris, not to canon. Canon never sets it — the host decides:
|
|
349
|
+
|
|
350
|
+
`LEPTRIS_DIGEST_ATTR_ORDER=1`:: Makes attribute order identity-bearing in
|
|
351
|
+
libleptris' structural digests. Canon detects this and skips the SAX
|
|
352
|
+
signature probe in verbose diff reports — attribute-order identity is then
|
|
353
|
+
proven by the digest itself. Digest *values* change process-wide, so enable
|
|
354
|
+
it only if nothing in your process persists leptris digests across restarts.
|
|
355
|
+
|
|
345
356
|
== See also
|
|
346
357
|
|
|
347
358
|
* link:size-limits/[Size Limits] - File size and node count limits
|
|
@@ -202,16 +202,14 @@ module Canon
|
|
|
202
202
|
def verbose_report_proven_empty?(n1, n2, opts)
|
|
203
203
|
return true unless opts[:verbose]
|
|
204
204
|
|
|
205
|
-
# Identical input parses identically
|
|
206
|
-
#
|
|
207
|
-
#
|
|
208
|
-
|
|
209
|
-
#
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
return !Xml::Sax.probe(n1).saw_error?
|
|
214
|
-
end
|
|
205
|
+
# Identical input parses identically, and certify has
|
|
206
|
+
# already declined any recover-error document through the
|
|
207
|
+
# wrapper's parse_diagnostics — the banner cannot be lost.
|
|
208
|
+
return true if n1 == n2
|
|
209
|
+
# With order-sensitive digests (host-set flag), attribute
|
|
210
|
+
# order is digest-proven as well — the signature probe has
|
|
211
|
+
# nothing left to answer.
|
|
212
|
+
return true if Xml::DigestGate.attr_order_digest?
|
|
215
213
|
|
|
216
214
|
left = Xml::Sax.probe(n1)
|
|
217
215
|
return false if left.saw_error?
|
data/lib/canon/version.rb
CHANGED
|
@@ -21,26 +21,24 @@ module Canon
|
|
|
21
21
|
module DigestGate
|
|
22
22
|
module_function
|
|
23
23
|
|
|
24
|
-
#
|
|
25
|
-
# events
|
|
26
|
-
#
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
# (or the binding predates the surface), the verbose lane
|
|
30
|
-
# falls back to the SAX probe for its error scan.
|
|
31
|
-
def recover_diags_available?
|
|
32
|
-
defined?(::Leptris::XML::FFI) &&
|
|
33
|
-
::Leptris::XML::FFI.respond_to?(:leptris_document_parse_diag_count)
|
|
34
|
-
rescue StandardError
|
|
35
|
-
false
|
|
36
|
-
end
|
|
37
|
-
|
|
24
|
+
# moxml 0.5.76+ (moxml#271) surfaces the engine's recover
|
|
25
|
+
# diagnostics — duplicate-attribute events and the like (#1200)
|
|
26
|
+
# — as Document#parse_diagnostics. The direct-leptris-FFI
|
|
27
|
+
# reach-in this replaced was the gate's one documented seam
|
|
28
|
+
# exception; the wrapper ends it.
|
|
38
29
|
def recover_diags?(doc)
|
|
39
|
-
|
|
30
|
+
!doc.parse_diagnostics.empty?
|
|
31
|
+
end
|
|
40
32
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
# Whether the HOST opted into attribute-order-sensitive digests
|
|
34
|
+
# (libleptris 1.9.228 honors LEPTRIS_DIGEST_ATTR_ORDER per
|
|
35
|
+
# digest call; leptris#1297). Canon reads the env — never
|
|
36
|
+
# writes it: the flag re-spaces digest values process-wide, so
|
|
37
|
+
# enabling it is the host's call, not a library's. When set,
|
|
38
|
+
# digest equality proves attribute-order identity too, and the
|
|
39
|
+
# verbose lane's signature probe becomes redundant.
|
|
40
|
+
def attr_order_digest?
|
|
41
|
+
ENV["LEPTRIS_DIGEST_ATTR_ORDER"] == "1"
|
|
44
42
|
end
|
|
45
43
|
|
|
46
44
|
def available?
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: canon
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.71
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
@@ -44,28 +44,28 @@ dependencies:
|
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 1.9.
|
|
47
|
+
version: 1.9.228
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 1.9.
|
|
54
|
+
version: 1.9.228
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: moxml
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: 0.5.
|
|
61
|
+
version: 0.5.78
|
|
62
62
|
type: :runtime
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: 0.5.
|
|
68
|
+
version: 0.5.78
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: paint
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|