toccatore 0.3.9 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/Gemfile.lock +31 -18
- data/README.md +1 -1
- data/lib/toccatore.rb +2 -0
- data/lib/toccatore/cli.rb +12 -0
- data/lib/toccatore/queue.rb +50 -0
- data/lib/toccatore/usage_update.rb +170 -0
- data/lib/toccatore/version.rb +1 -1
- data/spec/cli_spec.rb +34 -1
- data/spec/fixtures/event_data_resp_1 +2 -0
- data/spec/fixtures/event_data_resp_2 +4 -0
- data/spec/fixtures/usage_event.json +1 -0
- data/spec/fixtures/usage_event_fail.json +17 -0
- data/spec/fixtures/usage_events.json +63 -0
- data/spec/fixtures/usage_update.json +101 -0
- data/spec/fixtures/usage_update_1.json +36738 -0
- data/spec/fixtures/usage_update_2.json +171 -0
- data/spec/fixtures/usage_update_3.json +176 -0
- data/spec/fixtures/usage_update_4.json +101 -0
- data/spec/fixtures/usage_update_nil.json +6 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/usage_update/no_reports_in_the_queue/should_succeed_with_no_works.yml +150 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/usage_update/should_fail.yml +150 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/usage_update/should_succeed_with_no_works.yml +150 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_data/when_there_are_messages/should_return_the_data_for_one_message.yml +52 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_data/when_there_is_ONE_message/should_return_the_data_for_one_message.yml +52 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/push_data/should_fail_if_format_of_the_event_is_wrong.yml +199 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/push_data/should_work_with_DataCite_Event_Data.yml +199 -0
- data/spec/queque_spec.rb +61 -0
- data/spec/spec_helper.rb +14 -0
- data/spec/usage_update_spec.rb +156 -0
- data/toccatore.gemspec +3 -1
- metadata +43 -7
@@ -0,0 +1,52 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://metrics.test.datacite.org/reports/2018-3-DataONE
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Maremma - https://github.com/datacite/maremma
|
12
|
+
Accept:
|
13
|
+
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: ''
|
18
|
+
headers:
|
19
|
+
Date:
|
20
|
+
- Mon, 07 May 2018 15:07:45 GMT
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
Connection:
|
24
|
+
- keep-alive
|
25
|
+
Status:
|
26
|
+
- 200 OK
|
27
|
+
X-Anonymous-Consumer:
|
28
|
+
- 'true'
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
Vary:
|
32
|
+
- Accept-Encoding, Origin
|
33
|
+
Etag:
|
34
|
+
- W/"4f2411eb13af4c17be452f00b66b9bc8"
|
35
|
+
X-Runtime:
|
36
|
+
- '0.004929'
|
37
|
+
X-Request-Id:
|
38
|
+
- 88da99f7-e209-4ede-8adf-7954ff834a5b
|
39
|
+
X-Powered-By:
|
40
|
+
- Phusion Passenger 5.2.3
|
41
|
+
Server:
|
42
|
+
- nginx/1.12.2 + Phusion Passenger 5.2.3
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: '{"report":{"id":"2018-3-DataONE","report-header":{"report-name":"Dataset
|
46
|
+
Master Report","report-id":"DSR","created-by":"DataONE","created":"2018-03-16"},"report-datasets":[{"uri":"https://search.DataONE.org/index.html#view/https://pasta.lternet.edu/package/metadata/eml/knb-lter-luq/88/559501","yop":2010,"creators":[{"type":"Name","value":"Jess
|
47
|
+
Zimmerman"}],"platform":"DataONE","data-type":"Dataset","publisher":"LTER
|
48
|
+
Network","dataset-id":[{"type":"DOI","value":"10.6073/pasta/aec48ca27decb1fd2c2f454f1c5f88e4"}],"performance":[{"period":{"end-date":"2018-03-31","begin-date":"2018-03-01"},"instance":[{"count":7,"country":"US","metric-type":"Total-Dataset-Investigations","access-method":"Regular"}]}],"publisher-id":"urn:node:LTER","dataset-title":"Phenologies
|
49
|
+
of the Tabonuco Forest trees and shrubs.","publication-dates":"2010-03-22"}]}}'
|
50
|
+
http_version:
|
51
|
+
recorded_at: Mon, 07 May 2018 15:07:45 GMT
|
52
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,52 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://metrics.test.datacite.org/reports/2018-3-DataONE
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Maremma - https://github.com/datacite/maremma
|
12
|
+
Accept:
|
13
|
+
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: ''
|
18
|
+
headers:
|
19
|
+
Date:
|
20
|
+
- Mon, 07 May 2018 15:07:45 GMT
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
Connection:
|
24
|
+
- keep-alive
|
25
|
+
Status:
|
26
|
+
- 200 OK
|
27
|
+
X-Anonymous-Consumer:
|
28
|
+
- 'true'
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
Vary:
|
32
|
+
- Accept-Encoding, Origin
|
33
|
+
Etag:
|
34
|
+
- W/"4f2411eb13af4c17be452f00b66b9bc8"
|
35
|
+
X-Runtime:
|
36
|
+
- '0.005172'
|
37
|
+
X-Request-Id:
|
38
|
+
- b27d35ff-3942-4c94-8d28-0b5595d18096
|
39
|
+
X-Powered-By:
|
40
|
+
- Phusion Passenger 5.2.3
|
41
|
+
Server:
|
42
|
+
- nginx/1.12.2 + Phusion Passenger 5.2.3
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: '{"report":{"id":"2018-3-DataONE","report-header":{"report-name":"Dataset
|
46
|
+
Master Report","report-id":"DSR","created-by":"DataONE","created":"2018-03-16"},"report-datasets":[{"uri":"https://search.DataONE.org/index.html#view/https://pasta.lternet.edu/package/metadata/eml/knb-lter-luq/88/559501","yop":2010,"creators":[{"type":"Name","value":"Jess
|
47
|
+
Zimmerman"}],"platform":"DataONE","data-type":"Dataset","publisher":"LTER
|
48
|
+
Network","dataset-id":[{"type":"DOI","value":"10.6073/pasta/aec48ca27decb1fd2c2f454f1c5f88e4"}],"performance":[{"period":{"end-date":"2018-03-31","begin-date":"2018-03-01"},"instance":[{"count":7,"country":"US","metric-type":"Total-Dataset-Investigations","access-method":"Regular"}]}],"publisher-id":"urn:node:LTER","dataset-title":"Phenologies
|
49
|
+
of the Tabonuco Forest trees and shrubs.","publication-dates":"2010-03-22"}]}}'
|
50
|
+
http_version:
|
51
|
+
recorded_at: Mon, 07 May 2018 15:07:45 GMT
|
52
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,199 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.test.datacite.org/events
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"data":{"id":"a17e783b-8214-451e-9b0d-077213c2acae","type":"events","attributes":{"message-action":"add","subj-id":"https://metrics.test.datacite.org/reports/2018-3-Dash","subj":{"pid":"https://metrics.test.datacite.org/reports/2018-3-Dash","issued":"2128-04-09"},"total":3,"obj-id":"https://doi.org/10.7291/d1q94r","relation-type-id":"total-dataset-investigations-regular","source-id":"datacite","source-token":"28276d12-b320-41ba-9272-bb0adc3466ff","occurred-at":"2128-04-09","license":"https://creativecommons.org/publicdomain/zero/1.0/"}}}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Maremma - https://github.com/datacite/maremma
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept:
|
15
|
+
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
16
|
+
Authorization:
|
17
|
+
- Bearer <LAGOTTO_TOKEN>
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 201
|
21
|
+
message: ''
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Mon, 07 May 2018 15:07:44 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Connection:
|
28
|
+
- keep-alive
|
29
|
+
Status:
|
30
|
+
- 201 Created
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
Vary:
|
34
|
+
- Accept-Encoding, Origin
|
35
|
+
Etag:
|
36
|
+
- W/"205daac1156d285daeb903afc6bcd156"
|
37
|
+
X-Runtime:
|
38
|
+
- '0.011591'
|
39
|
+
X-Credential-Username:
|
40
|
+
- 0000-0001-5489-3594
|
41
|
+
X-Request-Id:
|
42
|
+
- b6a796cd-81ab-4abd-93ad-bea3ff71ae66
|
43
|
+
X-Powered-By:
|
44
|
+
- Phusion Passenger 5.2.3
|
45
|
+
Server:
|
46
|
+
- nginx/1.12.2 + Phusion Passenger 5.2.3
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"data":{"id":"e7c02cf2-848b-4f19-bb58-80777dc74cef","type":"events","attributes":{"subj-id":"https://metrics.test.datacite.org/reports/2018-3-Dash","obj-id":"https://doi.org/10.7291/d1q94r","message-action":"add","source-token":"28276d12-b320-41ba-9272-bb0adc3466ff","relation-type-id":"total-dataset-investigations-regular","source-id":"datacite","total":3,"license":"https://creativecommons.org/publicdomain/zero/1.0/","occurred-at":"2128-04-09T00:00:00.000Z","timestamp":"2018-05-07T15:07:44Z","subj":{"pid":"https://metrics.test.datacite.org/reports/2018-3-Dash","issued":"2128-04-09"},"obj":{}}}}'
|
50
|
+
http_version:
|
51
|
+
recorded_at: Mon, 07 May 2018 15:07:44 GMT
|
52
|
+
- request:
|
53
|
+
method: post
|
54
|
+
uri: https://api.test.datacite.org/events
|
55
|
+
body:
|
56
|
+
encoding: UTF-8
|
57
|
+
string: '{"data":{"id":"fc6860b8-4230-41bc-8b8e-21d60e9a7d9a","type":"events","attributes":{"message-action":"add","subj-id":"https://metrics.test.datacite.org/reports/2018-3-Dash","subj":{"pid":"https://metrics.test.datacite.org/reports/2018-3-Dash","issued":"2128-04-09"},"total":3,"obj-id":"https://doi.org/10.7291/d1q94r","relation-type-id":"unique-dataset-investigations-regular","source-id":"datacite","source-token":"28276d12-b320-41ba-9272-bb0adc3466ff","occurred-at":"2128-04-09","license":"https://creativecommons.org/publicdomain/zero/1.0/"}}}'
|
58
|
+
headers:
|
59
|
+
User-Agent:
|
60
|
+
- Maremma - https://github.com/datacite/maremma
|
61
|
+
Content-Type:
|
62
|
+
- application/json
|
63
|
+
Accept:
|
64
|
+
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
65
|
+
Authorization:
|
66
|
+
- Bearer <LAGOTTO_TOKEN>
|
67
|
+
response:
|
68
|
+
status:
|
69
|
+
code: 201
|
70
|
+
message: ''
|
71
|
+
headers:
|
72
|
+
Date:
|
73
|
+
- Mon, 07 May 2018 15:07:44 GMT
|
74
|
+
Content-Type:
|
75
|
+
- application/json; charset=utf-8
|
76
|
+
Connection:
|
77
|
+
- keep-alive
|
78
|
+
Status:
|
79
|
+
- 201 Created
|
80
|
+
Cache-Control:
|
81
|
+
- max-age=0, private, must-revalidate
|
82
|
+
Vary:
|
83
|
+
- Accept-Encoding, Origin
|
84
|
+
Etag:
|
85
|
+
- W/"a158314678963c3092f8a6d088a8f231"
|
86
|
+
X-Runtime:
|
87
|
+
- '0.010919'
|
88
|
+
X-Credential-Username:
|
89
|
+
- 0000-0001-5489-3594
|
90
|
+
X-Request-Id:
|
91
|
+
- 85781082-877f-4118-9308-ee5ba2f635ae
|
92
|
+
X-Powered-By:
|
93
|
+
- Phusion Passenger 5.2.3
|
94
|
+
Server:
|
95
|
+
- nginx/1.12.2 + Phusion Passenger 5.2.3
|
96
|
+
body:
|
97
|
+
encoding: UTF-8
|
98
|
+
string: '{"data":{"id":"cd62bd0a-fce4-4de6-9470-d8948b944519","type":"events","attributes":{"subj-id":"https://metrics.test.datacite.org/reports/2018-3-Dash","obj-id":"https://doi.org/10.7291/d1q94r","message-action":"add","source-token":"28276d12-b320-41ba-9272-bb0adc3466ff","relation-type-id":"unique-dataset-investigations-regular","source-id":"datacite","total":3,"license":"https://creativecommons.org/publicdomain/zero/1.0/","occurred-at":"2128-04-09T00:00:00.000Z","timestamp":"2018-05-07T15:07:44Z","subj":{"pid":"https://metrics.test.datacite.org/reports/2018-3-Dash","issued":"2128-04-09"},"obj":{}}}}'
|
99
|
+
http_version:
|
100
|
+
recorded_at: Mon, 07 May 2018 15:07:44 GMT
|
101
|
+
- request:
|
102
|
+
method: post
|
103
|
+
uri: https://api.test.datacite.org/events
|
104
|
+
body:
|
105
|
+
encoding: UTF-8
|
106
|
+
string: '{"data":{"id":"054da0ad-9821-492e-877e-5c3adbfd5ccf","type":"events","attributes":{"message-action":"add","subj-id":"https://metrics.test.datacite.org/reports/2018-3-Dash","subj":{"pid":"https://metrics.test.datacite.org/reports/2018-3-Dash","issued":"2128-04-09"},"total":254,"obj-id":"https://doi.org/10.6071/z7wc73","relation-type-id":"Total-Dataset-Requests-Machine","source-id":"datacite","source-token":"28276d12-b320-41ba-9272-bb0adc3466ff","occurred-at":"2128-04-09","license":"https://creativecommons.org/publicdomain/zero/1.0/"}}}'
|
107
|
+
headers:
|
108
|
+
User-Agent:
|
109
|
+
- Maremma - https://github.com/datacite/maremma
|
110
|
+
Content-Type:
|
111
|
+
- application/json
|
112
|
+
Accept:
|
113
|
+
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
114
|
+
Authorization:
|
115
|
+
- Bearer <LAGOTTO_TOKEN>
|
116
|
+
response:
|
117
|
+
status:
|
118
|
+
code: 201
|
119
|
+
message: ''
|
120
|
+
headers:
|
121
|
+
Date:
|
122
|
+
- Mon, 07 May 2018 15:07:44 GMT
|
123
|
+
Content-Type:
|
124
|
+
- application/json; charset=utf-8
|
125
|
+
Connection:
|
126
|
+
- keep-alive
|
127
|
+
Status:
|
128
|
+
- 201 Created
|
129
|
+
Cache-Control:
|
130
|
+
- max-age=0, private, must-revalidate
|
131
|
+
Vary:
|
132
|
+
- Accept-Encoding, Origin
|
133
|
+
Etag:
|
134
|
+
- W/"eaeed9bb6d073a58a924ddd3b211e489"
|
135
|
+
X-Runtime:
|
136
|
+
- '0.010635'
|
137
|
+
X-Credential-Username:
|
138
|
+
- 0000-0001-5489-3594
|
139
|
+
X-Request-Id:
|
140
|
+
- 27f7c58e-16c1-4a1d-a873-2f7561eb44c6
|
141
|
+
X-Powered-By:
|
142
|
+
- Phusion Passenger 5.2.3
|
143
|
+
Server:
|
144
|
+
- nginx/1.12.2 + Phusion Passenger 5.2.3
|
145
|
+
body:
|
146
|
+
encoding: UTF-8
|
147
|
+
string: '{"data":{"id":"f441aaf4-4e78-4de8-9461-98c67ffc524e","type":"events","attributes":{"subj-id":"https://metrics.test.datacite.org/reports/2018-3-Dash","obj-id":"https://doi.org/10.6071/z7wc73","message-action":"add","source-token":"28276d12-b320-41ba-9272-bb0adc3466ff","relation-type-id":"Total-Dataset-Requests-Machine","source-id":"datacite","total":254,"license":"https://creativecommons.org/publicdomain/zero/1.0/","occurred-at":"2128-04-09T00:00:00.000Z","timestamp":"2018-05-07T15:07:44Z","subj":{"pid":"https://metrics.test.datacite.org/reports/2018-3-Dash","issued":"2128-04-09"},"obj":{}}}}'
|
148
|
+
http_version:
|
149
|
+
recorded_at: Mon, 07 May 2018 15:07:44 GMT
|
150
|
+
- request:
|
151
|
+
method: post
|
152
|
+
uri: https://api.test.datacite.org/events
|
153
|
+
body:
|
154
|
+
encoding: UTF-8
|
155
|
+
string: '{"data":{"id":"6d6fd620-2123-42da-91f3-6c02e63f3cec","type":"events","attributes":{"message-action":"add","subj-id":"https://metrics.test.datacite.org/reports/2018-3-Dash","subj":{"pid":"https://metrics.test.datacite.org/reports/2018-3-Dash","issued":"2128-04-09"},"total":208,"obj-id":"https://doi.org/10.6071/z7wc73","relation-type-id":"Unique-Dataset-Requests-Machine","source-id":"datacite","source-token":"28276d12-b320-41ba-9272-bb0adc3466ff","occurred-at":"2128-04-09","license":"https://creativecommons.org/publicdomain/zero/1.0/"}}}'
|
156
|
+
headers:
|
157
|
+
User-Agent:
|
158
|
+
- Maremma - https://github.com/datacite/maremma
|
159
|
+
Content-Type:
|
160
|
+
- application/json
|
161
|
+
Accept:
|
162
|
+
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
163
|
+
Authorization:
|
164
|
+
- Bearer <LAGOTTO_TOKEN>
|
165
|
+
response:
|
166
|
+
status:
|
167
|
+
code: 201
|
168
|
+
message: ''
|
169
|
+
headers:
|
170
|
+
Date:
|
171
|
+
- Mon, 07 May 2018 15:07:45 GMT
|
172
|
+
Content-Type:
|
173
|
+
- application/json; charset=utf-8
|
174
|
+
Connection:
|
175
|
+
- keep-alive
|
176
|
+
Status:
|
177
|
+
- 201 Created
|
178
|
+
Cache-Control:
|
179
|
+
- max-age=0, private, must-revalidate
|
180
|
+
Vary:
|
181
|
+
- Accept-Encoding, Origin
|
182
|
+
Etag:
|
183
|
+
- W/"cb58adc778b81c34b739145921caaf48"
|
184
|
+
X-Runtime:
|
185
|
+
- '0.011676'
|
186
|
+
X-Credential-Username:
|
187
|
+
- 0000-0001-5489-3594
|
188
|
+
X-Request-Id:
|
189
|
+
- c46bfedb-ce4d-45f0-8bf6-f4023659cbab
|
190
|
+
X-Powered-By:
|
191
|
+
- Phusion Passenger 5.2.3
|
192
|
+
Server:
|
193
|
+
- nginx/1.12.2 + Phusion Passenger 5.2.3
|
194
|
+
body:
|
195
|
+
encoding: UTF-8
|
196
|
+
string: '{"data":{"id":"c3c56526-2db8-4082-be25-5a7f3f1396d7","type":"events","attributes":{"subj-id":"https://metrics.test.datacite.org/reports/2018-3-Dash","obj-id":"https://doi.org/10.6071/z7wc73","message-action":"add","source-token":"28276d12-b320-41ba-9272-bb0adc3466ff","relation-type-id":"Unique-Dataset-Requests-Machine","source-id":"datacite","total":208,"license":"https://creativecommons.org/publicdomain/zero/1.0/","occurred-at":"2128-04-09T00:00:00.000Z","timestamp":"2018-05-07T15:07:45Z","subj":{"pid":"https://metrics.test.datacite.org/reports/2018-3-Dash","issued":"2128-04-09"},"obj":{}}}}'
|
197
|
+
http_version:
|
198
|
+
recorded_at: Mon, 07 May 2018 15:07:45 GMT
|
199
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,199 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.test.datacite.org/events
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"data":{"id":"393ed959-b0b2-402b-aa48-e794529b9eef","type":"events","attributes":{"message-action":"add","subj-id":"https://metrics.test.datacite.org/reports/2018-3-Dash","subj":{"pid":"https://metrics.test.datacite.org/reports/2018-3-Dash","issued":"2128-04-09"},"total":3,"obj-id":"https://doi.org/10.7291/d1q94r","relation-type-id":"total-dataset-investigations-regular","source-id":"datacite","source-token":"28276d12-b320-41ba-9272-bb0adc3466ff","occurred-at":"2128-04-09","license":"https://creativecommons.org/publicdomain/zero/1.0/"}}}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Maremma - https://github.com/datacite/maremma
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept:
|
15
|
+
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
16
|
+
Authorization:
|
17
|
+
- Bearer <LAGOTTO_TOKEN>
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 201
|
21
|
+
message: ''
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Mon, 07 May 2018 15:07:42 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Connection:
|
28
|
+
- keep-alive
|
29
|
+
Status:
|
30
|
+
- 201 Created
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
Vary:
|
34
|
+
- Accept-Encoding, Origin
|
35
|
+
Etag:
|
36
|
+
- W/"01700b9bbf553d49a585e0fb88779627"
|
37
|
+
X-Runtime:
|
38
|
+
- '0.010769'
|
39
|
+
X-Credential-Username:
|
40
|
+
- 0000-0001-5489-3594
|
41
|
+
X-Request-Id:
|
42
|
+
- def01fde-6bb8-4ee1-9c03-f73772932f72
|
43
|
+
X-Powered-By:
|
44
|
+
- Phusion Passenger 5.2.3
|
45
|
+
Server:
|
46
|
+
- nginx/1.12.2 + Phusion Passenger 5.2.3
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"data":{"id":"58b64b91-4c0e-4058-9815-ed80b7d4604a","type":"events","attributes":{"subj-id":"https://metrics.test.datacite.org/reports/2018-3-Dash","obj-id":"https://doi.org/10.7291/d1q94r","message-action":"add","source-token":"28276d12-b320-41ba-9272-bb0adc3466ff","relation-type-id":"total-dataset-investigations-regular","source-id":"datacite","total":3,"license":"https://creativecommons.org/publicdomain/zero/1.0/","occurred-at":"2128-04-09T00:00:00.000Z","timestamp":"2018-05-07T15:07:42Z","subj":{"pid":"https://metrics.test.datacite.org/reports/2018-3-Dash","issued":"2128-04-09"},"obj":{}}}}'
|
50
|
+
http_version:
|
51
|
+
recorded_at: Mon, 07 May 2018 15:07:42 GMT
|
52
|
+
- request:
|
53
|
+
method: post
|
54
|
+
uri: https://api.test.datacite.org/events
|
55
|
+
body:
|
56
|
+
encoding: UTF-8
|
57
|
+
string: '{"data":{"id":"d4934083-0552-4e32-bed1-b103698506aa","type":"events","attributes":{"message-action":"add","subj-id":"https://metrics.test.datacite.org/reports/2018-3-Dash","subj":{"pid":"https://metrics.test.datacite.org/reports/2018-3-Dash","issued":"2128-04-09"},"total":3,"obj-id":"https://doi.org/10.7291/d1q94r","relation-type-id":"unique-dataset-investigations-regular","source-id":"datacite","source-token":"28276d12-b320-41ba-9272-bb0adc3466ff","occurred-at":"2128-04-09","license":"https://creativecommons.org/publicdomain/zero/1.0/"}}}'
|
58
|
+
headers:
|
59
|
+
User-Agent:
|
60
|
+
- Maremma - https://github.com/datacite/maremma
|
61
|
+
Content-Type:
|
62
|
+
- application/json
|
63
|
+
Accept:
|
64
|
+
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
65
|
+
Authorization:
|
66
|
+
- Bearer <LAGOTTO_TOKEN>
|
67
|
+
response:
|
68
|
+
status:
|
69
|
+
code: 201
|
70
|
+
message: ''
|
71
|
+
headers:
|
72
|
+
Date:
|
73
|
+
- Mon, 07 May 2018 15:07:43 GMT
|
74
|
+
Content-Type:
|
75
|
+
- application/json; charset=utf-8
|
76
|
+
Connection:
|
77
|
+
- keep-alive
|
78
|
+
Status:
|
79
|
+
- 201 Created
|
80
|
+
Cache-Control:
|
81
|
+
- max-age=0, private, must-revalidate
|
82
|
+
Vary:
|
83
|
+
- Accept-Encoding, Origin
|
84
|
+
Etag:
|
85
|
+
- W/"5df37219e0abe7356435e8ad2c7d359f"
|
86
|
+
X-Runtime:
|
87
|
+
- '0.010413'
|
88
|
+
X-Credential-Username:
|
89
|
+
- 0000-0001-5489-3594
|
90
|
+
X-Request-Id:
|
91
|
+
- c86c445e-ffa4-4f8a-8a5c-64567b0ac8b9
|
92
|
+
X-Powered-By:
|
93
|
+
- Phusion Passenger 5.2.3
|
94
|
+
Server:
|
95
|
+
- nginx/1.12.2 + Phusion Passenger 5.2.3
|
96
|
+
body:
|
97
|
+
encoding: UTF-8
|
98
|
+
string: '{"data":{"id":"5c4edbd7-3308-46d8-b018-4412988868f9","type":"events","attributes":{"subj-id":"https://metrics.test.datacite.org/reports/2018-3-Dash","obj-id":"https://doi.org/10.7291/d1q94r","message-action":"add","source-token":"28276d12-b320-41ba-9272-bb0adc3466ff","relation-type-id":"unique-dataset-investigations-regular","source-id":"datacite","total":3,"license":"https://creativecommons.org/publicdomain/zero/1.0/","occurred-at":"2128-04-09T00:00:00.000Z","timestamp":"2018-05-07T15:07:43Z","subj":{"pid":"https://metrics.test.datacite.org/reports/2018-3-Dash","issued":"2128-04-09"},"obj":{}}}}'
|
99
|
+
http_version:
|
100
|
+
recorded_at: Mon, 07 May 2018 15:07:43 GMT
|
101
|
+
- request:
|
102
|
+
method: post
|
103
|
+
uri: https://api.test.datacite.org/events
|
104
|
+
body:
|
105
|
+
encoding: UTF-8
|
106
|
+
string: '{"data":{"id":"393ed959-b0b2-402b-aa48-e794529b9eef","type":"events","attributes":{"message-action":"add","subj-id":"https://metrics.test.datacite.org/reports/2018-3-Dash","subj":{"pid":"https://metrics.test.datacite.org/reports/2018-3-Dash","issued":"2128-04-09"},"total":3,"obj-id":"https://doi.org/10.7291/d1q94r","relation-type-id":"total-dataset-investigations-regular","source-id":"datacite","source-token":"28276d12-b320-41ba-9272-bb0adc3466ff","occurred-at":"2128-04-09","license":"https://creativecommons.org/publicdomain/zero/1.0/"}}}'
|
107
|
+
headers:
|
108
|
+
User-Agent:
|
109
|
+
- Maremma - https://github.com/datacite/maremma
|
110
|
+
Content-Type:
|
111
|
+
- application/json
|
112
|
+
Accept:
|
113
|
+
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
114
|
+
Authorization:
|
115
|
+
- Bearer <LAGOTTO_TOKEN>
|
116
|
+
response:
|
117
|
+
status:
|
118
|
+
code: 201
|
119
|
+
message: ''
|
120
|
+
headers:
|
121
|
+
Date:
|
122
|
+
- Mon, 07 May 2018 15:07:43 GMT
|
123
|
+
Content-Type:
|
124
|
+
- application/json; charset=utf-8
|
125
|
+
Connection:
|
126
|
+
- keep-alive
|
127
|
+
Status:
|
128
|
+
- 201 Created
|
129
|
+
Cache-Control:
|
130
|
+
- max-age=0, private, must-revalidate
|
131
|
+
Vary:
|
132
|
+
- Accept-Encoding, Origin
|
133
|
+
Etag:
|
134
|
+
- W/"47258fc20a829faf79620c607b4b5e02"
|
135
|
+
X-Runtime:
|
136
|
+
- '0.010351'
|
137
|
+
X-Credential-Username:
|
138
|
+
- 0000-0001-5489-3594
|
139
|
+
X-Request-Id:
|
140
|
+
- e41d3e47-d6ff-46d4-9b37-bf80b5c485fe
|
141
|
+
X-Powered-By:
|
142
|
+
- Phusion Passenger 5.2.3
|
143
|
+
Server:
|
144
|
+
- nginx/1.12.2 + Phusion Passenger 5.2.3
|
145
|
+
body:
|
146
|
+
encoding: UTF-8
|
147
|
+
string: '{"data":{"id":"8fde079c-f919-4d7f-96cb-e74e861c09e3","type":"events","attributes":{"subj-id":"https://metrics.test.datacite.org/reports/2018-3-Dash","obj-id":"https://doi.org/10.7291/d1q94r","message-action":"add","source-token":"28276d12-b320-41ba-9272-bb0adc3466ff","relation-type-id":"total-dataset-investigations-regular","source-id":"datacite","total":3,"license":"https://creativecommons.org/publicdomain/zero/1.0/","occurred-at":"2128-04-09T00:00:00.000Z","timestamp":"2018-05-07T15:07:43Z","subj":{"pid":"https://metrics.test.datacite.org/reports/2018-3-Dash","issued":"2128-04-09"},"obj":{}}}}'
|
148
|
+
http_version:
|
149
|
+
recorded_at: Mon, 07 May 2018 15:07:43 GMT
|
150
|
+
- request:
|
151
|
+
method: post
|
152
|
+
uri: https://api.test.datacite.org/events
|
153
|
+
body:
|
154
|
+
encoding: UTF-8
|
155
|
+
string: '{"data":{"id":"d4934083-0552-4e32-bed1-b103698506aa","type":"events","attributes":{"message-action":"add","subj-id":"https://metrics.test.datacite.org/reports/2018-3-Dash","subj":{"pid":"https://metrics.test.datacite.org/reports/2018-3-Dash","issued":"2128-04-09"},"total":3,"obj-id":"https://doi.org/10.7291/d1q94r","relation-type-id":"unique-dataset-investigations-regular","source-id":"datacite","source-token":"28276d12-b320-41ba-9272-bb0adc3466ff","occurred-at":"2128-04-09","license":"https://creativecommons.org/publicdomain/zero/1.0/"}}}'
|
156
|
+
headers:
|
157
|
+
User-Agent:
|
158
|
+
- Maremma - https://github.com/datacite/maremma
|
159
|
+
Content-Type:
|
160
|
+
- application/json
|
161
|
+
Accept:
|
162
|
+
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
163
|
+
Authorization:
|
164
|
+
- Bearer <LAGOTTO_TOKEN>
|
165
|
+
response:
|
166
|
+
status:
|
167
|
+
code: 201
|
168
|
+
message: ''
|
169
|
+
headers:
|
170
|
+
Date:
|
171
|
+
- Mon, 07 May 2018 15:07:43 GMT
|
172
|
+
Content-Type:
|
173
|
+
- application/json; charset=utf-8
|
174
|
+
Connection:
|
175
|
+
- keep-alive
|
176
|
+
Status:
|
177
|
+
- 201 Created
|
178
|
+
Cache-Control:
|
179
|
+
- max-age=0, private, must-revalidate
|
180
|
+
Vary:
|
181
|
+
- Accept-Encoding, Origin
|
182
|
+
Etag:
|
183
|
+
- W/"ccb671619889c6d8d1340da3814ef0a0"
|
184
|
+
X-Runtime:
|
185
|
+
- '0.010571'
|
186
|
+
X-Credential-Username:
|
187
|
+
- 0000-0001-5489-3594
|
188
|
+
X-Request-Id:
|
189
|
+
- 3504a0cb-d384-490d-922f-15dbf095c42d
|
190
|
+
X-Powered-By:
|
191
|
+
- Phusion Passenger 5.2.3
|
192
|
+
Server:
|
193
|
+
- nginx/1.12.2 + Phusion Passenger 5.2.3
|
194
|
+
body:
|
195
|
+
encoding: UTF-8
|
196
|
+
string: '{"data":{"id":"b14650aa-817e-4922-a06d-27d6a21a9920","type":"events","attributes":{"subj-id":"https://metrics.test.datacite.org/reports/2018-3-Dash","obj-id":"https://doi.org/10.7291/d1q94r","message-action":"add","source-token":"28276d12-b320-41ba-9272-bb0adc3466ff","relation-type-id":"unique-dataset-investigations-regular","source-id":"datacite","total":3,"license":"https://creativecommons.org/publicdomain/zero/1.0/","occurred-at":"2128-04-09T00:00:00.000Z","timestamp":"2018-05-07T15:07:43Z","subj":{"pid":"https://metrics.test.datacite.org/reports/2018-3-Dash","issued":"2128-04-09"},"obj":{}}}}'
|
197
|
+
http_version:
|
198
|
+
recorded_at: Mon, 07 May 2018 15:07:43 GMT
|
199
|
+
recorded_with: VCR 3.0.3
|