canon 0.3.109 → 0.3.110
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/lib/canon/comparison/xml_comparator/child_comparison.rb +7 -1
- data/lib/canon/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 831a2d23d844114132e9a234a4e1452f08aacc36ef0947d80c7100358bbbe209
|
|
4
|
+
data.tar.gz: ff423e64f21b9e5e6c93694c124fc404b95e31ad5b4ed3162262c62023bd5c35
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 35762c78b2ba5bd8090cb799566ecabec4d863bd956c27c0a9119bf8025cda2bad8d49f9a93b4242ece7bfc5de7e8ef5a939bce5e3f955e46af925857379e704
|
|
7
|
+
data.tar.gz: 4b932b9b03940bc536887cbf4a750ce265b2992afc775b446ea9a56b675d23f52724b7b7a6f710ae3258a4c5e73c69bfc01bd67b56087554ca0a3c47a5f35343
|
|
@@ -198,6 +198,12 @@ module Canon
|
|
|
198
198
|
)
|
|
199
199
|
has_mismatch = false
|
|
200
200
|
|
|
201
|
+
# The ORIGINAL direction, captured before
|
|
202
|
+
# determine_mismatch_children returns reduced sets of equal
|
|
203
|
+
# length — deriving the side from the reduced sets reports
|
|
204
|
+
# every mid-content removal as an insertion (canon#285).
|
|
205
|
+
before_longer = children1.length > children2.length
|
|
206
|
+
|
|
201
207
|
# Length check
|
|
202
208
|
unless children1.length == children2.length
|
|
203
209
|
has_mismatch = true
|
|
@@ -228,7 +234,7 @@ module Canon
|
|
|
228
234
|
else
|
|
229
235
|
mismatched_children.each do |child|
|
|
230
236
|
child_dim = comparator.determine_node_dimension(child)
|
|
231
|
-
if
|
|
237
|
+
if before_longer
|
|
232
238
|
comparator.add_difference(child, nil,
|
|
233
239
|
Comparison::MISSING_NODE,
|
|
234
240
|
Comparison::MISSING_NODE,
|
data/lib/canon/version.rb
CHANGED