diff --git a/app/models/base.rb b/app/models/base.rb index 585db62e..775e07c6 100644 --- a/app/models/base.rb +++ b/app/models/base.rb @@ -154,7 +154,7 @@ def send_notification_to_slack(text, options={}) end def self.doi_from_url(url) - if /\A(?:(http|https):\/\/(dx\.)?(doi.org|handle.test.datacite.org)\/)?(doi:)?(10\.\d{4,5}\/.+)\z/.match(url) + if /\A(?:(http|https):\/\/(dx\.)?(doi.org|handle.test.datacite.org|handle.stage.datacite.org)\/)?(doi:)?(10\.\d{4,5}\/.+)\z/.match(url) uri = Addressable::URI.parse(url) uri.path.gsub(/^\//, '').downcase end diff --git a/app/models/report.rb b/app/models/report.rb index 556454da..8c0ebdbf 100644 --- a/app/models/report.rb +++ b/app/models/report.rb @@ -21,12 +21,18 @@ def initialize report, options={} def self.parse_multi_subset_report report subset = report.subsets.last - - #puts subset["checksum"] + compressed = decode_report subset["gzip"] json = decompress_report compressed dataset_array = parse_subset json - url = Rails.env.production? ? "https://api.datacite.org/reports/#{report.report_id}" : "https://api.test.datacite.org/reports/#{report.report_id}" + url = case true + when Rails.env.production? + "https://api.datacite.org/reports/#{report.report_id}" + when ENV["API_URL"].include?("test") + "https://api.test.datacite.org/reports/#{report.report_id}" + else + "https://api.stage.datacite.org/reports/#{report.report_id}" + end dataset_array.map do |dataset| args = {header: report.header, url: url} UsageUpdateParseJob.perform_later(dataset, args) diff --git a/config/application.rb b/config/application.rb index bfa2d8af..e79db4f5 100644 --- a/config/application.rb +++ b/config/application.rb @@ -35,10 +35,10 @@ ENV['CONCURRENCY'] ||= "25" ENV['GITHUB_URL'] ||= "https://github.com/datacite/levriero" ENV['ORCID_API_URL'] ||= "https://pub.orcid.org/v2.1" -ENV['API_URL'] ||= "https://api.test.datacite.org" -ENV['VOLPINO_URL'] ||= "https://api.test.datacite.org" -ENV['LAGOTTINO_URL'] ||= "https://api.test.datacite.org" -ENV['SASHIMI_QUERY_URL'] ||= "https://api.test.datacite.org" +ENV['API_URL'] ||= "https://api.stage.datacite.org" +ENV['VOLPINO_URL'] ||= "https://api.stage.datacite.org" +ENV['LAGOTTINO_URL'] ||= "https://api.stage.datacite.org" +ENV['SASHIMI_QUERY_URL'] ||= "https://api.stage.datacite.org" ENV['EVENTDATA_URL'] ||= "https://bus-staging.eventdata.crossref.org" ENV['CROSSREF_QUERY_URL'] ||= "https://api.eventdata.crossref.org" ENV['TRUSTED_IP'] ||= "10.0.40.1" diff --git a/spec/fixtures/event_data_resp_1 b/spec/fixtures/event_data_resp_1 index 3860fc6c..daf7c8b7 100644 --- a/spec/fixtures/event_data_resp_1 +++ b/spec/fixtures/event_data_resp_1 @@ -1,2 +1,2 @@ -https://api.test.datacite.org/reports/2018-3-Dash total-dataset-investigations-regular https://doi.org/10.7291/d1q94r pushed to Event Data service. -https://api.test.datacite.org/reports/2018-3-Dash unique-dataset-investigations-regular https://doi.org/10.7291/d1q94r pushed to Event Data service. +https://api.stage.datacite.org/reports/2018-3-Dash total-dataset-investigations-regular https://doi.org/10.7291/d1q94r pushed to Event Data service. +https://api.stage.datacite.org/reports/2018-3-Dash unique-dataset-investigations-regular https://doi.org/10.7291/d1q94r pushed to Event Data service. diff --git a/spec/fixtures/event_data_resp_2 b/spec/fixtures/event_data_resp_2 index 76b0b48e..b832f660 100644 --- a/spec/fixtures/event_data_resp_2 +++ b/spec/fixtures/event_data_resp_2 @@ -1,4 +1,4 @@ -https://api.test.datacite.org/reports/2018-3-Dash total-dataset-investigations-regular https://doi.org/10.7291/d1q94r had an error:\nthe server responded with status 500/\n -https://api.test.datacite.org/reports/2018-3-Dash unique-dataset-investigations-regular https://doi.org/10.7291/d1q94r had an error:\nthe server responded with status 500/\n -https://api.test.datacite.org/reports/2018-3-Dash Total-Dataset-Requests-Machine https://doi.org/10.6071/z7wc73 had an error:\nthe server responded with status 500/\n -https://api.test.datacite.org/reports/2018-3-Dash Unique-Dataset-Requests-Machine https://doi.org/10.6071/z7wc73 had an error:\nthe server responded with status 500/\n \ No newline at end of file +https://api.stage.datacite.org/reports/2018-3-Dash total-dataset-investigations-regular https://doi.org/10.7291/d1q94r had an error:\nthe server responded with status 500/\n +https://api.stage.datacite.org/reports/2018-3-Dash unique-dataset-investigations-regular https://doi.org/10.7291/d1q94r had an error:\nthe server responded with status 500/\n +https://api.stage.datacite.org/reports/2018-3-Dash Total-Dataset-Requests-Machine https://doi.org/10.6071/z7wc73 had an error:\nthe server responded with status 500/\n +https://api.stage.datacite.org/reports/2018-3-Dash Unique-Dataset-Requests-Machine https://doi.org/10.6071/z7wc73 had an error:\nthe server responded with status 500/\n \ No newline at end of file diff --git a/spec/fixtures/events_empty.json b/spec/fixtures/events_empty.json index d33d31e4..a4ebce7d 100644 --- a/spec/fixtures/events_empty.json +++ b/spec/fixtures/events_empty.json @@ -17,9 +17,9 @@ }, { "uuid": "fc6860b8-4230-41bc-8b8e-21d60e9a7d9a", "message-action": "create", - "subj-id": "https://api.test.datacite.org/reports/2018-3-Dashs", + "subj-id": "https://api.stage.datacite.org/reports/2018-3-Dashs", "subj": { - "id": "https://api.test.datacite.org/reports/2018-3-Dashs", + "id": "https://api.stage.datacite.org/reports/2018-3-Dashs", "issued": "2128-04-09" }, "total": 3, diff --git a/spec/fixtures/usage_event.json b/spec/fixtures/usage_event.json index f5566fe5..2f20a29a 100644 --- a/spec/fixtures/usage_event.json +++ b/spec/fixtures/usage_event.json @@ -1 +1 @@ -{"report_id":"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad"} \ No newline at end of file +{"report_id":"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad"} \ No newline at end of file diff --git a/spec/fixtures/usage_event_fail.json b/spec/fixtures/usage_event_fail.json index 3e529b3d..6a743e8a 100644 --- a/spec/fixtures/usage_event_fail.json +++ b/spec/fixtures/usage_event_fail.json @@ -2,7 +2,7 @@ "id": 12332423432432, "message-action": "create", "subj": { - "id": "https://api.test.datacite.org/reports/2018-3-Dash", + "id": "https://api.stage.datacite.org/reports/2018-3-Dash", "issued": "2128-04-09" }, "total": "208", diff --git a/spec/fixtures/usage_events.json b/spec/fixtures/usage_events.json index b8a22b6a..8c04cdd5 100644 --- a/spec/fixtures/usage_events.json +++ b/spec/fixtures/usage_events.json @@ -2,9 +2,9 @@ { "uuid": "a17e783b-8214-451e-9b0d-077213c2acae", "message-action": "create", - "subj-id": "https://api.test.datacite.org/reports/2018-3-Dash", + "subj-id": "https://api.stage.datacite.org/reports/2018-3-Dash", "subj": { - "id": "https://api.test.datacite.org/reports/2018-3-Dash", + "id": "https://api.stage.datacite.org/reports/2018-3-Dash", "issued": "2128-04-09" }, "total": 3, @@ -17,9 +17,9 @@ }, { "uuid": "fc6860b8-4230-41bc-8b8e-21d60e9a7d9a", "message-action": "create", - "subj-id": "https://api.test.datacite.org/reports/2018-3-Dash", + "subj-id": "https://api.stage.datacite.org/reports/2018-3-Dash", "subj": { - "id": "https://api.test.datacite.org/reports/2018-3-Dash", + "id": "https://api.stage.datacite.org/reports/2018-3-Dash", "issued": "2128-04-09" }, "total": 3, @@ -32,9 +32,9 @@ }, { "uuid": "054da0ad-9821-492e-877e-5c3adbfd5ccf", "message-action": "create", - "subj-id": "https://api.test.datacite.org/reports/2018-3-Dash", + "subj-id": "https://api.stage.datacite.org/reports/2018-3-Dash", "subj": { - "id": "https://api.test.datacite.org/reports/2018-3-Dash", + "id": "https://api.stage.datacite.org/reports/2018-3-Dash", "issued": "2128-04-09" }, "total": 254, @@ -47,9 +47,9 @@ }, { "uuid": "6d6fd620-2123-42da-91f3-6c02e63f3cec", "message-action": "create", - "subj-id": "https://api.test.datacite.org/reports/2018-3-Dash", + "subj-id": "https://api.stage.datacite.org/reports/2018-3-Dash", "subj": { - "id": "https://api.test.datacite.org/reports/2018-3-Dash", + "id": "https://api.stage.datacite.org/reports/2018-3-Dash", "issued": "2128-04-09" }, "total": 208, diff --git a/spec/fixtures/vcr_cassettes/AffiliationIdentifier/import_affiliation_identifiers/import.yml b/spec/fixtures/vcr_cassettes/AffiliationIdentifier/import_affiliation_identifiers/import.yml index ae411e89..392cf0bf 100644 --- a/spec/fixtures/vcr_cassettes/AffiliationIdentifier/import_affiliation_identifiers/import.yml +++ b/spec/fixtures/vcr_cassettes/AffiliationIdentifier/import_affiliation_identifiers/import.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.affiliation.affiliationIdentifierScheme:ROR%20AND%20updated:%5B2019-07-13T00:00:00Z%20TO%202019-07-19T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.affiliation.affiliationIdentifierScheme:ROR%20AND%20updated:%5B2019-07-13T00:00:00Z%20TO%202019-07-19T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/AffiliationIdentifier/import_affiliation_identifiers/import_zero.yml b/spec/fixtures/vcr_cassettes/AffiliationIdentifier/import_affiliation_identifiers/import_zero.yml index 77567a5a..23cbd479 100644 --- a/spec/fixtures/vcr_cassettes/AffiliationIdentifier/import_affiliation_identifiers/import_zero.yml +++ b/spec/fixtures/vcr_cassettes/AffiliationIdentifier/import_affiliation_identifiers/import_zero.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.affiliation.affiliationIdentifierScheme:ROR%20AND%20updated:%5B2019-07-01T00:00:00Z%20TO%202019-07-01T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.affiliation.affiliationIdentifierScheme:ROR%20AND%20updated:%5B2019-07-01T00:00:00Z%20TO%202019-07-01T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/AffiliationIdentifier/import_affiliation_identifiers/push_item.yml b/spec/fixtures/vcr_cassettes/AffiliationIdentifier/import_affiliation_identifiers/push_item.yml index a9a1e563..6e8e87d0 100644 --- a/spec/fixtures/vcr_cassettes/AffiliationIdentifier/import_affiliation_identifiers/push_item.yml +++ b/spec/fixtures/vcr_cassettes/AffiliationIdentifier/import_affiliation_identifiers/push_item.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois/10.14454/cne7-ar31?affiliation=true + uri: https://api.stage.datacite.org/dois/10.14454/cne7-ar31?affiliation=true body: encoding: US-ASCII string: '' @@ -52,7 +52,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:56:48 GMT - request: method: get - uri: https://api.test.datacite.org/dois/10.14454/cne7-ar31 + uri: https://api.stage.datacite.org/dois/10.14454/cne7-ar31 body: encoding: US-ASCII string: '' @@ -207,7 +207,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:56:49 GMT - request: method: post - uri: https://api.test.datacite.org/events + uri: https://api.stage.datacite.org/events body: encoding: UTF-8 string: '{"data":{"type":"events","attributes":{"messageAction":"create","subjId":"https://doi.org/10.14454/cne7-ar31","objId":"https://ror.org/04wxnsj81","relationTypeId":"is-authored-at","sourceId":"datacite-affiliation","sourceToken":"847ec89c-1f0e-4e37-9319-bd8b11b16edd","occurredAt":"2020-04-11T16:01:09.000Z","timestamp":"2020-04-13T15:56:49Z","license":"https://creativecommons.org/publicdomain/zero/1.0/","subj":{"@id":"https://doi.org/10.14454/cne7-ar31","@type":"ScholarlyArticle","datePublished":"2019-03-20T07:17:52.792Z","proxyIdentifiers":["10.5438/0000-00ss"],"registrantId":"datacite.datacite.datacite"},"obj":{"@id":"https://ror.org/04wxnsj81","@type":"Organization","name":"DataCite","location":{"type":"postalAddress","addressCountry":"Germany"}}}}}' @@ -261,7 +261,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:56:49 GMT - request: method: post - uri: https://api.test.datacite.org/events + uri: https://api.stage.datacite.org/events body: encoding: UTF-8 string: '{"data":{"type":"events","attributes":{"messageAction":"create","subjId":"https://doi.org/10.14454/cne7-ar31","objId":"https://ror.org/02e2c7k09","relationTypeId":"is-authored-at","sourceId":"datacite-affiliation","sourceToken":"847ec89c-1f0e-4e37-9319-bd8b11b16edd","occurredAt":"2020-04-11T16:01:09.000Z","timestamp":"2020-04-13T15:56:49Z","license":"https://creativecommons.org/publicdomain/zero/1.0/","subj":{"@id":"https://doi.org/10.14454/cne7-ar31","@type":"ScholarlyArticle","datePublished":"2019-03-20T07:17:52.792Z","proxyIdentifiers":["10.5438/0000-00ss"],"registrantId":"datacite.datacite.datacite"},"obj":{"@id":"https://ror.org/02e2c7k09","@type":"Organization","name":"Delft diff --git a/spec/fixtures/vcr_cassettes/Base/get_crossref_metadata/fetch_crossref_metadata.yml b/spec/fixtures/vcr_cassettes/Base/get_crossref_metadata/fetch_crossref_metadata.yml index 3138ce74..d6e10a71 100644 --- a/spec/fixtures/vcr_cassettes/Base/get_crossref_metadata/fetch_crossref_metadata.yml +++ b/spec/fixtures/vcr_cassettes/Base/get_crossref_metadata/fetch_crossref_metadata.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois/10.1055/s-0030-1259729 + uri: https://api.stage.datacite.org/dois/10.1055/s-0030-1259729 body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/Base/get_datacite_json/fetch_metadata_dataset.yml b/spec/fixtures/vcr_cassettes/Base/get_datacite_json/fetch_metadata_dataset.yml index 2d0be680..8f7cc599 100644 --- a/spec/fixtures/vcr_cassettes/Base/get_datacite_json/fetch_metadata_dataset.yml +++ b/spec/fixtures/vcr_cassettes/Base/get_datacite_json/fetch_metadata_dataset.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois/10.4124/ccvcn4z?affiliation=true + uri: https://api.stage.datacite.org/dois/10.4124/ccvcn4z?affiliation=true body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/Base/get_datacite_json/fetch_metadata_scholarly-article.yml b/spec/fixtures/vcr_cassettes/Base/get_datacite_json/fetch_metadata_scholarly-article.yml index 83fa0dfe..c67740a8 100644 --- a/spec/fixtures/vcr_cassettes/Base/get_datacite_json/fetch_metadata_scholarly-article.yml +++ b/spec/fixtures/vcr_cassettes/Base/get_datacite_json/fetch_metadata_scholarly-article.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois/10.5438/mk65-3m12?affiliation=true + uri: https://api.stage.datacite.org/dois/10.5438/mk65-3m12?affiliation=true body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/Base/get_datacite_metadata/fetch_metadata_ScholarlyArticle.yml b/spec/fixtures/vcr_cassettes/Base/get_datacite_metadata/fetch_metadata_ScholarlyArticle.yml index f92b591c..d03e1e56 100644 --- a/spec/fixtures/vcr_cassettes/Base/get_datacite_metadata/fetch_metadata_ScholarlyArticle.yml +++ b/spec/fixtures/vcr_cassettes/Base/get_datacite_metadata/fetch_metadata_ScholarlyArticle.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois/10.5438/mk65-3m12 + uri: https://api.stage.datacite.org/dois/10.5438/mk65-3m12 body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/Base/get_datacite_metadata/fetch_metadata_dataset.yml b/spec/fixtures/vcr_cassettes/Base/get_datacite_metadata/fetch_metadata_dataset.yml index cb044c08..3cfb947a 100644 --- a/spec/fixtures/vcr_cassettes/Base/get_datacite_metadata/fetch_metadata_dataset.yml +++ b/spec/fixtures/vcr_cassettes/Base/get_datacite_metadata/fetch_metadata_dataset.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois/10.4124/ccvcn4z + uri: https://api.stage.datacite.org/dois/10.4124/ccvcn4z body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/Base/get_datacite_metadata/fetch_metadata_with_author_information.yml b/spec/fixtures/vcr_cassettes/Base/get_datacite_metadata/fetch_metadata_with_author_information.yml index 722410bb..e2fb0618 100644 --- a/spec/fixtures/vcr_cassettes/Base/get_datacite_metadata/fetch_metadata_with_author_information.yml +++ b/spec/fixtures/vcr_cassettes/Base/get_datacite_metadata/fetch_metadata_with_author_information.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois/10.17863/cam.10441 + uri: https://api.stage.datacite.org/dois/10.17863/cam.10441 body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/Base/get_datacite_metadata/fetch_metadata_with_funding_information.yml b/spec/fixtures/vcr_cassettes/Base/get_datacite_metadata/fetch_metadata_with_funding_information.yml index dee2f1ae..a51ff061 100644 --- a/spec/fixtures/vcr_cassettes/Base/get_datacite_metadata/fetch_metadata_with_funding_information.yml +++ b/spec/fixtures/vcr_cassettes/Base/get_datacite_metadata/fetch_metadata_with_funding_information.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois/10.70112/d7svvt + uri: https://api.stage.datacite.org/dois/10.70112/d7svvt body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/Base/get_datacite_xml/fetch_metadata_dataset.yml b/spec/fixtures/vcr_cassettes/Base/get_datacite_xml/fetch_metadata_dataset.yml index 257182b1..738105bb 100644 --- a/spec/fixtures/vcr_cassettes/Base/get_datacite_xml/fetch_metadata_dataset.yml +++ b/spec/fixtures/vcr_cassettes/Base/get_datacite_xml/fetch_metadata_dataset.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois/10.4124/ccvcn4z + uri: https://api.stage.datacite.org/dois/10.4124/ccvcn4z body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/Base/get_datacite_xml/fetch_metadata_scholarly-article.yml b/spec/fixtures/vcr_cassettes/Base/get_datacite_xml/fetch_metadata_scholarly-article.yml index 79ae45b8..f3c96ed5 100644 --- a/spec/fixtures/vcr_cassettes/Base/get_datacite_xml/fetch_metadata_scholarly-article.yml +++ b/spec/fixtures/vcr_cassettes/Base/get_datacite_xml/fetch_metadata_scholarly-article.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois/10.5438/mk65-3m12 + uri: https://api.stage.datacite.org/dois/10.5438/mk65-3m12 body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/Base/get_orcid_metadata/fetch_orcid_metadata.yml b/spec/fixtures/vcr_cassettes/Base/get_orcid_metadata/fetch_orcid_metadata.yml index 7af9e7e3..39b80ec9 100644 --- a/spec/fixtures/vcr_cassettes/Base/get_orcid_metadata/fetch_orcid_metadata.yml +++ b/spec/fixtures/vcr_cassettes/Base/get_orcid_metadata/fetch_orcid_metadata.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/users/0000-0002-2203-2076 + uri: https://api.stage.datacite.org/users/0000-0002-2203-2076 body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/CrossrefFunder/import_crossref_funder/push_item.yml b/spec/fixtures/vcr_cassettes/CrossrefFunder/import_crossref_funder/push_item.yml index 7df9f960..64ecca4d 100644 --- a/spec/fixtures/vcr_cassettes/CrossrefFunder/import_crossref_funder/push_item.yml +++ b/spec/fixtures/vcr_cassettes/CrossrefFunder/import_crossref_funder/push_item.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois/10.1039/c8cc06410e + uri: https://api.stage.datacite.org/dois/10.1039/c8cc06410e body: encoding: US-ASCII string: '' @@ -180,7 +180,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:46:21 GMT - request: method: get - uri: https://api.test.datacite.org/dois/10.13039/501100001659 + uri: https://api.stage.datacite.org/dois/10.13039/501100001659 body: encoding: US-ASCII string: '' @@ -226,7 +226,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:46:21 GMT - request: method: put - uri: https://api.test.datacite.org/dois/10.13039/501100001659 + uri: https://api.stage.datacite.org/dois/10.13039/501100001659 body: encoding: UTF-8 string: '{"data":{"type":"dois","attributes":{"xml":"aHR0cHM6Ly9kb2kub3JnLzEwLjEzMDM5LzUwMTEwMDAwMTY1OQ==","source":"levriero","event":"publish"},"relationships":{"client":{"data":{"type":"clients","id":"crossref.citations"}}}}}' @@ -276,7 +276,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:46:22 GMT - request: method: post - uri: https://api.test.datacite.org/events + uri: https://api.stage.datacite.org/events body: encoding: UTF-8 string: '{"data":{"type":"events","attributes":{"messageAction":"create","subjId":"https://doi.org/10.1039/c8cc06410e","objId":"https://doi.org/10.13039/501100001659","relationTypeId":"is-funded-by","sourceId":"crossref-funder","sourceToken":"736c91da-ae6a-474d-b08c-c2570a5532b7","occurredAt":"2015-10-05T10:01:19Z","timestamp":"2020-04-13T15:46:22Z","license":"https://creativecommons.org/publicdomain/zero/1.0/","subj":{"@id":"https://doi.org/10.1039/c8cc06410e","@type":"ScholarlyArticle","datePublished":"2019","proxyIdentifiers":["1364-548X"],"registrantId":"crossref.292"},"obj":{}}}}' diff --git a/spec/fixtures/vcr_cassettes/CrossrefImport/import_crossref_import/push_item.yml b/spec/fixtures/vcr_cassettes/CrossrefImport/import_crossref_import/push_item.yml index 6681183f..81264660 100644 --- a/spec/fixtures/vcr_cassettes/CrossrefImport/import_crossref_import/push_item.yml +++ b/spec/fixtures/vcr_cassettes/CrossrefImport/import_crossref_import/push_item.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois/10.1021/jp036075h + uri: https://api.stage.datacite.org/dois/10.1021/jp036075h body: encoding: US-ASCII string: '' @@ -102,7 +102,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 16:34:40 GMT - request: method: post - uri: https://api.test.datacite.org/events + uri: https://api.stage.datacite.org/events body: encoding: UTF-8 string: '{"data":{"type":"events","id":"35ec67ae-fe3a-4eb7-b4fd-9c8c6be54aca","attributes":{"messageAction":"create","subjId":"https://doi.org/10.1021/jp036075h","objId":null,"relationTypeId":"","sourceId":"crossref-import","sourceToken":"652dd75f-d3de-4371-b545-f505c7a29511","occurredAt":"2015-10-05T10:01:19Z","timestamp":"2020-04-13T16:34:40Z","license":"https://creativecommons.org/publicdomain/zero/1.0/","subj":{"@id":"https://doi.org/10.1021/jp036075h","@type":"ScholarlyArticle","datePublished":"2004-01","proxyIdentifiers":["1520-5207"],"registrantId":"crossref.316"},"obj":{}}}}' diff --git a/spec/fixtures/vcr_cassettes/CrossrefImport/import_crossref_import/push_orcid_items.yml b/spec/fixtures/vcr_cassettes/CrossrefImport/import_crossref_import/push_orcid_items.yml new file mode 100644 index 00000000..2967236a --- /dev/null +++ b/spec/fixtures/vcr_cassettes/CrossrefImport/import_crossref_import/push_orcid_items.yml @@ -0,0 +1,318 @@ +--- +http_interactions: +- request: + method: get + uri: https://api.stage.datacite.org/dois/10.1039/c5ee02393a + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Mozilla/5.0 (compatible; Maremma/4.6.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 + Accept-Encoding: + - gzip,deflate + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 28 May 2020 10:41:19 GMT + Content-Type: + - application/json; charset=utf-8 + Connection: + - keep-alive + Status: + - 200 OK + X-Anonymous-Consumer: + - 'true' + Cache-Control: + - max-age=0, private, must-revalidate + Vary: + - Accept-Encoding, Origin + Content-Encoding: + - gzip + Etag: + - W/"3009842186b45f718abb3d8ed75bd440" + X-Runtime: + - '0.069073' + X-Request-Id: + - '09f04e9d-eae5-4d5f-b6f8-0cfd040fc4b1' + X-Powered-By: + - Phusion Passenger 6.0.4 + Server: +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SwI8g3hfYQxLqHved3Y5ZFOc5+NlzoB8qkOOwLUIYm935gv3/w1bn7WBI6zd97bsSIC+Tc03W2vX7UtZ0ZbVcnNe9zTh8R50sFKr4IVj9CA2VNRb5GzbnMsFxsCzhpbVHoGzEEvFepsXv9+bwZjsYBPY6Ky17mwNOFLIMxn4TcTzWpinsT+ML3OzryD+KZkrCcyvUnC428khJ69N8A1y+1nGmIJPGgbMQ1dpqoFOyCkOYLZaqHQJfsUzgeV6Jqx2HK1v+pMNxlkI9i1hfcSzUhvAewXfgfsgY7cODObj9UB1RFgr1vi7E2/JG00qXH+y4+4pr38Ce5fP+R3jZfbMZ+SmKsKczADkVrDGAP2HWC/WEcwJR+etYSyFmCtyL6zXLJ7rQ24t1C3k28d4n0PQP7Peo73wwUbI12ALXcz7LGlyzgLyvAbcAbyTImYgBiAnnYydeqvyPGO3xkG/UJ83HDLvF/4ucuD78PnW+veqhsBzlyfn/KaVL1efrtIIf6Ee/7LF59vbLXX91U0UG8Uft/j31kj616bYbhd/M6S+e1e35SczHFO+2QXfKoB/DUXZv/CF3b8s+tCyF47d8CXTheyyz+3KinyLXuO74MpXNkN3aq0j14qC4u3fdSNx19CaRKkFfZLyldhPrm/iO8uLN9SQ+PlFM2vX2jTxnQ2FIfgtHq2taOri68CLN88EG58GxHzutG950THav3jguScYX7yh4HXLi7EhiZLnTmHx2uojq0pgXjUc9yn+0oqFf12GZ3n2muWv2eqUYz9Xap9ZfC0XqxVTt904ASvN/fT3r14vBxZvSk137wb/BUn7V3DjRBw3LN4WblAX/37E559P/9aNEQVxDNDcHGZ+dfhbN+WQ+OrrV6SF6ZJXo3/pL+WUI75+PUI+fhbwlx+/HqH9oh0Bfqtt9PSicQf0y74H/E/a4d//AQAA//8DADm5Y5npZwAA + http_version: null + recorded_at: Thu, 28 May 2020 10:41:19 GMT +- request: + method: get + uri: https://api.crossref.org/works/10.1039/c5ee02393a?mailto=info@datacite.org + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Mozilla/5.0 (compatible; Maremma/4.6.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 + Accept-Encoding: + - gzip,deflate + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - application/json;charset=UTF-8 + Vary: + - Accept + Access-Control-Allow-Origin: + - "*" + Access-Control-Allow-Headers: + - X-Requested-With + Content-Length: + - '16404' + Server: + - http-kit + Date: + - Thu, 28 May 2020 10:41:20 GMT + X-Rate-Limit-Limit: + - '50' + X-Rate-Limit-Interval: + - 1s + Connection: + - close + body: + encoding: ASCII-8BIT + string: '{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2020,5,13]],"date-time":"2020-05-13T05:43:35Z","timestamp":1589348615369},"reference-count":50,"publisher":"Royal + Society of Chemistry (RSC)","issue":"1","content-domain":{"domain":["rsc.org"],"crossmark-restriction":true},"short-container-title":["Energy + Environ. Sci."],"abstract":"

Bias-free solar water splitting is demonstrated + using thin film silicon based triple and quadruple junction solar cells with + solar-to-hydrogen efficiencies up to 9.5%.<\/p>","DOI":"10.1039\/c5ee02393a","type":"journal-article","created":{"date-parts":[[2015,10,5]],"date-time":"2015-10-05T10:01:19Z","timestamp":1444039279000},"page":"145-154","update-policy":"http:\/\/dx.doi.org\/10.1039\/rsc_crossmark_policy","source":"Crossref","is-referenced-by-count":72,"title":["Multijunction + Si photocathodes with tunable photovoltages from 2.0 V to 2.8 V for light + induced water splitting"],"prefix":"10.1039","volume":"9","author":[{"ORCID":"http:\/\/orcid.org\/0000-0001-5423-6818","authenticated-orcid":false,"given":"F\u00e9lix","family":"Urbain","sequence":"first","affiliation":[{"name":"IEK-5 + Photovoltaik"},{"name":"Forschungszentrum J\u00fclich"},{"name":"J\u00fclich"},{"name":"Germany"}]},{"given":"Vladimir","family":"Smirnov","sequence":"additional","affiliation":[{"name":"IEK-5 + Photovoltaik"},{"name":"Forschungszentrum J\u00fclich"},{"name":"J\u00fclich"},{"name":"Germany"}]},{"given":"Jan-Philipp","family":"Becker","sequence":"additional","affiliation":[{"name":"IEK-5 + Photovoltaik"},{"name":"Forschungszentrum J\u00fclich"},{"name":"J\u00fclich"},{"name":"Germany"}]},{"given":"Andreas","family":"Lambertz","sequence":"additional","affiliation":[{"name":"IEK-5 + Photovoltaik"},{"name":"Forschungszentrum J\u00fclich"},{"name":"J\u00fclich"},{"name":"Germany"}]},{"given":"Florent","family":"Yang","sequence":"additional","affiliation":[{"name":"Institute + of Materials Science"},{"name":"TU Darmstadt"},{"name":"Darmstadt"},{"name":"Germany"}]},{"given":"J\u00fcrgen","family":"Ziegler","sequence":"additional","affiliation":[{"name":"Institute + of Materials Science"},{"name":"TU Darmstadt"},{"name":"Darmstadt"},{"name":"Germany"}]},{"given":"Bernhard","family":"Kaiser","sequence":"additional","affiliation":[{"name":"Institute + of Materials Science"},{"name":"TU Darmstadt"},{"name":"Darmstadt"},{"name":"Germany"}]},{"given":"Wolfram","family":"Jaegermann","sequence":"additional","affiliation":[{"name":"Institute + of Materials Science"},{"name":"TU Darmstadt"},{"name":"Darmstadt"},{"name":"Germany"}]},{"given":"Uwe","family":"Rau","sequence":"additional","affiliation":[{"name":"IEK-5 + Photovoltaik"},{"name":"Forschungszentrum J\u00fclich"},{"name":"J\u00fclich"},{"name":"Germany"}]},{"given":"Friedhelm","family":"Finger","sequence":"additional","affiliation":[{"name":"IEK-5 + Photovoltaik"},{"name":"Forschungszentrum J\u00fclich"},{"name":"J\u00fclich"},{"name":"Germany"}]}],"member":"292","published-online":{"date-parts":[[2016]]},"reference":[{"key":"C5EE02393A-(cit1)\/*[position()=1]","author":"Cook","volume":"110","first-page":"6474","year":"2010","journal-title":"Chem. + Rev.","DOI":"10.1021\/cr100246c","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit2)\/*[position()=1]","author":"Grimes","year":"2008","unstructured":"C. + A.\n Grimes\n , O. K.Varghese and S.Ranjan, Light, water, + hydrogen: the solar generation of hydrogen by water photoelectrolysis, Springer, + New York, 2008","volume-title":"Light, water, hydrogen: the solar generation + of hydrogen by water photoelectrolysis","DOI":"10.1007\/978-0-387-68238-9","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit3)\/*[position()=1]","author":"Nozik","volume":"100","first-page":"13061","year":"1996","journal-title":"J. + Phys. Chem.","DOI":"10.1021\/jp953720e","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit4)\/*[position()=1]","author":"Miller","year":"2013","unstructured":"E.\n Miller\n , + White Papers on Materials for Photoelectrochemical Water Splitting, DOE PEC + Working Group, 2013","volume-title":"White Papers on Materials for Photoelectrochemical + Water Splitting"},{"key":"C5EE02393A-(cit5)\/*[position()=1]","author":"Li","volume":"6","first-page":"347","year":"2013","journal-title":"Energy + Environ. Sci.","DOI":"10.1039\/C2EE22618A","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit6)\/*[position()=1]","author":"Memming","year":"2002","unstructured":"R.\n Memming\n , + Semiconductor Electrochemistry, Wiley VCH, 2002","volume-title":"Semiconductor + Electrochemistry"},{"key":"C5EE02393A-(cit7)\/*[position()=1]","author":"Nielander","volume":"8","first-page":"16","year":"2015","journal-title":"Energy + Environ. Sci.","DOI":"10.1039\/C4EE02251C","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit8)\/*[position()=1]","author":"Parkinson","volume":"17","first-page":"431","year":"1984","journal-title":"Acc. + Chem. Res.","DOI":"10.1021\/ar00108a004","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit9)\/*[position()=1]","author":"Urbain","volume":"2014","first-page":"249317","year":"2014","journal-title":"Int. + J. Photoenergy","DOI":"10.1155\/2014\/249317","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit10)\/*[position()=1]","author":"Abdi","volume":"4","first-page":"2195","year":"2013","journal-title":"Nat. + Commun.","DOI":"10.1038\/ncomms3195","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit11)\/*[position()=1]","author":"Ager","volume":"8","first-page":"2811","year":"2015","journal-title":"Energy + Environ. Sci.","DOI":"10.1039\/C5EE00457H","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit12)\/*[position()=1]","author":"Urbain","volume":"140","first-page":"275","year":"2015","journal-title":"Sol. + Energy Mater. Sol. Cells","DOI":"10.1016\/j.solmat.2015.04.013","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit13)\/*[position()=1]","author":"Mills","volume":"112","first-page":"148304","year":"2014","journal-title":"Phys. + Rev. Lett.","DOI":"10.1103\/PhysRevLett.112.148304","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit14)\/*[position()=1]","author":"Huang","volume":"39","first-page":"16220","year":"2014","journal-title":"Int. + J. Hydrogen Energy","DOI":"10.1016\/j.ijhydene.2013.12.162","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit15)\/*[position()=1]","author":"Delahoy","volume":"10","first-page":"113","year":"1985","journal-title":"Int. + J. Hydrogen Energy","DOI":"10.1016\/0360-3199(85)90043-6","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit16)\/*[position()=1]","author":"Reece","volume":"334","first-page":"645","year":"2003","journal-title":"Science","DOI":"10.1126\/science.1209816","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit17)\/*[position()=1]","author":"Cristino","volume":"15","first-page":"13083","year":"2013","journal-title":"Phys. + Chem. Chem. Phys.","DOI":"10.1039\/c3cp52237g","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit18)\/*[position()=1]","author":"Han","volume":"3","first-page":"4155","year":"2015","journal-title":"J. + Mater. Chem. A","DOI":"10.1039\/C4TA05523C","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit19)\/*[position()=1]","author":"Rocheleau","volume":"12","first-page":"3","year":"1998","journal-title":"Energy + Fuels","DOI":"10.1021\/ef9701347","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit20)\/*[position()=1]","author":"Khaselev","volume":"26","first-page":"127","year":"2001","journal-title":"Int. + J. Hydrogen Energy","DOI":"10.1016\/S0360-3199(00)00039-2","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit21)\/*[position()=1]","author":"Fujii","volume":"38","first-page":"14424","year":"2013","journal-title":"Int. + J. Hydrogen Energy","DOI":"10.1016\/j.ijhydene.2013.07.010","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit22)\/*[position()=1]","author":"Jacobsson","volume":"6","first-page":"3676","year":"2013","journal-title":"Energy + Environ. Sci.","DOI":"10.1039\/c3ee42519c","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit23)\/*[position()=1]","author":"Cox","volume":"111","first-page":"14057","year":"2014","journal-title":"Proc. + Natl. Acad. Sci. U. S. A.","DOI":"10.1073\/pnas.1414290111","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit24)\/*[position()=1]","author":"Luo","volume":"345","first-page":"1593","year":"2014","journal-title":"Science","DOI":"10.1126\/science.1258307","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit25)\/*[position()=1]","author":"Finger","volume":"150","first-page":"300","year":"2003","journal-title":"IEE + Proc., Part I: Solid-State Electron Devices"},{"key":"C5EE02393A-(cit26)\/*[position()=1]","author":"Urbain","volume":"29","first-page":"2605","year":"2014","journal-title":"J. + Mater. Res.","DOI":"10.1557\/jmr.2014.308","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit27)\/*[position()=1]","author":"Lambertz","volume":"119","first-page":"134","year":"2013","journal-title":"Sol. + Energy Mater. Sol. Cells","DOI":"10.1016\/j.solmat.2013.05.053","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit28)\/*[position()=1]","author":"Hu","volume":"344","first-page":"1005","year":"2014","journal-title":"Science","DOI":"10.1126\/science.1251428","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit29)\/*[position()=1]","author":"Kenney","volume":"342","first-page":"836","year":"2014","journal-title":"Science","DOI":"10.1126\/science.1241327","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit30)\/*[position()=1]","author":"Mei","volume":"5","first-page":"1948","year":"2014","journal-title":"J. + Phys. Chem. Lett.","DOI":"10.1021\/jz500865g","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit31)\/*[position()=1]","author":"Kelly","volume":"31","first-page":"1658","year":"2006","journal-title":"Int. + J. Hydrogen Energy","DOI":"10.1016\/j.ijhydene.2005.12.014","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit32)\/*[position()=1]","author":"B\u00f6ttler","volume":"209","first-page":"1144","year":"2012","journal-title":"Phys. + Status Solidi A","DOI":"10.1002\/pssa.201127676","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit33)\/*[position()=1]","author":"Ulbrich","volume":"21","first-page":"1672","year":"2013","journal-title":"Prog. + Photovoltaics","DOI":"10.1002\/pip.2249","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit34)\/*[position()=1]","author":"Hodes","volume":"3","first-page":"1208","year":"2012","journal-title":"J. + Phys. Chem. Lett.","DOI":"10.1021\/jz300220b","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit35)\/*[position()=1]","author":"Smirnov","volume":"92","first-page":"932","year":"2014","journal-title":"Can. + J. Phys.","DOI":"10.1139\/cjp-2013-0640","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit36)\/*[position()=1]","author":"Kirner","volume":"9","first-page":"2145","year":"2012","journal-title":"Phys. + Status Solidi C","DOI":"10.1002\/pssc.201200243","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit37)\/*[position()=1]","author":"H\u00e4nni","volume":"212","first-page":"840","year":"2015","journal-title":"Phys. + Status Solidi A","DOI":"10.1002\/pssa.201431708","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit38)\/*[position()=1]","author":"Seitz","volume":"7","first-page":"1372","year":"2014","journal-title":"ChemSusChem","DOI":"10.1002\/cssc.201301030","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit39)\/*[position()=1]","author":"McCrory","volume":"135","first-page":"16977","year":"2013","journal-title":"J. + Am. Chem. Soc.","DOI":"10.1021\/ja407115p","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit40)\/*[position()=1]","author":"Sch\u00fcttauf","volume":"133","first-page":"163","year":"2015","journal-title":"Sol. + Energy Mater. Sol. Cells","DOI":"10.1016\/j.solmat.2014.11.006","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit41)\/*[position()=1]","author":"Si","volume":"105","first-page":"063902","year":"2014","journal-title":"Appl. + Phys. Lett.","DOI":"10.1063\/1.4892890","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit42)\/*[position()=1]","author":"Kirner","volume":"54","first-page":"08KB03","year":"2015","journal-title":"Jpn. + J. Appl. Phys.","DOI":"10.7567\/JJAP.54.08KB03","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit43)\/*[position()=1]","author":"Green","volume":"23","first-page":"1","year":"2015","journal-title":"Prog. + Photovoltaics","DOI":"10.1002\/pip.2573","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit44)\/*[position()=1]","author":"Chen","volume":"25","first-page":"3","year":"2010","journal-title":"J. + Mater. Res.","DOI":"10.1557\/JMR.2010.0020","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit45)\/*[position()=1]","author":"Walter","volume":"110","first-page":"6446","year":"2010","journal-title":"Chem. + Rev.","DOI":"10.1021\/cr1002326","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit46)\/*[position()=1]","author":"Chen","year":"2013","unstructured":"Z.\n Chen\n , + H. N.Dinh and E.Miller, Photoelectrochemical Water Splitting, Springer, New + York, 2013","volume-title":"Photoelectrochemical Water Splitting","DOI":"10.1007\/978-1-4614-8298-7","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit47)\/*[position()=1]","author":"Coridan","volume":"8","first-page":"2886","year":"2015","journal-title":"Energy + Environ. Sci.","DOI":"10.1039\/C5EE00777A","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit48)\/*[position()=1]","author":"McKone","volume":"4","first-page":"3573","year":"2011","journal-title":"Energy + Environ. Sci.","DOI":"10.1039\/c1ee01488a","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit49)\/*[position()=1]","author":"Maeda","volume":"1","first-page":"2655","year":"2010","journal-title":"J. + Phys. Chem. Lett.","DOI":"10.1021\/jz1007966","doi-asserted-by":"crossref"},{"key":"C5EE02393A-(cit50)\/*[position()=1]","author":"Seger","volume":"7","first-page":"2397","year":"2014","journal-title":"Energy + Environ. Sci.","DOI":"10.1039\/C4EE01335B","doi-asserted-by":"crossref"}],"container-title":["Energy + & Environmental Science"],"original-title":[],"language":"en","link":[{"URL":"http:\/\/pubs.rsc.org\/en\/content\/articlepdf\/2016\/EE\/C5EE02393A","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2017,11,18]],"date-time":"2017-11-18T22:33:13Z","timestamp":1511044393000},"score":1.0,"subtitle":[],"short-title":[],"issued":{"date-parts":[[2016]]},"references-count":50,"journal-issue":{"published-print":{"date-parts":[[2016]]},"issue":"1"},"URL":"http:\/\/dx.doi.org\/10.1039\/c5ee02393a","relation":{"cites":[]},"ISSN":["1754-5692","1754-5706"],"issn-type":[{"value":"1754-5692","type":"print"},{"value":"1754-5706","type":"electronic"}],"assertion":[{"value":"This + document is Similarity Check deposited","name":"similarity_check","explanation":{"URL":"https:\/\/www.crossref.org\/services\/similarity-check\/"},"group":{"name":"similarity_check","label":"SIMILARITY + CHECK"}},{"value":"Supplementary Information","URL":"https:\/\/doi.org\/10.1039\/C5EE02393A","name":"related_data","group":{"name":"related_data","label":"RELATED + DATA"}},{"value":"F\u00e9lix Urbain (ORCID)","URL":"http:\/\/orcid.org\/0000-0001-5423-6818","name":"identifier","group":{"name":"author_identifiers","label":"IDENTIFIERS"}},{"value":"Jan-Philipp + Becker (ResearcherID)","URL":"http:\/\/www.researcherid.com\/rid\/K-1581-2014","name":"identifier","group":{"name":"author_identifiers","label":"IDENTIFIERS"}},{"value":"The + Royal Society of Chemistry has an exclusive publication licence for this journal","name":"copyright_licence","group":{"name":"copyright_licensing","label":"COPYRIGHT + AND LICENSING"}},{"value":"This article is freely available. This article + is licensed under a Creative Commons Attribution Non Commercial 3.0 Unported + Licence (CC BY-NC 3.0)","URL":"http:\/\/creativecommons.org\/licenses\/by-nc\/3.0\/","name":"copyright_licence","label":"OPEN + ACCESS","group":{"name":"copyright_licensing","label":"COPYRIGHT AND LICENSING"}},{"value":"Single-blind","order":2,"name":"peer_review_method","group":{"name":"peer_review_method","label":"PEER + REVIEW METHOD"}},{"value":"Received 4 August 2015; Accepted 5 October 2015; Accepted + Manuscript published 5 October 2015; Advance Article published 12 October + 2015; Version of Record published 6 January 2016","order":1,"name":"history","group":{"name":"publication_history","label":"PUBLICATION + HISTORY"}}]}}' + http_version: null + recorded_at: Thu, 28 May 2020 10:41:20 GMT +- request: + method: get + uri: https://api.stage.datacite.org/users/0000-0001-5423-6818 + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Mozilla/5.0 (compatible; Maremma/4.6.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 + Accept-Encoding: + - gzip,deflate + response: + status: + code: 404 + message: Not Found + headers: + Date: + - Thu, 28 May 2020 10:41:20 GMT + Content-Type: + - text/html; charset=UTF-8 + Content-Length: + - '0' + Connection: + - keep-alive + Status: + - 404 Not Found + Vary: + - Origin + X-Request-Id: + - 2bff40df-6162-48cb-9ec4-9c8112c65935 + X-Runtime: + - '0.008798' + X-Powered-By: + - Phusion Passenger 6.0.4 + Server: + - nginx/1.14.0 + Phusion Passenger 6.0.4 + body: + encoding: ASCII-8BIT + string: '' + http_version: null + recorded_at: Thu, 28 May 2020 10:41:20 GMT +- request: + method: get + uri: https://pub.orcid.org/v2.1/0000-0001-5423-6818/person + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Mozilla/5.0 (compatible; Maremma/4.6.1; mailto:info@datacite.org) + Accept: + - application/vnd.orcid+json + Accept-Encoding: + - gzip,deflate + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx/1.16.1 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Type: + - application/vnd.orcid+json; qs=4;charset=UTF-8 + Content-Encoding: + - gzip + Date: + - Thu, 28 May 2020 10:41:21 GMT + Expires: + - '0' + Pragma: + - no-cache + X-Xss-Protection: + - 1; mode=block + Access-Control-Allow-Origin: + - "*" + X-Content-Type-Options: + - nosniff + Connection: + - keep-alive + Set-Cookie: + - X-Mapping-fjhppofk=26484D0F5DA32D2D6AF64AA1C9DBBA16; path=/ + X-Frame-Options: + - DENY + body: + encoding: ASCII-8BIT + string: !binary |- + H4sIAAAAAAAAA5VUy4rbMBTd9yuM1lHsJHaaDpSBFqYUuiiFWZUyKJYSX0axjCwnMUM+qN/RH6sse2TZcR4OeBGde+45ug+9ffA8xEmu8E5Q2ACjmBLFkPfgvWlIg3vCC/N/FgbhfB6uZkG4XGjsNKm4Kdm50bFkmt5P0k2zDD5Gi3AWRsEng5pEN2zcl2ELe5biylI+TEVP//5yOKIOa0N2wEvcvUmH9SzXBNIuS9+UgrKstOC8QXJRyLh/uIcc1sBBlSbjz+cvP75/RQ2YEZWY40D/sP5mOArnC7xczVbIllqohMn+7S5UzVFuaRXw2/vTF/UHVH1XzDpYg9hKkiWlK4EkyxmRcRVfSH7b21BHu6PVVrmbu76A5V8atuupbfKbBu/P07bc4daHWMgYaBfSYCHBFD9RKssffN9ETYXcDnUDTVzq1WnpRCYiVybSZkcWPk3OnMYcWKpw7badIDekvySD6+W5+2K0zgqmm2lzoV9Nk79V9XdDLjXDVu1wOEzfR2Sr2dOUKT+TYgOc+U9Me3mpvTyy/eeEypdjJjfozM215by5Kb3x9+erKIpCh10oHAtqjNeYhSjkGSclhpSyY4UH9fDfuaP9xbN7ynYE+KhHwjDGvA81wSoSSrWbfNzL1JDGyL5TrPArKw9C0lG6DWeMrpVpa3xUTKaE63XRS1NpyXEVP+ePqv+QvDV3nZvpWKHX8/QfISD/N/4HAAA= + http_version: null + recorded_at: Thu, 28 May 2020 10:41:21 GMT +- request: + method: put + uri: https://api.stage.datacite.org/users/0000-0001-5423-6818 + body: + encoding: UTF-8 + string: '{"data":{"type":"users","attributes":{"name":"Félix Urbain","givenNames":"Félix","familyName":"Urbain"}}}' + headers: + User-Agent: + - Mozilla/5.0 (compatible; Maremma/4.6.1; mailto:info@datacite.org) + Accept: + - application/vnd.api+json + Content-Type: + - application/vnd.api+json + Authorization: + - Bearer eyJhbGciOiJSUzI1NiJ9.eyJ1aWQiOiIwMDAwLTAwMDEtNTQ4OS0zNTk0IiwibmFtZSI6Ikpvc2lhaCBDYXJiZXJyeSIsInJvbGVfaWQiOiJzdGFmZl9hZG1pbiIsImlhdCI6MTU1MzI0OTg4NCwiZXhwIjozMjU2MzI2NTMyNjUzMjU2NTMyNjU3NjIzNTIzNTYyMzU2MjM2NTcyMzY3MzA5NDg1NTA3fQ.dyKeuTqDdqfn0I8KEPAH4N-UD2Y13YtNYXXfgHXorfPZhVLPoHAGs87GDCjtsk2r4VUNDHvNEwGjURYGKvcaCQwz4ukS5vIqCIRio2ZpeptsOuOB_D0n4lvANyWDUbgNGgJt_ddxRo0Th7Wm6oug8lv63E98zFJJLn6Yfd7PKjnKyUXmywNW_RMYdhy-NcvVnCpFxyedx9TbMCPiQU-HYtSerSVIxuW_bqDHj9DvxwiP6lvK64BRyQIU0l3ykPzMIZ7pKYS3KwAIPpCMAtBw99ysRIB-TCV6MP4cMRP7J50mluaDDGy0OBSATPiTbg_uN3MZ2wK26te9PzF6Zjmn4g + Accept-Encoding: + - gzip,deflate + response: + status: + code: 404 + message: Not Found + headers: + Date: + - Thu, 28 May 2020 10:41:21 GMT + Content-Type: + - application/json; charset=UTF-8 + Content-Length: + - '34' + Connection: + - keep-alive + Status: + - 404 Not Found + Vary: + - Origin + X-Runtime: + - '0.009831' + X-Request-Id: + - 4829b542-24f7-4460-8d8a-3a1e0fd60a10 + X-Powered-By: + - Phusion Passenger 6.0.4 + Server: + - nginx/1.14.0 + Phusion Passenger 6.0.4 + body: + encoding: ASCII-8BIT + string: '{"status":404,"error":"Not Found"}' + http_version: null + recorded_at: Thu, 28 May 2020 10:41:22 GMT +recorded_with: VCR 5.1.0 diff --git a/spec/fixtures/vcr_cassettes/CrossrefImport/import_crossref_import/push_related_items.yml b/spec/fixtures/vcr_cassettes/CrossrefImport/import_crossref_import/push_related_items.yml new file mode 100644 index 00000000..34aa19e7 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/CrossrefImport/import_crossref_import/push_related_items.yml @@ -0,0 +1,193 @@ +--- +http_interactions: +- request: + method: get + uri: https://doi.org/ra/10.2307 + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Mozilla/5.0 (compatible; Maremma/4.6.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 + Accept-Encoding: + - gzip,deflate + response: + status: + code: 200 + message: '' + headers: + Date: + - Thu, 28 May 2020 10:41:16 GMT + Content-Type: + - application/json;charset=UTF-8 + Connection: + - keep-alive + Set-Cookie: + - __cfduid=d382126601f4ff6d1843de801182fc1231590662476; expires=Sat, 27-Jun-20 + 10:41:16 GMT; path=/; domain=.doi.org; HttpOnly; SameSite=Lax; Secure + Content-Encoding: + - gzip + Cf-Cache-Status: + - DYNAMIC + Cf-Request-Id: + - 02fc784b0100007ec2a6bf5200000001 + 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: + - 59a75cbe6e1a7ec2-BUD + body: + encoding: ASCII-8BIT + string: !binary |- + H4sIAAAAAAAAA4vmUlCoBmIFBSUXf08lKwUlQwM9I2MDcyUdiGiQI0jQuSi/uLgoNU0JKFjLFQsAbPP7SDYAAAA= + http_version: null + recorded_at: Thu, 28 May 2020 10:41:16 GMT +- request: + method: get + uri: https://api.stage.datacite.org/dois/10.2307/1847110 + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Mozilla/5.0 (compatible; Maremma/4.6.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 + Accept-Encoding: + - gzip,deflate + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 28 May 2020 10:41:17 GMT + Content-Type: + - application/json; charset=utf-8 + Connection: + - keep-alive + Status: + - 200 OK + X-Anonymous-Consumer: + - 'true' + Cache-Control: + - max-age=0, private, must-revalidate + Vary: + - Accept-Encoding, Origin + Content-Encoding: + - gzip + X-Request-Id: + - 2ae0306f-5f45-4d71-9097-9c352f6d5b11 + Etag: + - W/"dd99aec2c507cf37a2563ccec0437767" + X-Runtime: + - '0.071137' + X-Powered-By: + - Phusion Passenger 6.0.4 + Server: + - nginx/1.14.0 + Phusion Passenger 6.0.4 + body: + encoding: ASCII-8BIT + string: !binary |- + H4sIAE2Vz14AA5RXa3OqTBL+K5afdus9OQHURFJ1astL4uUoGkVQtvbDABMcM1wKBhBT+e/bM4CXnLxbtfkSafr6PN0zzUfTRQw1nz6axG0+NWXpp9KSHu/lbvtRlqXmjyYrIgwv3JAk8IQYi4mdMpxwExB+axPF+I0cL69AlKRvleisRVwcMPJGcAzO/v1x9Qxqe8ai5On+HkL8DGPv/s8gF3W9THG4mDQ//wM5UobjADE8uQkAb5wYIxZW4QLkCyuUkeRHg/9zG/2YhAH45u8qr0uwDgNEQeqRDAfaxeyi/4Z8QourVwIrqJgSxLgKhOepMcIoLsOLn6Ct73FjHmbYh1wbLGz07JCSZN8YoIgwRBvLNIBH8ZYEjZ6PY+KgHw35sft4J3cfZFFylNrcSCA3XeuLFYR3woAhEnDZR83iNEzjshaSJCmXyM0fN6lUAYLGmCQAFfykjRXOCM5BMQtpKkp8aPGiSZywJfK4QGndMAISSZKUu+7jg/IdVZP1Wmt+Vn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GlurfuFtdUydzs9lPwaY+AFcn9JYAY21nYvAce/7ZZRcL5ft1OIp0H+OcymceLynWJs8LZPqx7jvXyNp3iejPgsVHrr6dRpabJlvpLl4bmj6Q6DHoZ+4Tpnvrt87iA/YS9yhTPC2JbPfE7gXDguBlKuDQDbl1eoPTxpwzDXaHjjC/C4zqkLeSfCx/P1jE1P574BjGwe21xNr2do8jfyOre1oek6mXiVf5iBzqVeub93gtXSKt/f4LZSjBTi7+2hRF4VNbFHxkHwRqDGIZx9RGprp10BdcA8HTmO7+vr8+BQ99L3+dV1n89p0q3OGMAEZhRt+6KHrjmDnoDZoXmZR//2uT5/qMZ7nDoSnPNwvtlm2YvQL2J2zjMA87CGnuZzyHvSHvTX1pZj7iST4e70e/gczQa9Yn7K4aw1TjCjkTPm+LXP/N3E57N7uO4/4Nn79QvuyjSmV7ttnuc/D3zLEhtuwpBN8ddF91+wg3kk+OXEYZLAWl0tdnDXbriv8ur0MUN8jTfqG1Wq94yzRATl+zSo8f2kDCl07t9hXcb0rs23E3HbgzrFWQx3eShWxR7c9RlIWZxi0GHlNvVGApenLHYAlFxucr4tDsI0YCIR/pQs4LLXCd8dxdUe5gENkXtRqiVfFOP6Yr9oQvJiA6gk8kVybfvRLMQ+CSufxPcYFjK+uchiWYbl5+IvEqvQVbolYn8IrnXEdwR2hXtFuoN1SVJ16eGp3XnqSD9hf7IEJh7sMpC+W+NSb+lutbHyhqj2zf/hqV7reIV7EokN1KEE81w+br/e6ib5eYbk8gFXmiTNz0/eLy5Bf1j/7bdfqf75ecVHcrGGL5srDq7kF7eyJD/cJ5KsyncPHVX9hyT/E0qTYWX/8oH5yX1xRr76L1n6IqyY+ap7JuxGDn//BQAA//8DAP3zRR/sDgAA + http_version: null + recorded_at: Thu, 28 May 2020 10:41:17 GMT +- request: + method: get + uri: https://api.crossref.org/works/10.2307/1847110?mailto=info@datacite.org + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Mozilla/5.0 (compatible; Maremma/4.6.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 + Accept-Encoding: + - gzip,deflate + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - application/json;charset=UTF-8 + Vary: + - Accept + Access-Control-Allow-Origin: + - "*" + Access-Control-Allow-Headers: + - X-Requested-With + Content-Length: + - '1346' + Server: + - http-kit + Date: + - Thu, 28 May 2020 10:41:18 GMT + X-Rate-Limit-Limit: + - '50' + X-Rate-Limit-Interval: + - 1s + Connection: + - close + body: + encoding: ASCII-8BIT + string: '{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2020,4,10]],"date-time":"2020-04-10T03:39:08Z","timestamp":1586489948796},"reference-count":0,"publisher":"JSTOR","issue":"1","content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["The + American Historical Review"],"published-print":{"date-parts":[[1957,10]]},"DOI":"10.2307\/1847110","type":"journal-article","created":{"date-parts":[[2006,4,19]],"date-time":"2006-04-19T22:06:06Z","timestamp":1145484366000},"page":"23","source":"Crossref","is-referenced-by-count":13,"title":["The + Movement to Abolish Capital Punishment in America, 1787-1861"],"prefix":"10.2307","volume":"63","author":[{"given":"David + Brion","family":"Davis","sequence":"first","affiliation":[]}],"member":"1121","container-title":["The + American Historical Review"],"original-title":[],"deposited":{"date-parts":[[2018,4,18]],"date-time":"2018-04-18T19:34:06Z","timestamp":1524080046000},"score":1.0,"subtitle":[],"short-title":[],"issued":{"date-parts":[[1957,10]]},"references-count":0,"journal-issue":{"published-print":{"date-parts":[[1957,10]]},"issue":"1"},"URL":"http:\/\/dx.doi.org\/10.2307\/1847110","relation":{},"ISSN":["0002-8762"],"issn-type":[{"value":"0002-8762","type":"print"}],"subject":["Archaeology","Museology","History"]}}' + http_version: null + recorded_at: Thu, 28 May 2020 10:41:18 GMT +- request: + method: get + uri: https://api.stage.datacite.org/dois/10.1016/s0191-6599(01)00017-1 + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Mozilla/5.0 (compatible; Maremma/4.6.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 + Accept-Encoding: + - gzip,deflate + response: + status: + code: 404 + message: Not Found + headers: + Date: + - Thu, 28 May 2020 10:41:18 GMT + Content-Type: + - application/json; charset=utf-8 + Connection: + - keep-alive + Status: + - 404 Not Found + Cache-Control: + - no-cache + Vary: + - Accept-Encoding, Origin + Content-Encoding: + - gzip + X-Runtime: + - '0.018821' + X-Request-Id: + - 7693373f-af75-4b6c-b81e-46854492153a + X-Powered-By: + - Phusion Passenger 6.0.4 + Server: + - nginx/1.14.0 + Phusion Passenger 6.0.4 + body: + encoding: ASCII-8BIT + string: !binary |- + H4sIAE6Vz14AAwzHMQqAMAwF0KuELC4iDp08h5s4FP1qsTSQpKCId9ftvYehKmo8TA+bR68/OfSBW/bkGf/GA6QwqbqAbqkUFZRFzlR22kRpFVhpnHAl847f+f0AAAD//wMArpOW4VcAAAA= + http_version: null + recorded_at: Thu, 28 May 2020 10:41:18 GMT +recorded_with: VCR 5.1.0 diff --git a/spec/fixtures/vcr_cassettes/CrossrefOrcid/import_crossref_orcid/push_item.yml b/spec/fixtures/vcr_cassettes/CrossrefOrcid/import_crossref_orcid/push_item.yml index f9643953..1ad6cb4d 100644 --- a/spec/fixtures/vcr_cassettes/CrossrefOrcid/import_crossref_orcid/push_item.yml +++ b/spec/fixtures/vcr_cassettes/CrossrefOrcid/import_crossref_orcid/push_item.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois/10.1039/c5ee02393a + uri: https://api.stage.datacite.org/dois/10.1039/c5ee02393a body: encoding: US-ASCII string: '' @@ -177,7 +177,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:43:35 GMT - request: method: get - uri: https://api.test.datacite.org/users/0000-0001-5423-6818 + uri: https://api.stage.datacite.org/users/0000-0001-5423-6818 body: encoding: US-ASCII string: '' @@ -239,7 +239,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:43:36 GMT - request: method: post - uri: https://api.test.datacite.org/events + uri: https://api.stage.datacite.org/events body: encoding: UTF-8 string: '{"data":{"type":"events","attributes":{"messageAction":"create","subjId":"https://doi.org/10.1039/c5ee02393a","objId":"https://orcid.org/0000-0001-5423-6818","relationTypeId":"is-authored-by","sourceId":"crossref-orcid-auto-update","sourceToken":"873fc485-d5bb-430b-8d3b-1716ed5d322d","occurredAt":"2015-10-05T10:01:19Z","timestamp":"2020-04-13T15:43:36Z","license":"https://creativecommons.org/publicdomain/zero/1.0/","subj":{"@id":"https://doi.org/10.1039/c5ee02393a","@type":"ScholarlyArticle","datePublished":"2016","proxyIdentifiers":["1754-5706"],"registrantId":"crossref.292"},"obj":{"@id":"https://orcid.org/0000-0001-5423-6818","@type":"Person"}}}}' diff --git a/spec/fixtures/vcr_cassettes/CrossrefRelated/import_crossref_related/push_item.yml b/spec/fixtures/vcr_cassettes/CrossrefRelated/import_crossref_related/push_item.yml index a94e7c40..2d4ee370 100644 --- a/spec/fixtures/vcr_cassettes/CrossrefRelated/import_crossref_related/push_item.yml +++ b/spec/fixtures/vcr_cassettes/CrossrefRelated/import_crossref_related/push_item.yml @@ -47,7 +47,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 16:03:03 GMT - request: method: get - uri: https://api.test.datacite.org/dois/10.2307/1847110 + uri: https://api.stage.datacite.org/dois/10.2307/1847110 body: encoding: US-ASCII string: '' @@ -144,7 +144,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 16:03:05 GMT - request: method: get - uri: https://api.test.datacite.org/dois/10.1016/s0191-6599(01)00017-1 + uri: https://api.stage.datacite.org/dois/10.1016/s0191-6599(01)00017-1 body: encoding: US-ASCII string: '' @@ -190,7 +190,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 16:03:05 GMT - request: method: post - uri: https://api.test.datacite.org/events + uri: https://api.stage.datacite.org/events body: encoding: UTF-8 string: '{"data":{"type":"events","id":"909caaa9-ecf5-4255-91e9-16bc6e0ba83e","attributes":{"messageAction":"create","subjId":"https://doi.org/10.1016/s0191-6599(01)00017-1","objId":"https://doi.org/10.2307/1847110","relationTypeId":"cites","sourceId":"crossref-related","sourceToken":"2a9027a7-8441-4e3e-b4f9-3004010356cc","occurredAt":"2002-07-25T17:19:59Z","timestamp":"2020-04-13T16:03:05Z","license":"https://creativecommons.org/publicdomain/zero/1.0/","subj":{},"obj":{"@id":"https://doi.org/10.2307/1847110","@type":"ScholarlyArticle","datePublished":"1957-10","proxyIdentifiers":["0002-8762"],"registrantId":"crossref.1121"}}}}' diff --git a/spec/fixtures/vcr_cassettes/FunderIdentifier/import_funder_identifiers/import.yml b/spec/fixtures/vcr_cassettes/FunderIdentifier/import_funder_identifiers/import.yml index 5b851b38..47ded62f 100644 --- a/spec/fixtures/vcr_cassettes/FunderIdentifier/import_funder_identifiers/import.yml +++ b/spec/fixtures/vcr_cassettes/FunderIdentifier/import_funder_identifiers/import.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=fundingReferences.funderIdentifierType:%22Crossref%20Funder%20ID%22%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202019-06-30T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=fundingReferences.funderIdentifierType:%22Crossref%20Funder%20ID%22%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202019-06-30T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' @@ -54,7 +54,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 16:03:07 GMT - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=25&query=fundingReferences.funderIdentifierType:%22Crossref%20Funder%20ID%22%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202019-06-30T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=25&query=fundingReferences.funderIdentifierType:%22Crossref%20Funder%20ID%22%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202019-06-30T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/FunderIdentifier/import_funder_identifiers/push_item.yml b/spec/fixtures/vcr_cassettes/FunderIdentifier/import_funder_identifiers/push_item.yml index 6e1e5404..19ed6ad2 100644 --- a/spec/fixtures/vcr_cassettes/FunderIdentifier/import_funder_identifiers/push_item.yml +++ b/spec/fixtures/vcr_cassettes/FunderIdentifier/import_funder_identifiers/push_item.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois/10.15125/bath-00708?affiliation=true + uri: https://api.stage.datacite.org/dois/10.15125/bath-00708?affiliation=true body: encoding: US-ASCII string: '' @@ -52,7 +52,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 16:03:11 GMT - request: method: get - uri: https://api.test.datacite.org/dois/10.15125/bath-00708 + uri: https://api.stage.datacite.org/dois/10.15125/bath-00708 body: encoding: US-ASCII string: '' @@ -147,7 +147,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 16:03:15 GMT - request: method: post - uri: https://api.test.datacite.org/events + uri: https://api.stage.datacite.org/events body: encoding: UTF-8 string: '{"data":{"type":"events","attributes":{"messageAction":"create","subjId":"https://doi.org/10.15125/bath-00708","objId":"https://doi.org/10.13039/501100000835","relationTypeId":"is-funded-by","sourceId":"datacite-funder","sourceToken":"6be0ac24-f58c-4a9f-968a-5c69a1ec0e68","occurredAt":"2020-04-13T12:02:47.000Z","timestamp":"2020-04-13T16:03:15Z","license":"https://creativecommons.org/publicdomain/zero/1.0/","subj":{"@id":"https://doi.org/10.15125/bath-00708","@type":"SoftwareSourceCode","datePublished":"2017","proxyIdentifiers":[],"registrantId":"datacite.bl.bath"},"obj":{"@id":"https://doi.org/10.13039/501100000835","@type":"Funder","name":"University diff --git a/spec/fixtures/vcr_cassettes/NameIdentifier/import_name_identifiers/import.yml b/spec/fixtures/vcr_cassettes/NameIdentifier/import_name_identifiers/import.yml index 0897cead..bc128f84 100644 --- a/spec/fixtures/vcr_cassettes/NameIdentifier/import_name_identifiers/import.yml +++ b/spec/fixtures/vcr_cassettes/NameIdentifier/import_name_identifiers/import.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-01-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-01-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' @@ -54,7 +54,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:55:38 GMT - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=25&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-01-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=25&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-01-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/NameIdentifier/import_name_identifiers/push_item.yml b/spec/fixtures/vcr_cassettes/NameIdentifier/import_name_identifiers/push_item.yml index 8a3bb2de..a92ac06c 100644 --- a/spec/fixtures/vcr_cassettes/NameIdentifier/import_name_identifiers/push_item.yml +++ b/spec/fixtures/vcr_cassettes/NameIdentifier/import_name_identifiers/push_item.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois/10.4224/crm.2010f.moos-2?affiliation=true + uri: https://api.stage.datacite.org/dois/10.4224/crm.2010f.moos-2?affiliation=true body: encoding: US-ASCII string: '' @@ -52,7 +52,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:55:39 GMT - request: method: get - uri: https://api.test.datacite.org/dois/10.4224/crm.2010f.moos-2 + uri: https://api.stage.datacite.org/dois/10.4224/crm.2010f.moos-2 body: encoding: US-ASCII string: '' @@ -102,7 +102,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:55:39 GMT - request: method: get - uri: https://api.test.datacite.org/users/0000-0002-3376-0722 + uri: https://api.stage.datacite.org/users/0000-0002-3376-0722 body: encoding: US-ASCII string: '' @@ -164,7 +164,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:55:40 GMT - request: method: get - uri: https://api.test.datacite.org/users/0000-0002-0083-0528 + uri: https://api.stage.datacite.org/users/0000-0002-0083-0528 body: encoding: US-ASCII string: '' @@ -226,7 +226,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:55:40 GMT - request: method: get - uri: https://api.test.datacite.org/users/0000-0002-3349-5535 + uri: https://api.stage.datacite.org/users/0000-0002-3349-5535 body: encoding: US-ASCII string: '' @@ -288,7 +288,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:55:41 GMT - request: method: get - uri: https://api.test.datacite.org/users/0000-0002-2377-2615 + uri: https://api.stage.datacite.org/users/0000-0002-2377-2615 body: encoding: US-ASCII string: '' @@ -350,7 +350,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:55:41 GMT - request: method: get - uri: https://api.test.datacite.org/users/0000-0002-4351-2503 + uri: https://api.stage.datacite.org/users/0000-0002-4351-2503 body: encoding: US-ASCII string: '' @@ -412,7 +412,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:55:41 GMT - request: method: post - uri: https://api.test.datacite.org/events + uri: https://api.stage.datacite.org/events body: encoding: UTF-8 string: '{"data":{"type":"events","attributes":{"messageAction":"create","subjId":"https://doi.org/10.4224/crm.2010f.moos-2","objId":"https://orcid.org/0000-0002-3376-0722","relationTypeId":"is-authored-by","sourceId":"datacite-orcid-auto-update","sourceToken":"7b09eda9-0024-4e26-9f01-6d8d5a1028d7","occurredAt":"2020-03-26T16:38:05.000Z","timestamp":"2020-04-13T15:55:40Z","license":"https://creativecommons.org/publicdomain/zero/1.0/","subj":{"@id":"https://doi.org/10.4224/crm.2010f.moos-2","@type":"ScholarlyArticle","datePublished":"2010-11-01","proxyIdentifiers":["2292-9339"],"registrantId":"datacite.nrc.ir"},"obj":{"@id":"https://orcid.org/0000-0002-3376-0722","@type":"Person"}}}}' @@ -466,7 +466,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:55:41 GMT - request: method: post - uri: https://api.test.datacite.org/claims + uri: https://api.stage.datacite.org/claims body: encoding: UTF-8 string: '{"claim":{"doi":"10.4224/crm.2010f.moos-2","orcid":"0000-0002-3376-0722","source_id":"orcid_update","claim_action":"create"}}' @@ -530,7 +530,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:55:42 GMT - request: method: post - uri: https://api.test.datacite.org/events + uri: https://api.stage.datacite.org/events body: encoding: UTF-8 string: '{"data":{"type":"events","attributes":{"messageAction":"create","subjId":"https://doi.org/10.4224/crm.2010f.moos-2","objId":"https://orcid.org/0000-0002-0083-0528","relationTypeId":"is-authored-by","sourceId":"datacite-orcid-auto-update","sourceToken":"7b09eda9-0024-4e26-9f01-6d8d5a1028d7","occurredAt":"2020-03-26T16:38:05.000Z","timestamp":"2020-04-13T15:55:40Z","license":"https://creativecommons.org/publicdomain/zero/1.0/","subj":{"@id":"https://doi.org/10.4224/crm.2010f.moos-2","@type":"ScholarlyArticle","datePublished":"2010-11-01","proxyIdentifiers":["2292-9339"],"registrantId":"datacite.nrc.ir"},"obj":{"@id":"https://orcid.org/0000-0002-0083-0528","@type":"Person"}}}}' @@ -584,7 +584,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:55:42 GMT - request: method: post - uri: https://api.test.datacite.org/claims + uri: https://api.stage.datacite.org/claims body: encoding: UTF-8 string: '{"claim":{"doi":"10.4224/crm.2010f.moos-2","orcid":"0000-0002-0083-0528","source_id":"orcid_update","claim_action":"create"}}' @@ -648,7 +648,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:55:42 GMT - request: method: post - uri: https://api.test.datacite.org/events + uri: https://api.stage.datacite.org/events body: encoding: UTF-8 string: '{"data":{"type":"events","attributes":{"messageAction":"create","subjId":"https://doi.org/10.4224/crm.2010f.moos-2","objId":"https://orcid.org/0000-0002-3349-5535","relationTypeId":"is-authored-by","sourceId":"datacite-orcid-auto-update","sourceToken":"7b09eda9-0024-4e26-9f01-6d8d5a1028d7","occurredAt":"2020-03-26T16:38:05.000Z","timestamp":"2020-04-13T15:55:41Z","license":"https://creativecommons.org/publicdomain/zero/1.0/","subj":{"@id":"https://doi.org/10.4224/crm.2010f.moos-2","@type":"ScholarlyArticle","datePublished":"2010-11-01","proxyIdentifiers":["2292-9339"],"registrantId":"datacite.nrc.ir"},"obj":{"@id":"https://orcid.org/0000-0002-3349-5535","@type":"Person"}}}}' @@ -702,7 +702,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:55:43 GMT - request: method: post - uri: https://api.test.datacite.org/claims + uri: https://api.stage.datacite.org/claims body: encoding: UTF-8 string: '{"claim":{"doi":"10.4224/crm.2010f.moos-2","orcid":"0000-0002-3349-5535","source_id":"orcid_update","claim_action":"create"}}' @@ -766,7 +766,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:55:44 GMT - request: method: post - uri: https://api.test.datacite.org/events + uri: https://api.stage.datacite.org/events body: encoding: UTF-8 string: '{"data":{"type":"events","attributes":{"messageAction":"create","subjId":"https://doi.org/10.4224/crm.2010f.moos-2","objId":"https://orcid.org/0000-0002-2377-2615","relationTypeId":"is-authored-by","sourceId":"datacite-orcid-auto-update","sourceToken":"7b09eda9-0024-4e26-9f01-6d8d5a1028d7","occurredAt":"2020-03-26T16:38:05.000Z","timestamp":"2020-04-13T15:55:41Z","license":"https://creativecommons.org/publicdomain/zero/1.0/","subj":{"@id":"https://doi.org/10.4224/crm.2010f.moos-2","@type":"ScholarlyArticle","datePublished":"2010-11-01","proxyIdentifiers":["2292-9339"],"registrantId":"datacite.nrc.ir"},"obj":{"@id":"https://orcid.org/0000-0002-2377-2615","@type":"Person"}}}}' @@ -820,7 +820,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:55:44 GMT - request: method: post - uri: https://api.test.datacite.org/claims + uri: https://api.stage.datacite.org/claims body: encoding: UTF-8 string: '{"claim":{"doi":"10.4224/crm.2010f.moos-2","orcid":"0000-0002-2377-2615","source_id":"orcid_update","claim_action":"create"}}' @@ -884,7 +884,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:55:44 GMT - request: method: post - uri: https://api.test.datacite.org/events + uri: https://api.stage.datacite.org/events body: encoding: UTF-8 string: '{"data":{"type":"events","attributes":{"messageAction":"create","subjId":"https://doi.org/10.4224/crm.2010f.moos-2","objId":"https://orcid.org/0000-0002-4351-2503","relationTypeId":"is-authored-by","sourceId":"datacite-orcid-auto-update","sourceToken":"7b09eda9-0024-4e26-9f01-6d8d5a1028d7","occurredAt":"2020-03-26T16:38:05.000Z","timestamp":"2020-04-13T15:55:41Z","license":"https://creativecommons.org/publicdomain/zero/1.0/","subj":{"@id":"https://doi.org/10.4224/crm.2010f.moos-2","@type":"ScholarlyArticle","datePublished":"2010-11-01","proxyIdentifiers":["2292-9339"],"registrantId":"datacite.nrc.ir"},"obj":{"@id":"https://orcid.org/0000-0002-4351-2503","@type":"Person"}}}}' @@ -938,7 +938,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:55:44 GMT - request: method: post - uri: https://api.test.datacite.org/claims + uri: https://api.stage.datacite.org/claims body: encoding: UTF-8 string: '{"claim":{"doi":"10.4224/crm.2010f.moos-2","orcid":"0000-0002-4351-2503","source_id":"orcid_update","claim_action":"create"}}' diff --git a/spec/fixtures/vcr_cassettes/OrcidAffiliation/import_orcid_affiliations/import.yml b/spec/fixtures/vcr_cassettes/OrcidAffiliation/import_orcid_affiliations/import.yml index 4b59a0fc..1e4f9b7d 100644 --- a/spec/fixtures/vcr_cassettes/OrcidAffiliation/import_orcid_affiliations/import.yml +++ b/spec/fixtures/vcr_cassettes/OrcidAffiliation/import_orcid_affiliations/import.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20%2Bcreators.affiliation.affiliationIdentifierScheme:ROR%20AND%20updated:%5B2019-07-13T00:00:00Z%20TO%202019-07-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20%2Bcreators.affiliation.affiliationIdentifierScheme:ROR%20AND%20updated:%5B2019-07-13T00:00:00Z%20TO%202019-07-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/OrcidAffiliation/import_orcid_affiliations/import_zero.yml b/spec/fixtures/vcr_cassettes/OrcidAffiliation/import_orcid_affiliations/import_zero.yml index 301bfc35..475ecadf 100644 --- a/spec/fixtures/vcr_cassettes/OrcidAffiliation/import_orcid_affiliations/import_zero.yml +++ b/spec/fixtures/vcr_cassettes/OrcidAffiliation/import_orcid_affiliations/import_zero.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20%2Bcreators.affiliation.affiliationIdentifierScheme:ROR%20AND%20updated:%5B2019-07-01T00:00:00Z%20TO%202019-07-01T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20%2Bcreators.affiliation.affiliationIdentifierScheme:ROR%20AND%20updated:%5B2019-07-01T00:00:00Z%20TO%202019-07-01T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/OrcidAffiliation/import_orcid_affiliations/push_item.yml b/spec/fixtures/vcr_cassettes/OrcidAffiliation/import_orcid_affiliations/push_item.yml index 3676d3a6..ca6ab9ae 100644 --- a/spec/fixtures/vcr_cassettes/OrcidAffiliation/import_orcid_affiliations/push_item.yml +++ b/spec/fixtures/vcr_cassettes/OrcidAffiliation/import_orcid_affiliations/push_item.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois/10.14454/cne7-ar31?affiliation=true + uri: https://api.stage.datacite.org/dois/10.14454/cne7-ar31?affiliation=true body: encoding: US-ASCII string: '' @@ -52,7 +52,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 16:03:18 GMT - request: method: get - uri: https://api.test.datacite.org/users/0000-0002-4695-7874 + uri: https://api.stage.datacite.org/users/0000-0002-4695-7874 body: encoding: US-ASCII string: '' @@ -114,7 +114,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 16:03:18 GMT - request: method: post - uri: https://api.test.datacite.org/events + uri: https://api.stage.datacite.org/events body: encoding: UTF-8 string: '{"data":{"type":"events","attributes":{"messageAction":"create","subjId":"https://orcid.org/0000-0002-4695-7874","objId":"https://ror.org/04wxnsj81","relationTypeId":"is-affiliated-with","sourceId":"orcid-affiliation","sourceToken":"3bca8cf0-2b60-4b25-8c29-99f5b7dbd5b2","occurredAt":"2020-04-11T16:01:09.000Z","timestamp":"2020-04-13T16:03:18Z","license":"https://creativecommons.org/publicdomain/zero/1.0/","subj":{"@id":"https://orcid.org/0000-0002-4695-7874","@type":"Person"},"obj":{"@id":"https://ror.org/04wxnsj81","@type":"Organization","name":"DataCite","location":{"type":"postalAddress","addressCountry":"Germany"}}}}}' @@ -168,7 +168,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 16:03:18 GMT - request: method: get - uri: https://api.test.datacite.org/users/0000-0002-8963-3415 + uri: https://api.stage.datacite.org/users/0000-0002-8963-3415 body: encoding: US-ASCII string: '' @@ -230,7 +230,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 16:03:19 GMT - request: method: post - uri: https://api.test.datacite.org/events + uri: https://api.stage.datacite.org/events body: encoding: UTF-8 string: '{"data":{"type":"events","attributes":{"messageAction":"create","subjId":"https://orcid.org/0000-0002-8963-3415","objId":"https://ror.org/02e2c7k09","relationTypeId":"is-affiliated-with","sourceId":"orcid-affiliation","sourceToken":"3bca8cf0-2b60-4b25-8c29-99f5b7dbd5b2","occurredAt":"2020-04-11T16:01:09.000Z","timestamp":"2020-04-13T16:03:19Z","license":"https://creativecommons.org/publicdomain/zero/1.0/","subj":{"@id":"https://orcid.org/0000-0002-8963-3415","@type":"Person"},"obj":{"@id":"https://ror.org/02e2c7k09","@type":"Organization","name":"Delft diff --git a/spec/fixtures/vcr_cassettes/RelatedIdentifier/import_related_identifiers/import.yml b/spec/fixtures/vcr_cassettes/RelatedIdentifier/import_related_identifiers/import.yml index 5352fd0e..78c40644 100644 --- a/spec/fixtures/vcr_cassettes/RelatedIdentifier/import_related_identifiers/import.yml +++ b/spec/fixtures/vcr_cassettes/RelatedIdentifier/import_related_identifiers/import.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=relatedIdentifiers.relatedIdentifierType:DOI%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-01-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=relatedIdentifiers.relatedIdentifierType:DOI%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-01-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' @@ -54,7 +54,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:58:15 GMT - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=25&query=relatedIdentifiers.relatedIdentifierType:DOI%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-01-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=25&query=relatedIdentifiers.relatedIdentifierType:DOI%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-01-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/RelatedUrl/class_methods/import.yml b/spec/fixtures/vcr_cassettes/RelatedUrl/class_methods/import.yml index c694e229..ec3ce551 100644 --- a/spec/fixtures/vcr_cassettes/RelatedUrl/class_methods/import.yml +++ b/spec/fixtures/vcr_cassettes/RelatedUrl/class_methods/import.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=relatedIdentifiers.relatedIdentifierType:URL%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=relatedIdentifiers.relatedIdentifierType:URL%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' @@ -54,7 +54,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:58:47 GMT - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=25&query=relatedIdentifiers.relatedIdentifierType:URL%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=25&query=relatedIdentifiers.relatedIdentifierType:URL%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/RelatedUrl/class_methods/push_item.yml b/spec/fixtures/vcr_cassettes/RelatedUrl/class_methods/push_item.yml index 124b4c9d..1a25d14c 100644 --- a/spec/fixtures/vcr_cassettes/RelatedUrl/class_methods/push_item.yml +++ b/spec/fixtures/vcr_cassettes/RelatedUrl/class_methods/push_item.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois/10.4224/crm.2010f.selm-1?affiliation=true + uri: https://api.stage.datacite.org/dois/10.4224/crm.2010f.selm-1?affiliation=true body: encoding: US-ASCII string: '' @@ -52,7 +52,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:58:48 GMT - request: method: get - uri: https://api.test.datacite.org/dois/10.4224/crm.2010f.selm-1 + uri: https://api.stage.datacite.org/dois/10.4224/crm.2010f.selm-1 body: encoding: US-ASCII string: '' @@ -102,7 +102,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 15:58:48 GMT - request: method: post - uri: https://api.test.datacite.org/events + uri: https://api.stage.datacite.org/events body: encoding: UTF-8 string: '{"data":{"type":"events","attributes":{"messageAction":"create","subjId":"https://doi.org/10.4224/crm.2010f.selm-1","objId":"http://www.iso.org/iso/catalogue_detail.htm?csnumber=45315","relationTypeId":"references","sourceId":"datacite-url","sourceToken":"44fcac73-2945-4d04-9fcd-2ad679d7b695","occurredAt":"2020-04-13T13:02:14.000Z","timestamp":"2020-04-13T15:58:48Z","license":"https://creativecommons.org/publicdomain/zero/1.0/","subj":{"@id":"https://doi.org/10.4224/crm.2010f.selm-1","@type":"ScholarlyArticle","datePublished":"2010-05-01","proxyIdentifiers":[],"registrantId":"datacite.nrc.ir"},"obj":{}}}}' diff --git a/spec/fixtures/vcr_cassettes/RelatedUrl/instance_methods/get_total.yml b/spec/fixtures/vcr_cassettes/RelatedUrl/instance_methods/get_total.yml index 40b05d91..3c5ab83c 100644 --- a/spec/fixtures/vcr_cassettes/RelatedUrl/instance_methods/get_total.yml +++ b/spec/fixtures/vcr_cassettes/RelatedUrl/instance_methods/get_total.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=1&page%5Bsize%5D=0&query=relatedIdentifiers.relatedIdentifierType:URL%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-08-05T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=1&page%5Bsize%5D=0&query=relatedIdentifiers.relatedIdentifierType:URL%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-08-05T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/Report/compressed_report/when_there_the_report_is_good/should_return_the_data_for_one_message.yml b/spec/fixtures/vcr_cassettes/Report/compressed_report/when_there_the_report_is_good/should_return_the_data_for_one_message.yml index 6137482e..e430a5b0 100644 --- a/spec/fixtures/vcr_cassettes/Report/compressed_report/when_there_the_report_is_good/should_return_the_data_for_one_message.yml +++ b/spec/fixtures/vcr_cassettes/Report/compressed_report/when_there_the_report_is_good/should_return_the_data_for_one_message.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/reports/9e5461d8-0713-4abd-8e87-e4533a76ab3d + uri: https://api.stage.datacite.org/reports/9e5461d8-0713-4abd-8e87-e4533a76ab3d body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/Report/get_type/when_there_the_report_is_good/should_return_the_data_for_one_message.yml b/spec/fixtures/vcr_cassettes/Report/get_type/when_there_the_report_is_good/should_return_the_data_for_one_message.yml index 07258c4b..45df4504 100644 --- a/spec/fixtures/vcr_cassettes/Report/get_type/when_there_the_report_is_good/should_return_the_data_for_one_message.yml +++ b/spec/fixtures/vcr_cassettes/Report/get_type/when_there_the_report_is_good/should_return_the_data_for_one_message.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/reports/9e5461d8-0713-4abd-8e87-e4533a76ab3d + uri: https://api.stage.datacite.org/reports/9e5461d8-0713-4abd-8e87-e4533a76ab3d body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/Report/parse_multi_subset_report/when_report_is_ok/should_parsed_it_give_you_two_arrays_that_are_in_every_gzip.yml b/spec/fixtures/vcr_cassettes/Report/parse_multi_subset_report/when_report_is_ok/should_parsed_it_give_you_two_arrays_that_are_in_every_gzip.yml index 74a4e4a6..646e54c7 100644 --- a/spec/fixtures/vcr_cassettes/Report/parse_multi_subset_report/when_report_is_ok/should_parsed_it_give_you_two_arrays_that_are_in_every_gzip.yml +++ b/spec/fixtures/vcr_cassettes/Report/parse_multi_subset_report/when_report_is_ok/should_parsed_it_give_you_two_arrays_that_are_in_every_gzip.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/reports/9e5461d8-0713-4abd-8e87-e4533a76ab3d + uri: https://api.stage.datacite.org/reports/9e5461d8-0713-4abd-8e87-e4533a76ab3d body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/Report/translate_datasets/when_the_report_is_good/should_return_a_good_json.yml b/spec/fixtures/vcr_cassettes/Report/translate_datasets/when_the_report_is_good/should_return_a_good_json.yml index 45b2c20a..b9b95622 100644 --- a/spec/fixtures/vcr_cassettes/Report/translate_datasets/when_the_report_is_good/should_return_a_good_json.yml +++ b/spec/fixtures/vcr_cassettes/Report/translate_datasets/when_the_report_is_good/should_return_a_good_json.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/reports/9e5461d8-0713-4abd-8e87-e4533a76ab3d + uri: https://api.stage.datacite.org/reports/9e5461d8-0713-4abd-8e87-e4533a76ab3d body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/UsageUpdate/get_data/when_there_is_ONE_message/should_return_the_data_for_one_message.yml b/spec/fixtures/vcr_cassettes/UsageUpdate/get_data/when_there_is_ONE_message/should_return_the_data_for_one_message.yml index b552e2e2..36d3dcdf 100644 --- a/spec/fixtures/vcr_cassettes/UsageUpdate/get_data/when_there_is_ONE_message/should_return_the_data_for_one_message.yml +++ b/spec/fixtures/vcr_cassettes/UsageUpdate/get_data/when_there_is_ONE_message/should_return_the_data_for_one_message.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad + uri: https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/affiliation_identifier_import/should_enqueue_an_AffiliationIdentifierImportJob.yml b/spec/fixtures/vcr_cassettes/affiliation_identifier_import/should_enqueue_an_AffiliationIdentifierImportJob.yml index c02ed356..f0439b7b 100644 --- a/spec/fixtures/vcr_cassettes/affiliation_identifier_import/should_enqueue_an_AffiliationIdentifierImportJob.yml +++ b/spec/fixtures/vcr_cassettes/affiliation_identifier_import/should_enqueue_an_AffiliationIdentifierImportJob.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.affiliation.affiliationIdentifierScheme:ROR%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.affiliation.affiliationIdentifierScheme:ROR%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' @@ -44,7 +44,7 @@ http_interactions: - nginx/1.14.0 + Phusion Passenger 6.0.4 body: encoding: ASCII-8BIT - string: '{"data":[],"meta":{"total":0,"totalPages":0,"page":1},"links":{"self":"https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.affiliation.affiliationIdentifierScheme%3AROR+AND+updated%3A%5B2018-01-04T00%3A00%3A00Z+TO+2018-12-31T23%3A59%3A59Z%5D&resource-type-id="}}' + string: '{"data":[],"meta":{"total":0,"totalPages":0,"page":1},"links":{"self":"https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.affiliation.affiliationIdentifierScheme%3AROR+AND+updated%3A%5B2018-01-04T00%3A00%3A00Z+TO+2018-12-31T23%3A59%3A59Z%5D&resource-type-id="}}' http_version: null recorded_at: Mon, 13 Apr 2020 08:35:47 GMT recorded_with: VCR 5.1.0 diff --git a/spec/fixtures/vcr_cassettes/affiliation_identifier_import/should_run_the_rake_task.yml b/spec/fixtures/vcr_cassettes/affiliation_identifier_import/should_run_the_rake_task.yml index 54a3ba44..54ef2917 100644 --- a/spec/fixtures/vcr_cassettes/affiliation_identifier_import/should_run_the_rake_task.yml +++ b/spec/fixtures/vcr_cassettes/affiliation_identifier_import/should_run_the_rake_task.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.affiliation.affiliationIdentifierScheme:ROR%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.affiliation.affiliationIdentifierScheme:ROR%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' @@ -44,7 +44,7 @@ http_interactions: - nginx/1.14.0 + Phusion Passenger 6.0.4 body: encoding: ASCII-8BIT - string: '{"data":[],"meta":{"total":0,"totalPages":0,"page":1},"links":{"self":"https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.affiliation.affiliationIdentifierScheme%3AROR+AND+updated%3A%5B2018-01-04T00%3A00%3A00Z+TO+2018-12-31T23%3A59%3A59Z%5D&resource-type-id="}}' + string: '{"data":[],"meta":{"total":0,"totalPages":0,"page":1},"links":{"self":"https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.affiliation.affiliationIdentifierScheme%3AROR+AND+updated%3A%5B2018-01-04T00%3A00%3A00Z+TO+2018-12-31T23%3A59%3A59Z%5D&resource-type-id="}}' http_version: null recorded_at: Mon, 13 Apr 2020 08:35:47 GMT recorded_with: VCR 5.1.0 diff --git a/spec/fixtures/vcr_cassettes/funder_identifier_import/should_enqueue_an_FunderIdentifierImportJob.yml b/spec/fixtures/vcr_cassettes/funder_identifier_import/should_enqueue_an_FunderIdentifierImportJob.yml index c4377658..5817be03 100644 --- a/spec/fixtures/vcr_cassettes/funder_identifier_import/should_enqueue_an_FunderIdentifierImportJob.yml +++ b/spec/fixtures/vcr_cassettes/funder_identifier_import/should_enqueue_an_FunderIdentifierImportJob.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=fundingReferences.funderIdentifierType:%22Crossref%20Funder%20ID%22%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=fundingReferences.funderIdentifierType:%22Crossref%20Funder%20ID%22%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' @@ -54,7 +54,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 14:45:15 GMT - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=1000&query=fundingReferences.funderIdentifierType:%22Crossref%20Funder%20ID%22%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=1000&query=fundingReferences.funderIdentifierType:%22Crossref%20Funder%20ID%22%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/funder_identifier_import/should_run_the_rake_task.yml b/spec/fixtures/vcr_cassettes/funder_identifier_import/should_run_the_rake_task.yml index 01ced281..b73b9f8c 100644 --- a/spec/fixtures/vcr_cassettes/funder_identifier_import/should_run_the_rake_task.yml +++ b/spec/fixtures/vcr_cassettes/funder_identifier_import/should_run_the_rake_task.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=fundingReferences.funderIdentifierType:%22Crossref%20Funder%20ID%22%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=fundingReferences.funderIdentifierType:%22Crossref%20Funder%20ID%22%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' @@ -54,7 +54,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 14:45:13 GMT - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=1000&query=fundingReferences.funderIdentifierType:%22Crossref%20Funder%20ID%22%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=1000&query=fundingReferences.funderIdentifierType:%22Crossref%20Funder%20ID%22%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/name_identifier_import/should_enqueue_an_NameIdentifierImportJob.yml b/spec/fixtures/vcr_cassettes/name_identifier_import/should_enqueue_an_NameIdentifierImportJob.yml index 6fab5905..ceb62038 100644 --- a/spec/fixtures/vcr_cassettes/name_identifier_import/should_enqueue_an_NameIdentifierImportJob.yml +++ b/spec/fixtures/vcr_cassettes/name_identifier_import/should_enqueue_an_NameIdentifierImportJob.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' @@ -54,7 +54,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 14:47:15 GMT - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=1000&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=1000&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/name_identifier_import/should_run_the_rake_task.yml b/spec/fixtures/vcr_cassettes/name_identifier_import/should_run_the_rake_task.yml index 42fd54f6..74794304 100644 --- a/spec/fixtures/vcr_cassettes/name_identifier_import/should_run_the_rake_task.yml +++ b/spec/fixtures/vcr_cassettes/name_identifier_import/should_run_the_rake_task.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' @@ -54,7 +54,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 14:47:14 GMT - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=1000&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=1000&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/orcid_affiliation_import/should_enqueue_an_OrcidAffiliationImportJob.yml b/spec/fixtures/vcr_cassettes/orcid_affiliation_import/should_enqueue_an_OrcidAffiliationImportJob.yml index d399a7a2..378e421f 100644 --- a/spec/fixtures/vcr_cassettes/orcid_affiliation_import/should_enqueue_an_OrcidAffiliationImportJob.yml +++ b/spec/fixtures/vcr_cassettes/orcid_affiliation_import/should_enqueue_an_OrcidAffiliationImportJob.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20%2Bcreators.affiliation.affiliationIdentifierScheme:ROR%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20%2Bcreators.affiliation.affiliationIdentifierScheme:ROR%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/orcid_affiliation_import/should_run_the_rake_task.yml b/spec/fixtures/vcr_cassettes/orcid_affiliation_import/should_run_the_rake_task.yml index 9cf1930f..f5499399 100644 --- a/spec/fixtures/vcr_cassettes/orcid_affiliation_import/should_run_the_rake_task.yml +++ b/spec/fixtures/vcr_cassettes/orcid_affiliation_import/should_run_the_rake_task.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20%2Bcreators.affiliation.affiliationIdentifierScheme:ROR%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=creators.nameIdentifiers.nameIdentifierScheme:ORCID%20%2Bcreators.affiliation.affiliationIdentifierScheme:ROR%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/related_identifier_import/should_enqueue_an_RelatedIdentifierImportJob.yml b/spec/fixtures/vcr_cassettes/related_identifier_import/should_enqueue_an_RelatedIdentifierImportJob.yml index c21d19ec..23cb37c5 100644 --- a/spec/fixtures/vcr_cassettes/related_identifier_import/should_enqueue_an_RelatedIdentifierImportJob.yml +++ b/spec/fixtures/vcr_cassettes/related_identifier_import/should_enqueue_an_RelatedIdentifierImportJob.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=relatedIdentifiers.relatedIdentifierType:DOI%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=relatedIdentifiers.relatedIdentifierType:DOI%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' @@ -54,7 +54,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 14:49:17 GMT - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=1000&query=relatedIdentifiers.relatedIdentifierType:DOI%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=1000&query=relatedIdentifiers.relatedIdentifierType:DOI%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' @@ -106,7 +106,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 14:49:23 GMT - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=1&page%5Bsize%5D=1000&query=relatedIdentifiers.relatedIdentifierType:DOI%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=1&page%5Bsize%5D=1000&query=relatedIdentifiers.relatedIdentifierType:DOI%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/related_identifier_import/should_run_the_rake_task.yml b/spec/fixtures/vcr_cassettes/related_identifier_import/should_run_the_rake_task.yml index c7a575a4..6e13529f 100644 --- a/spec/fixtures/vcr_cassettes/related_identifier_import/should_run_the_rake_task.yml +++ b/spec/fixtures/vcr_cassettes/related_identifier_import/should_run_the_rake_task.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=relatedIdentifiers.relatedIdentifierType:DOI%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=relatedIdentifiers.relatedIdentifierType:DOI%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' @@ -54,7 +54,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 14:49:03 GMT - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=1000&query=relatedIdentifiers.relatedIdentifierType:DOI%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=1000&query=relatedIdentifiers.relatedIdentifierType:DOI%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' @@ -106,7 +106,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 14:49:09 GMT - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=1&page%5Bsize%5D=1000&query=relatedIdentifiers.relatedIdentifierType:DOI%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=1&page%5Bsize%5D=1000&query=relatedIdentifiers.relatedIdentifierType:DOI%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/related_url_import/should_enqueue_an_RelatedUrlImportJob.yml b/spec/fixtures/vcr_cassettes/related_url_import/should_enqueue_an_RelatedUrlImportJob.yml index ef10e046..2b7dd564 100644 --- a/spec/fixtures/vcr_cassettes/related_url_import/should_enqueue_an_RelatedUrlImportJob.yml +++ b/spec/fixtures/vcr_cassettes/related_url_import/should_enqueue_an_RelatedUrlImportJob.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=relatedIdentifiers.relatedIdentifierType:URL%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=relatedIdentifiers.relatedIdentifierType:URL%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' @@ -54,7 +54,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 14:50:46 GMT - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=1000&query=relatedIdentifiers.relatedIdentifierType:URL%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=1000&query=relatedIdentifiers.relatedIdentifierType:URL%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/vcr_cassettes/related_url_import/should_run_the_rake_task.yml b/spec/fixtures/vcr_cassettes/related_url_import/should_run_the_rake_task.yml index 29033b2a..ee8adb03 100644 --- a/spec/fixtures/vcr_cassettes/related_url_import/should_run_the_rake_task.yml +++ b/spec/fixtures/vcr_cassettes/related_url_import/should_run_the_rake_task.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=relatedIdentifiers.relatedIdentifierType:URL%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=0&query=relatedIdentifiers.relatedIdentifierType:URL%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' @@ -54,7 +54,7 @@ http_interactions: recorded_at: Mon, 13 Apr 2020 14:50:45 GMT - request: method: get - uri: https://api.test.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=1000&query=relatedIdentifiers.relatedIdentifierType:URL%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= + uri: https://api.stage.datacite.org/dois?affiliation=true&exclude_registration_agencies=true&page%5Bnumber%5D=0&page%5Bsize%5D=1000&query=relatedIdentifiers.relatedIdentifierType:URL%20AND%20updated:%5B2018-01-04T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D&resource-type-id= body: encoding: US-ASCII string: '' diff --git a/spec/jobs/usage_update_parse_job_spec.rb b/spec/jobs/usage_update_parse_job_spec.rb index 08dbefe4..d253dfac 100644 --- a/spec/jobs/usage_update_parse_job_spec.rb +++ b/spec/jobs/usage_update_parse_job_spec.rb @@ -25,9 +25,9 @@ end context "not existing report" do - let(:item) { "https://api.test.datacite.org/reports/5cac6ca0-9391-4e1-95cf-ba2f475cbfad" } + let(:item) { "https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1-95cf-ba2f475cbfad" } let(:body) {File.read(fixture_path + 'usage_update_3.json')} - let(:result) {OpenStruct.new(body: JSON.parse(body), url:"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1-95cf-ba2f475cbfad" )} + let(:result) {OpenStruct.new(body: JSON.parse(body), url:"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1-95cf-ba2f475cbfad" )} let(:report) {Report.new(result)} let(:args) {{header: report.header, url:report.report_url}} subject(:job) { UsageUpdateParseJob.perform_later(report.datasets,args) } diff --git a/spec/models/related_url_spec.rb b/spec/models/related_url_spec.rb index 3309f0ea..5098c434 100644 --- a/spec/models/related_url_spec.rb +++ b/spec/models/related_url_spec.rb @@ -9,7 +9,7 @@ it "get_query_url" do response = subject.get_query_url(from_date: from_date, until_date: until_date) - expect(response).to eq("https://api.test.datacite.org/dois?query=relatedIdentifiers.relatedIdentifierType%3AURL+AND+updated%3A%5B2018-01-04T00%3A00%3A00Z+TO+2018-08-05T23%3A59%3A59Z%5D&resource-type-id=&page%5Bnumber%5D=1&page%5Bsize%5D=1000&exclude_registration_agencies=true&affiliation=true") + expect(response).to eq("https://api.stage.datacite.org/dois?query=relatedIdentifiers.relatedIdentifierType%3AURL+AND+updated%3A%5B2018-01-04T00%3A00%3A00Z+TO+2018-08-05T23%3A59%3A59Z%5D&resource-type-id=&page%5Bnumber%5D=1&page%5Bsize%5D=1000&exclude_registration_agencies=true&affiliation=true") end it "get_total" do diff --git a/spec/models/report_spec.rb b/spec/models/report_spec.rb index f3423850..81806726 100644 --- a/spec/models/report_spec.rb +++ b/spec/models/report_spec.rb @@ -4,20 +4,20 @@ let(:body) {File.read(fixture_path + 'resolution_compress_small.json')} let(:response) {OpenStruct.new(body: JSON.parse(body) )} let(:report) {Report.new(response)} - let(:url) {"https://api.test.datacite.org/reports/9e5461d8-0713-4abd-8e87-e4533a76ab3d"} #original for test - # let(:url) {"https://api.test.datacite.org/reports/82022fc3-8b31-47f2-88a8-24814d9bd2f0"} + let(:url) {"https://api.stage.datacite.org/reports/9e5461d8-0713-4abd-8e87-e4533a76ab3d"} #original for test + # let(:url) {"https://api.stage.datacite.org/reports/82022fc3-8b31-47f2-88a8-24814d9bd2f0"} describe "parse_multi_subset_report" do context "when report is ok" do let(:body) {File.read(fixture_path + 'multi_subset_report.json')} let(:uncompressed) {File.read(fixture_path + 'datacite_resolution_report_2018-09.json')} - let(:result) {OpenStruct.new(body: JSON.parse(body), url:"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad")} + let(:result) {OpenStruct.new(body: JSON.parse(body), url:"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad")} let(:report) {Report.new(result)} it "should parsed it give you two arrays that are in every gzip" do - live_results = Maremma.get(url, host: "https://api.test.datacite.org/") + live_results = Maremma.get(url, host: "https://api.stage.datacite.org/") report = Report.new(live_results) rr = Report.parse_multi_subset_report report @@ -32,7 +32,7 @@ context "when report is ok" do let(:body) {File.read(fixture_path + 'multi_subset_report.json')} let(:uncompressed) {File.read(fixture_path + 'datacite_resolution_report_2018-09.json')} - let(:result) {OpenStruct.new(body: JSON.parse(body), url:"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad")} + let(:result) {OpenStruct.new(body: JSON.parse(body), url:"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad")} let(:report) {Report.new(result)} @@ -52,7 +52,7 @@ describe "translate_datasets" do context "when the report is good" do it "should return a good json" do - live_results = Maremma.get(url, host: "https://api.test.datacite.org/") + live_results = Maremma.get(url, host: "https://api.stage.datacite.org/") report = Report.new(live_results) arrays = Report.parse_multi_subset_report report @@ -70,7 +70,7 @@ describe "get_type" do context "when there the report is good" do it "should return the data for one message" do - live_results = Maremma.get(url, host: "https://api.test.datacite.org/") + live_results = Maremma.get(url, host: "https://api.stage.datacite.org/") report = Report.new(live_results) expect(report.get_type).to eq("compressed") end @@ -80,7 +80,7 @@ describe "compressed_report" do context "when there the report is good" do it "should return the data for one message" do - live_results = Maremma.get(url, host: "https://api.test.datacite.org/") + live_results = Maremma.get(url, host: "https://api.stage.datacite.org/") report = Report.new(live_results) expect(report.get_type).to eq("compressed") end diff --git a/spec/models/usage_update_spec.rb b/spec/models/usage_update_spec.rb index d05f8910..2cfd76fb 100644 --- a/spec/models/usage_update_spec.rb +++ b/spec/models/usage_update_spec.rb @@ -8,7 +8,7 @@ context "when there is ONE message" do it "should return the data for one message" do options ={} - message= "https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad" + message= "https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad" response = UsageUpdate.get_data(message,options) expect(response.body["data"]["report"]["report-header"]["report-name"]).to eq("Dataset Master Report") end @@ -79,30 +79,30 @@ context "when the report was found" do it "should parsed it correctly" do body = File.read(fixture_path + 'usage_update.json') - result = OpenStruct.new(body: JSON.parse(body), url:"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad" ) + result = OpenStruct.new(body: JSON.parse(body), url:"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad" ) report = Report.new(result) args = { header: report.header, url: report.report_url } response = Report.translate_datasets(result.body.dig("data","report","report-datasets"), args) expect(response.length).to eq(2) - expect(response.last.except("uuid")).to eq("subj"=>{"id"=>"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "issued"=>"2128-04-09"},"total"=>3,"message-action" => "create", "subj-id"=>"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "obj-id"=>"https://doi.org/10.7291/d1q94r", "relation-type-id"=>"unique-dataset-investigations-regular", "source-id"=>"datacite-usage", "occurred-at"=>"2013-11-02", "license" => "https://creativecommons.org/publicdomain/zero/1.0/", "source-token" => ENV['DATACITE_USAGE_SOURCE_TOKEN']) + expect(response.last.except("uuid")).to eq("subj"=>{"id"=>"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "issued"=>"2128-04-09"},"total"=>3,"message-action" => "create", "subj-id"=>"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "obj-id"=>"https://doi.org/10.7291/d1q94r", "relation-type-id"=>"unique-dataset-investigations-regular", "source-id"=>"datacite-usage", "occurred-at"=>"2013-11-02", "license" => "https://creativecommons.org/publicdomain/zero/1.0/", "source-token" => ENV['DATACITE_USAGE_SOURCE_TOKEN']) end it "should parsed it correctly resolution" do body = File.read(fixture_path + 'resolution_update.json') - result = OpenStruct.new(body: JSON.parse(body), url:"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad" ) + result = OpenStruct.new(body: JSON.parse(body), url:"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad" ) report = Report.new(result) args = { header: report.header, url: report.report_url } response = Report.translate_datasets(result.body.dig("data","report","report-datasets"), args) expect(response.length).to eq(136) - expect(response.last.except("uuid")).to eq("subj"=>{"id"=>"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "issued"=>"2018-10-28"},"total"=>37,"message-action" => "create", "subj-id"=>"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "obj-id"=>"https://doi.org/10.6084/m9.figshare.6158567.v1", "relation-type-id"=>"total-resolutions-machine", "source-id"=>"datacite-resolution", "occurred-at"=>"2019-05-01", "license" => "https://creativecommons.org/publicdomain/zero/1.0/", "source-token" => ENV['DATACITE_RESOLUTION_SOURCE_TOKEN']) + expect(response.last.except("uuid")).to eq("subj"=>{"id"=>"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "issued"=>"2018-10-28"},"total"=>37,"message-action" => "create", "subj-id"=>"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "obj-id"=>"https://doi.org/10.6084/m9.figshare.6158567.v1", "relation-type-id"=>"total-resolutions-machine", "source-id"=>"datacite-resolution", "occurred-at"=>"2019-05-01", "license" => "https://creativecommons.org/publicdomain/zero/1.0/", "source-token" => ENV['DATACITE_RESOLUTION_SOURCE_TOKEN']) end # it "should parsed it correctly from call" do - # result = Maremma.get("https://api.test.datacite.org/reports/1ca6c11f-dcc8-47ed-be45-53499687f0d1", host: "https://api.test.datacite.org/") + # result = Maremma.get("https://api.stage.datacite.org/reports/1ca6c11f-dcc8-47ed-be45-53499687f0d1", host: "https://api.stage.datacite.org/") # report = Report.new(result) # args = { header: report.header, url: report.report_url } # response = Report.translate_datasets(result.body.dig("data","report","report-datasets"), args) @@ -115,7 +115,7 @@ it "should parsed it correctly from dataone with strange doi names" do body = File.read(fixture_path + 'dataone.json') - result = OpenStruct.new(body: JSON.parse(body), url:"https://api.test.datacite.org/reports/f0e06846-7af1-4e43-a32b-8d299e99bd21" ) + result = OpenStruct.new(body: JSON.parse(body), url:"https://api.stage.datacite.org/reports/f0e06846-7af1-4e43-a32b-8d299e99bd21" ) # response = UsageUpdate.parse_data(result) report = Report.new(result) args = {header: report.header, url:report.report_url} @@ -127,30 +127,30 @@ it "should parsed it correctly when it has five metrics and two DOIs" do body = File.read(fixture_path + 'usage_update_3.json') - result = OpenStruct.new(body: JSON.parse(body), url:"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad" ) + result = OpenStruct.new(body: JSON.parse(body), url:"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad" ) # response = UsageUpdate.parse_data(result) report = Report.new(result) args = {header: report.header, url:report.report_url} response = Report.translate_datasets(result.body.dig("data","report","report-datasets"), args) expect(response.length).to eq(5) - expect(response.last.except("uuid")).to eq("message-action"=>"create", "subj-id"=>"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "subj"=>{"id"=>"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "issued"=>"2128-04-09"}, "total"=>208, "obj-id"=>"https://doi.org/10.6071/z7wc73", "relation-type-id"=>"Unique-Dataset-Requests-Machine", "source-id"=>"datacite-usage", "source-token"=>ENV['DATACITE_USAGE_SOURCE_TOKEN'], "occurred-at"=>"2013-11-02", "license"=>"https://creativecommons.org/publicdomain/zero/1.0/") + expect(response.last.except("uuid")).to eq("message-action"=>"create", "subj-id"=>"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "subj"=>{"id"=>"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "issued"=>"2128-04-09"}, "total"=>208, "obj-id"=>"https://doi.org/10.6071/z7wc73", "relation-type-id"=>"Unique-Dataset-Requests-Machine", "source-id"=>"datacite-usage", "source-token"=>ENV['DATACITE_USAGE_SOURCE_TOKEN'], "occurred-at"=>"2013-11-02", "license"=>"https://creativecommons.org/publicdomain/zero/1.0/") end it "should parsed it correctly when it has two metrics per DOI " do body = File.read(fixture_path + 'usage_update_2.json') - result = OpenStruct.new(body: JSON.parse(body), url:"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad") + result = OpenStruct.new(body: JSON.parse(body), url:"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad") # response = UsageUpdate.parse_data(result) report = Report.new(result) args = {header: report.header, url:report.report_url} response = Report.translate_datasets(result.body.dig("data","report","report-datasets"), args) expect(response.length).to eq(4) - expect(response.last.except("uuid")).to eq("message-action"=>"create", "subj-id"=>"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "subj"=>{"id"=>"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "issued"=>"2128-04-09"}, "total"=>208, "obj-id"=>"https://doi.org/10.6071/z7wc73", "relation-type-id"=>"Unique-Dataset-Requests-Machine", "source-id"=>"datacite-usage", "source-token"=>ENV['DATACITE_USAGE_SOURCE_TOKEN'], "occurred-at"=>"2013-11-02", "license"=>"https://creativecommons.org/publicdomain/zero/1.0/") + expect(response.last.except("uuid")).to eq("message-action"=>"create", "subj-id"=>"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "subj"=>{"id"=>"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "issued"=>"2128-04-09"}, "total"=>208, "obj-id"=>"https://doi.org/10.6071/z7wc73", "relation-type-id"=>"Unique-Dataset-Requests-Machine", "source-id"=>"datacite-usage", "source-token"=>ENV['DATACITE_USAGE_SOURCE_TOKEN'], "occurred-at"=>"2013-11-02", "license"=>"https://creativecommons.org/publicdomain/zero/1.0/") end it "should send a warning if there are more than 4 metrics" do body = File.read(fixture_path + 'usage_update_1.json') - result = OpenStruct.new(body: JSON.parse(body), url:"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad" ) + result = OpenStruct.new(body: JSON.parse(body), url:"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad" ) # response = UsageUpdate.parse_data(result) report = Report.new(result) args = {header: report.header, url:report.report_url} @@ -158,7 +158,7 @@ expect(response.length).to eq(1) expect(response).to be_a(Array) - expect(response.last.body).to eq({"errors"=>"There are too many instances in 10.7291/D1Q94R for report https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad. There can only be 4"}) + expect(response.last.body).to eq({"errors"=>"There are too many instances in 10.7291/D1Q94R for report https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad. There can only be 4"}) end end @@ -166,7 +166,7 @@ context "when the usage event is ok" do it "should return report parsed" do body = File.read(fixture_path + 'datacite_resolution_report_2018-09_encoded.json') - result = OpenStruct.new(body: JSON.parse(body), url:"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad" ) + result = OpenStruct.new(body: JSON.parse(body), url:"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad" ) # parsed = UsageUpdate.parse_data(result) expect(Report.new(result).compressed_report?).to be(true) end @@ -176,7 +176,7 @@ describe "get_query_url" do context "when is ok" do it "should return url" do - expect(UsageUpdate.get_query_url(number: 4, year: 2020)).to eq("https://api.test.datacite.org/reports?page%5Bnumber%5D=4&page%5Bsize%5D=25&year=2020") + expect(UsageUpdate.get_query_url(number: 4, year: 2020)).to eq("https://api.stage.datacite.org/reports?page%5Bnumber%5D=4&page%5Bsize%5D=25&year=2020") end end end @@ -185,7 +185,7 @@ # context "when the usage event is ok" do # it "should return report parsed" do # body = File.read(fixture_path + 'datacite_resolution_report_2018-09_encoded.json') - # result = OpenStruct.new(body: JSON.parse(body), url:"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad" ) + # result = OpenStruct.new(body: JSON.parse(body), url:"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad" ) # parsed = Report.new(result).parse_data # # puts parsed # checksum is wrong diff --git a/spec/workers/usage_update_import_worker_spec.rb b/spec/workers/usage_update_import_worker_spec.rb index 098a60d8..34bcc6bf 100644 --- a/spec/workers/usage_update_import_worker_spec.rb +++ b/spec/workers/usage_update_import_worker_spec.rb @@ -2,14 +2,14 @@ describe UsageUpdateImportWorker do context "usage_report", vcr: true do - let(:data) { {"report_id"=>"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad"}.to_json } + let(:data) { {"report_id"=>"https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad"}.to_json } let(:sqs_msg) { double message_id: 'fc754df7-9cc2-4c41-96ca-5996a44b771e', body: data, delete: nil } subject { UsageUpdateImportWorker.new } it 'find usage reports' do parse_job = subject.perform(sqs_msg, data) - expect(parse_job.arguments.first).to eq("https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad") + expect(parse_job.arguments.first).to eq("https://api.stage.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad") end end