Skip to content

Commit

Permalink
fix breaking changes from merging
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jun 3, 2020
1 parent b0c8136 commit 8b65e7c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions lib/bolognese/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/bolognese/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Bolognese
VERSION = "1.6.3"
VERSION = "1.6.4"
end
6 changes: 5 additions & 1 deletion spec/readers/datacite_reader_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 <i>Drosophila melanogaster</i>")
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"}])
Expand Down
4 changes: 3 additions & 1 deletion spec/utils_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 8b65e7c

Please sign in to comment.