lib/bolognese/readers/datacite_reader.rb in bolognese-0.12.2 vs lib/bolognese/readers/datacite_reader.rb in bolognese-0.12.3

- old
+ new

@@ -102,10 +102,12 @@ else { "subject_scheme" => k["subjectScheme"], "scheme_uri" => k["schemeURI"], "text" => sanitize(k["__content__"]) }.compact end end.compact dates = Array.wrap(meta.dig("dates", "date")) + sizes = Array.wrap(meta.dig("sizes", "size")).unwrap + formats = Array.wrap(meta.dig("formats", "format")).unwrap funding = begin f = datacite_funder_contributor(meta) + datacite_funding_reference(meta) f.length > 1 ? f : f.first end state = doi.present? ? "findable" : "not_found" @@ -146,10 +148,11 @@ "description" => description, "license" => license, "b_version" => meta.fetch("version", nil), "keywords" => keywords, "language" => meta.fetch("language", nil), - "content_size" => meta.fetch("size", nil), + "content_format" => formats, + "content_size" => sizes, "schema_version" => schema_version, "state" => state } end