Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 55 additions & 55 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
bolognese (1.9.12)
bolognese (1.9.13)
activesupport (>= 4.2.5)
benchmark_methods (~> 0.7)
bibtex-ruby (>= 5.1.0)
Expand Down Expand Up @@ -30,81 +30,80 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activesupport (6.1.4.4)
activesupport (6.1.5.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
amazing_print (1.3.0)
amazing_print (1.4.0)
benchmark_methods (0.7)
bibtex-ruby (6.0.0)
latex-decode (~> 0.0)
builder (3.2.4)
citeproc (1.0.10)
namae (~> 1.0)
citeproc-ruby (1.1.13)
citeproc-ruby (1.1.14)
citeproc (~> 1.0, >= 1.0.9)
csl (~> 1.5)
csl (~> 1.6)
colorize (0.8.1)
concurrent-ruby (1.1.9)
concurrent-ruby (1.1.10)
crack (0.4.5)
rexml
crass (1.0.6)
csl (1.5.2)
csl (1.6.0)
namae (~> 1.0)
rexml
csl-styles (1.0.1.11)
csl (~> 1.0)
diff-lcs (1.4.4)
docile (1.4.0)
ebnf (2.1.3)
amazing_print (~> 1.2)
ebnf (2.3.1)
amazing_print (~> 1.4)
htmlentities (~> 4.3)
rdf (~> 3.1)
rdf (~> 3.2)
scanf (~> 1.0)
sxp (~> 1.1)
unicode-types (~> 1.6)
edtf (3.0.6)
activesupport (>= 3.0, < 7.0)
sxp (~> 1.2)
unicode-types (~> 1.7)
edtf (3.0.8)
activesupport (>= 3.0, < 8.0)
excon (0.71.1)
faraday (0.17.4)
faraday (0.17.5)
multipart-post (>= 1.2, < 3)
faraday-encoding (0.0.5)
faraday
faraday_middleware (0.14.0)
faraday (>= 0.7.4, < 1.0)
gender_detector (0.1.2)
unicode_utils (>= 1.3.0)
haml (5.2.1)
haml (5.2.2)
temple (>= 0.8.0)
tilt
hamster (3.0.0)
concurrent-ruby (~> 1.0)
hashdiff (1.0.1)
htmlentities (4.3.4)
i18n (1.8.11)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
iso8601 (0.9.1)
json (2.5.1)
json-canonicalization (0.2.1)
json-ld (3.1.9)
json-canonicalization (0.3.0)
json-ld (3.2.0)
htmlentities (~> 4.3)
json-canonicalization (~> 0.2)
json-canonicalization (~> 0.3)
link_header (~> 0.0, >= 0.0.8)
multi_json (~> 1.14)
rack (~> 2.0)
rdf (~> 3.1)
json-ld-preloaded (3.1.6)
json-ld (~> 3.1)
rdf (~> 3.1)
multi_json (~> 1.15)
rack (~> 2.2)
rdf (~> 3.2)
json-ld-preloaded (3.2.0)
json-ld (~> 3.2)
rdf (~> 3.2)
jsonlint (0.3.0)
oj (~> 3)
optimist (~> 3)
latex-decode (0.3.2)
link_header (0.0.8)
loofah (2.10.0)
loofah (2.17.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
maremma (4.9.7)
Expand All @@ -118,6 +117,7 @@ GEM
nokogiri (>= 1.11.2, < 1.13.0)
oj (>= 2.8.3)
oj_mimic_json (~> 1.0, >= 1.0.1)
matrix (0.4.2)
mini_portile2 (2.6.1)
minitest (5.15.0)
multi_json (1.15.0)
Expand All @@ -139,30 +139,29 @@ GEM
rack-test (0.8.3)
rack (>= 1.0, < 3)
rake (12.3.3)
rdf (3.1.15)
hamster (~> 3.0)
rdf (3.2.7)
link_header (~> 0.0, >= 0.0.8)
rdf-aggregate-repo (3.1.0)
rdf (~> 3.1)
rdf-rdfa (3.1.3)
rdf-aggregate-repo (3.2.0)
rdf (~> 3.2)
rdf-rdfa (3.2.0)
haml (~> 5.2)
htmlentities (~> 4.3)
rdf (~> 3.1, >= 3.1.13)
rdf-aggregate-repo (~> 3.1)
rdf-vocab (~> 3.1, >= 3.1.11)
rdf-xsd (~> 3.1)
rdf-rdfxml (3.1.1)
rdf (~> 3.2)
rdf-aggregate-repo (~> 3.2)
rdf-vocab (~> 3.2)
rdf-xsd (~> 3.2)
rdf-rdfxml (3.2.0)
htmlentities (~> 4.3)
rdf (~> 3.1)
rdf-rdfa (~> 3.1)
rdf-xsd (~> 3.1)
rdf-turtle (3.1.3)
ebnf (~> 2.1)
rdf (~> 3.1, >= 3.1.8)
rdf-vocab (3.1.14)
rdf (~> 3.1, >= 3.1.12)
rdf-xsd (3.1.1)
rdf (~> 3.1)
rdf (~> 3.2)
rdf-rdfa (~> 3.2)
rdf-xsd (~> 3.2)
rdf-turtle (3.2.0)
ebnf (~> 2.3)
rdf (~> 3.2)
rdf-vocab (3.2.1)
rdf (~> 3.2, >= 3.2.4)
rdf-xsd (3.2.1)
rdf (~> 3.2)
rexml (~> 3.2)
rexml (3.2.5)
rspec (3.10.0)
Expand All @@ -187,21 +186,22 @@ GEM
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
sxp (1.1.0)
rdf (~> 3.1)
sxp (1.2.2)
matrix
rdf (~> 3.2)
temple (0.8.2)
thor (1.1.0)
thor (1.2.1)
tilt (2.0.10)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unicode-types (1.6.0)
unicode-types (1.7.0)
unicode_utils (1.4.0)
vcr (3.0.3)
webmock (3.13.0)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
zeitwerk (2.5.3)
zeitwerk (2.5.4)

PLATFORMS
ruby
Expand All @@ -219,4 +219,4 @@ DEPENDENCIES
webmock (~> 3.0, >= 3.0.1)

BUNDLED WITH
2.2.26
2.3.12
12 changes: 9 additions & 3 deletions lib/bolognese/readers/crossref_reader.rb
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ def crossref_people(bibliographic_metadata, contributor_role)
end

def crossref_funding_reference(program_metadata)
id = []
fundref = Array.wrap(program_metadata).find { |a| a["name"] == "fundref" } || {}
Array.wrap(fundref.fetch("assertion", [])).select { |a| a["name"] == "fundgroup" && a["assertion"].present? }.map do |f|
funder_identifier = nil
Expand All @@ -307,12 +308,17 @@ def crossref_funding_reference(program_metadata)
award_uri = a.fetch("awardURI", nil)
elsif a.fetch("name") == "funder_name"
funder_name = a.fetch("__content__", nil).to_s.squish.presence
funder_identifier = validate_funder_doi(a.dig("assertion", "__content__"))
funder_identifier_type = "Crossref Funder ID" if funder_identifier.present?

# This is work-in-progress. This reads input with multiple funder_identifiers, but only outputs the last one.
# We need to determine what the DataCite xml writer will accept for multiple funder_identifiers to generate the correct DataCite xml.
Array.wrap(a.fetch("assertion", [])).select { |a| a["name"] == "funder_identifier" && a["__content__"].present? }.map do |f|
funder_identifier = validate_funder_doi(f.fetch("__content__", nil))
funder_identifier_type = "Crossref Funder ID" if funder_identifier.present?
end
end
end

# funder_name is required in DataCite
# funder_name is required in DataCite. How do we handle multiple identifier/identifierTypes?
if funder_name.present?
{ "funderIdentifier" => funder_identifier,
"funderIdentifierType" => funder_identifier_type,
Expand Down

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

Loading