lib/bolognese/readers/datacite_reader.rb in bolognese-1.6.3 vs lib/bolognese/readers/datacite_reader.rb in bolognese-1.6.4
- old
+ new
@@ -115,12 +115,12 @@
end.compact
rights_list = Array.wrap(meta.dig("rightsList", "rights")).map do |r|
if r.blank?
nil
elsif r.is_a?(String)
- { "rights" => r }
+ name_to_spdx(r)
elsif r.is_a?(Hash)
- { "rights" => r["__content__"], "rightsUri" => normalize_url(r["rightsURI"]), "lang" => r["lang"] }.compact
+ hsh_to_spdx(r)
end
end.compact
subjects = Array.wrap(meta.dig("subjects", "subject")).reduce([]) do |sum, subject|
if subject.is_a?(String)