diff --git a/spec/concerns/helpable_spec.rb b/spec/concerns/helpable_spec.rb index 15190369e..d1f8bd0a3 100644 --- a/spec/concerns/helpable_spec.rb +++ b/spec/concerns/helpable_spec.rb @@ -74,7 +74,7 @@ response = subject.get_url expect(response.body.dig("data", "responseCode")).to eq(1) - expect(response.body.dig("data", "values")).to eq([{"index"=>1, "type"=>"URL", "data"=>{"format"=>"string", "value"=>"https://blog.datacite.org/re3data-science-europe/"}, "ttl"=>86400, "timestamp"=>"2018-07-30T07:53:49Z"}]) + expect(response.body.dig("data", "values")).to eq([{"index"=>1, "type"=>"URL", "data"=>{"format"=>"string", "value"=>"https://blog.datacite.org/"}, "ttl"=>86400, "timestamp"=>"2018-09-26T08:52:01Z"}]) end # it 'should register on save' do @@ -99,7 +99,7 @@ response = subject.get_url expect(response.body.dig("data", "responseCode")).to eq(1) - expect(response.body.dig("data", "values")).to eq([{"index"=>1, "type"=>"URL", "data"=>{"format"=>"string", "value"=>"https://blog.datacite.org/re3data-science-europe/"}, "ttl"=>86400, "timestamp"=>"2018-07-30T07:53:49Z"}]) + expect(response.body.dig("data", "values")).to eq([{"index"=>1, "type"=>"URL", "data"=>{"format"=>"string", "value"=>"https://blog.datacite.org/re3data-science-europe/"}, "ttl"=>86400, "timestamp"=>"2018-09-26T08:52:02Z"}]) end it 'draft doi' do @@ -123,10 +123,10 @@ let(:client) { create(:client, provider: provider, symbol: ENV['MDS_USERNAME'], password: ENV['MDS_PASSWORD']) } it 'should get dois' do - options = { prefix: "10.14454", username: client.symbol, password: client.password, role_id: "client_admin" } + options = { prefix: "10.5438", username: client.symbol, password: client.password, role_id: "client_admin" } dois = Doi.get_dois(options).body.dig("data", "handles") - expect(dois.length).to eq(7) - expect(dois.first).to eq("10.14454/07243.2013.001") + expect(dois.length).to eq(438) + expect(dois.first).to eq("10.5438/0000-00SS") end end end diff --git a/spec/fixtures/vcr_cassettes/Doi/get_dois/should_get_dois.yml b/spec/fixtures/vcr_cassettes/Doi/get_dois/should_get_dois.yml index d0365c1f7..c45662dd1 100644 --- a/spec/fixtures/vcr_cassettes/Doi/get_dois/should_get_dois.yml +++ b/spec/fixtures/vcr_cassettes/Doi/get_dois/should_get_dois.yml @@ -2,13 +2,13 @@ http_interactions: - request: method: get - uri: https://38.100.138.135:8000/api/handles?prefix=10.14454 + uri: https://handle.test.datacite.org/api/handles?prefix=10.5438 body: encoding: US-ASCII string: '' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma) + - Mozilla/5.0 (compatible; Maremma/4.1.1; +https://github.com/datacite/maremma) Accept: - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 Authorization: @@ -18,13 +18,17 @@ http_interactions: code: 200 message: OK headers: + Date: + - Wed, 26 Sep 2018 08:55:57 GMT Content-Type: - application/json;charset=UTF-8 + Connection: + - keep-alive Vary: - Accept-Encoding body: encoding: ASCII-8BIT - string: '{"responseCode":1,"prefix":"10.14454","totalCount":"7","handles":["10.14454/07243.2013.001","10.14454/07243.2014.001","10.14454/S7QH-5N07","10.14454/XACD-WK60","10.14454/XJ8V-BJ37","10.14454/Y92R-5T46","10.14454/Z32M-SC94"]}' + string: '{"responseCode":1,"prefix":"10.5438","totalCount":"438","handles":["10.5438/0000-00SS","10.5438/0000-01HC","10.5438/0000-03VC","10.5438/0001","10.5438/0002","10.5438/0003","10.5438/0004","10.5438/0005","10.5438/0006","10.5438/0007","10.5438/0007-NW90","10.5438/022J-CC0M","10.5438/02BH-TGC7","10.5438/045S-EC11","10.5438/08A0-3F64","10.5438/08H0-8MQY","10.5438/09C3-4V7S","10.5438/0DPB-24DR","10.5438/0DW9-MPAF","10.5438/0JGW-B795","10.5438/0MAE-2Y7~","10.5438/0Q0J-AJHF","10.5438/0QCA-V2AP","10.5438/0QS4-A3G0","10.5438/0S9T-VT1H","10.5438/0TK6-KN9=","10.5438/0V73-FK2C","10.5438/0XJG-XW5Q","10.5438/13J9-6GQ3","10.5438/15X1-BJ6R","10.5438/18MQ-RPGG","10.5438/1A5Y-7XSB","10.5438/1E3Q-74PQ","10.5438/1FDB-E490","10.5438/1H7N-3CEN","10.5438/1HV8-2GC2","10.5438/1J97-YVHJ","10.5438/1K45-K844","10.5438/1M14-41XZ","10.5438/1M69-A1ZK","10.5438/1MAM-DVC~","10.5438/1NX6-PQ88","10.5438/1PNA-0ZKH","10.5438/1S5T-M2D1","10.5438/1W0P-W0BC","10.5438/1XX7-7765","10.5438/1YAA-K6D1","10.5438/20G9-6WB1","10.5438/2516-KNTQ","10.5438/2629-X1J6","10.5438/26HT-FE7P","10.5438/28A6-4QV*","10.5438/28E3-DP9C","10.5438/2B73-V3YB","10.5438/2B8J-TDXH","10.5438/2G4X-Q6S9","10.5438/2R6Y-9G5Q","10.5438/2WFX-2HZ1","10.5438/2WPE-THS0","10.5438/31V8-C457","10.5438/350C-QNPD","10.5438/3604-7V9$","10.5438/36H3-CQV*","10.5438/36RH-W023","10.5438/382F-TKFV","10.5438/3CN7-V545","10.5438/3DFW-Z4KQ","10.5438/3E7A-6HK7","10.5438/3FYV-2G0V","10.5438/3J8D-X85J","10.5438/3JKB-2QP9","10.5438/3JMF-VP13","10.5438/3MTR-WGS9","10.5438/3Q29-9NWT","10.5438/3TYG-2KW7","10.5438/3X51-RC2B","10.5438/3X7Y-HBP2","10.5438/3YQ5-6N53","10.5438/408J-EAJ4","10.5438/44JK-BESG","10.5438/44VH-95FY","10.5438/455Y-9TR8","10.5438/462Q-X856","10.5438/4BY7-B7ZN","10.5438/4DCW-96B*","10.5438/4K0Q-PB5A","10.5438/4K3M-NYVG","10.5438/4N30-NJPN","10.5438/4QX3-RP8Y","10.5438/4T5V-0PT8","10.5438/53NZ-N4G7","10.5438/54CN-P40V","10.5438/55E5-T5C0","10.5438/5653-THGW","10.5438/57SK-XD8G","10.5438/59G5-93T4","10.5438/59R2-VEEV","10.5438/5AEG-WEEV","10.5438/5B5R-B9DE","10.5438/5E2Q-NJ95","10.5438/5HZJ-5KDS","10.5438/5K96-CDVP","10.5438/5N3Y-GTDY","10.5438/5PS5-G3V~","10.5438/5SJZ-JT21","10.5438/5SQZ-H72E","10.5438/5TJ1-Z20*","10.5438/5YCZ-R519","10.5438/63PZ-PG99","10.5438/67C9-ZAZB","10.5438/68F9-B337","10.5438/6BRG-2M37","10.5438/6BRW-VEMG","10.5438/6DDP-WW08","10.5438/6GEP-3S5E","10.5438/6GG8-SDG9","10.5438/6T44-7BDJ","10.5438/6WCF-EFW5","10.5438/6XDQ-4DT0","10.5438/75RM-4VE2","10.5438/76M6-STNZ","10.5438/7705-12GY","10.5438/7780-8F8P","10.5438/78P9-FNRN","10.5438/78ZD-REDY","10.5438/7D9J-P0FP","10.5438/7MDQ-CFQJ","10.5438/7MRF-MPDK","10.5438/7RXD-S8A3","10.5438/7SSY-QVBV","10.5438/81P5-2D8H","10.5438/85SN-MX23","10.5438/85Y8-8J2Z","10.5438/879W-C2W7","10.5438/87E5-GKYY","10.5438/8AY6-WA82","10.5438/8E5N-E3Q5","10.5438/8EFW-N085","10.5438/8H16-WPEK","10.5438/8JBJ-M82P","10.5438/8QKH-1R6~","10.5438/8S99-7AWR","10.5438/8SZS-1H0H","10.5438/8TWW-0XC8","10.5438/8W5K-8W4K","10.5438/8YMV-8436","10.5438/9171-4B4F","10.5438/95DP-Q6FX","10.5438/99TJ-JZSN","10.5438/9FE4-8FNT","10.5438/9JWD-TN3A","10.5438/9QSK-2MPH","10.5438/9SNZ-VV1Y","10.5438/9Z99-A1RC","10.5438/9ZAT-8K6K","10.5438/A997-PAB1","10.5438/AB8Z-2599","10.5438/AKXG-KCQ*","10.5438/AN60-YNTY","10.5438/ANGM-ARS8","10.5438/AW9V-A6YS","10.5438/AZ3Q-C1VF","10.5438/B77P-W36R","10.5438/BAKK-ZHJN","10.5438/BBGG-0ZKW","10.5438/BC11-CQW1","10.5438/BC11-CQW6","10.5438/BDMN-SCW8","10.5438/BG66-DJN~","10.5438/BJ3H-4S1P","10.5438/BJ5V-MW65","10.5438/BMMQ-YCE9","10.5438/BNC7-JAYB","10.5438/BND2-A57V","10.5438/BNY0-AF15","10.5438/BPZZ-EAY0","10.5438/BRAINLIFE.007","10.5438/BZ8M-MBK5","10.5438/C1ZY-STZQ","10.5438/C3BY-VYZS","10.5438/C61Q-Z2K7","10.5438/C7VR-43SC","10.5438/C81T-HKVP","10.5438/CAB5-TEG0","10.5438/CAPM-3JK5","10.5438/CBS9-YE5~","10.5438/CEVP-HAVW","10.5438/CJT2-T6DZ","10.5438/CMHK-ZH44","10.5438/CRKW-AJ5D","10.5438/CT6S-F4X*","10.5438/D31R-P039","10.5438/D3FQ-BXPA","10.5438/D54Q-GW6Q","10.5438/D6PT-J5Y7","10.5438/D8E2-50Q~","10.5438/D9EQ-9DGA","10.5438/DE51-9GCW","10.5438/DJ3W-83H5","10.5438/DJ5K-XDB0","10.5438/DPJ1-Q3AZ","10.5438/DQCR-N40N","10.5438/E13Q-YPED","10.5438/E2J1-DK5A","10.5438/E5SQ-R8G1","10.5438/E66Y-3X8V","10.5438/EA4H-TX3G","10.5438/EAZK-SSE~","10.5438/ECC1-WA5S","10.5438/ECV0-QFAK","10.5438/ED4H-Y9Q0","10.5438/EJDA-7GW1","10.5438/EKBF-T33Y","10.5438/ESYS-F867","10.5438/ETEB-HG2~","10.5438/EWSV-1821","10.5438/EXAMPLE-FULL","10.5438/F17B-45VZ","10.5438/F1P0-3FK5","10.5438/F2KV-2YK3","10.5438/F36E-H22F","10.5438/FBJ5-3DWP","10.5438/FD06-ABAW","10.5438/FERW-CWHQ","10.5438/FJ3W-0SHD","10.5438/FRC3-XR1E","10.5438/G063-GKT~","10.5438/G39T-WYP1","10.5438/G3ZB-M1GS","10.5438/G59A-FBT2","10.5438/G5QG-A8SA","10.5438/G9G5-CKR7","10.5438/G9QG-M5NJ","10.5438/G9Z6-J964","10.5438/GA8V-FA94","10.5438/GFD7-6QA1","10.5438/GK1Q-HKKR","10.5438/GN8X-06M0","10.5438/GS93-BY4R","10.5438/GWSC-DADG","10.5438/GY4A-STW*","10.5438/GY9W-92W=","10.5438/GYE3-PP2A","10.5438/H0PX-5YTV","10.5438/H0WW-75T7","10.5438/H1JN-QT8$","10.5438/H40K-S4K*","10.5438/H4TY-HS9F","10.5438/H8DR-4TTX","10.5438/HCE6-GCRP","10.5438/HFEA-PRR5","10.5438/HGHT-610$","10.5438/HGMF-XE8X","10.5438/HHE9-1G5=","10.5438/HN7K-SV5Z","10.5438/HQ54-9A6C","10.5438/J5FD-TF79","10.5438/J7K4-98WC","10.5438/J8BC-4SJW","10.5438/J8C8-C0M0","10.5438/JEGK-2DF0","10.5438/JG8P-DVZX","10.5438/JHTN-6890","10.5438/JKW6-K78G","10.5438/JM9F-325F","10.5438/JMED-JCAM","10.5438/JPHX-V7A0","10.5438/JQ7T-HXH8","10.5438/JWX3-KWZ4","10.5438/JZG5-VCQV","10.5438/K3W2-59D0","10.5438/KBG2-ZS5Y","10.5438/KBRV-TZAG","10.5438/KHYZ-6Z8$","10.5438/KTR7-ZJJH","10.5438/KVP3-XY0A","10.5438/KY61-VNBM","10.5438/M5K4-AMKR","10.5438/M68V-4GK6","10.5438/M8TS-BD9~","10.5438/MBW1-0GT1","10.5438/MCMF-B7EH","10.5438/MCNV-GA6N","10.5438/MDS-CLIENT-RUBY-TEST","10.5438/MK56-9XM4","10.5438/MRR6-MF3Q","10.5438/MSK0-15R2","10.5438/MW0P-H8HQ","10.5438/N39S-B1K9","10.5438/NBXT-KY11","10.5438/NDHK-V0BX","10.5438/NDRJ-BX5K","10.5438/NG46-GVT2","10.5438/NHT3-8M8F","10.5438/NMVM-6WC6","10.5438/NNWW-3NX$","10.5438/NQCF-E0EM","10.5438/NSF1-NVKY","10.5438/NTEN-WEYS","10.5438/NZ7N-4YHF","10.5438/NZEX-EY30","10.5438/P1X8-NPY$","10.5438/P3BH-TBB~","10.5438/P59X-916F","10.5438/PE54-ZJ5T","10.5438/PQXM-76GQ","10.5438/PRF0-NRXQ","10.5438/PRXJ-7PZ6","10.5438/PVBB-BTPB","10.5438/Q019-6VE4","10.5438/Q10P-C66K","10.5438/Q2GH-6EGD","10.5438/Q36Q-82CN","10.5438/Q699-SSGR","10.5438/Q8N8-XRQZ","10.5438/QCFT-GV12","10.5438/QDMX-ECG0","10.5438/QGQ5-PGE7","10.5438/QTHF-2NGC","10.5438/QV34-E1WS","10.5438/QVW6-10XP","10.5438/QW2X-PGCY","10.5438/QYJP-1GFT","10.5438/R2ZV-P5WP","10.5438/R33F-96GH","10.5438/R438-S70*","10.5438/R4RA-8DD~","10.5438/R5AV-PTNH","10.5438/R8XY-8XK=","10.5438/R9M1-77T$","10.5438/RC4N-42YJ","10.5438/RCTN-QJCB","10.5438/RCZV-HJNS","10.5438/RDEE-P7JW","10.5438/RFJ3-C3SM","10.5438/RMT6-W97W","10.5438/RN1Z-DWRB","10.5438/RNNR-X2H~","10.5438/RPZ2-WBY6","10.5438/RQ5Q-PPEP","10.5438/RQY9-0M3B","10.5438/RTQF-7S4J","10.5438/RWAD-EB1A","10.5438/RX2V-V5WT","10.5438/RZQM-SYE2","10.5438/S20C-STGX","10.5438/S2YG-RY5K","10.5438/S7KD-S2C7","10.5438/S8GF-0CK9","10.5438/S9ZJ-ARXG","10.5438/SBTT-S36E","10.5438/SC37-K1J5","10.5438/SD03-1XBE","10.5438/SD2R-YCG9","10.5438/SDQ2-7G1Y","10.5438/SHCG-EA1F","10.5438/SHR4-2BS2","10.5438/SS2R-9CNS","10.5438/SSAF-KFTT","10.5438/SSK4-YEJ9","10.5438/SWBY-VWG~","10.5438/SYW5-VQA5","10.5438/T0AP-D5W7","10.5438/T3NT-4627","10.5438/T964-M8SM","10.5438/TEPP-YTY6","10.5438/THY1-TC09","10.5438/TK9X-RNY9","10.5438/TNHX-54CG","10.5438/TQ4C-6C0Q","10.5438/TSJR-F9CH","10.5438/TT7V-JP55","10.5438/TW5H-21DH","10.5438/TXD3-C9ZP","10.5438/V0VG-8JJK","10.5438/V1W9-VF4H","10.5438/V2XJ-NFAP","10.5438/V683-K48X","10.5438/VAKZ-08VB","10.5438/VCC2-T9SJ","10.5438/VFJ4-8DQ$","10.5438/VHQF-PWJQ","10.5438/VKG9-X9BZ","10.5438/VQ2T-VR4K","10.5438/VQ3X-QDWT","10.5438/VTBT-NTJ8","10.5438/VZX2-KFRD","10.5438/W029-Y6W~","10.5438/W354-4XQB","10.5438/W4N7-01AT","10.5438/W8QF-4HMG","10.5438/W9H1-WE44","10.5438/WD63-6X8~","10.5438/WDYW-1K1R","10.5438/WMAS-KM0V","10.5438/WQCK-V16M","10.5438/WQX6-2DSQ","10.5438/WTJH-QHX1","10.5438/X0BB-6959","10.5438/X4JQ-EGT5","10.5438/X6WA-82RZ","10.5438/X9EG-VF27","10.5438/XCBJ-G7ZY","10.5438/XCVB-T9EW","10.5438/XDPK-WM3E","10.5438/XF8R-7VZT","10.5438/XGHB-6E1H","10.5438/XQ3J-1CMK","10.5438/XXAJ-N6H9","10.5438/XY47-C7JF","10.5438/XZH2-HG04","10.5438/Y0HC-S62S","10.5438/Y131-YX9D","10.5438/Y4KS-KSBC","10.5438/Y543-2QJX","10.5438/Y5SF-0K1T","10.5438/Y72S-E9JW","10.5438/Y81Q-R21F","10.5438/Y919-5QN4","10.5438/YAA9-F80*","10.5438/YDFF-0DNH","10.5438/YEG5-6R6Z","10.5438/YHCJ-P5HR","10.5438/YX93-ZP3M","10.5438/YYM6-6WVT","10.5438/Z2DD-TKPN","10.5438/Z2GZ-V9MF","10.5438/ZAVG-XM4R","10.5438/ZDTR-AQTT","10.5438/ZE09-RCBA","10.5438/ZF4S-5M37","10.5438/ZFPH-3MXQ","10.5438/ZH1T-Z72K","10.5438/ZQGA-EWE7","10.5438/ZR9Y-K3Z5","10.5438/ZSKC-6BC1","10.5438/ZWSF-4Y7Y","10.5438/ZYJN-KXX9"]}' http_version: - recorded_at: Wed, 25 Jul 2018 10:51:46 GMT + recorded_at: Wed, 26 Sep 2018 08:55:57 GMT recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/Doi/register_doi/draft_doi.yml b/spec/fixtures/vcr_cassettes/Doi/register_doi/draft_doi.yml deleted file mode 100644 index 939aebc89..000000000 --- a/spec/fixtures/vcr_cassettes/Doi/register_doi/draft_doi.yml +++ /dev/null @@ -1,73 +0,0 @@ ---- -http_interactions: -- request: - method: put - uri: http://elasticsearch:9200/providers-test/provider/44 - body: - encoding: UTF-8 - string: '{"id":44,"contact_email":"josiah@example.org","contact_name":"Josiah - Carberry","created":"2018-07-05T09:12:14.000Z","doi_quota_allowed":-1,"doi_quota_used":0,"is_active":"\u0001","name":"My - provider","password":"15e4bf0dfe3407d79121bf1a093fd57bdcff5b4bc5996e18da5e6115ac0fdd65","role_name":"ROLE_ALLOCATOR","symbol":"DATACITE","updated":"2018-07-05T09:12:14.000Z","version":0,"comments":null,"experiments":null,"description":null,"region":"EMEA","country_code":"DE","website":null,"phone":null,"deleted_at":null,"joined":null,"institution_type":null,"logo":null}' - headers: - Authorization: - - Basic ZWxhc3RpYzpjaGFuZ2VtZQ== - Content-Type: - - application/json - User-Agent: - - Faraday v0.15.2 - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - response: - status: - code: 201 - message: Created - headers: - Location: - - "/providers-test/provider/44" - Content-Type: - - application/json; charset=UTF-8 - Content-Length: - - '135' - body: - encoding: ASCII-8BIT - string: '{"_index":"providers-test","_type":"provider","_id":"44","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"created":true}' - http_version: - recorded_at: Thu, 05 Jul 2018 09:12:14 GMT -- request: - method: put - uri: http://elasticsearch:9200/clients-test/client/32 - body: - encoding: UTF-8 - string: '{"id":32,"comments":null,"contact_email":"josiah@example.org","contact_name":"Josiah - Carberry","created":"2018-07-05T09:12:14.000Z","doi_quota_allowed":-1,"doi_quota_used":0,"domains":"*","is_active":"\u0001","name":"My - data center","password":"Kf7JEQ2c","role_name":"ROLE_DATACENTRE","symbol":"DATACITE.DATACITE","updated":"2018-07-05T09:12:14.000Z","version":0,"allocator":44,"experiments":null,"deleted_at":null,"re3data":null,"url":null}' - headers: - Authorization: - - Basic ZWxhc3RpYzpjaGFuZ2VtZQ== - Content-Type: - - application/json - User-Agent: - - Faraday v0.15.2 - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - response: - status: - code: 201 - message: Created - headers: - Location: - - "/clients-test/client/32" - Content-Type: - - application/json; charset=UTF-8 - Content-Length: - - '132' - body: - encoding: ASCII-8BIT - string: '{"_index":"clients-test","_type":"client","_id":"32","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"created":true}' - http_version: - recorded_at: Thu, 05 Jul 2018 09:12:14 GMT -recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/Doi/register_doi/missing_username.yml b/spec/fixtures/vcr_cassettes/Doi/register_doi/missing_username.yml deleted file mode 100644 index a1913b38e..000000000 --- a/spec/fixtures/vcr_cassettes/Doi/register_doi/missing_username.yml +++ /dev/null @@ -1,40 +0,0 @@ ---- -http_interactions: -- request: - method: put - uri: https://mds-legacy.test.datacite.org/doi/10.5438/MCNV-GA6N - body: - encoding: UTF-8 - string: |- - doi=10.5438/MCNV-GA6N - url=https://blog.datacite.org/re3data-science-europe/ - headers: - User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.0.12; +https://github.com/datacite/maremma) - Content-Type: - - text/plain;charset=UTF-8 - Accept: - - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 - response: - status: - code: 401 - message: Unauthorized - headers: - Date: - - Sat, 21 Jul 2018 18:00:55 GMT - Content-Length: - - '61' - Connection: - - keep-alive - Server: - - Apache-Coyote/1.1 - Set-Cookie: - - JSESSIONID=8C6029FCCA079D38051D01A8CE93DFEE; Path=/; HttpOnly - Www-Authenticate: - - Basic realm="mds.datacite.org" - body: - encoding: ASCII-8BIT - string: An Authentication object was not found in the SecurityContext - http_version: - recorded_at: Sat, 21 Jul 2018 18:00:59 GMT -recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/Doi/register_doi/missing_username_and_password.yml b/spec/fixtures/vcr_cassettes/Doi/register_doi/missing_username_and_password.yml deleted file mode 100644 index f2b263208..000000000 --- a/spec/fixtures/vcr_cassettes/Doi/register_doi/missing_username_and_password.yml +++ /dev/null @@ -1,73 +0,0 @@ ---- -http_interactions: -- request: - method: put - uri: http://elasticsearch:9200/providers-test/provider/45 - body: - encoding: UTF-8 - string: '{"id":45,"contact_email":"josiah@example.org","contact_name":"Josiah - Carberry","created":"2018-07-05T09:12:14.000Z","doi_quota_allowed":-1,"doi_quota_used":0,"is_active":"\u0001","name":"My - provider","password":"15e4bf0dfe3407d79121bf1a093fd57bdcff5b4bc5996e18da5e6115ac0fdd65","role_name":"ROLE_ALLOCATOR","symbol":"DATACITE","updated":"2018-07-05T09:12:14.000Z","version":0,"comments":null,"experiments":null,"description":null,"region":"EMEA","country_code":"DE","website":null,"phone":null,"deleted_at":null,"joined":null,"institution_type":null,"logo":null}' - headers: - Authorization: - - Basic ZWxhc3RpYzpjaGFuZ2VtZQ== - Content-Type: - - application/json - User-Agent: - - Faraday v0.15.2 - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - response: - status: - code: 201 - message: Created - headers: - Location: - - "/providers-test/provider/45" - Content-Type: - - application/json; charset=UTF-8 - Content-Length: - - '136' - body: - encoding: ASCII-8BIT - string: '{"_index":"providers-test","_type":"provider","_id":"45","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"created":true}' - http_version: - recorded_at: Thu, 05 Jul 2018 09:12:14 GMT -- request: - method: put - uri: http://elasticsearch:9200/clients-test/client/33 - body: - encoding: UTF-8 - string: '{"id":33,"comments":null,"contact_email":"josiah@example.org","contact_name":"Josiah - Carberry","created":"2018-07-05T09:12:14.000Z","doi_quota_allowed":-1,"doi_quota_used":0,"domains":"*","is_active":"\u0001","name":"My - data center","password":"Kf7JEQ2c","role_name":"ROLE_DATACENTRE","symbol":"DATACITE.DATACITE","updated":"2018-07-05T09:12:14.000Z","version":0,"allocator":45,"experiments":null,"deleted_at":null,"re3data":null,"url":null}' - headers: - Authorization: - - Basic ZWxhc3RpYzpjaGFuZ2VtZQ== - Content-Type: - - application/json - User-Agent: - - Faraday v0.15.2 - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - response: - status: - code: 201 - message: Created - headers: - Location: - - "/clients-test/client/33" - Content-Type: - - application/json; charset=UTF-8 - Content-Length: - - '132' - body: - encoding: ASCII-8BIT - string: '{"_index":"clients-test","_type":"client","_id":"33","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"created":true}' - http_version: - recorded_at: Thu, 05 Jul 2018 09:12:14 GMT -recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/Doi/register_doi/server_not_responsible.yml b/spec/fixtures/vcr_cassettes/Doi/register_doi/server_not_responsible.yml index 54ba73dfa..01629926b 100644 --- a/spec/fixtures/vcr_cassettes/Doi/register_doi/server_not_responsible.yml +++ b/spec/fixtures/vcr_cassettes/Doi/register_doi/server_not_responsible.yml @@ -2,13 +2,13 @@ http_interactions: - request: method: put - uri: https://38.100.138.135:8000/api/handles/10.1371/JOURNAL.PBIO.2001414 + uri: https://handle.test.datacite.org/api/handles/10.1371/JOURNAL.PBIO.2001414 body: encoding: UTF-8 - string: '[{"index":100,"type":"HS_ADMIN","data":{"format":"admin","value":{"handle":"10.admin/codata","index":300,"permissions":"111111111111"}}},{"index":1,"type":"URL","data":{"format":"string","value":"http://hackett.io/kitty.reichert"}}]' + string: '[{"index":100,"type":"HS_ADMIN","data":{"format":"admin","value":{"handle":"TEST/ADMIN","index":300,"permissions":"111111111111"}}},{"index":1,"type":"URL","data":{"format":"string","value":"http://cruickshank.net/art_conn"}}]' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma) + - Mozilla/5.0 (compatible; Maremma/4.1.1; +https://github.com/datacite/maremma) Content-Type: - application/json;charset=UTF-8 Accept: @@ -20,13 +20,17 @@ http_interactions: code: 400 message: Bad Request headers: + Date: + - Wed, 26 Sep 2018 08:52:02 GMT Content-Type: - application/json;charset=UTF-8 Content-Length: - '102' + Connection: + - keep-alive body: encoding: ASCII-8BIT string: '{"responseCode":301,"message":"That prefix doesn''t live here","handle":"10.1371/JOURNAL.PBIO.2001414"}' http_version: - recorded_at: Mon, 30 Jul 2018 18:31:27 GMT + recorded_at: Wed, 26 Sep 2018 08:52:02 GMT recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/Doi/register_doi/should_change_url.yml b/spec/fixtures/vcr_cassettes/Doi/register_doi/should_change_url.yml index 4381bfd75..769e829de 100644 --- a/spec/fixtures/vcr_cassettes/Doi/register_doi/should_change_url.yml +++ b/spec/fixtures/vcr_cassettes/Doi/register_doi/should_change_url.yml @@ -2,13 +2,13 @@ http_interactions: - request: method: put - uri: https://38.100.138.135:8000/api/handles/10.5438/MCNV-GA6N + uri: https://handle.test.datacite.org/api/handles/10.5438/MCNV-GA6N body: encoding: UTF-8 - string: '[{"index":100,"type":"HS_ADMIN","data":{"format":"admin","value":{"handle":"10.admin/codata","index":300,"permissions":"111111111111"}}},{"index":1,"type":"URL","data":{"format":"string","value":"https://blog.datacite.org/re3data-science-europe/"}}]' + string: '[{"index":100,"type":"HS_ADMIN","data":{"format":"admin","value":{"handle":"TEST/ADMIN","index":300,"permissions":"111111111111"}}},{"index":1,"type":"URL","data":{"format":"string","value":"https://blog.datacite.org/re3data-science-europe/"}}]' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma) + - Mozilla/5.0 (compatible; Maremma/4.1.1; +https://github.com/datacite/maremma) Content-Type: - application/json;charset=UTF-8 Accept: @@ -20,51 +20,46 @@ http_interactions: code: 200 message: OK headers: + Date: + - Wed, 26 Sep 2018 08:52:02 GMT Content-Type: - application/json;charset=UTF-8 + Connection: + - keep-alive Vary: - Accept-Encoding body: encoding: ASCII-8BIT string: '{"responseCode":1,"handle":"10.5438/MCNV-GA6N"}' - http_version: - recorded_at: Mon, 30 Jul 2018 18:28:17 GMT + http_version: + recorded_at: Wed, 26 Sep 2018 08:52:02 GMT - request: method: get - uri: https://38.100.138.135:8000/api/handles/10.5438/MCNV-GA6N?index=1 + uri: https://handle.test.datacite.org/api/handles/10.5438/MCNV-GA6N?index=1 body: encoding: US-ASCII string: '' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma) + - Mozilla/5.0 (compatible; Maremma/4.1.1; +https://github.com/datacite/maremma) Accept: - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 response: status: code: 200 - message: '' + message: OK headers: Date: - - Mon, 30 Jul 2018 18:28:17 GMT + - Wed, 26 Sep 2018 08:52:02 GMT Content-Type: - application/json;charset=UTF-8 Connection: - keep-alive - Set-Cookie: - - __cfduid=de3585417869323469f3fed60da44233f1532975297; expires=Tue, 30-Jul-19 - 18:28:17 GMT; path=/; domain=.doi.org; HttpOnly Vary: - Accept-Encoding - Expect-Ct: - - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" - Server: - - cloudflare - Cf-Ray: - - 4429e256ce6c638b-FRA body: encoding: ASCII-8BIT - string: '{"responseCode":1,"handle":"10.5438/MCNV-GA6N","values":[{"index":1,"type":"URL","data":{"format":"string","value":"https://blog.datacite.org/re3data-science-europe/"},"ttl":86400,"timestamp":"2018-07-30T07:53:49Z"}]}' - http_version: - recorded_at: Mon, 30 Jul 2018 18:28:17 GMT + string: '{"responseCode":1,"handle":"10.5438/MCNV-GA6N","values":[{"index":1,"type":"URL","data":{"format":"string","value":"https://blog.datacite.org/re3data-science-europe/"},"ttl":86400,"timestamp":"2018-09-26T08:52:02Z"}]}' + http_version: + recorded_at: Wed, 26 Sep 2018 08:52:02 GMT recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/Doi/register_doi/should_register.yml b/spec/fixtures/vcr_cassettes/Doi/register_doi/should_register.yml index 283a05692..7cc473ae8 100644 --- a/spec/fixtures/vcr_cassettes/Doi/register_doi/should_register.yml +++ b/spec/fixtures/vcr_cassettes/Doi/register_doi/should_register.yml @@ -2,13 +2,13 @@ http_interactions: - request: method: put - uri: https://38.100.138.135:8000/api/handles/10.5438/MCNV-GA6N + uri: https://handle.test.datacite.org/api/handles/10.5438/MCNV-GA6N body: encoding: UTF-8 - string: '[{"index":100,"type":"HS_ADMIN","data":{"format":"admin","value":{"handle":"10.admin/codata","index":300,"permissions":"111111111111"}}},{"index":1,"type":"URL","data":{"format":"string","value":"https://blog.datacite.org/"}}]' + string: '[{"index":100,"type":"HS_ADMIN","data":{"format":"admin","value":{"handle":"TEST/ADMIN","index":300,"permissions":"111111111111"}}},{"index":1,"type":"URL","data":{"format":"string","value":"https://blog.datacite.org/"}}]' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma) + - Mozilla/5.0 (compatible; Maremma/4.1.1; +https://github.com/datacite/maremma) Content-Type: - application/json;charset=UTF-8 Accept: @@ -20,51 +20,46 @@ http_interactions: code: 200 message: OK headers: + Date: + - Wed, 26 Sep 2018 08:52:01 GMT Content-Type: - application/json;charset=UTF-8 + Connection: + - keep-alive Vary: - Accept-Encoding body: encoding: ASCII-8BIT string: '{"responseCode":1,"handle":"10.5438/MCNV-GA6N"}' - http_version: - recorded_at: Mon, 30 Jul 2018 18:28:15 GMT + http_version: + recorded_at: Wed, 26 Sep 2018 08:52:01 GMT - request: method: get - uri: https://38.100.138.135:8000/api/handles/10.5438/MCNV-GA6N?index=1 + uri: https://handle.test.datacite.org/api/handles/10.5438/MCNV-GA6N?index=1 body: encoding: US-ASCII string: '' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma) + - Mozilla/5.0 (compatible; Maremma/4.1.1; +https://github.com/datacite/maremma) Accept: - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 response: status: code: 200 - message: '' + message: OK headers: Date: - - Mon, 30 Jul 2018 18:28:16 GMT + - Wed, 26 Sep 2018 08:52:01 GMT Content-Type: - application/json;charset=UTF-8 Connection: - keep-alive - Set-Cookie: - - __cfduid=ddf6037292bbb7c52c219d1fc2ff6e68f1532975296; expires=Tue, 30-Jul-19 - 18:28:16 GMT; path=/; domain=.doi.org; HttpOnly Vary: - Accept-Encoding - Expect-Ct: - - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" - Server: - - cloudflare - Cf-Ray: - - 4429e24f9c4463e5-FRA body: encoding: ASCII-8BIT - string: '{"responseCode":1,"handle":"10.5438/MCNV-GA6N","values":[{"index":1,"type":"URL","data":{"format":"string","value":"https://blog.datacite.org/re3data-science-europe/"},"ttl":86400,"timestamp":"2018-07-30T07:53:49Z"}]}' - http_version: - recorded_at: Mon, 30 Jul 2018 18:28:16 GMT + string: '{"responseCode":1,"handle":"10.5438/MCNV-GA6N","values":[{"index":1,"type":"URL","data":{"format":"string","value":"https://blog.datacite.org/"},"ttl":86400,"timestamp":"2018-09-26T08:52:01Z"}]}' + http_version: + recorded_at: Wed, 26 Sep 2018 08:52:01 GMT recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url/returns_status_code_200.yml b/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url/returns_status_code_200.yml index f7eeaa880..504510b00 100644 --- a/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url/returns_status_code_200.yml +++ b/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url/returns_status_code_200.yml @@ -2,40 +2,31 @@ http_interactions: - request: method: get - uri: https://38.100.138.135:8000/api/handles/10.5438/8SYZ-YM47?index=1 + uri: https://handle.test.datacite.org/api/handles/10.5438/FJ3W-0SHD?index=1 body: encoding: US-ASCII string: '' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma) + - Mozilla/5.0 (compatible; Maremma/4.1.1; +https://github.com/datacite/maremma) Accept: - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 response: status: code: 200 - message: '' + message: OK headers: Date: - - Mon, 30 Jul 2018 18:48:02 GMT + - Wed, 26 Sep 2018 09:05:42 GMT Content-Type: - application/json;charset=UTF-8 Connection: - keep-alive - Set-Cookie: - - __cfduid=d6bc94bf2659233146f3cb499923388651532976482; expires=Tue, 30-Jul-19 - 18:48:02 GMT; path=/; domain=.doi.org; HttpOnly Vary: - Accept-Encoding - Expect-Ct: - - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" - Server: - - cloudflare - Cf-Ray: - - 4429ff44dbc36463-FRA body: encoding: ASCII-8BIT - string: '{"responseCode":1,"handle":"10.5438/8SYZ-YM47","values":[{"index":1,"type":"URL","data":{"format":"string","value":"https://blog.datacite.org/welcome-helena-cousijn/"},"ttl":86400,"timestamp":"2018-07-29T23:57:59Z"}]}' - http_version: - recorded_at: Mon, 30 Jul 2018 18:48:02 GMT + string: '{"responseCode":1,"handle":"10.5438/FJ3W-0SHD","values":[{"index":1,"type":"URL","data":{"format":"string","value":"https://blog.datacite.org/data-driven-development/"},"ttl":86400,"timestamp":"2016-12-19T15:06:36Z"}]}' + http_version: + recorded_at: Wed, 26 Sep 2018 09:05:42 GMT recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url/returns_url.yml b/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url/returns_url.yml index 0b83593e9..504510b00 100644 --- a/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url/returns_url.yml +++ b/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url/returns_url.yml @@ -2,40 +2,31 @@ http_interactions: - request: method: get - uri: https://38.100.138.135:8000/api/handles/10.5438/8SYZ-YM47?index=1 + uri: https://handle.test.datacite.org/api/handles/10.5438/FJ3W-0SHD?index=1 body: encoding: US-ASCII string: '' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma) + - Mozilla/5.0 (compatible; Maremma/4.1.1; +https://github.com/datacite/maremma) Accept: - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 response: status: code: 200 - message: '' + message: OK headers: Date: - - Mon, 30 Jul 2018 18:48:01 GMT + - Wed, 26 Sep 2018 09:05:42 GMT Content-Type: - application/json;charset=UTF-8 Connection: - keep-alive - Set-Cookie: - - __cfduid=d1772eeaee2380cc050a449a3e35e8b211532976481; expires=Tue, 30-Jul-19 - 18:48:01 GMT; path=/; domain=.doi.org; HttpOnly Vary: - Accept-Encoding - Expect-Ct: - - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" - Server: - - cloudflare - Cf-Ray: - - 4429ff3eda28649f-FRA body: encoding: ASCII-8BIT - string: '{"responseCode":1,"handle":"10.5438/8SYZ-YM47","values":[{"index":1,"type":"URL","data":{"format":"string","value":"https://blog.datacite.org/welcome-helena-cousijn/"},"ttl":86400,"timestamp":"2018-07-29T23:57:59Z"}]}' - http_version: - recorded_at: Mon, 30 Jul 2018 18:48:01 GMT + string: '{"responseCode":1,"handle":"10.5438/FJ3W-0SHD","values":[{"index":1,"type":"URL","data":{"format":"string","value":"https://blog.datacite.org/data-driven-development/"},"ttl":86400,"timestamp":"2016-12-19T15:06:36Z"}]}' + http_version: + recorded_at: Wed, 26 Sep 2018 09:05:42 GMT recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_DataCite_DOI/returns_nil.yml b/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_DataCite_DOI/returns_nil.yml new file mode 100644 index 000000000..316f8353c --- /dev/null +++ b/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_DataCite_DOI/returns_nil.yml @@ -0,0 +1,32 @@ +--- +http_interactions: +- request: + method: get + uri: https://handle.test.datacite.org/api/handles/10.1371/JOURNAL.PBIO.2001414?index=1 + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Mozilla/5.0 (compatible; Maremma/4.1.1; +https://github.com/datacite/maremma) + Accept: + - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 + response: + status: + code: 400 + message: Bad Request + headers: + Date: + - Wed, 26 Sep 2018 09:12:54 GMT + Content-Type: + - application/json;charset=UTF-8 + Content-Length: + - '102' + Connection: + - keep-alive + body: + encoding: ASCII-8BIT + string: '{"responseCode":301,"message":"That prefix doesn''t live here","handle":"10.1371/JOURNAL.PBIO.2001414"}' + http_version: + recorded_at: Wed, 26 Sep 2018 09:12:54 GMT +recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_DataCite_DOI/returns_not_DataCite_DOI.yml b/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_DataCite_DOI/returns_not_DataCite_DOI.yml index 7841988d8..2e21b7e80 100644 --- a/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_DataCite_DOI/returns_not_DataCite_DOI.yml +++ b/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_DataCite_DOI/returns_not_DataCite_DOI.yml @@ -2,40 +2,31 @@ http_interactions: - request: method: get - uri: https://38.100.138.135:8000/api/handles/10.1371/JOURNAL.PBIO.2001414?index=1 + uri: https://handle.test.datacite.org/api/handles/10.1371/JOURNAL.PBIO.2001414?index=1 body: encoding: US-ASCII string: '' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma) + - Mozilla/5.0 (compatible; Maremma/4.1.1; +https://github.com/datacite/maremma) Accept: - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 response: status: - code: 200 - message: '' + code: 400 + message: Bad Request headers: Date: - - Mon, 30 Jul 2018 18:48:13 GMT + - Wed, 26 Sep 2018 09:09:25 GMT Content-Type: - application/json;charset=UTF-8 + Content-Length: + - '102' Connection: - keep-alive - Set-Cookie: - - __cfduid=d3763692acfbcce3f8b51f10b1598ab521532976492; expires=Tue, 30-Jul-19 - 18:48:12 GMT; path=/; domain=.doi.org; HttpOnly - Vary: - - Accept-Encoding - Expect-Ct: - - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" - Server: - - cloudflare - Cf-Ray: - - 4429ff887d3c6463-FRA body: encoding: ASCII-8BIT - string: '{"responseCode":1,"handle":"10.1371/JOURNAL.PBIO.2001414","values":[{"index":1,"type":"URL","data":{"format":"string","value":"http://dx.plos.org/10.1371/journal.pbio.2001414"},"ttl":86400,"timestamp":"2017-06-29T17:30:17Z"}]}' - http_version: - recorded_at: Mon, 30 Jul 2018 18:48:13 GMT + string: '{"responseCode":301,"message":"That prefix doesn''t live here","handle":"10.1371/JOURNAL.PBIO.2001414"}' + http_version: + recorded_at: Wed, 26 Sep 2018 09:09:25 GMT recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_DataCite_DOI/returns_status_code_200.yml b/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_DataCite_DOI/returns_status_code_200.yml index 8702b434c..2e21b7e80 100644 --- a/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_DataCite_DOI/returns_status_code_200.yml +++ b/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_DataCite_DOI/returns_status_code_200.yml @@ -2,40 +2,31 @@ http_interactions: - request: method: get - uri: https://38.100.138.135:8000/api/handles/10.1371/JOURNAL.PBIO.2001414?index=1 + uri: https://handle.test.datacite.org/api/handles/10.1371/JOURNAL.PBIO.2001414?index=1 body: encoding: US-ASCII string: '' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma) + - Mozilla/5.0 (compatible; Maremma/4.1.1; +https://github.com/datacite/maremma) Accept: - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 response: status: - code: 200 - message: '' + code: 400 + message: Bad Request headers: Date: - - Mon, 30 Jul 2018 18:53:52 GMT + - Wed, 26 Sep 2018 09:09:25 GMT Content-Type: - application/json;charset=UTF-8 + Content-Length: + - '102' Connection: - keep-alive - Set-Cookie: - - __cfduid=d67050eb14d19cf0a9e1bb95a730854b31532976832; expires=Tue, 30-Jul-19 - 18:53:52 GMT; path=/; domain=.doi.org; HttpOnly - Vary: - - Accept-Encoding - Expect-Ct: - - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" - Server: - - cloudflare - Cf-Ray: - - 442a07d31da863c1-FRA body: encoding: ASCII-8BIT - string: '{"responseCode":1,"handle":"10.1371/JOURNAL.PBIO.2001414","values":[{"index":1,"type":"URL","data":{"format":"string","value":"http://dx.plos.org/10.1371/journal.pbio.2001414"},"ttl":86400,"timestamp":"2017-06-29T17:30:17Z"}]}' - http_version: - recorded_at: Mon, 30 Jul 2018 18:53:52 GMT + string: '{"responseCode":301,"message":"That prefix doesn''t live here","handle":"10.1371/JOURNAL.PBIO.2001414"}' + http_version: + recorded_at: Wed, 26 Sep 2018 09:09:25 GMT recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_DataCite_DOI/returns_status_code_500.yml b/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_DataCite_DOI/returns_status_code_500.yml deleted file mode 100644 index a7d07951c..000000000 --- a/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_DataCite_DOI/returns_status_code_500.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: https://38.100.138.135:8000/api/handles/10.1371/JOURNAL.PBIO.2001414?index=1 - body: - encoding: US-ASCII - string: '' - headers: - User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma) - Accept: - - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 - response: - status: - code: 200 - message: '' - headers: - Date: - - Mon, 30 Jul 2018 18:48:14 GMT - Content-Type: - - application/json;charset=UTF-8 - Connection: - - keep-alive - Set-Cookie: - - __cfduid=dfc64ebb9a47e81d714fb69ff20bebc421532976494; expires=Tue, 30-Jul-19 - 18:48:14 GMT; path=/; domain=.doi.org; HttpOnly - Vary: - - Accept-Encoding - Expect-Ct: - - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" - Server: - - cloudflare - Cf-Ray: - - 4429ff9378216457-FRA - body: - encoding: ASCII-8BIT - string: '{"responseCode":1,"handle":"10.1371/JOURNAL.PBIO.2001414","values":[{"index":1,"type":"URL","data":{"format":"string","value":"http://dx.plos.org/10.1371/journal.pbio.2001414"},"ttl":86400,"timestamp":"2017-06-29T17:30:17Z"}]}' - http_version: - recorded_at: Mon, 30 Jul 2018 18:48:14 GMT -recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_found/returns_not_found.yml b/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_found/returns_not_found.yml index 75bd7c16f..83421841e 100644 --- a/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_found/returns_not_found.yml +++ b/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_found/returns_not_found.yml @@ -2,40 +2,31 @@ http_interactions: - request: method: get - uri: https://38.100.138.135:8000/api/handles/10.14454/61Y1-E521?index=1 + uri: https://handle.test.datacite.org/api/handles/10.14454/61Y1-E521?index=1 body: encoding: US-ASCII string: '' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma) + - Mozilla/5.0 (compatible; Maremma/4.1.1; +https://github.com/datacite/maremma) Accept: - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 response: status: code: 404 - message: '' + message: Not Found headers: Date: - - Mon, 30 Jul 2018 18:48:09 GMT + - Wed, 26 Sep 2018 09:09:23 GMT Content-Type: - application/json;charset=UTF-8 Content-Length: - '50' Connection: - keep-alive - Set-Cookie: - - __cfduid=da150f2b25eafe9923b730a3a0dfa3cab1532976489; expires=Tue, 30-Jul-19 - 18:48:09 GMT; path=/; domain=.doi.org; HttpOnly - Expect-Ct: - - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" - Server: - - cloudflare - Cf-Ray: - - 4429ff738d05638b-FRA body: encoding: ASCII-8BIT string: '{"responseCode":100,"handle":"10.14454/61Y1-E521"}' - http_version: - recorded_at: Mon, 30 Jul 2018 18:48:09 GMT + http_version: + recorded_at: Wed, 26 Sep 2018 09:09:23 GMT recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_found/returns_status_code_404.yml b/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_found/returns_status_code_404.yml index 94572acb1..f5bc3aeea 100644 --- a/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_found/returns_status_code_404.yml +++ b/spec/fixtures/vcr_cassettes/dois/GET_/dois/DOI/get-url_not_found/returns_status_code_404.yml @@ -2,40 +2,31 @@ http_interactions: - request: method: get - uri: https://38.100.138.135:8000/api/handles/10.14454/61Y1-E521?index=1 + uri: https://handle.test.datacite.org/api/handles/10.14454/61Y1-E521?index=1 body: encoding: US-ASCII string: '' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma) + - Mozilla/5.0 (compatible; Maremma/4.1.1; +https://github.com/datacite/maremma) Accept: - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 response: status: code: 404 - message: '' + message: Not Found headers: Date: - - Mon, 30 Jul 2018 18:48:10 GMT + - Wed, 26 Sep 2018 09:09:24 GMT Content-Type: - application/json;charset=UTF-8 Content-Length: - '50' Connection: - keep-alive - Set-Cookie: - - __cfduid=dba5f839ee051250d66d44a8be4dde1dd1532976490; expires=Tue, 30-Jul-19 - 18:48:10 GMT; path=/; domain=.doi.org; HttpOnly - Expect-Ct: - - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" - Server: - - cloudflare - Cf-Ray: - - 4429ff7a4d63638b-FRA body: encoding: ASCII-8BIT string: '{"responseCode":100,"handle":"10.14454/61Y1-E521"}' - http_version: - recorded_at: Mon, 30 Jul 2018 18:48:10 GMT + http_version: + recorded_at: Wed, 26 Sep 2018 09:09:24 GMT recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/dois/GET_/dois/get-dois/returns_all_dois.yml b/spec/fixtures/vcr_cassettes/dois/GET_/dois/get-dois/returns_all_dois.yml index eb916f5c7..9f7cfdbbf 100644 --- a/spec/fixtures/vcr_cassettes/dois/GET_/dois/get-dois/returns_all_dois.yml +++ b/spec/fixtures/vcr_cassettes/dois/GET_/dois/get-dois/returns_all_dois.yml @@ -2,13 +2,13 @@ http_interactions: - request: method: get - uri: https://38.100.138.135:8000/api/handles?prefix=10.14454 + uri: https://handle.test.datacite.org/api/handles?prefix=10.5438 body: encoding: US-ASCII string: '' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma) + - Mozilla/5.0 (compatible; Maremma/4.1.1; +https://github.com/datacite/maremma) Accept: - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 Authorization: @@ -18,13 +18,17 @@ http_interactions: code: 200 message: OK headers: + Date: + - Wed, 26 Sep 2018 09:14:09 GMT Content-Type: - application/json;charset=UTF-8 + Connection: + - keep-alive Vary: - Accept-Encoding body: encoding: ASCII-8BIT - string: '{"responseCode":1,"prefix":"10.14454","totalCount":"7","handles":["10.14454/07243.2013.001","10.14454/07243.2014.001","10.14454/S7QH-5N07","10.14454/XACD-WK60","10.14454/XJ8V-BJ37","10.14454/Y92R-5T46","10.14454/Z32M-SC94"]}' + string: '{"responseCode":1,"prefix":"10.5438","totalCount":"438","handles":["10.5438/0000-00SS","10.5438/0000-01HC","10.5438/0000-03VC","10.5438/0001","10.5438/0002","10.5438/0003","10.5438/0004","10.5438/0005","10.5438/0006","10.5438/0007","10.5438/0007-NW90","10.5438/022J-CC0M","10.5438/02BH-TGC7","10.5438/045S-EC11","10.5438/08A0-3F64","10.5438/08H0-8MQY","10.5438/09C3-4V7S","10.5438/0DPB-24DR","10.5438/0DW9-MPAF","10.5438/0JGW-B795","10.5438/0MAE-2Y7~","10.5438/0Q0J-AJHF","10.5438/0QCA-V2AP","10.5438/0QS4-A3G0","10.5438/0S9T-VT1H","10.5438/0TK6-KN9=","10.5438/0V73-FK2C","10.5438/0XJG-XW5Q","10.5438/13J9-6GQ3","10.5438/15X1-BJ6R","10.5438/18MQ-RPGG","10.5438/1A5Y-7XSB","10.5438/1E3Q-74PQ","10.5438/1FDB-E490","10.5438/1H7N-3CEN","10.5438/1HV8-2GC2","10.5438/1J97-YVHJ","10.5438/1K45-K844","10.5438/1M14-41XZ","10.5438/1M69-A1ZK","10.5438/1MAM-DVC~","10.5438/1NX6-PQ88","10.5438/1PNA-0ZKH","10.5438/1S5T-M2D1","10.5438/1W0P-W0BC","10.5438/1XX7-7765","10.5438/1YAA-K6D1","10.5438/20G9-6WB1","10.5438/2516-KNTQ","10.5438/2629-X1J6","10.5438/26HT-FE7P","10.5438/28A6-4QV*","10.5438/28E3-DP9C","10.5438/2B73-V3YB","10.5438/2B8J-TDXH","10.5438/2G4X-Q6S9","10.5438/2R6Y-9G5Q","10.5438/2WFX-2HZ1","10.5438/2WPE-THS0","10.5438/31V8-C457","10.5438/350C-QNPD","10.5438/3604-7V9$","10.5438/36H3-CQV*","10.5438/36RH-W023","10.5438/382F-TKFV","10.5438/3CN7-V545","10.5438/3DFW-Z4KQ","10.5438/3E7A-6HK7","10.5438/3FYV-2G0V","10.5438/3J8D-X85J","10.5438/3JKB-2QP9","10.5438/3JMF-VP13","10.5438/3MTR-WGS9","10.5438/3Q29-9NWT","10.5438/3TYG-2KW7","10.5438/3X51-RC2B","10.5438/3X7Y-HBP2","10.5438/3YQ5-6N53","10.5438/408J-EAJ4","10.5438/44JK-BESG","10.5438/44VH-95FY","10.5438/455Y-9TR8","10.5438/462Q-X856","10.5438/4BY7-B7ZN","10.5438/4DCW-96B*","10.5438/4K0Q-PB5A","10.5438/4K3M-NYVG","10.5438/4N30-NJPN","10.5438/4QX3-RP8Y","10.5438/4T5V-0PT8","10.5438/53NZ-N4G7","10.5438/54CN-P40V","10.5438/55E5-T5C0","10.5438/5653-THGW","10.5438/57SK-XD8G","10.5438/59G5-93T4","10.5438/59R2-VEEV","10.5438/5AEG-WEEV","10.5438/5B5R-B9DE","10.5438/5E2Q-NJ95","10.5438/5HZJ-5KDS","10.5438/5K96-CDVP","10.5438/5N3Y-GTDY","10.5438/5PS5-G3V~","10.5438/5SJZ-JT21","10.5438/5SQZ-H72E","10.5438/5TJ1-Z20*","10.5438/5YCZ-R519","10.5438/63PZ-PG99","10.5438/67C9-ZAZB","10.5438/68F9-B337","10.5438/6BRG-2M37","10.5438/6BRW-VEMG","10.5438/6DDP-WW08","10.5438/6GEP-3S5E","10.5438/6GG8-SDG9","10.5438/6T44-7BDJ","10.5438/6WCF-EFW5","10.5438/6XDQ-4DT0","10.5438/75RM-4VE2","10.5438/76M6-STNZ","10.5438/7705-12GY","10.5438/7780-8F8P","10.5438/78P9-FNRN","10.5438/78ZD-REDY","10.5438/7D9J-P0FP","10.5438/7MDQ-CFQJ","10.5438/7MRF-MPDK","10.5438/7RXD-S8A3","10.5438/7SSY-QVBV","10.5438/81P5-2D8H","10.5438/85SN-MX23","10.5438/85Y8-8J2Z","10.5438/879W-C2W7","10.5438/87E5-GKYY","10.5438/8AY6-WA82","10.5438/8E5N-E3Q5","10.5438/8EFW-N085","10.5438/8H16-WPEK","10.5438/8JBJ-M82P","10.5438/8QKH-1R6~","10.5438/8S99-7AWR","10.5438/8SZS-1H0H","10.5438/8TWW-0XC8","10.5438/8W5K-8W4K","10.5438/8YMV-8436","10.5438/9171-4B4F","10.5438/95DP-Q6FX","10.5438/99TJ-JZSN","10.5438/9FE4-8FNT","10.5438/9JWD-TN3A","10.5438/9QSK-2MPH","10.5438/9SNZ-VV1Y","10.5438/9Z99-A1RC","10.5438/9ZAT-8K6K","10.5438/A997-PAB1","10.5438/AB8Z-2599","10.5438/AKXG-KCQ*","10.5438/AN60-YNTY","10.5438/ANGM-ARS8","10.5438/AW9V-A6YS","10.5438/AZ3Q-C1VF","10.5438/B77P-W36R","10.5438/BAKK-ZHJN","10.5438/BBGG-0ZKW","10.5438/BC11-CQW1","10.5438/BC11-CQW6","10.5438/BDMN-SCW8","10.5438/BG66-DJN~","10.5438/BJ3H-4S1P","10.5438/BJ5V-MW65","10.5438/BMMQ-YCE9","10.5438/BNC7-JAYB","10.5438/BND2-A57V","10.5438/BNY0-AF15","10.5438/BPZZ-EAY0","10.5438/BRAINLIFE.007","10.5438/BZ8M-MBK5","10.5438/C1ZY-STZQ","10.5438/C3BY-VYZS","10.5438/C61Q-Z2K7","10.5438/C7VR-43SC","10.5438/C81T-HKVP","10.5438/CAB5-TEG0","10.5438/CAPM-3JK5","10.5438/CBS9-YE5~","10.5438/CEVP-HAVW","10.5438/CJT2-T6DZ","10.5438/CMHK-ZH44","10.5438/CRKW-AJ5D","10.5438/CT6S-F4X*","10.5438/D31R-P039","10.5438/D3FQ-BXPA","10.5438/D54Q-GW6Q","10.5438/D6PT-J5Y7","10.5438/D8E2-50Q~","10.5438/D9EQ-9DGA","10.5438/DE51-9GCW","10.5438/DJ3W-83H5","10.5438/DJ5K-XDB0","10.5438/DPJ1-Q3AZ","10.5438/DQCR-N40N","10.5438/E13Q-YPED","10.5438/E2J1-DK5A","10.5438/E5SQ-R8G1","10.5438/E66Y-3X8V","10.5438/EA4H-TX3G","10.5438/EAZK-SSE~","10.5438/ECC1-WA5S","10.5438/ECV0-QFAK","10.5438/ED4H-Y9Q0","10.5438/EJDA-7GW1","10.5438/EKBF-T33Y","10.5438/ESYS-F867","10.5438/ETEB-HG2~","10.5438/EWSV-1821","10.5438/EXAMPLE-FULL","10.5438/F17B-45VZ","10.5438/F1P0-3FK5","10.5438/F2KV-2YK3","10.5438/F36E-H22F","10.5438/FBJ5-3DWP","10.5438/FD06-ABAW","10.5438/FERW-CWHQ","10.5438/FJ3W-0SHD","10.5438/FRC3-XR1E","10.5438/G063-GKT~","10.5438/G39T-WYP1","10.5438/G3ZB-M1GS","10.5438/G59A-FBT2","10.5438/G5QG-A8SA","10.5438/G9G5-CKR7","10.5438/G9QG-M5NJ","10.5438/G9Z6-J964","10.5438/GA8V-FA94","10.5438/GFD7-6QA1","10.5438/GK1Q-HKKR","10.5438/GN8X-06M0","10.5438/GS93-BY4R","10.5438/GWSC-DADG","10.5438/GY4A-STW*","10.5438/GY9W-92W=","10.5438/GYE3-PP2A","10.5438/H0PX-5YTV","10.5438/H0WW-75T7","10.5438/H1JN-QT8$","10.5438/H40K-S4K*","10.5438/H4TY-HS9F","10.5438/H8DR-4TTX","10.5438/HCE6-GCRP","10.5438/HFEA-PRR5","10.5438/HGHT-610$","10.5438/HGMF-XE8X","10.5438/HHE9-1G5=","10.5438/HN7K-SV5Z","10.5438/HQ54-9A6C","10.5438/J5FD-TF79","10.5438/J7K4-98WC","10.5438/J8BC-4SJW","10.5438/J8C8-C0M0","10.5438/JEGK-2DF0","10.5438/JG8P-DVZX","10.5438/JHTN-6890","10.5438/JKW6-K78G","10.5438/JM9F-325F","10.5438/JMED-JCAM","10.5438/JPHX-V7A0","10.5438/JQ7T-HXH8","10.5438/JWX3-KWZ4","10.5438/JZG5-VCQV","10.5438/K3W2-59D0","10.5438/KBG2-ZS5Y","10.5438/KBRV-TZAG","10.5438/KHYZ-6Z8$","10.5438/KTR7-ZJJH","10.5438/KVP3-XY0A","10.5438/KY61-VNBM","10.5438/M5K4-AMKR","10.5438/M68V-4GK6","10.5438/M8TS-BD9~","10.5438/MBW1-0GT1","10.5438/MCMF-B7EH","10.5438/MCNV-GA6N","10.5438/MDS-CLIENT-RUBY-TEST","10.5438/MK56-9XM4","10.5438/MRR6-MF3Q","10.5438/MSK0-15R2","10.5438/MW0P-H8HQ","10.5438/N39S-B1K9","10.5438/NBXT-KY11","10.5438/NDHK-V0BX","10.5438/NDRJ-BX5K","10.5438/NG46-GVT2","10.5438/NHT3-8M8F","10.5438/NMVM-6WC6","10.5438/NNWW-3NX$","10.5438/NQCF-E0EM","10.5438/NSF1-NVKY","10.5438/NTEN-WEYS","10.5438/NZ7N-4YHF","10.5438/NZEX-EY30","10.5438/P1X8-NPY$","10.5438/P3BH-TBB~","10.5438/P59X-916F","10.5438/PE54-ZJ5T","10.5438/PQXM-76GQ","10.5438/PRF0-NRXQ","10.5438/PRXJ-7PZ6","10.5438/PVBB-BTPB","10.5438/Q019-6VE4","10.5438/Q10P-C66K","10.5438/Q2GH-6EGD","10.5438/Q36Q-82CN","10.5438/Q699-SSGR","10.5438/Q8N8-XRQZ","10.5438/QCFT-GV12","10.5438/QDMX-ECG0","10.5438/QGQ5-PGE7","10.5438/QTHF-2NGC","10.5438/QV34-E1WS","10.5438/QVW6-10XP","10.5438/QW2X-PGCY","10.5438/QYJP-1GFT","10.5438/R2ZV-P5WP","10.5438/R33F-96GH","10.5438/R438-S70*","10.5438/R4RA-8DD~","10.5438/R5AV-PTNH","10.5438/R8XY-8XK=","10.5438/R9M1-77T$","10.5438/RC4N-42YJ","10.5438/RCTN-QJCB","10.5438/RCZV-HJNS","10.5438/RDEE-P7JW","10.5438/RFJ3-C3SM","10.5438/RMT6-W97W","10.5438/RN1Z-DWRB","10.5438/RNNR-X2H~","10.5438/RPZ2-WBY6","10.5438/RQ5Q-PPEP","10.5438/RQY9-0M3B","10.5438/RTQF-7S4J","10.5438/RWAD-EB1A","10.5438/RX2V-V5WT","10.5438/RZQM-SYE2","10.5438/S20C-STGX","10.5438/S2YG-RY5K","10.5438/S7KD-S2C7","10.5438/S8GF-0CK9","10.5438/S9ZJ-ARXG","10.5438/SBTT-S36E","10.5438/SC37-K1J5","10.5438/SD03-1XBE","10.5438/SD2R-YCG9","10.5438/SDQ2-7G1Y","10.5438/SHCG-EA1F","10.5438/SHR4-2BS2","10.5438/SS2R-9CNS","10.5438/SSAF-KFTT","10.5438/SSK4-YEJ9","10.5438/SWBY-VWG~","10.5438/SYW5-VQA5","10.5438/T0AP-D5W7","10.5438/T3NT-4627","10.5438/T964-M8SM","10.5438/TEPP-YTY6","10.5438/THY1-TC09","10.5438/TK9X-RNY9","10.5438/TNHX-54CG","10.5438/TQ4C-6C0Q","10.5438/TSJR-F9CH","10.5438/TT7V-JP55","10.5438/TW5H-21DH","10.5438/TXD3-C9ZP","10.5438/V0VG-8JJK","10.5438/V1W9-VF4H","10.5438/V2XJ-NFAP","10.5438/V683-K48X","10.5438/VAKZ-08VB","10.5438/VCC2-T9SJ","10.5438/VFJ4-8DQ$","10.5438/VHQF-PWJQ","10.5438/VKG9-X9BZ","10.5438/VQ2T-VR4K","10.5438/VQ3X-QDWT","10.5438/VTBT-NTJ8","10.5438/VZX2-KFRD","10.5438/W029-Y6W~","10.5438/W354-4XQB","10.5438/W4N7-01AT","10.5438/W8QF-4HMG","10.5438/W9H1-WE44","10.5438/WD63-6X8~","10.5438/WDYW-1K1R","10.5438/WMAS-KM0V","10.5438/WQCK-V16M","10.5438/WQX6-2DSQ","10.5438/WTJH-QHX1","10.5438/X0BB-6959","10.5438/X4JQ-EGT5","10.5438/X6WA-82RZ","10.5438/X9EG-VF27","10.5438/XCBJ-G7ZY","10.5438/XCVB-T9EW","10.5438/XDPK-WM3E","10.5438/XF8R-7VZT","10.5438/XGHB-6E1H","10.5438/XQ3J-1CMK","10.5438/XXAJ-N6H9","10.5438/XY47-C7JF","10.5438/XZH2-HG04","10.5438/Y0HC-S62S","10.5438/Y131-YX9D","10.5438/Y4KS-KSBC","10.5438/Y543-2QJX","10.5438/Y5SF-0K1T","10.5438/Y72S-E9JW","10.5438/Y81Q-R21F","10.5438/Y919-5QN4","10.5438/YAA9-F80*","10.5438/YDFF-0DNH","10.5438/YEG5-6R6Z","10.5438/YHCJ-P5HR","10.5438/YX93-ZP3M","10.5438/YYM6-6WVT","10.5438/Z2DD-TKPN","10.5438/Z2GZ-V9MF","10.5438/ZAVG-XM4R","10.5438/ZDTR-AQTT","10.5438/ZE09-RCBA","10.5438/ZF4S-5M37","10.5438/ZFPH-3MXQ","10.5438/ZH1T-Z72K","10.5438/ZQGA-EWE7","10.5438/ZR9Y-K3Z5","10.5438/ZSKC-6BC1","10.5438/ZWSF-4Y7Y","10.5438/ZYJN-KXX9"]}' http_version: - recorded_at: Wed, 25 Jul 2018 10:49:42 GMT + recorded_at: Wed, 26 Sep 2018 09:14:09 GMT recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/vcr_cassettes/dois/GET_/dois/get-dois/returns_status_code_200.yml b/spec/fixtures/vcr_cassettes/dois/GET_/dois/get-dois/returns_status_code_200.yml index c07543497..ddedce5ca 100644 --- a/spec/fixtures/vcr_cassettes/dois/GET_/dois/get-dois/returns_status_code_200.yml +++ b/spec/fixtures/vcr_cassettes/dois/GET_/dois/get-dois/returns_status_code_200.yml @@ -2,13 +2,13 @@ http_interactions: - request: method: get - uri: https://38.100.138.135:8000/api/handles?prefix=10.14454 + uri: https://handle.test.datacite.org/api/handles?prefix=10.5438 body: encoding: US-ASCII string: '' headers: User-Agent: - - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma) + - Mozilla/5.0 (compatible; Maremma/4.1.1; +https://github.com/datacite/maremma) Accept: - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 Authorization: @@ -18,13 +18,17 @@ http_interactions: code: 200 message: OK headers: + Date: + - Wed, 26 Sep 2018 09:14:10 GMT Content-Type: - application/json;charset=UTF-8 + Connection: + - keep-alive Vary: - Accept-Encoding body: encoding: ASCII-8BIT - string: '{"responseCode":1,"prefix":"10.14454","totalCount":"7","handles":["10.14454/07243.2013.001","10.14454/07243.2014.001","10.14454/S7QH-5N07","10.14454/XACD-WK60","10.14454/XJ8V-BJ37","10.14454/Y92R-5T46","10.14454/Z32M-SC94"]}' + string: '{"responseCode":1,"prefix":"10.5438","totalCount":"438","handles":["10.5438/0000-00SS","10.5438/0000-01HC","10.5438/0000-03VC","10.5438/0001","10.5438/0002","10.5438/0003","10.5438/0004","10.5438/0005","10.5438/0006","10.5438/0007","10.5438/0007-NW90","10.5438/022J-CC0M","10.5438/02BH-TGC7","10.5438/045S-EC11","10.5438/08A0-3F64","10.5438/08H0-8MQY","10.5438/09C3-4V7S","10.5438/0DPB-24DR","10.5438/0DW9-MPAF","10.5438/0JGW-B795","10.5438/0MAE-2Y7~","10.5438/0Q0J-AJHF","10.5438/0QCA-V2AP","10.5438/0QS4-A3G0","10.5438/0S9T-VT1H","10.5438/0TK6-KN9=","10.5438/0V73-FK2C","10.5438/0XJG-XW5Q","10.5438/13J9-6GQ3","10.5438/15X1-BJ6R","10.5438/18MQ-RPGG","10.5438/1A5Y-7XSB","10.5438/1E3Q-74PQ","10.5438/1FDB-E490","10.5438/1H7N-3CEN","10.5438/1HV8-2GC2","10.5438/1J97-YVHJ","10.5438/1K45-K844","10.5438/1M14-41XZ","10.5438/1M69-A1ZK","10.5438/1MAM-DVC~","10.5438/1NX6-PQ88","10.5438/1PNA-0ZKH","10.5438/1S5T-M2D1","10.5438/1W0P-W0BC","10.5438/1XX7-7765","10.5438/1YAA-K6D1","10.5438/20G9-6WB1","10.5438/2516-KNTQ","10.5438/2629-X1J6","10.5438/26HT-FE7P","10.5438/28A6-4QV*","10.5438/28E3-DP9C","10.5438/2B73-V3YB","10.5438/2B8J-TDXH","10.5438/2G4X-Q6S9","10.5438/2R6Y-9G5Q","10.5438/2WFX-2HZ1","10.5438/2WPE-THS0","10.5438/31V8-C457","10.5438/350C-QNPD","10.5438/3604-7V9$","10.5438/36H3-CQV*","10.5438/36RH-W023","10.5438/382F-TKFV","10.5438/3CN7-V545","10.5438/3DFW-Z4KQ","10.5438/3E7A-6HK7","10.5438/3FYV-2G0V","10.5438/3J8D-X85J","10.5438/3JKB-2QP9","10.5438/3JMF-VP13","10.5438/3MTR-WGS9","10.5438/3Q29-9NWT","10.5438/3TYG-2KW7","10.5438/3X51-RC2B","10.5438/3X7Y-HBP2","10.5438/3YQ5-6N53","10.5438/408J-EAJ4","10.5438/44JK-BESG","10.5438/44VH-95FY","10.5438/455Y-9TR8","10.5438/462Q-X856","10.5438/4BY7-B7ZN","10.5438/4DCW-96B*","10.5438/4K0Q-PB5A","10.5438/4K3M-NYVG","10.5438/4N30-NJPN","10.5438/4QX3-RP8Y","10.5438/4T5V-0PT8","10.5438/53NZ-N4G7","10.5438/54CN-P40V","10.5438/55E5-T5C0","10.5438/5653-THGW","10.5438/57SK-XD8G","10.5438/59G5-93T4","10.5438/59R2-VEEV","10.5438/5AEG-WEEV","10.5438/5B5R-B9DE","10.5438/5E2Q-NJ95","10.5438/5HZJ-5KDS","10.5438/5K96-CDVP","10.5438/5N3Y-GTDY","10.5438/5PS5-G3V~","10.5438/5SJZ-JT21","10.5438/5SQZ-H72E","10.5438/5TJ1-Z20*","10.5438/5YCZ-R519","10.5438/63PZ-PG99","10.5438/67C9-ZAZB","10.5438/68F9-B337","10.5438/6BRG-2M37","10.5438/6BRW-VEMG","10.5438/6DDP-WW08","10.5438/6GEP-3S5E","10.5438/6GG8-SDG9","10.5438/6T44-7BDJ","10.5438/6WCF-EFW5","10.5438/6XDQ-4DT0","10.5438/75RM-4VE2","10.5438/76M6-STNZ","10.5438/7705-12GY","10.5438/7780-8F8P","10.5438/78P9-FNRN","10.5438/78ZD-REDY","10.5438/7D9J-P0FP","10.5438/7MDQ-CFQJ","10.5438/7MRF-MPDK","10.5438/7RXD-S8A3","10.5438/7SSY-QVBV","10.5438/81P5-2D8H","10.5438/85SN-MX23","10.5438/85Y8-8J2Z","10.5438/879W-C2W7","10.5438/87E5-GKYY","10.5438/8AY6-WA82","10.5438/8E5N-E3Q5","10.5438/8EFW-N085","10.5438/8H16-WPEK","10.5438/8JBJ-M82P","10.5438/8QKH-1R6~","10.5438/8S99-7AWR","10.5438/8SZS-1H0H","10.5438/8TWW-0XC8","10.5438/8W5K-8W4K","10.5438/8YMV-8436","10.5438/9171-4B4F","10.5438/95DP-Q6FX","10.5438/99TJ-JZSN","10.5438/9FE4-8FNT","10.5438/9JWD-TN3A","10.5438/9QSK-2MPH","10.5438/9SNZ-VV1Y","10.5438/9Z99-A1RC","10.5438/9ZAT-8K6K","10.5438/A997-PAB1","10.5438/AB8Z-2599","10.5438/AKXG-KCQ*","10.5438/AN60-YNTY","10.5438/ANGM-ARS8","10.5438/AW9V-A6YS","10.5438/AZ3Q-C1VF","10.5438/B77P-W36R","10.5438/BAKK-ZHJN","10.5438/BBGG-0ZKW","10.5438/BC11-CQW1","10.5438/BC11-CQW6","10.5438/BDMN-SCW8","10.5438/BG66-DJN~","10.5438/BJ3H-4S1P","10.5438/BJ5V-MW65","10.5438/BMMQ-YCE9","10.5438/BNC7-JAYB","10.5438/BND2-A57V","10.5438/BNY0-AF15","10.5438/BPZZ-EAY0","10.5438/BRAINLIFE.007","10.5438/BZ8M-MBK5","10.5438/C1ZY-STZQ","10.5438/C3BY-VYZS","10.5438/C61Q-Z2K7","10.5438/C7VR-43SC","10.5438/C81T-HKVP","10.5438/CAB5-TEG0","10.5438/CAPM-3JK5","10.5438/CBS9-YE5~","10.5438/CEVP-HAVW","10.5438/CJT2-T6DZ","10.5438/CMHK-ZH44","10.5438/CRKW-AJ5D","10.5438/CT6S-F4X*","10.5438/D31R-P039","10.5438/D3FQ-BXPA","10.5438/D54Q-GW6Q","10.5438/D6PT-J5Y7","10.5438/D8E2-50Q~","10.5438/D9EQ-9DGA","10.5438/DE51-9GCW","10.5438/DJ3W-83H5","10.5438/DJ5K-XDB0","10.5438/DPJ1-Q3AZ","10.5438/DQCR-N40N","10.5438/E13Q-YPED","10.5438/E2J1-DK5A","10.5438/E5SQ-R8G1","10.5438/E66Y-3X8V","10.5438/EA4H-TX3G","10.5438/EAZK-SSE~","10.5438/ECC1-WA5S","10.5438/ECV0-QFAK","10.5438/ED4H-Y9Q0","10.5438/EJDA-7GW1","10.5438/EKBF-T33Y","10.5438/ESYS-F867","10.5438/ETEB-HG2~","10.5438/EWSV-1821","10.5438/EXAMPLE-FULL","10.5438/F17B-45VZ","10.5438/F1P0-3FK5","10.5438/F2KV-2YK3","10.5438/F36E-H22F","10.5438/FBJ5-3DWP","10.5438/FD06-ABAW","10.5438/FERW-CWHQ","10.5438/FJ3W-0SHD","10.5438/FRC3-XR1E","10.5438/G063-GKT~","10.5438/G39T-WYP1","10.5438/G3ZB-M1GS","10.5438/G59A-FBT2","10.5438/G5QG-A8SA","10.5438/G9G5-CKR7","10.5438/G9QG-M5NJ","10.5438/G9Z6-J964","10.5438/GA8V-FA94","10.5438/GFD7-6QA1","10.5438/GK1Q-HKKR","10.5438/GN8X-06M0","10.5438/GS93-BY4R","10.5438/GWSC-DADG","10.5438/GY4A-STW*","10.5438/GY9W-92W=","10.5438/GYE3-PP2A","10.5438/H0PX-5YTV","10.5438/H0WW-75T7","10.5438/H1JN-QT8$","10.5438/H40K-S4K*","10.5438/H4TY-HS9F","10.5438/H8DR-4TTX","10.5438/HCE6-GCRP","10.5438/HFEA-PRR5","10.5438/HGHT-610$","10.5438/HGMF-XE8X","10.5438/HHE9-1G5=","10.5438/HN7K-SV5Z","10.5438/HQ54-9A6C","10.5438/J5FD-TF79","10.5438/J7K4-98WC","10.5438/J8BC-4SJW","10.5438/J8C8-C0M0","10.5438/JEGK-2DF0","10.5438/JG8P-DVZX","10.5438/JHTN-6890","10.5438/JKW6-K78G","10.5438/JM9F-325F","10.5438/JMED-JCAM","10.5438/JPHX-V7A0","10.5438/JQ7T-HXH8","10.5438/JWX3-KWZ4","10.5438/JZG5-VCQV","10.5438/K3W2-59D0","10.5438/KBG2-ZS5Y","10.5438/KBRV-TZAG","10.5438/KHYZ-6Z8$","10.5438/KTR7-ZJJH","10.5438/KVP3-XY0A","10.5438/KY61-VNBM","10.5438/M5K4-AMKR","10.5438/M68V-4GK6","10.5438/M8TS-BD9~","10.5438/MBW1-0GT1","10.5438/MCMF-B7EH","10.5438/MCNV-GA6N","10.5438/MDS-CLIENT-RUBY-TEST","10.5438/MK56-9XM4","10.5438/MRR6-MF3Q","10.5438/MSK0-15R2","10.5438/MW0P-H8HQ","10.5438/N39S-B1K9","10.5438/NBXT-KY11","10.5438/NDHK-V0BX","10.5438/NDRJ-BX5K","10.5438/NG46-GVT2","10.5438/NHT3-8M8F","10.5438/NMVM-6WC6","10.5438/NNWW-3NX$","10.5438/NQCF-E0EM","10.5438/NSF1-NVKY","10.5438/NTEN-WEYS","10.5438/NZ7N-4YHF","10.5438/NZEX-EY30","10.5438/P1X8-NPY$","10.5438/P3BH-TBB~","10.5438/P59X-916F","10.5438/PE54-ZJ5T","10.5438/PQXM-76GQ","10.5438/PRF0-NRXQ","10.5438/PRXJ-7PZ6","10.5438/PVBB-BTPB","10.5438/Q019-6VE4","10.5438/Q10P-C66K","10.5438/Q2GH-6EGD","10.5438/Q36Q-82CN","10.5438/Q699-SSGR","10.5438/Q8N8-XRQZ","10.5438/QCFT-GV12","10.5438/QDMX-ECG0","10.5438/QGQ5-PGE7","10.5438/QTHF-2NGC","10.5438/QV34-E1WS","10.5438/QVW6-10XP","10.5438/QW2X-PGCY","10.5438/QYJP-1GFT","10.5438/R2ZV-P5WP","10.5438/R33F-96GH","10.5438/R438-S70*","10.5438/R4RA-8DD~","10.5438/R5AV-PTNH","10.5438/R8XY-8XK=","10.5438/R9M1-77T$","10.5438/RC4N-42YJ","10.5438/RCTN-QJCB","10.5438/RCZV-HJNS","10.5438/RDEE-P7JW","10.5438/RFJ3-C3SM","10.5438/RMT6-W97W","10.5438/RN1Z-DWRB","10.5438/RNNR-X2H~","10.5438/RPZ2-WBY6","10.5438/RQ5Q-PPEP","10.5438/RQY9-0M3B","10.5438/RTQF-7S4J","10.5438/RWAD-EB1A","10.5438/RX2V-V5WT","10.5438/RZQM-SYE2","10.5438/S20C-STGX","10.5438/S2YG-RY5K","10.5438/S7KD-S2C7","10.5438/S8GF-0CK9","10.5438/S9ZJ-ARXG","10.5438/SBTT-S36E","10.5438/SC37-K1J5","10.5438/SD03-1XBE","10.5438/SD2R-YCG9","10.5438/SDQ2-7G1Y","10.5438/SHCG-EA1F","10.5438/SHR4-2BS2","10.5438/SS2R-9CNS","10.5438/SSAF-KFTT","10.5438/SSK4-YEJ9","10.5438/SWBY-VWG~","10.5438/SYW5-VQA5","10.5438/T0AP-D5W7","10.5438/T3NT-4627","10.5438/T964-M8SM","10.5438/TEPP-YTY6","10.5438/THY1-TC09","10.5438/TK9X-RNY9","10.5438/TNHX-54CG","10.5438/TQ4C-6C0Q","10.5438/TSJR-F9CH","10.5438/TT7V-JP55","10.5438/TW5H-21DH","10.5438/TXD3-C9ZP","10.5438/V0VG-8JJK","10.5438/V1W9-VF4H","10.5438/V2XJ-NFAP","10.5438/V683-K48X","10.5438/VAKZ-08VB","10.5438/VCC2-T9SJ","10.5438/VFJ4-8DQ$","10.5438/VHQF-PWJQ","10.5438/VKG9-X9BZ","10.5438/VQ2T-VR4K","10.5438/VQ3X-QDWT","10.5438/VTBT-NTJ8","10.5438/VZX2-KFRD","10.5438/W029-Y6W~","10.5438/W354-4XQB","10.5438/W4N7-01AT","10.5438/W8QF-4HMG","10.5438/W9H1-WE44","10.5438/WD63-6X8~","10.5438/WDYW-1K1R","10.5438/WMAS-KM0V","10.5438/WQCK-V16M","10.5438/WQX6-2DSQ","10.5438/WTJH-QHX1","10.5438/X0BB-6959","10.5438/X4JQ-EGT5","10.5438/X6WA-82RZ","10.5438/X9EG-VF27","10.5438/XCBJ-G7ZY","10.5438/XCVB-T9EW","10.5438/XDPK-WM3E","10.5438/XF8R-7VZT","10.5438/XGHB-6E1H","10.5438/XQ3J-1CMK","10.5438/XXAJ-N6H9","10.5438/XY47-C7JF","10.5438/XZH2-HG04","10.5438/Y0HC-S62S","10.5438/Y131-YX9D","10.5438/Y4KS-KSBC","10.5438/Y543-2QJX","10.5438/Y5SF-0K1T","10.5438/Y72S-E9JW","10.5438/Y81Q-R21F","10.5438/Y919-5QN4","10.5438/YAA9-F80*","10.5438/YDFF-0DNH","10.5438/YEG5-6R6Z","10.5438/YHCJ-P5HR","10.5438/YX93-ZP3M","10.5438/YYM6-6WVT","10.5438/Z2DD-TKPN","10.5438/Z2GZ-V9MF","10.5438/ZAVG-XM4R","10.5438/ZDTR-AQTT","10.5438/ZE09-RCBA","10.5438/ZF4S-5M37","10.5438/ZFPH-3MXQ","10.5438/ZH1T-Z72K","10.5438/ZQGA-EWE7","10.5438/ZR9Y-K3Z5","10.5438/ZSKC-6BC1","10.5438/ZWSF-4Y7Y","10.5438/ZYJN-KXX9"]}' http_version: - recorded_at: Wed, 25 Jul 2018 10:49:43 GMT + recorded_at: Wed, 26 Sep 2018 09:14:10 GMT recorded_with: VCR 3.0.3 diff --git a/spec/requests/dois_spec.rb b/spec/requests/dois_spec.rb index 979a8e987..05e1071aa 100644 --- a/spec/requests/dois_spec.rb +++ b/spec/requests/dois_spec.rb @@ -1861,12 +1861,12 @@ end describe 'GET /dois/DOI/get-url', vcr: true do - let(:doi) { create(:doi, client: client, doi: "10.5438/8syz-ym47", event: "publish") } + let(:doi) { create(:doi, client: client, doi: "10.5438/fj3w-0shd", event: "publish") } before { get "/dois/#{doi.doi}/get-url", headers: headers } it 'returns url' do - expect(json["url"]).to eq("https://blog.datacite.org/welcome-helena-cousijn/") + expect(json["url"]).to eq("https://blog.datacite.org/data-driven-development/") end it 'returns status code 200' do @@ -1951,24 +1951,24 @@ before { get "/dois/#{doi.doi}/get-url", headers: headers } - it 'returns not DataCite DOI' do - expect(json['url']).to eq("http://dx.plos.org/10.1371/journal.pbio.2001414") + it 'returns nil' do + expect(json['url']).to be_nil end it 'returns status code 200' do - expect(response).to have_http_status(200) + expect(response).to have_http_status(403) end end describe 'GET /dois/get-dois', vcr: true do - let(:prefix) { create(:prefix, prefix: "10.14454") } + let(:prefix) { create(:prefix, prefix: "10.5438") } let!(:client_prefix) { create(:client_prefix, prefix: prefix, client: client) } before { get "/dois/get-dois", headers: headers } it 'returns all dois' do - expect(json["dois"].length).to eq(7) - expect(json["dois"].first).to eq("10.14454/07243.2013.001") + expect(json["dois"].length).to eq(438) + expect(json["dois"].first).to eq("10.5438/0000-00SS") end it 'returns status code 200' do