bolognese 0.8.3 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/bolognese/doi_utils.rb +10 -11
- data/lib/bolognese/utils.rb +2 -1
- data/lib/bolognese/version.rb +1 -1
- data/spec/doi_utils_spec.rb +14 -9
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/default.yml +55 -25
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_bibtex.yml +55 -25
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_crossref.yml +55 -25
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_datacite.yml +53 -25
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_schema_org.yml +55 -25
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/default.yml +75 -45
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_bibtex.yml +75 -45
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_datacite.yml +73 -45
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_datacite_json.yml +73 -45
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_schema_org.yml +73 -45
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/default.yml +62 -53
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_bibtex.yml +62 -53
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_datacite.yml +62 -53
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_schema_org.yml +62 -53
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/crossref.yml +74 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/datacite.yml +74 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/medra.yml +72 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/not_found.yml +67 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/crossref.yml +50 -20
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/crossref_doi_not_url.yml +50 -20
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/datacite.yml +50 -20
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/datacite_doi_http.yml +48 -20
- data/spec/utils_spec.rb +2 -3
- metadata +5 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/as_bibtex.yml +0 -760
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/as_crossref.yml +0 -760
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/as_datacite.yml +0 -760
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/as_schema_org.yml +0 -760
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/as_bibtex.yml +0 -214
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/as_datacite.yml +0 -214
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/as_schema_org.yml +0 -214
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/as_bibtex.yml +0 -653
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/as_datacite.yml +0 -653
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/as_schema_org.yml +0 -653
- data/spec/fixtures/vcr_cassettes/Bolognese_Crossref/doi_registration_agency/crossref.yml +0 -971
- data/spec/fixtures/vcr_cassettes/Bolognese_Crossref/doi_registration_agency/datacite.yml +0 -971
- data/spec/fixtures/vcr_cassettes/Bolognese_Crossref/doi_registration_agency/medra.yml +0 -971
- data/spec/fixtures/vcr_cassettes/Bolognese_Crossref/doi_registration_agency/not_found.yml +0 -971
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 063f676946258c78127e1d88782896a0b897e8a5
|
4
|
+
data.tar.gz: 3b9f829af641f7aa53394eb79e588a838bc88abb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0583e3e9ec72227314e388c395b2d03c9e61421e6b5307b2bfa8254c988dca539cad1ffa3f94f1775d8f3f0ca2848d6fb6e6be808e2089b19657ac30eb17020a
|
7
|
+
data.tar.gz: dd8d205fa555873683f496c5e49572bcc3a953fbb7d128baba3ca062e7ea206e86dc1592080edbea5e982d8fdccdfb042a29f0ad52d009ea7ba85d9c7a70c768
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bolognese (0.8.
|
4
|
+
bolognese (0.8.4)
|
5
5
|
activesupport (~> 4.2, >= 4.2.5)
|
6
6
|
bibtex-ruby (~> 4.1)
|
7
7
|
builder (~> 3.2, >= 3.2.2)
|
@@ -123,4 +123,4 @@ DEPENDENCIES
|
|
123
123
|
webmock (~> 1.22, >= 1.22.3)
|
124
124
|
|
125
125
|
BUNDLED WITH
|
126
|
-
1.
|
126
|
+
1.12.5
|
data/lib/bolognese/doi_utils.rb
CHANGED
@@ -4,6 +4,10 @@ module Bolognese
|
|
4
4
|
Array(/\A(?:(http|https):\/\/(dx\.)?doi.org\/)?(doi:)?(10\.\d{4,5}\/.+)\z/.match(doi)).last
|
5
5
|
end
|
6
6
|
|
7
|
+
def validate_prefix(doi)
|
8
|
+
Array(/\A(?:(http|https):\/\/(dx\.)?doi.org\/)?(doi:)?(10\.\d{4,5})\/.+\z/.match(doi)).last
|
9
|
+
end
|
10
|
+
|
7
11
|
def normalize_doi(doi)
|
8
12
|
doi = validate_doi(doi)
|
9
13
|
return nil unless doi.present?
|
@@ -26,20 +30,15 @@ module Bolognese
|
|
26
30
|
"https://doi.org/#{clean_doi(doi)}" if doi.present?
|
27
31
|
end
|
28
32
|
|
29
|
-
# get DOI registration agency
|
33
|
+
# get DOI registration agency
|
30
34
|
def get_doi_ra(doi)
|
31
|
-
|
35
|
+
prefix = validate_prefix(doi)
|
36
|
+
return nil if prefix.blank?
|
32
37
|
|
33
|
-
url = "https://
|
34
|
-
|
38
|
+
url = "https://api.datacite.org/prefixes/#{prefix}"
|
39
|
+
result = Maremma.get(url)
|
35
40
|
|
36
|
-
|
37
|
-
if ra.present?
|
38
|
-
{ "id" => ra.downcase,
|
39
|
-
"name" => ra }
|
40
|
-
else
|
41
|
-
{ "errors" => response.body.fetch("errors", nil) || response.body.fetch("data", nil) }
|
42
|
-
end
|
41
|
+
result.body.fetch("data", {}).fetch('attributes', {}).fetch('registration-agency', nil)
|
43
42
|
end
|
44
43
|
end
|
45
44
|
end
|
data/lib/bolognese/utils.rb
CHANGED
@@ -21,7 +21,8 @@ module Bolognese
|
|
21
21
|
id = normalize_id(id)
|
22
22
|
|
23
23
|
if /\A(?:(http|https):\/\/(dx\.)?doi.org\/)?(doi:)?(10\.\d{4,5}\/.+)\z/.match(id)
|
24
|
-
get_doi_ra(id)
|
24
|
+
ra = get_doi_ra(id)
|
25
|
+
ra.present? ? ra.downcase : nil
|
25
26
|
elsif /\A(?:(http|https):\/\/orcid\.org\/)?(\d{4}-\d{4}-\d{4}-\d{3}[0-9X]+)\z/.match(id)
|
26
27
|
"orcid"
|
27
28
|
elsif /\A(http|https):\/\/github\.com\/(.+)\z/.match(id)
|
data/lib/bolognese/version.rb
CHANGED
data/spec/doi_utils_spec.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe Bolognese::
|
4
|
-
let(:id) { "https://doi.org/10.1371/journal.pone.0000030" }
|
3
|
+
describe Bolognese::Metadata, vcr: true do
|
5
4
|
|
6
|
-
subject { Bolognese::
|
5
|
+
subject { Bolognese::Metadata.new }
|
7
6
|
|
8
7
|
context "normalize doi" do
|
9
8
|
it "doi" do
|
@@ -65,25 +64,31 @@ describe Bolognese::Crossref, vcr: true do
|
|
65
64
|
it "datacite" do
|
66
65
|
doi = "https://doi.org/10.5061/dryad.8515"
|
67
66
|
response = subject.get_doi_ra(doi)
|
68
|
-
expect(response
|
67
|
+
expect(response).to eq("DataCite")
|
69
68
|
end
|
70
69
|
|
71
70
|
it "crossref" do
|
72
|
-
doi = "
|
71
|
+
doi = "10.1371/journal.pone.0000030"
|
73
72
|
response = subject.get_doi_ra(doi)
|
74
|
-
expect(response
|
73
|
+
expect(response).to eq("Crossref")
|
75
74
|
end
|
76
75
|
|
77
76
|
it "medra" do
|
78
77
|
doi = "https://doi.org/10.1392/roma081203"
|
79
78
|
response = subject.get_doi_ra(doi)
|
80
|
-
expect(response
|
79
|
+
expect(response).to eq("mEDRA")
|
80
|
+
end
|
81
|
+
|
82
|
+
it "not a valid prefix" do
|
83
|
+
doi = "https://doi.org/10.a/dryad.8515x"
|
84
|
+
response = subject.get_doi_ra(doi)
|
85
|
+
expect(response).to be_nil
|
81
86
|
end
|
82
87
|
|
83
88
|
it "not found" do
|
84
|
-
doi = "https://doi.org/10.
|
89
|
+
doi = "https://doi.org/10.99999/dryad.8515x"
|
85
90
|
response = subject.get_doi_ra(doi)
|
86
|
-
expect(response
|
91
|
+
expect(response).to be_nil
|
87
92
|
end
|
88
93
|
end
|
89
94
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://api.datacite.org/prefixes/10.7554
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -16,31 +16,61 @@ http_interactions:
|
|
16
16
|
code: 200
|
17
17
|
message: ''
|
18
18
|
headers:
|
19
|
-
|
20
|
-
-
|
21
|
-
|
22
|
-
-
|
19
|
+
Access-Control-Allow-Credentials:
|
20
|
+
- 'true'
|
21
|
+
Access-Control-Allow-Headers:
|
22
|
+
- Content-Type,Accept,Accept-Encoding,Origin,User-Agent,Cache-Control,Keep-Alive
|
23
|
+
Access-Control-Allow-Methods:
|
24
|
+
- POST, GET, OPTIONS
|
25
|
+
Access-Control-Allow-Origin:
|
26
|
+
- "*"
|
27
|
+
Access-Control-Max-Age:
|
28
|
+
- '1728000'
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
23
31
|
Content-Type:
|
24
|
-
- application/json;charset=
|
25
|
-
Content-Language:
|
26
|
-
- en-US
|
27
|
-
Content-Length:
|
28
|
-
- '57'
|
32
|
+
- application/vnd.api+json; charset=utf-8
|
29
33
|
Date:
|
30
|
-
-
|
34
|
+
- Sun, 12 Mar 2017 09:09:07 GMT
|
35
|
+
Etag:
|
36
|
+
- W/"daf85afdb45f3c2713bc7e75916ba82a"
|
37
|
+
Server:
|
38
|
+
- openresty/1.11.2.2
|
39
|
+
Status:
|
40
|
+
- 200 OK
|
41
|
+
Vary:
|
42
|
+
- Accept-Encoding
|
43
|
+
Via:
|
44
|
+
- kong/0.10.0rc3
|
45
|
+
X-Content-Type-Options:
|
46
|
+
- nosniff
|
47
|
+
X-Frame-Options:
|
48
|
+
- SAMEORIGIN
|
49
|
+
X-Kong-Proxy-Latency:
|
50
|
+
- '18'
|
51
|
+
X-Kong-Upstream-Latency:
|
52
|
+
- '545'
|
53
|
+
X-Powered-By:
|
54
|
+
- Phusion Passenger 5.1.2
|
55
|
+
X-Ratelimit-Limit-Hour:
|
56
|
+
- '10000'
|
57
|
+
X-Ratelimit-Remaining-Hour:
|
58
|
+
- '9992'
|
59
|
+
X-Request-Id:
|
60
|
+
- 4a1c67ea-4ffb-4674-93d8-e4b2e1fa71a4
|
61
|
+
X-Runtime:
|
62
|
+
- '0.543916'
|
63
|
+
X-Xss-Protection:
|
64
|
+
- 1; mode=block
|
65
|
+
Content-Length:
|
66
|
+
- '124'
|
31
67
|
Connection:
|
32
|
-
-
|
68
|
+
- keep-alive
|
33
69
|
body:
|
34
70
|
encoding: UTF-8
|
35
|
-
string:
|
36
|
-
[
|
37
|
-
{
|
38
|
-
"DOI": "10.7554/elife.01567",
|
39
|
-
"RA": "Crossref"
|
40
|
-
}
|
41
|
-
]
|
71
|
+
string: '{"data":{"id":"10.7554","type":"prefixes","attributes":{"registration-agency":"Crossref","updated":"2016-09-21T21:07:27Z"}}}'
|
42
72
|
http_version:
|
43
|
-
recorded_at:
|
73
|
+
recorded_at: Sun, 12 Mar 2017 09:09:07 GMT
|
44
74
|
- request:
|
45
75
|
method: get
|
46
76
|
uri: https://doi.org/10.7554/elife.01567
|
@@ -64,20 +94,20 @@ http_interactions:
|
|
64
94
|
Location:
|
65
95
|
- http://data.crossref.org/10.7554%2Felife.01567
|
66
96
|
Expires:
|
67
|
-
-
|
97
|
+
- Sun, 12 Mar 2017 09:59:19 GMT
|
68
98
|
Content-Type:
|
69
99
|
- text/html;charset=utf-8
|
70
100
|
Content-Length:
|
71
101
|
- '177'
|
72
102
|
Date:
|
73
|
-
-
|
103
|
+
- Sun, 12 Mar 2017 09:09:14 GMT
|
74
104
|
body:
|
75
105
|
encoding: UTF-8
|
76
106
|
string: |-
|
77
107
|
<html><head><title>Handle Redirect</title></head>
|
78
108
|
<body><a href="http://data.crossref.org/10.7554%2Felife.01567">http://data.crossref.org/10.7554%2Felife.01567</a></body></html>
|
79
109
|
http_version:
|
80
|
-
recorded_at:
|
110
|
+
recorded_at: Sun, 12 Mar 2017 09:09:15 GMT
|
81
111
|
- request:
|
82
112
|
method: get
|
83
113
|
uri: http://data.crossref.org/10.7554%2Felife.01567
|
@@ -113,7 +143,7 @@ http_interactions:
|
|
113
143
|
Server:
|
114
144
|
- http-kit
|
115
145
|
Date:
|
116
|
-
-
|
146
|
+
- Sun, 12 Mar 2017 09:09:15 GMT
|
117
147
|
Connection:
|
118
148
|
- close
|
119
149
|
body:
|
@@ -756,5 +786,5 @@ http_interactions:
|
|
756
786
|
aWNsZT4NCiAgICAgIDwvam91cm5hbD4NCiAgICA8L2Nyb3NzcmVmPg0KICA8
|
757
787
|
L2RvaV9yZWNvcmQ+DQo8L2RvaV9yZWNvcmRzPg==
|
758
788
|
http_version:
|
759
|
-
recorded_at:
|
789
|
+
recorded_at: Sun, 12 Mar 2017 09:09:15 GMT
|
760
790
|
recorded_with: VCR 3.0.3
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://api.datacite.org/prefixes/10.7554
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -16,31 +16,61 @@ http_interactions:
|
|
16
16
|
code: 200
|
17
17
|
message: ''
|
18
18
|
headers:
|
19
|
-
|
20
|
-
-
|
21
|
-
|
22
|
-
-
|
19
|
+
Access-Control-Allow-Credentials:
|
20
|
+
- 'true'
|
21
|
+
Access-Control-Allow-Headers:
|
22
|
+
- Content-Type,Accept,Accept-Encoding,Origin,User-Agent,Cache-Control,Keep-Alive
|
23
|
+
Access-Control-Allow-Methods:
|
24
|
+
- POST, GET, OPTIONS
|
25
|
+
Access-Control-Allow-Origin:
|
26
|
+
- "*"
|
27
|
+
Access-Control-Max-Age:
|
28
|
+
- '1728000'
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
23
31
|
Content-Type:
|
24
|
-
- application/json;charset=
|
25
|
-
Content-Language:
|
26
|
-
- en-US
|
27
|
-
Content-Length:
|
28
|
-
- '57'
|
32
|
+
- application/vnd.api+json; charset=utf-8
|
29
33
|
Date:
|
30
|
-
-
|
34
|
+
- Sun, 12 Mar 2017 09:08:47 GMT
|
35
|
+
Etag:
|
36
|
+
- W/"daf85afdb45f3c2713bc7e75916ba82a"
|
37
|
+
Server:
|
38
|
+
- openresty/1.11.2.2
|
39
|
+
Status:
|
40
|
+
- 200 OK
|
41
|
+
Vary:
|
42
|
+
- Accept-Encoding
|
43
|
+
Via:
|
44
|
+
- kong/0.10.0rc3
|
45
|
+
X-Content-Type-Options:
|
46
|
+
- nosniff
|
47
|
+
X-Frame-Options:
|
48
|
+
- SAMEORIGIN
|
49
|
+
X-Kong-Proxy-Latency:
|
50
|
+
- '1'
|
51
|
+
X-Kong-Upstream-Latency:
|
52
|
+
- '489'
|
53
|
+
X-Powered-By:
|
54
|
+
- Phusion Passenger 5.1.2
|
55
|
+
X-Ratelimit-Limit-Hour:
|
56
|
+
- '10000'
|
57
|
+
X-Ratelimit-Remaining-Hour:
|
58
|
+
- '9994'
|
59
|
+
X-Request-Id:
|
60
|
+
- 62732ae3-9068-4d9c-ade4-36f6523afc7e
|
61
|
+
X-Runtime:
|
62
|
+
- '0.487711'
|
63
|
+
X-Xss-Protection:
|
64
|
+
- 1; mode=block
|
65
|
+
Content-Length:
|
66
|
+
- '124'
|
31
67
|
Connection:
|
32
|
-
-
|
68
|
+
- keep-alive
|
33
69
|
body:
|
34
70
|
encoding: UTF-8
|
35
|
-
string:
|
36
|
-
[
|
37
|
-
{
|
38
|
-
"DOI": "10.7554/elife.01567",
|
39
|
-
"RA": "Crossref"
|
40
|
-
}
|
41
|
-
]
|
71
|
+
string: '{"data":{"id":"10.7554","type":"prefixes","attributes":{"registration-agency":"Crossref","updated":"2016-09-21T21:07:27Z"}}}'
|
42
72
|
http_version:
|
43
|
-
recorded_at:
|
73
|
+
recorded_at: Sun, 12 Mar 2017 09:08:48 GMT
|
44
74
|
- request:
|
45
75
|
method: get
|
46
76
|
uri: https://doi.org/10.7554/elife.01567
|
@@ -64,20 +94,20 @@ http_interactions:
|
|
64
94
|
Location:
|
65
95
|
- http://data.crossref.org/10.7554%2Felife.01567
|
66
96
|
Expires:
|
67
|
-
-
|
97
|
+
- Sun, 12 Mar 2017 09:59:19 GMT
|
68
98
|
Content-Type:
|
69
99
|
- text/html;charset=utf-8
|
70
100
|
Content-Length:
|
71
101
|
- '177'
|
72
102
|
Date:
|
73
|
-
-
|
103
|
+
- Sun, 12 Mar 2017 09:08:55 GMT
|
74
104
|
body:
|
75
105
|
encoding: UTF-8
|
76
106
|
string: |-
|
77
107
|
<html><head><title>Handle Redirect</title></head>
|
78
108
|
<body><a href="http://data.crossref.org/10.7554%2Felife.01567">http://data.crossref.org/10.7554%2Felife.01567</a></body></html>
|
79
109
|
http_version:
|
80
|
-
recorded_at:
|
110
|
+
recorded_at: Sun, 12 Mar 2017 09:08:56 GMT
|
81
111
|
- request:
|
82
112
|
method: get
|
83
113
|
uri: http://data.crossref.org/10.7554%2Felife.01567
|
@@ -113,7 +143,7 @@ http_interactions:
|
|
113
143
|
Server:
|
114
144
|
- http-kit
|
115
145
|
Date:
|
116
|
-
-
|
146
|
+
- Sun, 12 Mar 2017 09:08:56 GMT
|
117
147
|
Connection:
|
118
148
|
- close
|
119
149
|
body:
|
@@ -756,5 +786,5 @@ http_interactions:
|
|
756
786
|
aWNsZT4NCiAgICAgIDwvam91cm5hbD4NCiAgICA8L2Nyb3NzcmVmPg0KICA8
|
757
787
|
L2RvaV9yZWNvcmQ+DQo8L2RvaV9yZWNvcmRzPg==
|
758
788
|
http_version:
|
759
|
-
recorded_at:
|
789
|
+
recorded_at: Sun, 12 Mar 2017 09:08:56 GMT
|
760
790
|
recorded_with: VCR 3.0.3
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://api.datacite.org/prefixes/10.7554
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -16,31 +16,61 @@ http_interactions:
|
|
16
16
|
code: 200
|
17
17
|
message: ''
|
18
18
|
headers:
|
19
|
-
|
20
|
-
-
|
21
|
-
|
22
|
-
-
|
19
|
+
Access-Control-Allow-Credentials:
|
20
|
+
- 'true'
|
21
|
+
Access-Control-Allow-Headers:
|
22
|
+
- Content-Type,Accept,Accept-Encoding,Origin,User-Agent,Cache-Control,Keep-Alive
|
23
|
+
Access-Control-Allow-Methods:
|
24
|
+
- POST, GET, OPTIONS
|
25
|
+
Access-Control-Allow-Origin:
|
26
|
+
- "*"
|
27
|
+
Access-Control-Max-Age:
|
28
|
+
- '1728000'
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
23
31
|
Content-Type:
|
24
|
-
- application/json;charset=
|
25
|
-
Content-Language:
|
26
|
-
- en-US
|
27
|
-
Content-Length:
|
28
|
-
- '57'
|
32
|
+
- application/vnd.api+json; charset=utf-8
|
29
33
|
Date:
|
30
|
-
-
|
34
|
+
- Sun, 12 Mar 2017 09:09:16 GMT
|
35
|
+
Etag:
|
36
|
+
- W/"daf85afdb45f3c2713bc7e75916ba82a"
|
37
|
+
Server:
|
38
|
+
- openresty/1.11.2.2
|
39
|
+
Status:
|
40
|
+
- 200 OK
|
41
|
+
Vary:
|
42
|
+
- Accept-Encoding
|
43
|
+
Via:
|
44
|
+
- kong/0.10.0rc3
|
45
|
+
X-Content-Type-Options:
|
46
|
+
- nosniff
|
47
|
+
X-Frame-Options:
|
48
|
+
- SAMEORIGIN
|
49
|
+
X-Kong-Proxy-Latency:
|
50
|
+
- '26'
|
51
|
+
X-Kong-Upstream-Latency:
|
52
|
+
- '237'
|
53
|
+
X-Powered-By:
|
54
|
+
- Phusion Passenger 5.1.2
|
55
|
+
X-Ratelimit-Limit-Hour:
|
56
|
+
- '10000'
|
57
|
+
X-Ratelimit-Remaining-Hour:
|
58
|
+
- '9991'
|
59
|
+
X-Request-Id:
|
60
|
+
- 2ceda84e-d266-4ed3-9f8a-df8675fd0106
|
61
|
+
X-Runtime:
|
62
|
+
- '0.236229'
|
63
|
+
X-Xss-Protection:
|
64
|
+
- 1; mode=block
|
65
|
+
Content-Length:
|
66
|
+
- '124'
|
31
67
|
Connection:
|
32
|
-
-
|
68
|
+
- keep-alive
|
33
69
|
body:
|
34
70
|
encoding: UTF-8
|
35
|
-
string:
|
36
|
-
[
|
37
|
-
{
|
38
|
-
"DOI": "10.7554/elife.01567",
|
39
|
-
"RA": "Crossref"
|
40
|
-
}
|
41
|
-
]
|
71
|
+
string: '{"data":{"id":"10.7554","type":"prefixes","attributes":{"registration-agency":"Crossref","updated":"2016-09-21T21:07:27Z"}}}'
|
42
72
|
http_version:
|
43
|
-
recorded_at:
|
73
|
+
recorded_at: Sun, 12 Mar 2017 09:09:16 GMT
|
44
74
|
- request:
|
45
75
|
method: get
|
46
76
|
uri: https://doi.org/10.7554/elife.01567
|
@@ -64,20 +94,20 @@ http_interactions:
|
|
64
94
|
Location:
|
65
95
|
- http://data.crossref.org/10.7554%2Felife.01567
|
66
96
|
Expires:
|
67
|
-
-
|
97
|
+
- Sun, 12 Mar 2017 09:59:19 GMT
|
68
98
|
Content-Type:
|
69
99
|
- text/html;charset=utf-8
|
70
100
|
Content-Length:
|
71
101
|
- '177'
|
72
102
|
Date:
|
73
|
-
-
|
103
|
+
- Sun, 12 Mar 2017 09:09:23 GMT
|
74
104
|
body:
|
75
105
|
encoding: UTF-8
|
76
106
|
string: |-
|
77
107
|
<html><head><title>Handle Redirect</title></head>
|
78
108
|
<body><a href="http://data.crossref.org/10.7554%2Felife.01567">http://data.crossref.org/10.7554%2Felife.01567</a></body></html>
|
79
109
|
http_version:
|
80
|
-
recorded_at:
|
110
|
+
recorded_at: Sun, 12 Mar 2017 09:09:24 GMT
|
81
111
|
- request:
|
82
112
|
method: get
|
83
113
|
uri: http://data.crossref.org/10.7554%2Felife.01567
|
@@ -113,7 +143,7 @@ http_interactions:
|
|
113
143
|
Server:
|
114
144
|
- http-kit
|
115
145
|
Date:
|
116
|
-
-
|
146
|
+
- Sun, 12 Mar 2017 09:09:24 GMT
|
117
147
|
Connection:
|
118
148
|
- close
|
119
149
|
body:
|
@@ -756,5 +786,5 @@ http_interactions:
|
|
756
786
|
aWNsZT4NCiAgICAgIDwvam91cm5hbD4NCiAgICA8L2Nyb3NzcmVmPg0KICA8
|
757
787
|
L2RvaV9yZWNvcmQ+DQo8L2RvaV9yZWNvcmRzPg==
|
758
788
|
http_version:
|
759
|
-
recorded_at:
|
789
|
+
recorded_at: Sun, 12 Mar 2017 09:09:25 GMT
|
760
790
|
recorded_with: VCR 3.0.3
|