diff --git a/lib/bolognese/utils.rb b/lib/bolognese/utils.rb index 67ae37ce..d45f58b0 100644 --- a/lib/bolognese/utils.rb +++ b/lib/bolognese/utils.rb @@ -1133,6 +1133,8 @@ def hsh_to_spdx(hsh) "rightsIdentifierScheme" => hsh["rightsIdentifierScheme"], "schemeUri" => hsh["schemeUri"], "lang" => hsh["lang"] }.compact + end + end def name_to_fos(name) # first find subject in Fields of Science (OECD) diff --git a/lib/bolognese/version.rb b/lib/bolognese/version.rb index 36698366..c94b4aea 100644 --- a/lib/bolognese/version.rb +++ b/lib/bolognese/version.rb @@ -1,3 +1,3 @@ module Bolognese - VERSION = "1.6.3" + VERSION = "1.6.4" end diff --git a/spec/readers/datacite_reader_spec.rb b/spec/readers/datacite_reader_spec.rb index 1d938de4..87143792 100644 --- a/spec/readers/datacite_reader_spec.rb +++ b/spec/readers/datacite_reader_spec.rb @@ -263,7 +263,11 @@ "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0002-2874-287X", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], "affiliation" => []) expect(subject.titles).to eq([{"title"=>"Drosophila melanogaster African Wings"}]) expect(subject.descriptions.first["description"]).to start_with("These are raw wing images from Drosophila melanogaster") - expect(subject.rights_list).to eq([{"rights"=>"CC BY 4.0", "rightsUri"=>"https://creativecommons.org/licenses/by/4.0"}]) + expect(subject.rights_list).to eq([{"rights"=>"Creative Commons Attribution 4.0 International", + "rightsIdentifier"=>"CC-BY-4.0", + "rightsIdentifierScheme"=>"SPDX", + "rightsUri"=>"https://creativecommons.org/licenses/by/4.0/legalcode", + "schemeUri"=>"https://spdx.org/licenses/"}]) expect(subject.dates).to eq([{"date"=>"2015-06-14", "dateType"=>"Created"}, {"date"=>"2018-03-17", "dateType"=>"Updated"}, {"date"=>"2015", "dateType"=>"Issued"}]) diff --git a/spec/utils_spec.rb b/spec/utils_spec.rb index 9145545d..4ab2132f 100644 --- a/spec/utils_spec.rb +++ b/spec/utils_spec.rb @@ -537,7 +537,9 @@ hsh = { "rightsURI" => "info:eu-repo/semantics/openAccess" } response = subject.hsh_to_spdx(hsh) expect(response).to eq({"rightsUri"=>"info:eu-repo/semantics/openAccess"}) - + end + end + context "fos" do it "name_to_fos match" do name = "Biological sciences"