pubid 2.0.0.pre.alpha.61 → 2.0.0.pre.alpha.62
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/pubid/identifier.rb +16 -1
- data/lib/pubid/iec/identifiers/vap_identifier.rb +7 -0
- data/lib/pubid/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: e7afdb690b76d32cc60abd371dd8936f0e79054e472150a6ec05f6fea1931fd7
|
|
4
|
+
data.tar.gz: 458c87cedd25491b9022e1053d72a799ec108bf9721d4103df44965b526855f7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8d0e50ff1df89fe98825e6427d0a4a0be18d8b74c7ddd396499fcd927f96ecb67c5b6cf4503b0b95ad7ef87f8d6a5463e8793140b4185c9aeb0f4cb5b5aa3244
|
|
7
|
+
data.tar.gz: 774ed8600701853d1fcd875fe589eee063b31ff8b319e0b1ce90d1e42ac8bcc20d18259c1602f9c8fa7c16aeb9bcd1246d151ce1c3086b656e8ff48755c488cf
|
data/lib/pubid/identifier.rb
CHANGED
|
@@ -1349,10 +1349,25 @@ module Pubid
|
|
|
1349
1349
|
end
|
|
1350
1350
|
end
|
|
1351
1351
|
|
|
1352
|
+
# Self is a wrapped record of exactly the edition +other+ names: the
|
|
1353
|
+
# wrapped document resolves to that edition (pubid#580 — a dated
|
|
1354
|
+
# base query must reach the wrapped record of that edition, whose
|
|
1355
|
+
# identity is one level down). Only wrappers answer true: a bare
|
|
1356
|
+
# record is its own edition and is matched directly by ===. The
|
|
1357
|
+
# resolution is exact — the wrapped base must equal the edition the
|
|
1358
|
+
# query names, no wildcards.
|
|
1359
|
+
def wrapped_edition_of?(other)
|
|
1360
|
+
return false unless other.is_a?(::Pubid::Identifier)
|
|
1361
|
+
return false unless wrapped_document
|
|
1362
|
+
|
|
1363
|
+
base_document == other
|
|
1364
|
+
end
|
|
1365
|
+
|
|
1352
1366
|
# Any relational predicate holds.
|
|
1353
1367
|
def related_to?(other)
|
|
1354
1368
|
%i[supplement_of? has_supplement? dated_version_of? edition_of?
|
|
1355
|
-
revision_of? sibling_of? includes? draft_of?
|
|
1369
|
+
revision_of? sibling_of? includes? draft_of?
|
|
1370
|
+
wrapped_edition_of?].any? do |m|
|
|
1356
1371
|
public_send(m, other)
|
|
1357
1372
|
end
|
|
1358
1373
|
end
|
|
@@ -70,6 +70,13 @@ module Pubid
|
|
|
70
70
|
def typed_stage
|
|
71
71
|
base&.typed_stage
|
|
72
72
|
end
|
|
73
|
+
|
|
74
|
+
# The wrapped document the VAP record is a view of (pubid#580):
|
|
75
|
+
# the peel lets a dated base query resolve the edition through
|
|
76
|
+
# the wrapper's relational predicates.
|
|
77
|
+
def base_document
|
|
78
|
+
base&.base_document || base
|
|
79
|
+
end
|
|
73
80
|
end
|
|
74
81
|
end
|
|
75
82
|
end
|
data/lib/pubid/version.rb
CHANGED