diff --git a/Gemfile.lock b/Gemfile.lock
index c4e4d013..68f88ef2 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- bolognese (1.8.3)
+ bolognese (1.8.4)
activesupport (>= 4.2.5)
benchmark_methods (~> 0.7)
bibtex-ruby (>= 5.1.0)
diff --git a/lib/bolognese/readers/crossref_reader.rb b/lib/bolognese/readers/crossref_reader.rb
index 7bc2c018..6803a224 100644
--- a/lib/bolognese/readers/crossref_reader.rb
+++ b/lib/bolognese/readers/crossref_reader.rb
@@ -48,9 +48,13 @@ def read_crossref(string: nil, **options)
book_metadata = meta.dig("crossref", "book", "book_metadata")
book_series_metadata = meta.dig("crossref", "book", "book_series_metadata")
book_set_metadata = meta.dig("crossref", "book", "book_set_metadata")
- bibliographic_metadata = meta.dig("crossref", "book", "content_item") || book_metadata || book_series_metadata
+ bibliographic_metadata = meta.dig("crossref", "book", "content_item") || book_metadata || book_series_metadata || book_set_metadata
resource_type = bibliographic_metadata.fetch("component_type", nil) ? "book-" + bibliographic_metadata.fetch("component_type") : "book"
- publisher = book_metadata.present? ? book_metadata.dig("publisher", "publisher_name") : book_series_metadata.dig("publisher", "publisher_name")
+ # publisher = if book_metadata.present?
+ # book_metadata.dig("publisher", "publisher_name")
+ # elsif book_series_metadata.present?
+ # book_series_metadata.dig("publisher", "publisher_name")
+ # end
when "conference"
event_metadata = meta.dig("crossref", "conference", "event_metadata") || {}
bibliographic_metadata = meta.dig("crossref", "conference", "conference_paper").to_h
@@ -165,7 +169,7 @@ def read_crossref(string: nil, **options)
"funding_references" => crossref_funding_reference(program_metadata),
"publisher" => publisher,
"container" => container,
- "agency" => agency = options[:ra] || "Crossref",
+ "agency" => agency = options[:ra] || "crossref",
"related_identifiers" => related_identifiers,
"dates" => dates,
"publication_year" => publication_year,
@@ -239,7 +243,7 @@ def crossref_people(bibliographic_metadata, contributor_role)
{ "nameType" => "Organizational",
"name" => a["name"] || a["__content__"] }
end
- end.unwrap
+ end
end
def crossref_funding_reference(program_metadata)
diff --git a/lib/bolognese/readers/datacite_reader.rb b/lib/bolognese/readers/datacite_reader.rb
index 5952a68c..686975b9 100644
--- a/lib/bolognese/readers/datacite_reader.rb
+++ b/lib/bolognese/readers/datacite_reader.rb
@@ -227,7 +227,7 @@ def read_datacite(string: nil, **options)
"contributors" => get_authors(Array.wrap(meta.dig("contributors", "contributor"))),
"container" => set_container(meta),
"publisher" => parse_attributes(meta.fetch("publisher", nil), first: true).to_s.strip.presence,
- "agency" => "DataCite",
+ "agency" => "datacite",
"funding_references" => funding_references,
"dates" => dates,
"publication_year" => parse_attributes(meta.fetch("publicationYear", nil), first: true).to_s.strip.presence,
diff --git a/lib/bolognese/utils.rb b/lib/bolognese/utils.rb
index 9eb31464..65249967 100644
--- a/lib/bolognese/utils.rb
+++ b/lib/bolognese/utils.rb
@@ -205,6 +205,7 @@ module Utils
"AudioObject" => "Sound",
"Blog" => "Text",
"BlogPosting" => "Text",
+ "Book" => "Text",
"Chapter" => "Text",
"Collection" => "Collection",
"DataCatalog" => "Dataset",
diff --git a/lib/bolognese/version.rb b/lib/bolognese/version.rb
index 371a3062..7926fa45 100644
--- a/lib/bolognese/version.rb
+++ b/lib/bolognese/version.rb
@@ -1,3 +1,3 @@
module Bolognese
- VERSION = "1.8.3"
+ VERSION = "1.8.4"
end
diff --git a/spec/fixtures/crosscite.json b/spec/fixtures/crosscite.json
index 86100388..4500c413 100644
--- a/spec/fixtures/crosscite.json
+++ b/spec/fixtures/crosscite.json
@@ -58,6 +58,6 @@
"description": "This tools are used to analyse the data produced by the Crosssover Experiment I designed to test Choice Architecture techniques as UI interventions in a SEEk4Science data catalogue. It contains:\n\n- Data structures for the experimental data.
\n- Visualisation functions
\n- Analysis functions\n\n## Installation\n\n- R
\n- python
\n- ipython 4\n\nClone and use.\n\n## Usage\n\n
\n```python
\nsource('parallel_plot.r')
\nwith(z, parallelset(trt,response, freq=count, alpha=0.2))
\n```\n\n
\n## Contributing\n\n1. Fork it!
\n2. Create your feature branch: `git checkout -b my-new-feature`
\n3. Commit your changes: `git commit -am 'Add some feature'`
\n4. Push to the branch: `git push origin my-new-feature`
\n5. Submit a pull request :D\n\n
\n## License\n\nThis work supports my PhD Thesis at University of Manchester."
}],
"schema_version": "http://datacite.org/schema/kernel-4",
- "agency": "DataCite",
+ "agency": "datacite",
"state": "findable"
}
diff --git a/spec/fixtures/datacite.json b/spec/fixtures/datacite.json
index ff72cb1f..ec148f3e 100644
--- a/spec/fixtures/datacite.json
+++ b/spec/fixtures/datacite.json
@@ -79,5 +79,5 @@
"description": "Eating your own dog food is a slang term to describe that an organization should itself use the products and services it provides. For DataCite this means that we should use DOIs with appropriate metadata and strategies for long-term preservation for..."
}],
"schemaVersion": "http://datacite.org/schema/kernel-4",
- "agency": "DataCite"
+ "agency": "datacite"
}
diff --git a/spec/fixtures/datacite_software.json b/spec/fixtures/datacite_software.json
index e6918eb1..d088c34a 100644
--- a/spec/fixtures/datacite_software.json
+++ b/spec/fixtures/datacite_software.json
@@ -17,5 +17,5 @@
"publisher": "KNB Data Repository",
"publication-year": "2016",
"schema-version": "http://datacite.org/schema/kernel-3",
- "agency": "DataCite"
+ "agency": "datacite"
}
diff --git a/spec/fixtures/datacite_software_version.json b/spec/fixtures/datacite_software_version.json
index 9ccd686e..85f7fb46 100644
--- a/spec/fixtures/datacite_software_version.json
+++ b/spec/fixtures/datacite_software_version.json
@@ -68,7 +68,7 @@
"schemaVersion": "http://datacite.org/schema/kernel-4",
"providerId": "cern",
"clientId": "cern.zenodo",
- "agency": "DataCite",
+ "agency": "datacite",
"state": "findable"
}
\ No newline at end of file
diff --git a/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book_oup.yml b/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book_oup.yml
new file mode 100644
index 00000000..b1e30d6f
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book_oup.yml
@@ -0,0 +1,91 @@
+---
+http_interactions:
+- request:
+ method: get
+ uri: https://doi.org/ra/10.1093
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Mozilla/5.0 (compatible; Maremma/4.7.1; mailto:info@datacite.org)
+ Accept:
+ - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
+ response:
+ status:
+ code: 200
+ message: ''
+ headers:
+ Date:
+ - Wed, 29 Jul 2020 18:49:31 GMT
+ Content-Type:
+ - application/json;charset=UTF-8
+ Connection:
+ - keep-alive
+ Set-Cookie:
+ - __cfduid=d6614b5a2ad0605965c4795ee34c9c8951596048571; expires=Fri, 28-Aug-20
+ 18:49:31 GMT; path=/; domain=.doi.org; HttpOnly; SameSite=Lax; Secure
+ Cf-Cache-Status:
+ - DYNAMIC
+ Cf-Request-Id:
+ - 043d8195850000c29fe4ae0200000001
+ Expect-Ct:
+ - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
+ Strict-Transport-Security:
+ - max-age=31536000; includeSubDomains; preload
+ Server:
+ - cloudflare
+ Cf-Ray:
+ - 5ba90535aee4c29f-FRA
+ body:
+ encoding: ASCII-8BIT
+ string: |-
+ [
+ {
+ "DOI": "10.1093",
+ "RA": "Crossref"
+ }
+ ]
+ http_version:
+ recorded_at: Wed, 29 Jul 2020 18:49:31 GMT
+- request:
+ method: get
+ uri: https://api.crossref.org/works/10.1093/oxfordhb/9780198746140.013.5/transform/application/vnd.crossref.unixsd+xml
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Mozilla/5.0 (compatible; Maremma/4.7.1; mailto:info@datacite.org)
+ Accept:
+ - text/xml
+ response:
+ status:
+ code: 200
+ message: OK
+ headers:
+ Link:
+ - ; rel="canonical"
+ Access-Control-Allow-Origin:
+ - "*"
+ Access-Control-Allow-Headers:
+ - X-Requested-With
+ Content-Length:
+ - '5031'
+ Server:
+ - http-kit
+ Date:
+ - Wed, 29 Jul 2020 18:49:32 GMT
+ X-Rate-Limit-Limit:
+ - '50'
+ X-Rate-Limit-Interval:
+ - 1s
+ Connection:
+ - close
+ body:
+ encoding: ASCII-8BIT
+ string: !binary |-
+ PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGNyb3NzcmVmX3Jlc3VsdCB4bWxucz0iaHR0cDovL3d3dy5jcm9zc3JlZi5vcmcvcXJzY2hlbWEvMy4wIiB2ZXJzaW9uPSIzLjAiIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhzaTpzY2hlbWFMb2NhdGlvbj0iaHR0cDovL3d3dy5jcm9zc3JlZi5vcmcvcXJzY2hlbWEvMy4wIGh0dHA6Ly93d3cuY3Jvc3NyZWYub3JnL3NjaGVtYXMvY3Jvc3NyZWZfcXVlcnlfb3V0cHV0My4wLnhzZCI+DQogIDxxdWVyeV9yZXN1bHQ+DQogICAgPGhlYWQ+DQogICAgICA8ZG9pX2JhdGNoX2lkPm5vbmU8L2RvaV9iYXRjaF9pZD4NCiAgICA8L2hlYWQ+DQogICAgPGJvZHk+DQogICAgICA8cXVlcnkgc3RhdHVzPSJyZXNvbHZlZCI+DQogICAgICAgIDxkb2kgdHlwZT0iYm9va190aXRsZSI+MTAuMTA5My9veGZvcmRoYi85NzgwMTk4NzQ2MTQwLjAxMy41PC9kb2k+DQogICAgICAgIDxjcm0taXRlbSBuYW1lPSJwdWJsaXNoZXItbmFtZSIgdHlwZT0ic3RyaW5nIj5PeGZvcmQgVW5pdmVyc2l0eSBQcmVzcyAoT1VQKTwvY3JtLWl0ZW0+DQogICAgICAgIDxjcm0taXRlbSBuYW1lPSJwcmVmaXgtbmFtZSIgdHlwZT0ic3RyaW5nIj5PeGZvcmQgVW5pdmVyc2l0eSBQcmVzczwvY3JtLWl0ZW0+DQogICAgICAgIDxjcm0taXRlbSBuYW1lPSJtZW1iZXItaWQiIHR5cGU9Im51bWJlciI+Mjg2PC9jcm0taXRlbT4NCiAgICAgICAgPGNybS1pdGVtIG5hbWU9ImNpdGF0aW9uLWlkIiB0eXBlPSJudW1iZXIiPjk3NjQ3MzU0PC9jcm0taXRlbT4NCiAgICAgICAgPGNybS1pdGVtIG5hbWU9ImJvb2staWQiIHR5cGU9Im51bWJlciI+MzAyMzQ1NDwvY3JtLWl0ZW0+DQogICAgICAgIDxjcm0taXRlbSBuYW1lPSJzZXJpZXMtaWQiIHR5cGU9Im51bWJlciI+MTQzNjE1MjwvY3JtLWl0ZW0+DQogICAgICAgIDxjcm0taXRlbSBuYW1lPSJkZXBvc2l0LXRpbWVzdGFtcCIgdHlwZT0ibnVtYmVyIj4yMDE4MDQwNTE1MjM1NDwvY3JtLWl0ZW0+DQogICAgICAgIDxjcm0taXRlbSBuYW1lPSJvd25lci1wcmVmaXgiIHR5cGU9InN0cmluZyI+MTAuMTA5MzwvY3JtLWl0ZW0+DQogICAgICAgIDxjcm0taXRlbSBuYW1lPSJsYXN0LXVwZGF0ZSIgdHlwZT0iZGF0ZSI+MjAxOC0wNC0wNlQwMzo0MDo1OFo8L2NybS1pdGVtPg0KICAgICAgICA8Y3JtLWl0ZW0gbmFtZT0iY3JlYXRlZCIgdHlwZT0iZGF0ZSI+MjAxOC0wNC0wNVQxNDozMDowN1o8L2NybS1pdGVtPg0KICAgICAgICA8Y3JtLWl0ZW0gbmFtZT0iY2l0ZWRieS1jb3VudCIgdHlwZT0ibnVtYmVyIj4xPC9jcm0taXRlbT4NCiAgICAgICAgPGRvaV9yZWNvcmQ+DQogICAgICAgICAgPGNyb3NzcmVmIHhtbG5zPSJodHRwOi8vd3d3LmNyb3NzcmVmLm9yZy94c2NoZW1hLzEuMSIgeHNpOnNjaGVtYUxvY2F0aW9uPSJodHRwOi8vd3d3LmNyb3NzcmVmLm9yZy94c2NoZW1hLzEuMSBodHRwOi8vZG9pLmNyb3NzcmVmLm9yZy9zY2hlbWFzL3VuaXhyZWYxLjEueHNkIj4NCiAgICAgICAgICAgIDxib29rIGJvb2tfdHlwZT0iZWRpdGVkX2Jvb2siPg0KICAgICAgICAgICAgICA8Ym9va19zZXRfbWV0YWRhdGEgbGFuZ3VhZ2U9ImVuIiBtZXRhZGF0YV9kaXN0cmlidXRpb25fb3B0cz0icXVlcnkiIHJlZmVyZW5jZV9kaXN0cmlidXRpb25fb3B0cz0ibm9uZSI+DQogICAgICAgICAgICAgICAgPHNldF9tZXRhZGF0YT4NCiAgICAgICAgICAgICAgICAgIDx0aXRsZXM+DQogICAgICAgICAgICAgICAgICAgIDx0aXRsZT5PeGZvcmQgSGFuZGJvb2tzIE9ubGluZTwvdGl0bGU+DQogICAgICAgICAgICAgICAgICAgIDxvcmlnaW5hbF9sYW5ndWFnZV90aXRsZT5PeGZvcmQgSGFuZGJvb2tzIE9ubGluZTwvb3JpZ2luYWxfbGFuZ3VhZ2VfdGl0bGU+DQogICAgICAgICAgICAgICAgICA8L3RpdGxlcz4NCiAgICAgICAgICAgICAgICAgIDxub2lzYm4gcmVhc29uPSJzaW1wbGVfc2VyaWVzIiAvPg0KICAgICAgICAgICAgICAgIDwvc2V0X21ldGFkYXRhPg0KICAgICAgICAgICAgICAgIDxjb250cmlidXRvcnM+DQogICAgICAgICAgICAgICAgICA8cGVyc29uX25hbWUgY29udHJpYnV0b3Jfcm9sZT0iZWRpdG9yIiBsYW5ndWFnZT0iZW4iIHNlcXVlbmNlPSJmaXJzdCI+DQogICAgICAgICAgICAgICAgICAgIDxnaXZlbl9uYW1lPkRhbmllbDwvZ2l2ZW5fbmFtZT4NCiAgICAgICAgICAgICAgICAgICAgPHN1cm5hbWU+Q296b3J0PC9zdXJuYW1lPg0KICAgICAgICAgICAgICAgICAgPC9wZXJzb25fbmFtZT4NCiAgICAgICAgICAgICAgICAgIDxwZXJzb25fbmFtZSBjb250cmlidXRvcl9yb2xlPSJlZGl0b3IiIGxhbmd1YWdlPSJlbiIgc2VxdWVuY2U9ImFkZGl0aW9uYWwiPg0KICAgICAgICAgICAgICAgICAgICA8Z2l2ZW5fbmFtZT5KYW1lcyBNYXJrPC9naXZlbl9uYW1lPg0KICAgICAgICAgICAgICAgICAgICA8c3VybmFtZT5TaGllbGRzPC9zdXJuYW1lPg0KICAgICAgICAgICAgICAgICAgPC9wZXJzb25fbmFtZT4NCiAgICAgICAgICAgICAgICAgIDxwZXJzb25fbmFtZSBjb250cmlidXRvcl9yb2xlPSJhdXRob3IiIGxhbmd1YWdlPSJlbiIgc2VxdWVuY2U9ImFkZGl0aW9uYWwiPg0KICAgICAgICAgICAgICAgICAgICA8Z2l2ZW5fbmFtZT5CYXJicmEgUi48L2dpdmVuX25hbWU+DQogICAgICAgICAgICAgICAgICAgIDxzdXJuYW1lPkNsYXl0b248L3N1cm5hbWU+DQogICAgICAgICAgICAgICAgICA8L3BlcnNvbl9uYW1lPg0KICAgICAgICAgICAgICAgIDwvY29udHJpYnV0b3JzPg0KICAgICAgICAgICAgICAgIDx0aXRsZXM+DQogICAgICAgICAgICAgICAgICA8dGl0bGU+VGhlIENoYW5naW5nIFdheSBvZiB0aGUgQm9kaGlzYXR0dmE8L3RpdGxlPg0KICAgICAgICAgICAgICAgICAgPG9yaWdpbmFsX2xhbmd1YWdlX3RpdGxlPlRoZSBDaGFuZ2luZyBXYXkgb2YgdGhlIEJvZGhpc2F0dHZhPC9vcmlnaW5hbF9sYW5ndWFnZV90aXRsZT4NCiAgICAgICAgICAgICAgICA8L3RpdGxlcz4NCiAgICAgICAgICAgICAgICA8YWJzdHJhY3QgeG1sbnM9Imh0dHA6Ly93d3cubmNiaS5ubG0ubmloLmdvdi9KQVRTMSI+DQogICAgICAgICAgICAgICAgICA8cD5UaGlzIGNoYXB0ZXIgZXhwbG9yZXMgdGhlIG5hdHVyZSBvZiB0aGUgY29ubmVjdGlvbnMgYmV0d2VlbiBjb250ZW1wb3JhcnkgdW5kZXJzdGFuZGluZ3Mgb2YgdGhlIGJvZGhpc2F0dHZhIHBhdGggYXMgc29jaWFsbHkgZW5nYWdlZCwgYW5kIHRoZSBjYW5vbmljYWwgTWFoxIF5xIFuYSB0cmFkaXRpb24gaW4gSW5kaWHigJR0aGUgVWdyYXBhcmlw4bmbY2NoxIEtc8WrdHJhIGFuZCB0aGUgd29ya3Mgb2YgxZrEgW50aWRldmEuIFRoZXNlIGNhbm9uaWNhbCB0cmVhdG1lbnRzIG9mIHRoZSBib2RoaXNhdHR2YeKAmXMgY2FyZWVyIGFyZSBjb21wYXJlZCB3aXRoIGEgY29udGVtcG9yYXJ5IHVuZGVyc3RhbmRpbmcgYXMgcmVmbGVjdGVkIGluIHRoZSBjb21tZW50YXJ5IG9uIMWaxIFudGlkZXZh4oCZcyBCb2RoaWNhcnnEgXZhdMSBcmEgYnkgUGVtYSBDaMO2ZHLDtm4uIFRoaXMgYW5hbHlzaXMgcmV2ZWFscyBkaXN0aW5jdCB2aXNpb25zIG9mIHRoZSBib2RoaXNhdHR2YSwgZnJvbSB0aGUgVWdyYeKAmXMgZWxpdGUgc3VwZXJoZXJvLCB0byDFmsSBbnRpZGV2YeKAmXMgc2FpbnRseSBib2RoaXNhdHR2YSwgdG8gdGhlIG1vZGVybiB2aWV3IG9mIHRoZSBib2RoaXNhdHR2YSBhcyBzb2NpYWwgYWN0aXZpc3QuIFRoZSBjYXJlZXIgb2YgdGhlIGJvZGhpc2F0dHZhIGlzIGZ1cnRoZXJtb3JlIHNob3duIHRvIGludm9sdmUgYSByYW5nZSBvZiB0eXBlcyBvZiBzb2NpYWwgZW5nYWdlbWVudC4gV2hpbGUgdGhlIGNhbm9uaWNhbCB0ZXh0cyBzdXBwb3J0IHRoZSBpZGVhbCBvZiBpbWJ1aW5nIGFsbCBkYWlseSBhY3Rpdml0aWVzIHdpdGggYW4gYWx0cnVpc3RpYyBtb3RpdmUsIGFzIHdlbGwgYXMgZW5kb3JzaW5nIHNlbGZsZXNzIHNlcnZpY2UgdG8gbWVldCB0aGUgbmVlZHMgYW5kIHdhbnRzIG9mIHNlbnRpZW50IGJlaW5ncywgb25seSB0aGUgY29udGVtcG9yYXJ5IHJlYWRpbmcgb2YgdGhlIGJvZGhpc2F0dHZhIHBhdGggYWR2b2NhdGVzIHNvY2lhbCBhY3Rpb24gdG8gYWRkcmVzcyBzeXN0ZW1pYyBjYXVzZXMgb2YgY29sbGVjdGl2ZSBzdWZmZXJpbmcuPC9wPg0KICAgICAgICAgICAgICAgIDwvYWJzdHJhY3Q+DQogICAgICAgICAgICAgICAgPHZvbHVtZT4xPC92b2x1bWU+DQogICAgICAgICAgICAgICAgPHB1YmxpY2F0aW9uX2RhdGU+DQogICAgICAgICAgICAgICAgICA8bW9udGg+MDQ8L21vbnRoPg0KICAgICAgICAgICAgICAgICAgPGRheT4wNTwvZGF5Pg0KICAgICAgICAgICAgICAgICAgPHllYXI+MjAxODwveWVhcj4NCiAgICAgICAgICAgICAgICA8L3B1YmxpY2F0aW9uX2RhdGU+DQogICAgICAgICAgICAgICAgPG5vaXNibiByZWFzb249InNpbXBsZV9zZXJpZXMiIC8+DQogICAgICAgICAgICAgICAgPHB1Ymxpc2hlcj4NCiAgICAgICAgICAgICAgICAgIDxwdWJsaXNoZXJfbmFtZT5PeGZvcmQgVW5pdmVyc2l0eSBQcmVzczwvcHVibGlzaGVyX25hbWU+DQogICAgICAgICAgICAgICAgPC9wdWJsaXNoZXI+DQogICAgICAgICAgICAgICAgPGRvaV9kYXRhPg0KICAgICAgICAgICAgICAgICAgPGRvaT4xMC4xMDkzL294Zm9yZGhiLzk3ODAxOTg3NDYxNDAuMDEzLjU8L2RvaT4NCiAgICAgICAgICAgICAgICAgIDxyZXNvdXJjZSBtaW1lX3R5cGU9InRleHQvaHRtbCI+aHR0cDovL294Zm9yZGhhbmRib29rcy5jb20vdmlldy8xMC4xMDkzL294Zm9yZGhiLzk3ODAxOTg3NDYxNDAuMDAxLjAwMDEvb3hmb3JkaGItOTc4MDE5ODc0NjE0MC1lLTU8L3Jlc291cmNlPg0KICAgICAgICAgICAgICAgIDwvZG9pX2RhdGE+DQogICAgICAgICAgICAgIDwvYm9va19zZXRfbWV0YWRhdGE+DQogICAgICAgICAgICA8L2Jvb2s+DQogICAgICAgICAgPC9jcm9zc3JlZj4NCiAgICAgICAgPC9kb2lfcmVjb3JkPg0KICAgICAgPC9xdWVyeT4NCiAgICA8L2JvZHk+DQogIDwvcXVlcnlfcmVzdWx0Pg0KPC9jcm9zc3JlZl9yZXN1bHQ+
+ http_version:
+ recorded_at: Wed, 29 Jul 2020 18:49:32 GMT
+recorded_with: VCR 3.0.3
diff --git a/spec/readers/crossref_reader_spec.rb b/spec/readers/crossref_reader_spec.rb
index 06bf1963..e405d608 100644
--- a/spec/readers/crossref_reader_spec.rb
+++ b/spec/readers/crossref_reader_spec.rb
@@ -47,7 +47,7 @@
{"funderIdentifier"=>"https://doi.org/10.13039/501100006390",
"funderIdentifierType"=>"Crossref Funder ID",
"funderName"=>"University of Lausanne"}])
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
end
it "journal article" do
@@ -60,7 +60,7 @@
expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
expect(subject.creators.length).to eq(5)
expect(subject.creators.first).to eq("nameType"=>"Personal", "name"=>"Ralser, Markus", "givenName"=>"Markus", "familyName"=>"Ralser")
- expect(subject.contributors).to eq("contributorType"=>"Editor", "familyName"=>"Janbon", "givenName"=>"Guilhem", "name"=>"Janbon, Guilhem", "nameType"=>"Personal")
+ expect(subject.contributors).to eq([{"contributorType"=>"Editor", "familyName"=>"Janbon", "givenName"=>"Guilhem", "name"=>"Janbon, Guilhem", "nameType"=>"Personal"}])
expect(subject.titles).to eq([{"title"=>"Triose Phosphate Isomerase Deficiency Is Caused by Altered Dimerization–Not Catalytic Inactivity–of the Mutant Enzymes"}])
expect(subject.rights_list).to eq([{"rights"=>"Creative Commons Attribution 4.0 International",
"rightsIdentifier"=>"cc-by-4.0",
@@ -74,7 +74,7 @@
expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"1932-6203", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.1056/nejm199109123251104", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
expect(subject.container).to eq("firstPage"=>"e30", "identifier"=>"1932-6203", "identifierType"=>"ISSN", "issue"=>"1", "title"=>"PLoS ONE", "type"=>"Journal", "volume"=>"1")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
end
it "journal article with funding" do
@@ -101,7 +101,7 @@
expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"1664-462X", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.17660/actahortic.2004.632.41", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
expect(subject.container).to eq("identifier"=>"1664-462X", "identifierType"=>"ISSN", "title"=>"Frontiers in Plant Science", "type"=>"Journal", "volume"=>"10")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
end
it "journal article original language title" do
@@ -111,7 +111,7 @@
expect(subject.id).to eq("https://doi.org/10.7600/jspfsm.56.60")
expect(subject.url).to eq("http://jlc.jst.go.jp/JST.JSTAGE/jspfsm/56.60?lang=en&from=CrossRef&type=abstract")
expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
- expect(subject.creators).to eq("name"=>":(unav)", "nameType"=>"Organizational")
+ expect(subject.creators).to eq([{"name"=>":(unav)", "nameType"=>"Organizational"}])
expect(subject.titles).to eq([{"lang"=>"ja", "title"=>"自律神経・循環器応答"}])
expect(subject.dates).to include({"date"=>"2007", "dateType"=>"Issued"})
expect(subject.publication_year).to eq("2007")
@@ -119,7 +119,7 @@
expect(subject.related_identifiers.length).to eq(1)
expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"1881-4751", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
expect(subject.container).to eq("firstPage"=>"60", "identifier"=>"1881-4751", "identifierType"=>"ISSN", "issue"=>"1", "lastPage"=>"60", "title"=>"Japanese Journal of Physical Fitness and Sports Medicine", "type"=>"Journal", "volume"=>"56")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
end
it "journal article with RDF for container" do
@@ -139,7 +139,7 @@
expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"1937-240X", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.1002/aqc.1122", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
expect(subject.container).to eq("firstPage"=>"949", "identifier"=>"1937-240X", "identifierType"=>"ISSN", "issue"=>"6", "lastPage"=>"961", "title"=>"Journal of Crustacean Biology", "type"=>"Journal", "volume"=>"32")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
end
it "book chapter with RDF for container" do
@@ -154,11 +154,11 @@
expect(subject.titles).to eq([{"title"=>"Human Body Orientation Estimation in Multiview Scenarios"}])
expect(subject.dates).to eq([{"date"=>"2012", "dateType"=>"Issued"}, {"date"=>"2019-07-03T01:07:17Z", "dateType"=>"Updated"}])
expect(subject.publication_year).to eq("2012")
- expect(subject.publisher).to eq("Springer Berlin Heidelberg")
+ expect(subject.publisher).to eq("Springer Science and Business Media LLC")
expect(subject.related_identifiers.length).to eq(7)
expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"10.1007/978-3-540-24670-1_3", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
expect(subject.container).to eq("identifier"=>"1611-3349", "identifierType"=>"ISSN", "title"=>"Lecture Notes in Computer Science", "type"=>"Book Series")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
end
it "posted_content" do
@@ -176,7 +176,7 @@
expect(subject.dates).to include({"date"=>"2017-10-09", "dateType"=>"Issued"})
expect(subject.publication_year).to eq("2017")
expect(subject.publisher).to eq("Cold Spring Harbor Laboratory")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
end
it "DOI with SICI DOI" do
@@ -196,7 +196,7 @@
expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"0012-9658", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.1098/rspb.2002.2213", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
expect(subject.container).to eq("firstPage"=>"2832", "identifier"=>"0012-9658", "identifierType"=>"ISSN", "issue"=>"11", "lastPage"=>"2841", "title"=>"Ecology", "type"=>"Journal", "volume"=>"87")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
end
it "DOI with ORCID ID" do
@@ -221,7 +221,7 @@
expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"2090-1844", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.1378/chest.12-0045", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
expect(subject.container).to eq("firstPage"=>"1", "identifier"=>"2090-1844", "identifierType"=>"ISSN", "lastPage"=>"7", "title"=>"Pulmonary Medicine", "type"=>"Journal", "volume"=>"2012")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
end
it "date in future" do
@@ -240,7 +240,7 @@
expect(subject.publisher).to eq("Elsevier BV")
expect(subject.related_identifiers).to eq([{"relatedIdentifier"=>"0014-2999", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection"}])
expect(subject.container).to eq("firstPage"=>"303", "identifier"=>"0014-2999", "identifierType"=>"ISSN", "lastPage"=>"312", "title"=>"European Journal of Pharmacology", "type"=>"Journal", "volume"=>"759")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
end
it "vor with url" do
@@ -259,7 +259,7 @@
expect(subject.related_identifiers.size).to eq(35)
expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"1365-2540", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
expect(subject.container).to eq("firstPage"=>"122", "identifier"=>"1365-2540", "identifierType"=>"ISSN", "issue"=>"2", "lastPage"=>"130", "title"=>"Heredity", "type"=>"Journal", "volume"=>"111")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
end
it "dataset" do
@@ -276,7 +276,7 @@
expect(subject.dates).to include({"date"=>"1984-07-17", "dateType"=>"Issued"})
expect(subject.publication_year).to eq("1984")
expect(subject.publisher).to eq("Worldwide Protein Data Bank")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
end
it "component" do
@@ -286,13 +286,13 @@
expect(subject.id).to eq("https://doi.org/10.1371/journal.pmed.0030277.g001")
expect(subject.url).to eq("https://dx.plos.org/10.1371/journal.pmed.0030277.g001")
expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceType"=>"SaComponent", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
- expect(subject.creators).to eq("name"=>":(unav)", "nameType"=>"Organizational")
+ expect(subject.creators).to eq([{"name"=>":(unav)", "nameType"=>"Organizational"}])
expect(subject.titles).to eq([{"title"=>":{unav)"}])
expect(subject.descriptions).to be_empty
expect(subject.dates).to eq([{"date"=>"2015-10-20", "dateType"=>"Issued"}, {"date"=>"2018-10-19T17:13:42Z", "dateType"=>"Updated"}])
expect(subject.publication_year).to eq("2015")
expect(subject.publisher).to eq("Public Library of Science (PLoS)")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
end
it "dataset usda" do
@@ -309,7 +309,7 @@
expect(subject.dates).to eq([{"date"=>"2017-08-09", "dateType"=>"Issued"}, {"date"=>"2020-06-04T21:31:55Z", "dateType"=>"Updated"}])
expect(subject.publication_year).to eq("2017")
expect(subject.publisher).to eq("USDA Forest Service")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
end
it "book chapter" do
@@ -324,8 +324,8 @@
expect(subject.titles).to eq([{"title"=>"Clinical Symptoms and Physical Examinations"}])
expect(subject.dates).to eq([{"date"=>"2015", "dateType"=>"Issued"}, {"date"=>"2015-04-14T02:31:13Z", "dateType"=>"Updated"}])
expect(subject.publication_year).to eq("2015")
- expect(subject.publisher).to eq("Springer Berlin Heidelberg")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.publisher).to eq("Springer Science and Business Media LLC")
+ expect(subject.agency).to eq("crossref")
end
it "another book chapter" do
@@ -335,12 +335,12 @@
expect(subject.id).to eq("https://doi.org/10.1007/978-3-319-75889-3_1")
expect(subject.url).to eq("http://link.springer.com/10.1007/978-3-319-75889-3_1")
expect(subject.types).to eq("bibtex"=>"inbook", "citeproc"=>"chapter", "resourceType"=>"BookChapter", "resourceTypeGeneral"=>"Text", "ris"=>"CHAP", "schemaOrg"=>"Chapter")
- expect(subject.creators).to eq("familyName"=>"Jones", "givenName"=>"Hunter M.", "name"=>"Jones, Hunter M.", "nameType"=>"Personal")
+ expect(subject.creators).to eq([{"familyName"=>"Jones", "givenName"=>"Hunter M.", "name"=>"Jones, Hunter M.", "nameType"=>"Personal"}])
expect(subject.titles).to eq([{"title"=>"Climate Change and Increasing Risk of Extreme Heat"}])
expect(subject.dates).to include({"date"=>"2018", "dateType"=>"Issued"})
expect(subject.publication_year).to eq("2018")
- expect(subject.publisher).to eq("Springer International Publishing")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.publisher).to eq("Springer Science and Business Media LLC")
+ expect(subject.agency).to eq("crossref")
end
it "yet another book chapter" do
@@ -350,12 +350,12 @@
expect(subject.id).to eq("https://doi.org/10.4018/978-1-4666-1891-6.ch004")
expect(subject.url).to eq("http://services.igi-global.com/resolvedoi/resolve.aspx?doi=10.4018/978-1-4666-1891-6.ch004")
expect(subject.types).to eq("bibtex"=>"inbook", "citeproc"=>"chapter", "resourceType"=>"BookChapter", "resourceTypeGeneral"=>"Text", "ris"=>"CHAP", "schemaOrg"=>"Chapter")
- expect(subject.creators).to eq("familyName"=>"Bichot", "givenName"=>"Charles-Edmond", "name"=>"Bichot, Charles-Edmond", "affiliation" => [{"name"=>"Université de Lyon, France"}], "nameType"=>"Personal")
+ expect(subject.creators).to eq([{"affiliation"=>[{"name"=>"Université de Lyon, France"}], "familyName"=>"Bichot", "givenName"=>"Charles-Edmond", "name"=>"Bichot, Charles-Edmond", "nameType"=>"Personal"}])
expect(subject.titles).to eq([{"title"=>"Unsupervised and Supervised Image Segmentation Using Graph Partitioning"}])
expect(subject.dates).to eq([{"date"=>"2012-08-08", "dateType"=>"Issued"}, {"date"=>"2019-07-02T17:17:21Z", "dateType"=>"Updated"}])
expect(subject.publication_year).to eq("2012")
expect(subject.publisher).to eq("IGI Global")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
end
it "missing creator" do
@@ -370,7 +370,7 @@
expect(subject.dates).to eq([{"date"=>"2018-04-09", "dateType"=>"Issued"}, {"date"=>"2018-04-10T17:58:05Z", "dateType"=>"Updated"}])
expect(subject.publication_year).to eq("2018")
expect(subject.publisher).to eq("MDPI AG")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
end
it "book" do
@@ -380,13 +380,13 @@
expect(subject.id).to eq("https://doi.org/10.1017/9781108348843")
expect(subject.identifiers).to eq([{"identifier"=>"9781108348843", "identifierType"=>"ISBN"}])
expect(subject.url).to eq("https://www.cambridge.org/core/product/identifier/9781108348843/type/book")
- expect(subject.types).to eq("bibtex"=>"book", "citeproc"=>"book", "resourceType"=>"Book", "ris"=>"BOOK", "schemaOrg"=>"Book")
- expect(subject.creators).to eq("familyName"=>"Leung", "givenName"=>"Vincent S.", "name"=>"Leung, Vincent S.", "nameType"=>"Personal")
+ expect(subject.types).to eq("bibtex"=>"book", "citeproc"=>"book", "resourceType"=>"Book", "resourceTypeGeneral"=>"Text", "ris"=>"BOOK", "schemaOrg"=>"Book")
+ expect(subject.creators).to eq([{"familyName"=>"Leung", "givenName"=>"Vincent S.", "name"=>"Leung, Vincent S.", "nameType"=>"Personal"}])
expect(subject.titles).to eq([{"title"=>"The Politics of the Past in Early China"}])
expect(subject.dates).to eq([{"date"=>"2019-07-01", "dateType"=>"Issued"}, {"date"=>"2019-12-01T18:11:11Z", "dateType"=>"Updated"}])
expect(subject.publication_year).to eq("2019")
- expect(subject.publisher).to eq("Cambridge University Press")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.publisher).to eq("Cambridge University Press (CUP)")
+ expect(subject.agency).to eq("crossref")
expect(subject.date_registered).to eq("2019-07-06T10:19:22Z")
end
@@ -396,15 +396,15 @@
expect(subject.valid?).to be true
expect(subject.id).to eq("https://doi.org/10.2973/odp.proc.ir.180.2000")
expect(subject.url).to eq("http://www-odp.tamu.edu/publications/180_IR/180TOC.HTM")
- expect(subject.types).to eq("bibtex"=>"book", "citeproc"=>"book", "resourceType"=>"Book", "ris"=>"BOOK", "schemaOrg"=>"Book")
- expect(subject.creators).to eq("name"=>":(unav)", "nameType"=>"Organizational")
+ expect(subject.types).to eq("bibtex"=>"book", "citeproc"=>"book", "resourceType"=>"Book", "resourceTypeGeneral"=>"Text", "ris"=>"BOOK", "schemaOrg"=>"Book")
+ expect(subject.creators).to eq([{"name"=>":(unav)", "nameType"=>"Organizational"}])
expect(subject.contributors.size).to eq(4)
expect(subject.contributors.first).to eq("contributorType"=>"Editor", "familyName"=>"Taylor", "givenName"=>"B.", "name"=>"Taylor, B.", "nameType"=>"Personal")
expect(subject.titles).to eq([{"title"=>"Proceedings of the Ocean Drilling Program, 180 Initial Reports"}])
expect(subject.dates).to eq([{"date"=>"2000-02-04", "dateType"=>"Issued"}, {"date"=>"2009-02-02T21:19:43Z", "dateType"=>"Updated"}])
expect(subject.publication_year).to eq("2000")
- expect(subject.publisher).to eq("Ocean Drilling Program")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.publisher).to eq("International Ocean Discovery Program (IODP)")
+ expect(subject.agency).to eq("crossref")
expect(subject.date_registered).to eq("2006-10-17T20:17:44Z")
end
@@ -415,16 +415,16 @@
expect(subject.id).to eq("https://doi.org/10.1029/ar035")
expect(subject.identifiers).to eq([{"identifier"=>"0-87590-181-6", "identifierType"=>"ISBN"}])
expect(subject.url).to eq("http://doi.wiley.com/10.1029/AR035")
- expect(subject.types).to eq("bibtex"=>"book", "citeproc"=>"book", "resourceType"=>"Book", "ris"=>"BOOK", "schemaOrg"=>"Book")
- expect(subject.creators).to eq("familyName"=>"McGinnis", "givenName"=>"Richard Frank", "name"=>"McGinnis, Richard Frank", "nameType"=>"Personal")
+ expect(subject.types).to eq("bibtex"=>"book", "citeproc"=>"book", "resourceType"=>"Book", "resourceTypeGeneral"=>"Text", "ris"=>"BOOK", "schemaOrg"=>"Book")
+ expect(subject.creators).to eq([{"familyName"=>"McGinnis", "givenName"=>"Richard Frank", "name"=>"McGinnis, Richard Frank", "nameType"=>"Personal"}])
expect(subject.titles).to eq([{"title"=>"Biogeography of Lanternfishes (Myctophidae) South of 30°S"}])
expect(subject.dates).to eq([{"date"=>"1982", "dateType"=>"Issued"}, {"date"=>"2019-06-15T05:11:12Z", "dateType"=>"Updated"}])
expect(subject.publication_year).to eq("1982")
- expect(subject.publisher).to eq("American Geophysical Union")
+ expect(subject.publisher).to eq("Wiley")
expect(subject.related_identifiers.length).to eq(44)
expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"10.1016/0031-0182(70)90103-3", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
expect(subject.container).to eq("identifier"=>"0066-4634", "identifierType"=>"ISSN", "title"=>"Antarctic Research Series", "type"=>"Book Series", "volume"=>"35")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
expect(subject.date_registered).to be_nil
end
@@ -469,7 +469,7 @@
expect(subject.id).to eq("https://doi.org/10.1241/johokanri.39.979")
expect(subject.url).to eq("http://joi.jlc.jst.go.jp/JST.JSTAGE/johokanri/39.979?from=CrossRef")
expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
- expect(subject.creators).to eq("familyName"=>"KUSUMOTO", "givenName"=>"Hiroyuki", "name"=>"KUSUMOTO, Hiroyuki", "nameType"=>"Personal")
+ expect(subject.creators).to eq([{"familyName"=>"KUSUMOTO", "givenName"=>"Hiroyuki", "name"=>"KUSUMOTO, Hiroyuki", "nameType"=>"Personal"}])
expect(subject.titles).to eq([{"title"=>"Utilizing the Internet. 12 Series. Future of the Internet."}])
expect(subject.dates).to eq([{"date"=>"1997", "dateType"=>"Issued"}, {"date"=>"2020-03-06T06:44:36Z", "dateType"=>"Updated"}])
expect(subject.publication_year).to eq("1997")
@@ -500,12 +500,12 @@
expect(subject.id).to eq("https://doi.org/10.4000/dms.865")
expect(subject.url).to eq("http://journals.openedition.org/dms/865")
expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
- expect(subject.creators).to eq("familyName"=>"Peraya", "givenName"=>"Daniel", "name"=>"Peraya, Daniel", "nameType"=>"Personal")
+ expect(subject.creators).to eq([{"familyName"=>"Peraya", "givenName"=>"Daniel", "name"=>"Peraya, Daniel", "nameType"=>"Personal"}])
expect(subject.titles).to eq([{"title"=>"Distances, absence, proximités et présences : des concepts en déplacement"}, {"title"=>"Distance(s), proximity and presence(s): evolving concepts"}])
expect(subject.dates).to include({"date"=>"2014-12-23", "dateType"=>"Issued"})
expect(subject.publication_year).to eq("2014")
expect(subject.publisher).to eq("OpenEdition")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
expect(subject.date_registered).to be_nil
end
@@ -522,7 +522,7 @@
expect(subject.dates).to include({"date"=>"2017-05-24", "dateType"=>"Issued"})
expect(subject.publication_year).to eq("2017")
expect(subject.publisher).to eq("The Royal Society")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
expect(subject.date_registered).to eq("2019-07-18T04:43:12Z")
end
@@ -581,7 +581,7 @@
expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"0028-646X", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.1002/pmic.201400530", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
expect(subject.container).to eq("firstPage"=>"929", "identifier"=>"0028-646X", "identifierType"=>"ISSN", "issue"=>"3", "lastPage"=>"935", "title"=>"New Phytologist", "type"=>"Journal", "volume"=>"218")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
expect(subject.date_registered).to eq("2018-08-03T11:45:49Z")
end
@@ -598,7 +598,7 @@
expect(subject.dates).to include({"date"=>"2017-04-03", "dateType"=>"Issued"})
expect(subject.publication_year).to eq("2017")
expect(subject.publisher).to eq("Springer Science and Business Media LLC")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
expect(subject.date_registered).to eq("2019-11-02T09:30:06Z")
end
@@ -620,7 +620,27 @@
expect(subject.dates).to include({"date"=>"2020-07-28", "dateType"=>"Issued"})
expect(subject.publication_year).to eq("2020")
expect(subject.publisher).to eq("Copernicus GmbH")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
+ end
+
+ it "book oup" do
+ input = "10.1093/oxfordhb/9780198746140.013.5"
+ subject = Bolognese::Metadata.new(input: input)
+ expect(subject.valid?).to be true
+ expect(subject.url).to eq("http://oxfordhandbooks.com/view/10.1093/oxfordhb/9780198746140.001.0001/oxfordhb-9780198746140-e-5")
+ expect(subject.types).to eq("bibtex"=>"book", "citeproc"=>"book", "resourceType"=>"Book", "resourceTypeGeneral"=>"Text", "ris"=>"BOOK", "schemaOrg"=>"Book")
+ expect(subject.creators.count).to eq(1)
+ expect(subject.creators.first).to eq("familyName"=>"Clayton", "givenName"=>"Barbra R.", "name"=>"Clayton, Barbra R.", "nameType"=>"Personal")
+ expect(subject.contributors.count).to eq(2)
+ expect(subject.contributors.first).to eq("contributorType"=>"Editor", "familyName"=>"Cozort", "givenName"=>"Daniel", "name"=>"Cozort, Daniel", "nameType"=>"Personal")
+ expect(subject.titles).to eq([{"title"=>"The Changing Way of the Bodhisattva"}])
+ expect(subject.id).to eq("https://doi.org/10.1093/oxfordhb/9780198746140.013.5")
+ expect(subject.identifiers).to be_empty
+ expect(subject.descriptions.first["description"]).to start_with("This chapter explores the nature of the connections")
+ expect(subject.dates).to include({"date"=>"2018-04-05", "dateType"=>"Issued"})
+ expect(subject.publication_year).to eq("2018")
+ expect(subject.publisher).to eq("Oxford University Press (OUP)")
+ expect(subject.agency).to eq("crossref")
end
it "journal issue" do
@@ -630,7 +650,7 @@
expect(subject.id).to eq("https://doi.org/10.6002/ect.2015.0371")
expect(subject.url).to eq("http://ectrx.org/forms/ectrxcontentshow.php?doi_id=10.6002/ect.2015.0371")
expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceType"=>"JournalIssue", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"PublicationIssue")
- expect(subject.creators).to eq("name"=>":(unav)", "nameType"=>"Organizational")
+ expect(subject.creators).to eq([{"name"=>":(unav)", "nameType"=>"Organizational"}])
expect(subject.titles).to eq([{"title"=>":{unav)"}])
expect(subject.dates).to eq([{"date"=>"2018-10", "dateType"=>"Issued"}, {"date"=>"2018-10-03T12:09:12Z", "dateType"=>"Updated"}])
expect(subject.publication_year).to eq("2018")
@@ -638,7 +658,7 @@
expect(subject.related_identifiers.length).to eq(1)
expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"2146-8427", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
expect(subject.container).to eq("identifier"=>"2146-8427", "identifierType"=>"ISSN", "issue"=>"5", "title"=>"Experimental and Clinical Transplantation", "type"=>"Journal", "volume"=>"16")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
end
it "not found error" do
@@ -647,7 +667,7 @@
expect(subject.valid?).to be false
expect(subject.id).to eq("https://doi.org/10.7554/elife.01567x")
expect(subject.doi).to eq("10.7554/elife.01567x")
- expect(subject.agency).to eq("Crossref")
+ expect(subject.agency).to eq("crossref")
expect(subject.state).to eq("not_found")
end
end
diff --git a/spec/readers/datacite_json_reader_spec.rb b/spec/readers/datacite_json_reader_spec.rb
index 8909325c..29d432f6 100644
--- a/spec/readers/datacite_json_reader_spec.rb
+++ b/spec/readers/datacite_json_reader_spec.rb
@@ -25,7 +25,7 @@
expect(subject.related_identifiers.length).to eq(3)
expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"10.5438/0000-00ss", "relatedIdentifierType"=>"DOI", "relationType"=>"IsPartOf")
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.5438/55e5-t5c0", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
end
# it "SoftwareSourceCode" do
@@ -74,7 +74,7 @@
expect(subject.datacite).to include("v0.3.2")
expect(subject.related_identifiers.length).to eq(2)
expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"https://github.com/jakevdp/supersmoother/tree/v0.3.2", "relatedIdentifierType"=>"URL", "relationType"=>"IsSupplementTo")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
end
end
end
diff --git a/spec/readers/datacite_reader_spec.rb b/spec/readers/datacite_reader_spec.rb
index 9b1b6e79..5f1ed755 100644
--- a/spec/readers/datacite_reader_spec.rb
+++ b/spec/readers/datacite_reader_spec.rb
@@ -44,7 +44,7 @@
{"subject"=>"phylogeny"},
{"subject"=>"Parasites"}])
expect(subject.publisher).to eq("Dryad")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
end
@@ -69,7 +69,7 @@
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.5438/0000-00ss", "relatedIdentifierType"=>"DOI", "relationType"=>"IsPartOf")
expect(subject.publisher).to eq("DataCite")
expect(subject.subjects).to eq([{"subject"=>"datacite"}, {"subject"=>"doi"}, {"subject"=>"metadata"}])
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
end
@@ -90,7 +90,7 @@
"subjectScheme"=>"DDC"}])
expect(subject.publication_year).to eq("2013")
expect(subject.publisher).to eq("Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik GmbH, Wadern/Saarbruecken, Germany")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-2.1")
end
@@ -142,7 +142,7 @@
expect(subject.sizes).to eq(["4 kB"])
expect(subject.formats).to eq(["application/xml"])
expect(subject.publisher).to eq("DataCite")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
end
@@ -159,7 +159,7 @@
expect(subject.dates).to eq([{"date"=>"2016-01-20", "dateType"=>"Available"}, {"date"=>"2016", "dateType"=>"Issued"}])
expect(subject.publication_year).to eq("2016")
expect(subject.publisher).to eq("University of St Andrews")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
end
@@ -178,7 +178,7 @@
expect(subject.sizes).to eq([])
expect(subject.subjects).to eq([{"subject"=>"Environmental research"}])
expect(subject.publisher).to eq("EvK2 CNR Committee")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-2.2")
end
@@ -210,7 +210,7 @@
{"subject"=>"crossover experiment"},
{"subject"=>"hci"}])
expect(subject.publisher).to eq("Zenodo")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
end
@@ -242,7 +242,7 @@
"subjectScheme"=>"Fields of Science and Technology (FOS)"},
{"subject"=>"Computational Biology"},
{"subject"=>"Systems Biology"}])
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
end
@@ -272,7 +272,7 @@
expect(subject.subjects).to eq([{"subject"=>"Evolutionary Biology"},
{"subject"=>"FOS: Biological sciences", "subjectScheme"=>"Fields of Science and Technology (FOS)", "schemeUri"=>"http://www.oecd.org/science/inno/38235147.pdf"},
{"subject"=>"60412 Quantitative Genetics (incl. Disease and Trait Mapping Genetics)", "subjectScheme"=>"FOR", "schemeUri"=>"http://www.abs.gov.au/ausstats/abs@.nsf/0/6BB427AB9696C225CA2574180004463E"}])
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
end
@@ -320,7 +320,7 @@
{"subject"=>"Data mining"},
{"subject"=>"Statistical Computing Language R"},
{"subject"=>"funded research publications"}])
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
end
@@ -361,7 +361,7 @@
"funderIdentifierType"=>"Crossref Funder ID",
"funderName"=>"European Commission"}])
expect(subject.identifiers).to eq([{"identifier"=>"123", "identifierType"=>"Repository ID"}])
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
expect(subject.state).to eq("findable")
end
@@ -614,7 +614,7 @@
"http://www.rcuk.ac.uk/research/efficiency/researchadmin/harmonisation/",
"subject"=>"Materials Characterisation",
"subjectScheme"=>"RCUK Research Classifications"}])
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
end
@@ -640,7 +640,7 @@
"funderIdentifier"=>"https://doi.org/10.13039/501100000780",
"funderIdentifierType"=>"Crossref Funder ID",
"funderName"=>"European Commission"}])
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
end
@@ -660,7 +660,7 @@
expect(subject.publisher).to eq("МОДЕЛИРОВАНИЕ, ОПТИМИЗАЦИЯ И ИНФОРМАЦИОННЫЕ ТЕХНОЛОГИИ")
expect(subject.funding_references.length).to eq(1)
expect(subject.funding_references.first).to eq("awardNumber"=>"проект № 170100728", "funderName"=>"РФФИ")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
end
@@ -681,7 +681,7 @@
expect(subject.publication_year).to eq("2016")
expect(subject.related_identifiers.length).to eq(3)
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.5438/0000-00ss", "relatedIdentifierType"=>"DOI", "relationType"=>"IsPartOf")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
end
it "Schema 4.1 from string" do
@@ -711,7 +711,7 @@
"rightsUri"=>"https://creativecommons.org/licenses/by-nd/2.0/legalcode",
"schemeUri"=>"https://spdx.org/licenses/"}])
expect(subject.publisher).to eq("Springer")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
end
@@ -741,7 +741,7 @@
"rightsUri"=>"https://creativecommons.org/licenses/by-nd/2.0/legalcode",
"schemeUri"=>"https://spdx.org/licenses/"}])
expect(subject.publisher).to eq("Springer")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4.0")
end
@@ -770,7 +770,7 @@
"rightsUri"=>"https://creativecommons.org/publicdomain/zero/1.0/legalcode",
"schemeUri"=>"https://spdx.org/licenses/"}])
expect(subject.publisher).to eq("Dryad Digital Repository")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
end
@@ -800,7 +800,7 @@
"rightsUri"=>"https://creativecommons.org/licenses/by-nd/2.0/legalcode",
"schemeUri"=>"https://spdx.org/licenses/"}])
expect(subject.publisher).to eq("Springer")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3.0")
end
@@ -824,7 +824,7 @@
expect(subject.related_identifiers.length).to eq(1)
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.5272/oldertestpub", "relatedIdentifierType"=>"DOI", "relationType"=>"IsPartOf")
expect(subject.publisher).to eq("Springer")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-2.2")
end
@@ -858,7 +858,7 @@
"rightsUri"=>"https://creativecommons.org/licenses/by-nd/2.0/legalcode",
"schemeUri"=>"https://spdx.org/licenses/"}])
expect(subject.publisher).to eq("Springer")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
end
it "namespaced xml from string" do
@@ -875,7 +875,7 @@
expect(subject.dates).to eq([{"date"=>"2018-07-18", "dateType"=>"Valid"}, {"date"=>"2018-07-18", "dateType"=>"Accepted"}, {"date"=>"2018", "dateType"=>"Issued"}])
expect(subject.publication_year).to eq("2018")
expect(subject.publisher).to eq("nanoHUB")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-2.2")
end
@@ -907,7 +907,7 @@
expect(subject.titles).to eq([{"title"=>"CERES Level 3 Cloud Type Historgram Terra+Aqua HDF file - Edition4"}])
expect(subject.publication_year).to eq("2016")
expect(subject.publisher).to eq("NASA Langley Atmospheric Science Data Center DAAC")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
end
@@ -928,7 +928,7 @@
expect(subject.dates).to eq([{"date"=>"1995-12", "dateType"=>"Collected"}, {"date"=>"1996", "dateType"=>"Issued"}])
expect(subject.publication_year).to eq("1996")
expect(subject.publisher).to eq("GESIS Data Archive")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
end
@@ -950,7 +950,7 @@
expect(subject.descriptions[1]["description"]).to start_with("Aim of this paper is the presentation")
expect(subject.subjects).to eq([{"subject"=>"PV Systems"}, {"subject"=>"Off-grid Applications"}])
expect(subject.publisher).to eq("WIP-Munich")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-2.2")
end
@@ -981,7 +981,7 @@
expect(subject.dates).to eq([{"date"=>"2017", "dateType"=>"Issued"}])
expect(subject.publication_year).to eq("2017")
expect(subject.publisher).to eq("Siemens AG")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
end
@@ -1021,7 +1021,7 @@
expect(subject.dates).to eq([{"date"=>"2014-04-25", "dateType"=>"Available"}, {"date"=>"2015", "dateType"=>"Issued"}])
expect(subject.publication_year).to eq("2015")
expect(subject.publisher).to eq("Royal Netherlands Meteorological Institute (KNMI)")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
end
@@ -1031,7 +1031,7 @@
expect(subject.valid?).to be false
expect(subject.id).to eq("https://doi.org/10.4124/05f6c379-dd68-4cdb-880d-33d3e9576d52/1")
expect(subject.doi).to eq("10.4124/05f6c379-dd68-4cdb-880d-33d3e9576d52/1")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.state).to eq("not_found")
end
@@ -1047,7 +1047,7 @@
expect(subject.dates).to eq([{"date"=>"2018-01-12", "dateType"=>"Issued"}])
expect(subject.publication_year).to eq("2018")
expect(subject.publisher).to eq("CaltechDATA")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
expect(subject.state).to eq("findable")
end
@@ -1064,7 +1064,7 @@
expect(subject.dates).to eq([{"date"=>"2018", "dateType"=>"Issued"}])
expect(subject.publication_year).to eq("2018")
expect(subject.publisher).to eq("F1000 Research Limited")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
expect(subject.state).to eq("findable")
end
@@ -1083,7 +1083,7 @@
expect(subject.titles).to eq([{"title"=>"Referee report. For: Gates - add article keywords to the metatags [version 2; referees: 1 approved]"}])
expect(subject.publication_year).to eq("2018")
expect(subject.publisher).to eq("Gates Open Research")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
end
@@ -1176,7 +1176,7 @@
{"date"=>"2009-10-01/2014-01-23", "dateType"=>"Created"}])
expect(subject.publication_year).to eq("2014")
expect(subject.publisher).to eq("Deutsches Elektronen-Synchrotron, DESY, Hamburg")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
end
@@ -1203,7 +1203,7 @@
expect(subject.publisher).to eq("МОДЕЛИРОВАНИЕ, ОПТИМИЗАЦИЯ И ИНФОРМАЦИОННЫЕ ТЕХНОЛОГИИ")
expect(subject.funding_references.count).to eq(1)
expect(subject.funding_references.first).to eq("awardNumber"=>"проект № 170100728", "funderName"=>"РФФИ")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
end
@@ -1300,7 +1300,7 @@
expect(subject.titles).to eq([{"lang"=>"en", "title"=>"Meteo measurements at the Sand Motor"}])
expect(subject.publication_year).to eq("2017")
expect(subject.publisher).to eq("4TU.Centre for Research Data")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
expect(subject.geo_locations.first["geoLocationPlace"]).to eq("Zandmotor, sand suppletion area on the Dutch coast.")
expect(subject.geo_locations.first["geoLocationPolygon"].first).to eq("polygonPoint"=>{"pointLatitude"=>"52.03913926329928", "pointLongitude"=>"4.1738852605822"})
diff --git a/spec/writers/datacite_writer_spec.rb b/spec/writers/datacite_writer_spec.rb
index 310869d1..d4cbdb63 100644
--- a/spec/writers/datacite_writer_spec.rb
+++ b/spec/writers/datacite_writer_spec.rb
@@ -147,7 +147,7 @@
expect(subject.publication_year).to eq("2015")
expect(subject.version_info).to eq("v0.3.2")
expect(subject.publisher).to eq("Zenodo")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
expect(subject.datacite).to include("v0.3.2")
end
@@ -173,7 +173,7 @@
{"schemeUri"=>"http://www.oecd.org/science/inno/38235147.pdf",
"subject"=>"FOS: Computer and information sciences",
"subjectScheme"=>"Fields of Science and Technology (FOS)"}])
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
expect(subject.datacite).to end_with("")
end
@@ -199,7 +199,7 @@
{"schemeUri"=>"http://www.oecd.org/science/inno/38235147.pdf",
"subject"=>"FOS: Computer and information sciences",
"subjectScheme"=>"Fields of Science and Technology (FOS)"}])
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
expect(subject.datacite).to end_with("")
end
@@ -224,7 +224,7 @@
expect(subject.related_identifiers.last).to eq("relatedIdentifier" => "10.1371/journal.ppat.1000446",
"relatedIdentifierType" => "DOI","relationType"=>"IsSupplementTo")
expect(subject.publisher).to eq("Dryad")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
datacite = Maremma.from_xml(subject.datacite).fetch("resource", {})
@@ -249,7 +249,7 @@
expect(subject.dates).to eq([{"date"=>"2014-10-17", "dateType"=>"Updated"}, {"date"=>"2016-03-14T17:02:02Z", "dateType"=>"Available"}, {"date"=>"2013", "dateType"=>"Issued"}])
expect(subject.publication_year).to eq("2013")
expect(subject.publisher).to eq("UC Merced")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
datacite = Maremma.from_xml(subject.datacite).fetch("resource", {})
@@ -273,7 +273,7 @@
expect(subject.valid?).to be false
expect(subject.id).to eq("https://doi.org/10.4124/05f6c379-dd68-4cdb-880d-33d3e9576d52/1")
expect(subject.doi).to eq("10.4124/05f6c379-dd68-4cdb-880d-33d3e9576d52/1")
- expect(subject.agency).to eq("DataCite")
+ expect(subject.agency).to eq("datacite")
expect(subject.state).to eq("not_found")
datacite = Maremma.from_xml(subject.datacite).fetch("resource", {})
expect(datacite["identifier"]).to eq("identifierType"=>"DOI", "__content__"=>"10.4124/05f6c379-dd68-4cdb-880d-33d3e9576d52/1")
diff --git a/spec/writers/jats_writer_spec.rb b/spec/writers/jats_writer_spec.rb
index 4262a44f..1b5d7fb7 100644
--- a/spec/writers/jats_writer_spec.rb
+++ b/spec/writers/jats_writer_spec.rb
@@ -53,7 +53,7 @@
jats = Maremma.from_xml(subject.jats).fetch("element_citation", {})
expect(jats.dig("publication_type")).to eq("chapter")
expect(jats.dig("chapter_title")).to eq("Physical Examinations")
- expect(jats.dig("source")).to eq("Jaypee Brothers Medical Publishers (P) Ltd.")
+ expect(jats.dig("source")).to eq("Jaypee Brothers Medical Publishing")
expect(jats.dig("person_group", "name")).to eq("surname"=>"Saha", "given_names"=>"Ashis")
expect(jats.dig("year")).to eq("iso_8601_date"=>"2015", "__content__"=>"2015")
expect(jats.dig("fpage")).to eq("27")