From 944e72b09d166785ca4999fd06703dd16472f257 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Fri, 8 May 2020 13:26:59 +0200 Subject: [PATCH] showing version is fixed via latest version of bolognese gem. datacite/lupo#354 --- Gemfile.lock | 119 +++++++++--------- spec/api/api_spec.rb | 12 +- .../vnd_datacite_datacite_xml/header.yml | 94 ++++++++++++-- .../vnd_datacite_datacite_xml/link.yml | 94 ++++++++++++-- .../vnd_datacite_datacite_xml/not_found.yml | 40 +++--- 5 files changed, 255 insertions(+), 104 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1db4f26..e84d280 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,43 +1,43 @@ GEM remote: https://rubygems.org/ specs: - actioncable (5.2.4.1) - actionpack (= 5.2.4.1) + actioncable (5.2.4.2) + actionpack (= 5.2.4.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.4.1) - actionpack (= 5.2.4.1) - actionview (= 5.2.4.1) - activejob (= 5.2.4.1) + actionmailer (5.2.4.2) + actionpack (= 5.2.4.2) + actionview (= 5.2.4.2) + activejob (= 5.2.4.2) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.4.1) - actionview (= 5.2.4.1) - activesupport (= 5.2.4.1) + actionpack (5.2.4.2) + actionview (= 5.2.4.2) + activesupport (= 5.2.4.2) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.4.1) - activesupport (= 5.2.4.1) + actionview (5.2.4.2) + activesupport (= 5.2.4.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.2.4.1) - activesupport (= 5.2.4.1) + activejob (5.2.4.2) + activesupport (= 5.2.4.2) globalid (>= 0.3.6) - activemodel (5.2.4.1) - activesupport (= 5.2.4.1) - activerecord (5.2.4.1) - activemodel (= 5.2.4.1) - activesupport (= 5.2.4.1) + activemodel (5.2.4.2) + activesupport (= 5.2.4.2) + activerecord (5.2.4.2) + activemodel (= 5.2.4.2) + activesupport (= 5.2.4.2) arel (>= 9.0) - activestorage (5.2.4.1) - actionpack (= 5.2.4.1) - activerecord (= 5.2.4.1) + activestorage (5.2.4.2) + actionpack (= 5.2.4.2) + activerecord (= 5.2.4.2) marcel (~> 0.3.1) - activesupport (5.2.4.1) + activesupport (5.2.4.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -47,15 +47,15 @@ GEM arel (9.0.0) ast (2.4.0) benchmark_methods (0.7) - better_errors (2.6.0) + better_errors (2.7.0) coderay (>= 1.0.0) erubi (>= 1.0.0) rack (>= 0.9.0) - bibtex-ruby (5.1.1) + bibtex-ruby (5.1.4) latex-decode (~> 0.0) binding_of_caller (0.8.0) debug_inspector (>= 0.0.1) - bolognese (1.5.15) + bolognese (1.5.21) activesupport (>= 4.2.5) benchmark_methods (~> 0.7) bibtex-ruby (>= 5.1.0) @@ -81,7 +81,7 @@ GEM rdf-turtle (~> 3.1) thor (~> 0.19) builder (3.2.4) - capybara (3.31.0) + capybara (3.32.1) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) @@ -127,7 +127,7 @@ GEM ffi (1.12.2) gender_detector (0.1.2) unicode_utils (>= 1.3.0) - git (1.6.0) + git (1.7.0) rchardet (~> 1.8) globalid (0.4.2) activesupport (>= 4.2.0) @@ -136,7 +136,7 @@ GEM tilt hamster (3.0.0) concurrent-ruby (~> 1.0) - hashdiff (1.0.0) + hashdiff (1.0.1) htmlentities (4.3.4) i18n (1.8.2) concurrent-ruby (~> 1.0) @@ -162,14 +162,14 @@ GEM logstash-event (1.2.02) logstash-logger (0.26.1) logstash-event (~> 1.2) - loofah (2.4.0) + loofah (2.5.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) marcel (0.3.3) mimemagic (~> 0.3.2) - maremma (4.6) + maremma (4.7) activesupport (>= 4.2.5) addressable (>= 2.3.6) builder (~> 3.2, >= 3.2.2) @@ -180,8 +180,8 @@ GEM nokogiri (~> 1.10.4) oj (>= 2.8.3) oj_mimic_json (~> 1.0, >= 1.0.1) - method_source (0.9.2) - mimemagic (0.3.4) + method_source (1.0.0) + mimemagic (0.3.5) mini_mime (1.0.2) mini_portile2 (2.4.0) minitest (5.14.0) @@ -189,13 +189,13 @@ GEM multipart-post (2.1.1) namae (1.0.1) nio4r (2.5.2) - nokogiri (1.10.8) + nokogiri (1.10.9) mini_portile2 (~> 2.4.0) - oj (3.10.2) + oj (3.10.6) oj_mimic_json (1.0.1) - optimist (3.0.0) + optimist (3.0.1) parallel (1.19.1) - parser (2.7.0.2) + parser (2.7.1.2) ast (~> 2.4.0) postrank-uri (1.0.24) addressable (>= 2.4.0) @@ -207,33 +207,33 @@ GEM rack (>= 2.0.0) rack-test (1.1.0) rack (>= 1.0, < 3) - rails (5.2.4.1) - actioncable (= 5.2.4.1) - actionmailer (= 5.2.4.1) - actionpack (= 5.2.4.1) - actionview (= 5.2.4.1) - activejob (= 5.2.4.1) - activemodel (= 5.2.4.1) - activerecord (= 5.2.4.1) - activestorage (= 5.2.4.1) - activesupport (= 5.2.4.1) + rails (5.2.4.2) + actioncable (= 5.2.4.2) + actionmailer (= 5.2.4.2) + actionpack (= 5.2.4.2) + actionview (= 5.2.4.2) + activejob (= 5.2.4.2) + activemodel (= 5.2.4.2) + activerecord (= 5.2.4.2) + activestorage (= 5.2.4.2) + activesupport (= 5.2.4.2) bundler (>= 1.3.0) - railties (= 5.2.4.1) + railties (= 5.2.4.2) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (5.2.4.1) - actionpack (= 5.2.4.1) - activesupport (= 5.2.4.1) + railties (5.2.4.2) + actionpack (= 5.2.4.2) + activesupport (= 5.2.4.2) method_source rake (>= 0.8.7) thor (>= 0.19.0, < 2.0) rainbow (3.0.0) rake (13.0.1) - rb-fsevent (0.10.3) + rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) rchardet (1.8.0) @@ -261,15 +261,15 @@ GEM regexp_parser (1.7.0) request_store (1.5.0) rack (>= 1.4) - rspec-core (3.9.1) - rspec-support (~> 3.9.1) - rspec-expectations (3.9.0) + rspec-core (3.9.2) + rspec-support (~> 3.9.3) + rspec-expectations (3.9.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) - rspec-rails (3.9.0) + rspec-rails (3.9.1) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) @@ -277,7 +277,7 @@ GEM rspec-expectations (~> 3.9.0) rspec-mocks (~> 3.9.0) rspec-support (~> 3.9.0) - rspec-support (3.9.2) + rspec-support (3.9.3) rubocop (0.77.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) @@ -287,7 +287,8 @@ GEM unicode-display_width (>= 1.4.0, < 1.7) rubocop-performance (1.5.2) rubocop (>= 0.71.0) - rubocop-rails (2.4.2) + rubocop-rails (2.5.2) + activesupport rack (>= 1.1) rubocop (>= 0.72.0) ruby-progressbar (1.10.1) @@ -316,12 +317,12 @@ GEM thor (0.20.3) thread_safe (0.3.6) tilt (2.0.10) - tzinfo (1.2.6) + tzinfo (1.2.7) thread_safe (~> 0.1) unicode-display_width (1.6.1) unicode_utils (1.4.0) vcr (3.0.3) - webmock (3.8.2) + webmock (3.8.3) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) diff --git a/spec/api/api_spec.rb b/spec/api/api_spec.rb index 46ccdbc..9e95b94 100644 --- a/spec/api/api_spec.rb +++ b/spec/api/api_spec.rb @@ -33,13 +33,16 @@ end context "application/vnd.datacite.datacite+xml" do + let(:doi) { "10.00012/uu01-ltej7x" } + it "header" do get "/#{doi}", nil, { "HTTP_ACCEPT" => "application/vnd.datacite.datacite+xml" } expect(last_response.status).to eq(200) response = Maremma.from_xml(last_response.body).to_h.fetch("resource", {}) - expect(response.dig("publisher")).to eq("DataCite") - expect(response.dig("titles", "title")).to eq("Announcing schema 4.2") + expect(response.dig("publisher")).to eq("Utrecht University") + expect(response.dig("titles", "title")).to eq("__content__"=>"Minimum: Title", "xml:lang"=>"en") + expect(response.dig("version")).to eq("Minimum: Version") end it "link" do @@ -47,8 +50,9 @@ expect(last_response.status).to eq(200) response = Maremma.from_xml(last_response.body).to_h.fetch("resource", {}) - expect(response.dig("publisher")).to eq("DataCite") - expect(response.dig("titles", "title")).to eq("Announcing schema 4.2") + expect(response.dig("publisher")).to eq("Utrecht University") + expect(response.dig("titles", "title")).to eq("__content__"=>"Minimum: Title", "xml:lang"=>"en") + expect(response.dig("version")).to eq("Minimum: Version") end it "not found" do diff --git a/spec/fixtures/vcr_cassettes/content_negotiation/application/vnd_datacite_datacite_xml/header.yml b/spec/fixtures/vcr_cassettes/content_negotiation/application/vnd_datacite_datacite_xml/header.yml index 2cead4a..6063070 100644 --- a/spec/fixtures/vcr_cassettes/content_negotiation/application/vnd_datacite_datacite_xml/header.yml +++ b/spec/fixtures/vcr_cassettes/content_negotiation/application/vnd_datacite_datacite_xml/header.yml @@ -2,22 +2,22 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois/10.14454/cne7-ar31 + uri: https://api.test.datacite.org/dois/10.00012/uu01-ltej7x body: encoding: US-ASCII string: '' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.4; mailto:info@datacite.org) + - Mozilla/5.0 (compatible; Maremma/4.7; mailto:info@datacite.org) Accept: - application/vnd.datacite.datacite+json response: status: code: 200 - message: '' + message: OK headers: Date: - - Sun, 15 Dec 2019 22:40:59 GMT + - Fri, 08 May 2020 11:23:44 GMT Content-Type: - application/vnd.datacite.datacite+json; charset=utf-8 Connection: @@ -31,19 +31,91 @@ http_interactions: Vary: - Accept-Encoding, Origin X-Request-Id: - - fd473ed2-ca88-4167-894a-d134e6d7ca95 + - 77cbd574-c769-4a8a-9ffe-c5c05eddcdca Etag: - - W/"37fcf41a8fbf601eac15785399ed4c78" + - W/"e8f7653f980f63cda770793e966e1e73" X-Runtime: - - '0.012668' + - '0.021474' X-Powered-By: - Phusion Passenger 6.0.4 Server: - - nginx/1.17.3 + Phusion Passenger 6.0.4 + - nginx/1.14.0 + Phusion Passenger 6.0.4 body: encoding: ASCII-8BIT - string: !binary |- - ewogICJpZCI6ICJodHRwczovL2RvaS5vcmcvMTAuMTQ0NTQvY25lNy1hcjMxIiwKICAiZG9pIjogIjEwLjE0NDU0L0NORTctQVIzMSIsCiAgInVybCI6ICJodHRwczovL2Jsb2cuZGF0YWNpdGUub3JnL2Fubm91bmNpbmctc2NoZW1hLTQtMi8iLAogICJ0eXBlcyI6IHsKICAgICJyaXMiOiAiR0VOIiwKICAgICJiaWJ0ZXgiOiAiYXJ0aWNsZSIsCiAgICAiY2l0ZXByb2MiOiAicG9zdC13ZWJsb2ciLAogICAgInNjaGVtYU9yZyI6ICJCbG9nUG9zdGluZyIsCiAgICAicmVzb3VyY2VUeXBlR2VuZXJhbCI6ICJUZXh0IgogIH0sCiAgImNyZWF0b3JzIjogWwogICAgewogICAgICAibmFtZSI6ICJEYXNsZXIsIFJvYmluIiwKICAgICAgIm5hbWVUeXBlIjogIlBlcnNvbmFsIiwKICAgICAgImdpdmVuTmFtZSI6ICJSb2JpbiIsCiAgICAgICJmYW1pbHlOYW1lIjogIkRhc2xlciIsCiAgICAgICJhZmZpbGlhdGlvbiI6IFsKICAgICAgICB7CiAgICAgICAgICAibmFtZSI6ICJEYXRhQ2l0ZSIsCiAgICAgICAgICAic2NoZW1lVXJpIjogImh0dHBzOi8vcm9yLm9yZyIsCiAgICAgICAgICAiYWZmaWxpYXRpb25JZGVudGlmaWVyIjogImh0dHBzOi8vcm9yLm9yZy8wNHd4bnNqODEiLAogICAgICAgICAgImFmZmlsaWF0aW9uSWRlbnRpZmllclNjaGVtZSI6ICJST1IiCiAgICAgICAgfQogICAgICBdLAogICAgICAibmFtZUlkZW50aWZpZXJzIjogWwogICAgICAgIHsKICAgICAgICAgICJzY2hlbWVVcmkiOiAiaHR0cHM6Ly9vcmNpZC5vcmciLAogICAgICAgICAgIm5hbWVJZGVudGlmaWVyIjogImh0dHBzOi8vb3JjaWQub3JnLzAwMDAtMDAwMi00Njk1LTc4NzQiLAogICAgICAgICAgIm5hbWVJZGVudGlmaWVyU2NoZW1lIjogIk9SQ0lEIgogICAgICAgIH0KICAgICAgXQogICAgfSwKICAgIHsKICAgICAgIm5hbWUiOiAiZGUgU21hZWxlLCBNYWRlbGVpbmUiLAogICAgICAibmFtZVR5cGUiOiAiUGVyc29uYWwiLAogICAgICAiZ2l2ZW5OYW1lIjogIk1hZGVsZWluZSIsCiAgICAgICJmYW1pbHlOYW1lIjogImRlIFNtYWVsZSIsCiAgICAgICJhZmZpbGlhdGlvbiI6IFsKICAgICAgICB7CiAgICAgICAgICAibmFtZSI6ICJEZWxmdCBVbml2ZXJzaXR5IG9mIFRlY2hub2xvZ3kiLAogICAgICAgICAgInNjaGVtZVVyaSI6ICJodHRwczovL3Jvci5vcmciLAogICAgICAgICAgImFmZmlsaWF0aW9uSWRlbnRpZmllciI6ICJodHRwczovL3Jvci5vcmcvMDJlMmM3azA5IiwKICAgICAgICAgICJhZmZpbGlhdGlvbklkZW50aWZpZXJTY2hlbWUiOiAiUk9SIgogICAgICAgIH0KICAgICAgXSwKICAgICAgIm5hbWVJZGVudGlmaWVycyI6IFsKICAgICAgICB7CiAgICAgICAgICAic2NoZW1lVXJpIjogImh0dHBzOi8vb3JjaWQub3JnIiwKICAgICAgICAgICJuYW1lSWRlbnRpZmllciI6ICJodHRwczovL29yY2lkLm9yZy8wMDAwLTAwMDItODk2My0zNDE1IiwKICAgICAgICAgICJuYW1lSWRlbnRpZmllclNjaGVtZSI6ICJPUkNJRCIKICAgICAgICB9CiAgICAgIF0KICAgIH0KICBdLAogICJ0aXRsZXMiOiBbCiAgICB7CiAgICAgICJsYW5nIjogbnVsbCwKICAgICAgInRpdGxlIjogIkFubm91bmNpbmcgc2NoZW1hIDQuMiIsCiAgICAgICJ0aXRsZVR5cGUiOiBudWxsCiAgICB9CiAgXSwKICAicHVibGlzaGVyIjogIkRhdGFDaXRlIiwKICAiY29udGFpbmVyIjoge30sCiAgInN1YmplY3RzIjogWwogICAgewogICAgICAic3ViamVjdCI6ICJmZWF0dXJlZCIKICAgIH0KICBdLAogICJjb250cmlidXRvcnMiOiBbXSwKICAiZGF0ZXMiOiBbCiAgICB7CiAgICAgICJkYXRlIjogIjIwMTktMDMtMjBUMDc6MTc6NTIuNzkyWiIsCiAgICAgICJkYXRlVHlwZSI6ICJJc3N1ZWQiCiAgICB9LAogICAgewogICAgICAiZGF0ZSI6ICIyMDE5LTAzLTIwVDA3OjE3OjUyLjc5MloiLAogICAgICAiZGF0ZVR5cGUiOiAiQ3JlYXRlZCIKICAgIH0sCiAgICB7CiAgICAgICJkYXRlIjogIjIwMTktMDMtMjBUMDc6MTc6NTIuNzkyWiIsCiAgICAgICJkYXRlVHlwZSI6ICJVcGRhdGVkIgogICAgfQogIF0sCiAgInB1YmxpY2F0aW9uWWVhciI6IDIwMTksCiAgImlkZW50aWZpZXJzIjogWwogICAgewogICAgICAiaWRlbnRpZmllciI6ICJodHRwczovL2RvaS5vcmcvMTAuMTQ0NTQvY25lNy1hcjMxIiwKICAgICAgImlkZW50aWZpZXJUeXBlIjogIkRPSSIKICAgIH0KICBdLAogICJ2ZXJzaW9uIjogIjEuMCIsCiAgInJpZ2h0c0xpc3QiOiB7CiAgICAicmlnaHRzIjogbnVsbCwKICAgICJyaWdodHNVcmkiOiBudWxsCiAgfSwKICAiZGVzY3JpcHRpb25zIjogWwogICAgewogICAgICAibGFuZyI6IG51bGwsCiAgICAgICJkZXNjcmlwdGlvbiI6ICJUaGUgRGF0YUNpdGUgTWV0YWRhdGEgU2NoZW1hIGlzIHRoZSBiYXNpcyBmb3IgdGhlIG1ldGFkYXRhIHlvdSBzdWJtaXQgdG8gRGF0YUNpdGUuIEl0IHRlbGxzIHlvdSB0aGUgYXZhaWxhYmxlIGZpZWxkcyBhbmQgc3RydWN0dXJlIGZvciB5b3VyIG1ldGFkYXRhIHJlY29yZHMsIGFuZCBpdOKAmXMgd2hhdCB3ZSB2YWxpZGF0ZSBhZ2FpbnN0IHRvIG1ha2Ugc3VyZSBldmVyeXRoaW5nIGlzIGFzIGl0IHNob3VsZCBiZS4gVGhlIG1ldGFkYXRhLi4uIiwKICAgICAgImRlc2NyaXB0aW9uVHlwZSI6ICJBYnN0cmFjdCIKICAgIH0KICBdLAogICJyZWxhdGVkSWRlbnRpZmllcnMiOiBbCiAgICB7CiAgICAgICJyZWxhdGlvblR5cGUiOiAiSXNQYXJ0T2YiLAogICAgICAicmVsYXRlZElkZW50aWZpZXIiOiAiMTAuNTQzOC8wMDAwLTAwc3MiLAogICAgICAicmVzb3VyY2VUeXBlR2VuZXJhbCI6ICJUZXh0IiwKICAgICAgInJlbGF0ZWRJZGVudGlmaWVyVHlwZSI6ICJET0kiCiAgICB9CiAgXSwKICAicHJvdmlkZXJJZCI6ICJkYXRhY2l0ZSIsCiAgImNsaWVudElkIjogImRhdGFjaXRlLmRhdGFjaXRlIiwKICAiYWdlbmN5IjogIkRhdGFDaXRlIiwKICAic3RhdGUiOiAiZmluZGFibGUiCn0= + string: |- + { + "id": "https://doi.org/10.00012/uu01-ltej7x", + "doi": "10.00012/UU01-LTEJ7X", + "url": "https://145.100.59.25.surf-hosted.nl/yoda-test/UU01/LTEJ7X.html", + "types": { + "ris": "DATA", + "bibtex": "misc", + "citeproc": "dataset", + "schemaOrg": "Dataset", + "resourceType": "Research Data", + "resourceTypeGeneral": "Dataset" + }, + "creators": [ + { + "name": "Minimum: Creator Of Datapackage", + "affiliation": [ + { + "name": "Utrecht University" + } + ], + "nameIdentifiers": [] + } + ], + "titles": [ + { + "lang": "en", + "title": "Minimum: Title" + } + ], + "publisher": "Utrecht University", + "container": {}, + "subjects": [], + "contributors": [], + "dates": [ + { + "date": "2019", + "dateType": "Issued" + } + ], + "publicationYear": 2019, + "language": "en", + "identifiers": [ + { + "identifier": "https://handle.test.datacite.org/10.00012/uu01-ltej7x", + "identifierType": "DOI" + } + ], + "sizes": [], + "formats": [], + "version": "Minimum: Version", + "rightsList": [ + { + "rights": "Custom" + }, + { + "rights": "Open Access", + "rightsUri": "info:eu-repo/semantics/openAccess" + } + ], + "descriptions": [ + { + "description": "Minimum: Description", + "descriptionType": "Abstract" + } + ], + "geoLocations": [], + "fundingReferences": [], + "relatedIdentifiers": [], + "providerId": "delft", + "clientId": "delft.uu", + "agency": "DataCite", + "state": "findable" + } http_version: - recorded_at: Sun, 15 Dec 2019 22:40:59 GMT + recorded_at: Fri, 08 May 2020 11:23:44 GMT recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/content_negotiation/application/vnd_datacite_datacite_xml/link.yml b/spec/fixtures/vcr_cassettes/content_negotiation/application/vnd_datacite_datacite_xml/link.yml index cbebd79..463b50b 100644 --- a/spec/fixtures/vcr_cassettes/content_negotiation/application/vnd_datacite_datacite_xml/link.yml +++ b/spec/fixtures/vcr_cassettes/content_negotiation/application/vnd_datacite_datacite_xml/link.yml @@ -2,22 +2,22 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois/10.14454/cne7-ar31 + uri: https://api.test.datacite.org/dois/10.00012/uu01-ltej7x body: encoding: US-ASCII string: '' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.4; mailto:info@datacite.org) + - Mozilla/5.0 (compatible; Maremma/4.7; mailto:info@datacite.org) Accept: - application/vnd.datacite.datacite+json response: status: code: 200 - message: '' + message: OK headers: Date: - - Sun, 15 Dec 2019 22:40:59 GMT + - Fri, 08 May 2020 11:23:44 GMT Content-Type: - application/vnd.datacite.datacite+json; charset=utf-8 Connection: @@ -31,19 +31,91 @@ http_interactions: Vary: - Accept-Encoding, Origin X-Request-Id: - - 9c255296-8f00-4b19-8e73-e1518f41e393 + - 0e619c0e-3fd4-48fc-8bc4-5b4e37e6949f Etag: - - W/"37fcf41a8fbf601eac15785399ed4c78" + - W/"e8f7653f980f63cda770793e966e1e73" X-Runtime: - - '0.013463' + - '0.020547' X-Powered-By: - Phusion Passenger 6.0.4 Server: - - nginx/1.17.3 + Phusion Passenger 6.0.4 + - nginx/1.14.0 + Phusion Passenger 6.0.4 body: encoding: ASCII-8BIT - string: !binary |- - ewogICJpZCI6ICJodHRwczovL2RvaS5vcmcvMTAuMTQ0NTQvY25lNy1hcjMxIiwKICAiZG9pIjogIjEwLjE0NDU0L0NORTctQVIzMSIsCiAgInVybCI6ICJodHRwczovL2Jsb2cuZGF0YWNpdGUub3JnL2Fubm91bmNpbmctc2NoZW1hLTQtMi8iLAogICJ0eXBlcyI6IHsKICAgICJyaXMiOiAiR0VOIiwKICAgICJiaWJ0ZXgiOiAiYXJ0aWNsZSIsCiAgICAiY2l0ZXByb2MiOiAicG9zdC13ZWJsb2ciLAogICAgInNjaGVtYU9yZyI6ICJCbG9nUG9zdGluZyIsCiAgICAicmVzb3VyY2VUeXBlR2VuZXJhbCI6ICJUZXh0IgogIH0sCiAgImNyZWF0b3JzIjogWwogICAgewogICAgICAibmFtZSI6ICJEYXNsZXIsIFJvYmluIiwKICAgICAgIm5hbWVUeXBlIjogIlBlcnNvbmFsIiwKICAgICAgImdpdmVuTmFtZSI6ICJSb2JpbiIsCiAgICAgICJmYW1pbHlOYW1lIjogIkRhc2xlciIsCiAgICAgICJhZmZpbGlhdGlvbiI6IFsKICAgICAgICB7CiAgICAgICAgICAibmFtZSI6ICJEYXRhQ2l0ZSIsCiAgICAgICAgICAic2NoZW1lVXJpIjogImh0dHBzOi8vcm9yLm9yZyIsCiAgICAgICAgICAiYWZmaWxpYXRpb25JZGVudGlmaWVyIjogImh0dHBzOi8vcm9yLm9yZy8wNHd4bnNqODEiLAogICAgICAgICAgImFmZmlsaWF0aW9uSWRlbnRpZmllclNjaGVtZSI6ICJST1IiCiAgICAgICAgfQogICAgICBdLAogICAgICAibmFtZUlkZW50aWZpZXJzIjogWwogICAgICAgIHsKICAgICAgICAgICJzY2hlbWVVcmkiOiAiaHR0cHM6Ly9vcmNpZC5vcmciLAogICAgICAgICAgIm5hbWVJZGVudGlmaWVyIjogImh0dHBzOi8vb3JjaWQub3JnLzAwMDAtMDAwMi00Njk1LTc4NzQiLAogICAgICAgICAgIm5hbWVJZGVudGlmaWVyU2NoZW1lIjogIk9SQ0lEIgogICAgICAgIH0KICAgICAgXQogICAgfSwKICAgIHsKICAgICAgIm5hbWUiOiAiZGUgU21hZWxlLCBNYWRlbGVpbmUiLAogICAgICAibmFtZVR5cGUiOiAiUGVyc29uYWwiLAogICAgICAiZ2l2ZW5OYW1lIjogIk1hZGVsZWluZSIsCiAgICAgICJmYW1pbHlOYW1lIjogImRlIFNtYWVsZSIsCiAgICAgICJhZmZpbGlhdGlvbiI6IFsKICAgICAgICB7CiAgICAgICAgICAibmFtZSI6ICJEZWxmdCBVbml2ZXJzaXR5IG9mIFRlY2hub2xvZ3kiLAogICAgICAgICAgInNjaGVtZVVyaSI6ICJodHRwczovL3Jvci5vcmciLAogICAgICAgICAgImFmZmlsaWF0aW9uSWRlbnRpZmllciI6ICJodHRwczovL3Jvci5vcmcvMDJlMmM3azA5IiwKICAgICAgICAgICJhZmZpbGlhdGlvbklkZW50aWZpZXJTY2hlbWUiOiAiUk9SIgogICAgICAgIH0KICAgICAgXSwKICAgICAgIm5hbWVJZGVudGlmaWVycyI6IFsKICAgICAgICB7CiAgICAgICAgICAic2NoZW1lVXJpIjogImh0dHBzOi8vb3JjaWQub3JnIiwKICAgICAgICAgICJuYW1lSWRlbnRpZmllciI6ICJodHRwczovL29yY2lkLm9yZy8wMDAwLTAwMDItODk2My0zNDE1IiwKICAgICAgICAgICJuYW1lSWRlbnRpZmllclNjaGVtZSI6ICJPUkNJRCIKICAgICAgICB9CiAgICAgIF0KICAgIH0KICBdLAogICJ0aXRsZXMiOiBbCiAgICB7CiAgICAgICJsYW5nIjogbnVsbCwKICAgICAgInRpdGxlIjogIkFubm91bmNpbmcgc2NoZW1hIDQuMiIsCiAgICAgICJ0aXRsZVR5cGUiOiBudWxsCiAgICB9CiAgXSwKICAicHVibGlzaGVyIjogIkRhdGFDaXRlIiwKICAiY29udGFpbmVyIjoge30sCiAgInN1YmplY3RzIjogWwogICAgewogICAgICAic3ViamVjdCI6ICJmZWF0dXJlZCIKICAgIH0KICBdLAogICJjb250cmlidXRvcnMiOiBbXSwKICAiZGF0ZXMiOiBbCiAgICB7CiAgICAgICJkYXRlIjogIjIwMTktMDMtMjBUMDc6MTc6NTIuNzkyWiIsCiAgICAgICJkYXRlVHlwZSI6ICJJc3N1ZWQiCiAgICB9LAogICAgewogICAgICAiZGF0ZSI6ICIyMDE5LTAzLTIwVDA3OjE3OjUyLjc5MloiLAogICAgICAiZGF0ZVR5cGUiOiAiQ3JlYXRlZCIKICAgIH0sCiAgICB7CiAgICAgICJkYXRlIjogIjIwMTktMDMtMjBUMDc6MTc6NTIuNzkyWiIsCiAgICAgICJkYXRlVHlwZSI6ICJVcGRhdGVkIgogICAgfQogIF0sCiAgInB1YmxpY2F0aW9uWWVhciI6IDIwMTksCiAgImlkZW50aWZpZXJzIjogWwogICAgewogICAgICAiaWRlbnRpZmllciI6ICJodHRwczovL2RvaS5vcmcvMTAuMTQ0NTQvY25lNy1hcjMxIiwKICAgICAgImlkZW50aWZpZXJUeXBlIjogIkRPSSIKICAgIH0KICBdLAogICJ2ZXJzaW9uIjogIjEuMCIsCiAgInJpZ2h0c0xpc3QiOiB7CiAgICAicmlnaHRzIjogbnVsbCwKICAgICJyaWdodHNVcmkiOiBudWxsCiAgfSwKICAiZGVzY3JpcHRpb25zIjogWwogICAgewogICAgICAibGFuZyI6IG51bGwsCiAgICAgICJkZXNjcmlwdGlvbiI6ICJUaGUgRGF0YUNpdGUgTWV0YWRhdGEgU2NoZW1hIGlzIHRoZSBiYXNpcyBmb3IgdGhlIG1ldGFkYXRhIHlvdSBzdWJtaXQgdG8gRGF0YUNpdGUuIEl0IHRlbGxzIHlvdSB0aGUgYXZhaWxhYmxlIGZpZWxkcyBhbmQgc3RydWN0dXJlIGZvciB5b3VyIG1ldGFkYXRhIHJlY29yZHMsIGFuZCBpdOKAmXMgd2hhdCB3ZSB2YWxpZGF0ZSBhZ2FpbnN0IHRvIG1ha2Ugc3VyZSBldmVyeXRoaW5nIGlzIGFzIGl0IHNob3VsZCBiZS4gVGhlIG1ldGFkYXRhLi4uIiwKICAgICAgImRlc2NyaXB0aW9uVHlwZSI6ICJBYnN0cmFjdCIKICAgIH0KICBdLAogICJyZWxhdGVkSWRlbnRpZmllcnMiOiBbCiAgICB7CiAgICAgICJyZWxhdGlvblR5cGUiOiAiSXNQYXJ0T2YiLAogICAgICAicmVsYXRlZElkZW50aWZpZXIiOiAiMTAuNTQzOC8wMDAwLTAwc3MiLAogICAgICAicmVzb3VyY2VUeXBlR2VuZXJhbCI6ICJUZXh0IiwKICAgICAgInJlbGF0ZWRJZGVudGlmaWVyVHlwZSI6ICJET0kiCiAgICB9CiAgXSwKICAicHJvdmlkZXJJZCI6ICJkYXRhY2l0ZSIsCiAgImNsaWVudElkIjogImRhdGFjaXRlLmRhdGFjaXRlIiwKICAiYWdlbmN5IjogIkRhdGFDaXRlIiwKICAic3RhdGUiOiAiZmluZGFibGUiCn0= + string: |- + { + "id": "https://doi.org/10.00012/uu01-ltej7x", + "doi": "10.00012/UU01-LTEJ7X", + "url": "https://145.100.59.25.surf-hosted.nl/yoda-test/UU01/LTEJ7X.html", + "types": { + "ris": "DATA", + "bibtex": "misc", + "citeproc": "dataset", + "schemaOrg": "Dataset", + "resourceType": "Research Data", + "resourceTypeGeneral": "Dataset" + }, + "creators": [ + { + "name": "Minimum: Creator Of Datapackage", + "affiliation": [ + { + "name": "Utrecht University" + } + ], + "nameIdentifiers": [] + } + ], + "titles": [ + { + "lang": "en", + "title": "Minimum: Title" + } + ], + "publisher": "Utrecht University", + "container": {}, + "subjects": [], + "contributors": [], + "dates": [ + { + "date": "2019", + "dateType": "Issued" + } + ], + "publicationYear": 2019, + "language": "en", + "identifiers": [ + { + "identifier": "https://handle.test.datacite.org/10.00012/uu01-ltej7x", + "identifierType": "DOI" + } + ], + "sizes": [], + "formats": [], + "version": "Minimum: Version", + "rightsList": [ + { + "rights": "Custom" + }, + { + "rights": "Open Access", + "rightsUri": "info:eu-repo/semantics/openAccess" + } + ], + "descriptions": [ + { + "description": "Minimum: Description", + "descriptionType": "Abstract" + } + ], + "geoLocations": [], + "fundingReferences": [], + "relatedIdentifiers": [], + "providerId": "delft", + "clientId": "delft.uu", + "agency": "DataCite", + "state": "findable" + } http_version: - recorded_at: Sun, 15 Dec 2019 22:40:59 GMT + recorded_at: Fri, 08 May 2020 11:23:44 GMT recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/content_negotiation/application/vnd_datacite_datacite_xml/not_found.yml b/spec/fixtures/vcr_cassettes/content_negotiation/application/vnd_datacite_datacite_xml/not_found.yml index 7bf7292..aeb15ce 100644 --- a/spec/fixtures/vcr_cassettes/content_negotiation/application/vnd_datacite_datacite_xml/not_found.yml +++ b/spec/fixtures/vcr_cassettes/content_negotiation/application/vnd_datacite_datacite_xml/not_found.yml @@ -8,16 +8,16 @@ http_interactions: string: '' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.4; mailto:info@datacite.org) + - Mozilla/5.0 (compatible; Maremma/4.7; mailto:info@datacite.org) Accept: - application/vnd.datacite.datacite+json response: status: code: 404 - message: '' + message: Not Found headers: Date: - - Sun, 15 Dec 2019 22:40:59 GMT + - Fri, 08 May 2020 11:23:44 GMT Content-Type: - application/json; charset=utf-8 Connection: @@ -29,19 +29,19 @@ http_interactions: Vary: - Accept-Encoding, Origin X-Request-Id: - - 3b855834-889e-417d-8ac9-a565400f2c94 + - b676da68-4f1c-4589-9c70-991222a562db X-Runtime: - - '0.004703' + - '0.014669' X-Powered-By: - Phusion Passenger 6.0.4 Server: - - nginx/1.17.3 + Phusion Passenger 6.0.4 + - nginx/1.14.0 + Phusion Passenger 6.0.4 body: encoding: ASCII-8BIT string: '{"errors":[{"status":"404","title":"The resource you are looking for doesn''t exist."}]}' http_version: - recorded_at: Sun, 15 Dec 2019 22:40:59 GMT + recorded_at: Fri, 08 May 2020 11:23:44 GMT - request: method: get uri: https://api.crossref.org/works/10.15146/r34015/transform/application/vnd.crossref.unixsd+xml @@ -50,13 +50,13 @@ http_interactions: string: '' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.4; mailto:info@datacite.org) + - Mozilla/5.0 (compatible; Maremma/4.7; mailto:info@datacite.org) Accept: - text/xml response: status: code: 404 - message: '' + message: Not Found headers: Content-Type: - text/plain @@ -69,7 +69,7 @@ http_interactions: Server: - http-kit Date: - - Sun, 15 Dec 2019 22:41:00 GMT + - Fri, 08 May 2020 11:23:44 GMT X-Rate-Limit-Limit: - '50' X-Rate-Limit-Interval: @@ -80,7 +80,7 @@ http_interactions: encoding: ASCII-8BIT string: Resource not found. http_version: - recorded_at: Sun, 15 Dec 2019 22:41:00 GMT + recorded_at: Fri, 08 May 2020 11:23:45 GMT - request: method: get uri: https://doi.org/ra/10.15146 @@ -89,7 +89,7 @@ http_interactions: string: '' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.4; mailto:info@datacite.org) + - Mozilla/5.0 (compatible; Maremma/4.7; 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: @@ -98,24 +98,26 @@ http_interactions: message: '' headers: Date: - - Sun, 15 Dec 2019 22:41:00 GMT + - Fri, 08 May 2020 11:23:45 GMT Content-Type: - application/json;charset=UTF-8 Connection: - keep-alive Set-Cookie: - - __cfduid=d5253fcf29d9ca6792a4999476c61e7fa1576449660; expires=Tue, 14-Jan-20 - 22:41:00 GMT; path=/; domain=.doi.org; HttpOnly; Secure + - __cfduid=d726de7377cfa1a0a2d6541c88a15f2af1588937025; expires=Sun, 07-Jun-20 + 11:23:45 GMT; path=/; domain=.doi.org; HttpOnly; SameSite=Lax; Secure Cf-Cache-Status: - DYNAMIC - Strict-Transport-Security: - - max-age=31536000; includeSubDomains; preload 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: - - 545bec28d808bd96-AMS + - 5902cf7709b505c8-FRA + Cf-Request-Id: + - '02959ffe68000005c86ea7a200000001' body: encoding: ASCII-8BIT string: |- @@ -126,5 +128,5 @@ http_interactions: } ] http_version: - recorded_at: Sun, 15 Dec 2019 22:41:00 GMT + recorded_at: Fri, 08 May 2020 11:23:45 GMT recorded_with: VCR 3.0.3