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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b7286c99d15f19823983e5965873648750e480124f4d72e97a58ca511bd2068
4
- data.tar.gz: dc9148ea2bc0c47f14828183bb6c11b7fc8c4a44fc664e005d4ae6683a364a6d
3
+ metadata.gz: effcf0f04d9b075586f9ee71ddd815359b9b531d1a4536ca8407e1465be17411
4
+ data.tar.gz: f3305805c9aac14139c42a3e4fd0ffe972e60771f7a4cb64a86ff08c268f6c17
5
5
  SHA512:
6
- metadata.gz: e84b0544a255c1dd857aaaf1a10632b9fbaa1d2e15e5d7c44dbaf0d696f96320c0b00356d9cc823f2579dbb2d82a8331eaba4262e0346d52b06ad2333b18a264
7
- data.tar.gz: f240a5bf6b24a6679cd9407634e2590b6717fc5e42a2675214fb1631785f464b7b3e18976f4f20f65bf2436eeb64e836037866c5759cc8866a19305006413f1c
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
@@ -1,3 +1,3 @@
1
1
  module Relaton
2
- VERSION = "3.1.16".freeze
2
+ VERSION = "3.1.17".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.16
4
+ version: 3.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.