lib/commonmeta/readers/datacite_reader.rb in commonmeta-ruby-3.5 vs lib/commonmeta/readers/datacite_reader.rb in commonmeta-ruby-3.5.1

- old
+ new

@@ -86,10 +86,11 @@ nil))).select do |r| %w[References Cites IsSupplementedBy].include?(r['relationType']) end.map do |reference| get_datacite_reference(reference) end + files = Array.wrap(meta.fetch("content_url", nil)).map { |file| { "url" => file } } formats = meta.fetch('formats', nil) sizes = meta.fetch('sizes', nil) schema_version = meta.fetch('schema_version', nil) || 'http://datacite.org/schema/kernel-4' state = id.present? || read_options.present? ? 'findable' : 'not_found' @@ -103,9 +104,10 @@ 'publisher' => publisher, 'provider' => 'DataCite', 'alternate_identifiers' => alternate_identifiers.presence, 'references' => references, 'funding_references' => funding_references, + 'files' => files.presence, 'date' => date.compact, 'descriptions' => descriptions, 'license' => license, 'version' => version, 'subjects' => subjects,