Skip to content

Commit

Permalink
identify cc-by 3.0 us
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Aug 21, 2020
1 parent 8b391e5 commit c956bce
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
bolognese (1.8.6)
bolognese (1.8.7)
activesupport (>= 4.2.5)
benchmark_methods (~> 0.7)
bibtex-ruby (>= 5.1.0)
Expand Down Expand Up @@ -41,6 +41,7 @@ GEM
benchmark_methods (0.7)
bibtex-ruby (5.1.4)
latex-decode (~> 0.0)
bigdecimal (2.0.0)
builder (3.2.4)
citeproc (1.0.10)
namae (~> 1.0)
Expand Down Expand Up @@ -121,7 +122,8 @@ GEM
namae (1.0.1)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
oj (3.10.8)
oj (3.10.12)
bigdecimal (>= 1.0, < 3)
oj_mimic_json (1.0.1)
optimist (3.0.1)
postrank-uri (1.0.24)
Expand Down Expand Up @@ -175,7 +177,7 @@ GEM
rspec (~> 3)
safe_yaml (1.0.5)
scanf (1.0.0)
simplecov (0.18.5)
simplecov (0.19.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov-html (0.12.2)
Expand Down
1 change: 1 addition & 0 deletions lib/bolognese/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module Utils
"https://creativecommons.org/licenses/by/2.0" => "https://creativecommons.org/licenses/by/2.0/legalcode",
"https://creativecommons.org/licenses/by/2.5" => "https://creativecommons.org/licenses/by/2.5/legalcode",
"https://creativecommons.org/licenses/by/3.0" => "https://creativecommons.org/licenses/by/3.0/legalcode",
"https://creativecommons.org/licenses/by/3.0/us" => "https://creativecommons.org/licenses/by/3.0/legalcode",
"https://creativecommons.org/licenses/by/4.0" => "https://creativecommons.org/licenses/by/4.0/legalcode",
"https://creativecommons.org/licenses/by-nc/1.0" => "https://creativecommons.org/licenses/by-nc/1.0/legalcode",
"https://creativecommons.org/licenses/by-nc/2.0" => "https://creativecommons.org/licenses/by-nc/2.0/legalcode",
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.8.6"
VERSION = "1.8.7"
end

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions spec/readers/datacite_reader_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,17 @@
{"subject"=>"FOS: Media and communications", "subjectScheme"=>"Fields of Science and Technology (FOS)", "schemeUri"=>"http://www.oecd.org/science/inno/38235147.pdf"}, {"subject"=>"Library and Information Studies"}])
end

it "cc-by 3.0 us" do
input = "10.6084/m9.figshare.1286826.v1"
subject = Bolognese::Metadata.new(input: input)
expect(subject.valid?).to be true
expect(subject.rights_list).to eq([{"rights"=>"Creative Commons Attribution 3.0 Unported",
+ "rightsIdentifier"=>"cc-by-3.0",
+ "rightsIdentifierScheme"=>"SPDX",
+ "rightsUri"=>"https://creativecommons.org/licenses/by/3.0/legalcode",
+ "schemeUri"=>"https://spdx.org/licenses/"}])
end

it "funding schema version 3" do
input = "https://doi.org/10.5281/ZENODO.1239"
subject = Bolognese::Metadata.new(input: input)
Expand Down

0 comments on commit c956bce

Please sign in to comment.