relaton 3.1.16 → 3.1.17
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/relaton/bib/model/type/plain_date.rb +13 -0
- data/lib/relaton/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: effcf0f04d9b075586f9ee71ddd815359b9b531d1a4536ca8407e1465be17411
|
|
4
|
+
data.tar.gz: f3305805c9aac14139c42a3e4fd0ffe972e60771f7a4cb64a86ff08c268f6c17
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0d625297d44fc7ab8421a809ae76d6835220a0b1fe7af2faa8349b25a2a29db0e55f35e2a50c4a2aed5d3e894685b497fb5b29f945a89f5395f570b5b2085a2a
|
|
7
|
+
data.tar.gz: 7f84119ab99a8fbebca57de249d51a36c9a7d13936ffc07ea94af5517b6e372f9236eeeea9ebbec4e6969a0e07a632a145241487c8e203f36bb624dd7bc7686c
|
|
@@ -35,3 +35,16 @@ module Relaton
|
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
|
+
|
|
39
|
+
# lutaml's format-serializer table resolves Date-typed attributes by
|
|
40
|
+
# walking the class hierarchy to the BASE Type::Date entry, whose static
|
|
41
|
+
# serialize truncates ::DateTime to "YYYY-MM-DDZ" — a subclass's serialize
|
|
42
|
+
# override is never consulted. Register this subclass explicitly so
|
|
43
|
+
# Validity#to_xml honors the precision-preserving serialization above
|
|
44
|
+
# (relaton#636).
|
|
45
|
+
if defined?(Lutaml::Xml::Type::Serializers)
|
|
46
|
+
Lutaml::Model::Type::Value.register_format_type_serializer(
|
|
47
|
+
:xml, Relaton::Bib::PlainDate,
|
|
48
|
+
to: ->(inst) { Relaton::Bib::PlainDate.serialize(inst.value) }
|
|
49
|
+
)
|
|
50
|
+
end
|
data/lib/relaton/version.rb
CHANGED