diff --git a/Gemfile b/Gemfile index 81c04a742..81f660188 100644 --- a/Gemfile +++ b/Gemfile @@ -12,8 +12,7 @@ gem "aws-sdk-sqs", "~> 1.3" gem "base32-url", "~> 0.3" gem "batch-loader", "~> 1.4", ">= 1.4.1" gem "bcrypt", "~> 3.1.7" -# gem "bolognese", "~> 1.11.5" -gem "bolognese", git: "https://github.com/datacite/bolognese", branch: "schema-4.5" +gem "bolognese", "~> 2.0.0" gem "bootsnap", "~> 1.4", ">= 1.4.4", require: false gem "cancancan", "~> 3.0" gem "commonmarker", "~> 0.23.4" diff --git a/Gemfile.lock b/Gemfile.lock index 2ce4f4683..040c625be 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,33 +1,3 @@ -GIT - remote: https://github.com/datacite/bolognese - revision: 98870f13479ef266a4b773e5295958886252a5a8 - branch: schema-4.5 - specs: - bolognese (1.11.5) - activesupport (>= 4.2.5) - benchmark_methods (~> 0.7) - bibtex-ruby (>= 5.1.0) - builder (~> 3.2, >= 3.2.2) - citeproc-ruby (~> 1.1, >= 1.1.12) - colorize (~> 0.8.1) - concurrent-ruby (~> 1.1, >= 1.1.5) - csl-styles (~> 1.0, >= 1.0.1.10) - edtf (~> 3.0, >= 3.0.4) - gender_detector (~> 0.1.2) - iso8601 (~> 0.9.1) - json-ld-preloaded (~> 3.1, >= 3.1.3) - jsonlint (~> 0.3.0) - loofah (~> 2.0, >= 2.0.3) - maremma (>= 4.9.4, < 5) - namae (~> 1.0) - nokogiri (>= 1.13.2, < 1.14) - oj (~> 3.10) - oj_mimic_json (~> 1.0, >= 1.0.1) - postrank-uri (~> 1.0, >= 1.0.18) - rdf-rdfxml (~> 3.1) - rdf-turtle (~> 3.1) - thor (>= 0.19) - GEM remote: https://rubygems.org/ specs: @@ -143,6 +113,30 @@ GEM latex-decode (~> 0.0) binding_of_caller (1.0.0) debug_inspector (>= 0.0.1) + bolognese (2.0.0) + activesupport (>= 4.2.5) + benchmark_methods (~> 0.7) + bibtex-ruby (>= 5.1.0) + builder (~> 3.2, >= 3.2.2) + citeproc-ruby (~> 1.1, >= 1.1.12) + colorize (~> 0.8.1) + concurrent-ruby (~> 1.1, >= 1.1.5) + csl-styles (~> 1.0, >= 1.0.1.10) + edtf (~> 3.0, >= 3.0.4) + gender_detector (~> 0.1.2) + iso8601 (~> 0.9.1) + json-ld-preloaded (~> 3.1, >= 3.1.3) + jsonlint (~> 0.3.0) + loofah (~> 2.0, >= 2.0.3) + maremma (>= 4.9.4, < 5) + namae (~> 1.0) + nokogiri (>= 1.13.2, < 1.14) + oj (~> 3.10) + oj_mimic_json (~> 1.0, >= 1.0.1) + postrank-uri (~> 1.0, >= 1.0.18) + rdf-rdfxml (~> 3.1) + rdf-turtle (~> 3.1) + thor (>= 0.19) bootsnap (1.15.0) msgpack (~> 1.2) builder (3.2.4) @@ -662,7 +656,7 @@ DEPENDENCIES bcrypt (~> 3.1.7) better_errors binding_of_caller - bolognese! + bolognese (~> 2.0.0) bootsnap (~> 1.4, >= 1.4.4) bullet (~> 6.1) byebug diff --git a/app/graphql/types/doi_item.rb b/app/graphql/types/doi_item.rb index 468a63a4b..6e2fdf89e 100644 --- a/app/graphql/types/doi_item.rb +++ b/app/graphql/types/doi_item.rb @@ -920,7 +920,7 @@ def citeproc_hsh "volume" => object.container.to_h["volume"], "issue" => object.container.to_h["issue"], "page" => page, - "publisher" => object.publisher["name"] || object.publisher, + "publisher" => (object.publisher.is_a?(Hash) ? object.publisher&.fetch("name", nil) : object.publisher), "title" => parse_attributes(object.titles, content: "title", first: true), "URL" => object.url, "version" => object.version_info,