lib/bolognese/readers/schema_org_reader.rb in bolognese-1.0.5 vs lib/bolognese/readers/schema_org_reader.rb in bolognese-1.0.6

- old
+ new

@@ -129,12 +129,12 @@ "types" => types, "doi" => validate_doi(id), "identifier" => identifier, "alternate_identifiers" => alternate_identifiers, "url" => normalize_id(meta.fetch("url", nil)), - "content_url" => Array.wrap(meta.fetch("contentUrl", nil)).unwrap, - "size" => meta.fetch("contenSize", nil), - "formats" => Array.wrap(meta.fetch("encodingFormat", nil) || meta.fetch("fileFormat", nil)).unwrap, + "content_url" => Array.wrap(meta.fetch("contentUrl", nil)), + "size" => Array.wrap(meta.fetch("contenSize", nil)).presence, + "formats" => Array.wrap(meta.fetch("encodingFormat", nil) || meta.fetch("fileFormat", nil)), "title" => meta.fetch("name", nil).present? ? [{ "text" => meta.fetch("name", nil) }] : nil, "creator" => author, "contributor" => contributor, "publisher" => publisher, "service_provider" => parse_attributes(meta.fetch("provider", nil), content: "name", first: true),