diff --git a/spec/concerns/metadatable_spec.rb b/spec/concerns/metadatable_spec.rb index 1f6f48f..39634e6 100644 --- a/spec/concerns/metadatable_spec.rb +++ b/spec/concerns/metadatable_spec.rb @@ -11,20 +11,20 @@ let(:datav3a) { file_fixture("datacite-v3a.xml").read } let(:datav4a) { file_fixture("datacite-v4a.xml").read } let(:doiv3) { "10.14454/0000-v3" } - let(:doiv3a) { "10.14454/0000-0002" } - let(:doiv4a) { "10.14454/0000-0002" } + let(:doiv3a) { "10.14454/0000-0003" } + let(:doiv4a) { "10.14454/0000-0003" } context "versions" do subject { MetadataController } - it "should not register metadata" do + it "should not register invalid version of metadata" do options = { data: datav3, username: username, password: password } response = subject.create_metadata(doiv3, options) expect(response.status).to eq(422) expect(response.body.dig("errors")).to eq([{"status"=>422, "title"=>"DOI 10.14454/0000-v3: Schema http://datacite.org/schema/kernel-3 is no longer supported"}]) end - it "should get v3 and update registered metadata as v4" do + it "should get v3 metadata and update registered metadata as v4" do options = { username: username, password: password } expect(subject.get_metadata(doiv3a, options).body.dig("data")).to eq(datav3a.strip) diff --git a/spec/fixtures/files/datacite-v3.xml b/spec/fixtures/files/datacite-v3.xml new file mode 100644 index 0000000..9ef08d8 --- /dev/null +++ b/spec/fixtures/files/datacite-v3.xml @@ -0,0 +1,40 @@ + + + 10.14454/0000-0003 + + + Fenner, Martin + Martin + Fenner + 0000-0003-1419-2405 + + + + Eating your own Dog Food + + DataCite + 2016 + BlogPosting + + MS-49-3632-5083 + + + datacite + doi + metadata + + + 2016-12-20 + 2016-12-20 + 2016-12-20 + + + 10.5438/0012 + 10.5438/55E5-T5C0 + 10.5438/0000-00SS + + 1.0 + + 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... + + diff --git a/spec/fixtures/files/datacite-v3a.xml b/spec/fixtures/files/datacite-v3a.xml new file mode 100644 index 0000000..69b2e30 --- /dev/null +++ b/spec/fixtures/files/datacite-v3a.xml @@ -0,0 +1,40 @@ + + + 10.14454/0000-0003 + + + Travolta, John + John + Travolta + + + X, Mr + Mr + X + + + Mozart, Wolfgang Amadeus + Wolfgang Amadeus + Mozart + + + + Test Title + + University of Illinois at Chicago + 2024 + + + Durham University + + + Durham University + + + Durham University + + + + + + \ No newline at end of file diff --git a/spec/fixtures/files/datacite-v4a.xml b/spec/fixtures/files/datacite-v4a.xml new file mode 100644 index 0000000..aaf1e75 --- /dev/null +++ b/spec/fixtures/files/datacite-v4a.xml @@ -0,0 +1,44 @@ + + + 10.14454/0000-0003 + + + Travolta, John + John + Travolta + + + X, Mr + Mr + X + + + Mozart, Wolfgang Amadeus + Wolfgang Amadeus + Mozart + + + + Test Title + + Census Data + University of Illinois at Chicago + 2024 + + + Durham University + + + Durham University + + + + + Durham University + https://doi.org/10.13039/501100001314 + + + + + + \ No newline at end of file diff --git a/spec/fixtures/vcr_cassettes/Metadatable/versions/should_get_v3_metadata_and_update_registered_metadata_as_v4.yml b/spec/fixtures/vcr_cassettes/Metadatable/versions/should_get_v3_metadata_and_update_registered_metadata_as_v4.yml new file mode 100644 index 0000000..acf1891 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Metadatable/versions/should_get_v3_metadata_and_update_registered_metadata_as_v4.yml @@ -0,0 +1,145 @@ +--- +http_interactions: +- request: + method: get + uri: https://api.stage.datacite.org/dois/10.14454/0000-0003 + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Mozilla/5.0 (compatible; Maremma/4.9.8; mailto:info@datacite.org) + Accept: + - application/vnd.datacite.datacite+xml + Authorization: + - Basic + Accept-Encoding: + - gzip,deflate + response: + status: + code: 200 + message: '' + headers: + Content-Type: + - application/vnd.datacite.datacite+xml; charset=utf-8 + Connection: + - keep-alive + Status: + - 200 OK + Cache-Control: + - max-age=0, private, must-revalidate + Vary: + - Accept,Accept-Encoding + Content-Encoding: + - gzip + Referrer-Policy: + - strict-origin-when-cross-origin + X-Permitted-Cross-Domain-Policies: + - none + X-Xss-Protection: + - '0' + X-Credential-Username: + - datacite.test + X-Request-Id: + - a48469d3-6965-48a6-9eeb-d7d3d9b8e71e + Etag: + - W/"a9852281f1a0284e03ef09289feb07ec" + X-Frame-Options: + - SAMEORIGIN + X-Runtime: + - '0.018399' + X-Content-Type-Options: + - nosniff + Date: + - Mon, 28 Oct 2024 15:48:35 GMT + X-Powered-By: + - Phusion Passenger(R) 6.0.23 + Server: + - nginx/1.18.0 + Phusion Passenger(R) 6.0.23 + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET, POST, PUT, PATCH, DELETE, OPTIONS + Access-Control-Allow-Headers: + - Accept,Access-Control-Allow-Origin,Access-Control-Expose-Headers,Access-Control-Allow-Methods,Access-Control-Allow-Headers,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With + Access-Control-Expose-Headers: + - Authorization + body: + encoding: ASCII-8BIT + string: !binary |- + H4sIAFOyH2cAA8SUXWvbMBSG7/srhK4Ty/kYjKC4jJXSjGYbW8rSS9U+tsVkKUhyPvrrp0hxlKzQdLCxgIPeN8+RX58ci15vG4HWoA1XcooHSYoRyFwVXFZT/LC47b/H19kV1WBUq3NADpdmsjV8imtrVxNCNptNshklSldkmKYDspzff89raFifS2OZzAGHqmNFwSzLuQVfYzxLfoKWIPojxxo+Cea9ypn1ud5QiA5MsJMztAEbQa/2PydbU+DsCiHKC5CWlxw0isvFbgVTfPNlhrNBmgzG43djkrpP310jSiLot8g1MKu02Ysog4r6M2sASfcVNv/q+q4kEzhbaLZWwrIe+qRqSckJf9yj4muQ3glM1B1RsoaLnbe6DSk5MUM2chbuj6Mue2iuLyXcE6/mW/79YHP1zLTtoR9KlBWTFfrQsAJacynrS/7V5OE2F+IfhR8IarkV0M2GF9kCjEWL/ZKS4PiySNJV+yS4qd2APUjuX1G7Q6pEMyG4VNwgZtHHmuesUpRE+FgaXp5HYDobpsPxgTlx/dwqaTV/ak9nN1roZB3a/Y1XtTV3ShSgcfxrIuYbctPqmjUo5nb9+A3pehbtt9z+ThnrjqaZO1m4bfdP8h9C3Lby3zz9mRGGwPBnMMQvS6UbZg/icGQ7QUl3OGe/AAAA//8DAED7AvXOBQAA + http_version: + recorded_at: Mon, 28 Oct 2024 15:48:35 GMT +- request: + method: put + uri: https://api.stage.datacite.org/dois/10.14454/0000-0003 + body: + encoding: UTF-8 + string: '{"data":{"type":"dois","attributes":{"doi":"10.14454/0000-0003","xml":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHJlc291cmNlIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhtbG5zPSJodHRwOi8vZGF0YWNpdGUub3JnL3NjaGVtYS9rZXJuZWwtNCIgeHNpOnNjaGVtYUxvY2F0aW9uPSJodHRwOi8vZGF0YWNpdGUub3JnL3NjaGVtYS9rZXJuZWwtNCBodHRwOi8vc2NoZW1hLmRhdGFjaXRlLm9yZy9tZXRhL2tlcm5lbC00L21ldGFkYXRhLnhzZCI+CiAgPGlkZW50aWZpZXIgaWRlbnRpZmllclR5cGU9IkRPSSI+MTAuMTQ0NTQvMDAwMC0wMDAzPC9pZGVudGlmaWVyPgogIDxjcmVhdG9ycz4KICAgIDxjcmVhdG9yPgogICAgICA8Y3JlYXRvck5hbWUgbmFtZVR5cGU9IlBlcnNvbmFsIj5UcmF2b2x0YSwgSm9objwvY3JlYXRvck5hbWU+CiAgICAgIDxnaXZlbk5hbWU+Sm9objwvZ2l2ZW5OYW1lPgogICAgICA8ZmFtaWx5TmFtZT5UcmF2b2x0YTwvZmFtaWx5TmFtZT4KICAgIDwvY3JlYXRvcj4KICAgIDxjcmVhdG9yPgogICAgICA8Y3JlYXRvck5hbWUgbmFtZVR5cGU9IlBlcnNvbmFsIj5YLCBNcjwvY3JlYXRvck5hbWU+CiAgICAgIDxnaXZlbk5hbWU+T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zPgogICAgPGZ1bmRpbmdSZWZlcmVuY2U+CiAgICAgIDxmdW5kZXJOYW1lPkR1cmhhbSBVbml2ZXJzaXR5PC9mdW5kZXJOYW1lPgogICAgICA8ZnVuZGVySWRlbnRpZmllciBmdW5kZXJJZGVudGlmaWVyVHlwZT0iQ3Jvc3NyZWYgRnVuZGVyIElEIj5odHRwczovL2RvaS5vcmcvMTAuMTMwMzkvNTAxMTAwMDAxMzE0PC9mdW5kZXJJZGVudGlmaWVyPgogICAgPC9mdW5kaW5nUmVmZXJlbmNlPgogIDwvZnVuZGluZ1JlZmVyZW5jZXM+CiAgPHNpemVzLz4KICA8Zm9ybWF0cy8+CiAgPHZlcnNpb24vPgo8L3Jlc291cmNlPg==","should_validate":"true","source":"mds","event":"show"},"relationships":{"client":{"data":{"type":"clients","id":"datacite.test"}}}}}' + headers: + User-Agent: + - Mozilla/5.0 (compatible; Maremma/4.9.8; mailto:info@datacite.org) + Accept: + - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 + Content-Type: + - application/vnd.api+json + Authorization: + - Basic + Accept-Encoding: + - gzip,deflate + response: + status: + code: 200 + message: '' + headers: + Content-Type: + - application/json; charset=utf-8 + Connection: + - keep-alive + Status: + - 200 OK + Cache-Control: + - max-age=0, private, must-revalidate + Vary: + - Accept-Encoding + Content-Encoding: + - gzip + Referrer-Policy: + - strict-origin-when-cross-origin + X-Permitted-Cross-Domain-Policies: + - none + X-Xss-Protection: + - '0' + X-Credential-Username: + - datacite.test + X-Request-Id: + - 59692e83-2278-4579-bd06-b6b7341c78ef + Etag: + - W/"dac1b5bc1fffd0dff62447d2033c31f6" + X-Frame-Options: + - SAMEORIGIN + X-Runtime: + - '0.257396' + X-Content-Type-Options: + - nosniff + Date: + - Mon, 28 Oct 2024 15:48:35 GMT + X-Powered-By: + - Phusion Passenger(R) 6.0.23 + Server: + - nginx/1.18.0 + Phusion Passenger(R) 6.0.23 + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET, POST, PUT, PATCH, DELETE, OPTIONS + Access-Control-Allow-Headers: + - Accept,Access-Control-Allow-Origin,Access-Control-Expose-Headers,Access-Control-Allow-Methods,Access-Control-Allow-Headers,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With + Access-Control-Expose-Headers: + - Authorization + body: + encoding: ASCII-8BIT + string: !binary |- + H4sIAFOyH2cAA7wYa2+ySvqvGL+evm8BZaNNzge1VXGVWkUQNvthgBFGh0tgwEvT/77PcKlo++6ek7xZk6bOc7/PM763XcRQ++m9Tdz2U1sUfordrtx9FODzA/467Yc2O8cYcG5EUjghxhJiZwynnAuAv2KLE7wjpwYWYGm2K2FNQuLikJEdwQmI/Ne/QQVlOAkRw8o9xkkwYlFxem+HKMBaadsSKKIQUZDGoQDREpRHlKGH1izyQ4B7JMehWiIr0A4FhJ7VWwbuIhhJCWIkCku1XOadLR8P/8OA7UNrkdzpLQA3Wre/S90iuqCEPbSMiO48FHqtQYBcnKV3FnyDvrGnFPNXjQIwI4ziMh/FVx5JnLKWVhw4RZzZlKQ+TgC1CcGWJCXs3Ip2LYVSEkJVtRBrjXziIC8CzU4UMkRCTv/+UbE7hSEmRgCUBKnLK8neY4fVdQE8RVU2awP0PWeJj4LWVW37W0e+cbchsYr5ing+S6cRdcG0Oh+/Wcc0ShkJPSWEfywrKHkIoUerGPNvQMdj0C7hFaeSphl2C2oK+c2QB9Awo7Ts36JZU8fHAXpNPG41tH2KeaYdwnCcRA5v8U+gTWyGeaMGJHXgnEDvA9NAG/ADTqMscQrVEwyZgkJsSmziATHCYZqlLY6HuAGWgtnul/DUcIaDCpKSC66+7qIkQHW2izjzIJb+JUVi5iRlJdrFqZOQmEevYvBwNI/KGqrlZaELgV7hHU5w6FTR5VCcqL/Oa0lwNR3IfMbi9OnxESbhzyjxHvm06wid/qMsiCIfc2JH7H7DWgcnidIUJmVrXOBbynORw1PAQ7p87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0as3/lSz/N6Pum4nlmgHhX1rywAd0C9Qe418fIe/mTeBa8gHqKEybocV1Krv2+vhTW3x3rqha/ZyqGc8h+vm/UKGNf2seX/U+X/rzCCufD6Y3qrih9p9gblS3IHOBe5waZWjdXV/F/fT4ri4HHJVG5zgzO+n0+LyIjRsm325q8oaKPBw34ebQA+Aju8WtJ4Fpf2wZ4gzakFdwVzaW9t6Lqgxhp6eV/1twR1sw0xzzr0KX+bVlro5yIOeufb70vvzT1iLsoTWexxfh2E72lwhAWaI76R6vfCJD9US+wkp9i++fgEZ32SLHaykeTzAKxLTH8XDs1hI+T7r8jcPSQcOg72u/bRDMCoBz8rF2k3QrlxhUXrdMGGj5tvisrFU5wQfR1EWws4plKf0FfZEjfDdsdhCo2NII+ReiWrIHWFS76BXSnCkWFa/Qu54Y3isXYn46XXXsKoM0hdAk6Z4UWO3elP8EIUfoqiJ3Sep+ySLP2F9tYpoeLBdg5Vu7X79qHOvj5Esdu8kST1NlJ+6vaeOXEqqt3/uiE/i4lHiUIK5Le+3v0R85hNePuz6I0RJnbY/+MswiXLiFu/E73mvbDVpyRhgl6AvXP/tt4+S4+Ojka30KoA/z68ZuoPzpHwHe93dAavk3NN+5uwGDp//AAAA//8DAHoKx+G7EQAA + http_version: + recorded_at: Mon, 28 Oct 2024 15:48:35 GMT +recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/Metadatable/versions/should_not_register_invalid_version_of_metadata.yml b/spec/fixtures/vcr_cassettes/Metadatable/versions/should_not_register_invalid_version_of_metadata.yml new file mode 100644 index 0000000..3daa880 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Metadatable/versions/should_not_register_invalid_version_of_metadata.yml @@ -0,0 +1,73 @@ +--- +http_interactions: +- request: + method: put + uri: https://api.stage.datacite.org/dois/10.14454/0000-v3 + body: + encoding: UTF-8 + string: '{"data":{"type":"dois","attributes":{"doi":"10.14454/0000-v3","xml":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZG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TPC9yZWxhdGVkSWRlbnRpZmllcj4KICA8L3JlbGF0ZWRJZGVudGlmaWVycz4KICA8dmVyc2lvbj4xLjA8L3ZlcnNpb24+CiAgPGRlc2NyaXB0aW9ucz4KICAgIDxkZXNjcmlwdGlvbiBkZXNjcmlwdGlvblR5cGU9IkFic3RyYWN0Ij5FYXRpbmcgeW91ciBvd24gZG9nIGZvb2QgaXMgYSBzbGFuZyB0ZXJtIHRvIGRlc2NyaWJlIHRoYXQgYW4gb3JnYW5pemF0aW9uIHNob3VsZCBpdHNlbGYgdXNlIHRoZSBwcm9kdWN0cyBhbmQgc2VydmljZXMgaXQgcHJvdmlkZXMuIEZvciBEYXRhQ2l0ZSB0aGlzIG1lYW5zIHRoYXQgd2Ugc2hvdWxkIHVzZSBET0lzIHdpdGggYXBwcm9wcmlhdGUgbWV0YWRhdGEgYW5kIHN0cmF0ZWdpZXMgZm9yIGxvbmctdGVybSBwcmVzZXJ2YXRpb24gZm9yLi4uPC9kZXNjcmlwdGlvbj4KICA8L2Rlc2NyaXB0aW9ucz4KPC9yZXNvdXJjZT4K","should_validate":"true","source":"mds","event":"show"},"relationships":{"client":{"data":{"type":"clients","id":"datacite.test"}}}}}' + headers: + User-Agent: + - Mozilla/5.0 (compatible; Maremma/4.9.8; mailto:info@datacite.org) + Accept: + - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 + Content-Type: + - application/vnd.api+json + Authorization: + - Basic + Accept-Encoding: + - gzip,deflate + response: + status: + code: 422 + message: '' + headers: + Content-Type: + - application/json; charset=utf-8 + Connection: + - keep-alive + Status: + - 422 Unprocessable Entity + Cache-Control: + - no-cache + Vary: + - Accept-Encoding + Content-Encoding: + - gzip + Referrer-Policy: + - strict-origin-when-cross-origin + X-Permitted-Cross-Domain-Policies: + - none + X-Xss-Protection: + - '0' + X-Credential-Username: + - datacite.test + X-Request-Id: + - 97889c7c-301a-4511-9159-c6fcd9c02edf + X-Runtime: + - '0.031366' + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Date: + - Mon, 28 Oct 2024 15:55:30 GMT + X-Powered-By: + - Phusion Passenger(R) 6.0.23 + Server: + - nginx/1.18.0 + Phusion Passenger(R) 6.0.23 + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET, POST, PUT, PATCH, DELETE, OPTIONS + Access-Control-Allow-Headers: + - Accept,Access-Control-Allow-Origin,Access-Control-Expose-Headers,Access-Control-Allow-Methods,Access-Control-Allow-Headers,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With + Access-Control-Expose-Headers: + - Authorization + body: + encoding: ASCII-8BIT + string: !binary |- + H4sIAPKzH2cAA1yNMQvCMBBG/8pxs21aGpfMLk4OHcWhJEcbTJNwuYhQ+t+tjn7b48H7NiTmxAXNfcOSKltCg+814AnFS/jS5XaFvmt7rc9adcea12BgtAutEywi2SjlJpmsF2oTz6r8lHoSRwrNAL5ATBBSnImh1JwTC7njoXp39P/buD/2DwAAAP//AwCX7EjimAAAAA== + http_version: + recorded_at: Mon, 28 Oct 2024 15:55:30 GMT +recorded_with: VCR 3.0.3