toccatore 0.3.5 → 0.3.6
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 +4 -4
- data/Gemfile.lock +7 -5
- data/lib/toccatore/base.rb +29 -1
- data/lib/toccatore/cli.rb +2 -0
- data/lib/toccatore/images/toccatore.png +0 -0
- data/lib/toccatore/version.rb +1 -1
- data/spec/base_spec.rb +32 -0
- data/spec/cli_spec.rb +7 -1
- data/spec/fixtures/vcr_cassettes/Toccatore_Base/send_notification_to_slack/datacite_related.yml +56 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_Base/send_notification_to_slack/datacite_related_no_works.yml +56 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_Base/send_notification_to_slack/orcid_update.yml +56 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_Base/send_notification_to_slack/orcid_update_no_works.yml +56 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/datacite_related/should_fail.yml +215 -406
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/datacite_related/should_query_by_DOI.yml +141 -186
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/datacite_related/should_query_by_related_identifier.yml +74 -47
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/datacite_related/should_succeed.yml +617 -792
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/datacite_related/should_succeed_with_no_works.yml +56 -3
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/orcid_update/should_fail.yml +59 -6
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/orcid_update/should_query_by_DOI.yml +162 -101
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/orcid_update/should_query_by_ORCID_ID.yml +369 -278
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/orcid_update/should_succeed.yml +295 -230
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/orcid_update/should_succeed_with_no_works.yml +56 -3
- data/spec/spec_helper.rb +1 -0
- data/toccatore.gemspec +1 -0
- metadata +21 -3
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/orcid_update/should_delete.yml +0 -73
@@ -23,18 +23,20 @@ http_interactions:
|
|
23
23
|
Content-Type:
|
24
24
|
- application/json;charset=UTF-8
|
25
25
|
Date:
|
26
|
-
-
|
26
|
+
- Wed, 29 Mar 2017 13:24:23 GMT
|
27
27
|
Server:
|
28
28
|
- openresty/1.11.2.2
|
29
|
+
Content-Length:
|
30
|
+
- '89'
|
29
31
|
Connection:
|
30
32
|
- keep-alive
|
31
33
|
body:
|
32
34
|
encoding: UTF-8
|
33
|
-
string: '{"responseHeader":{"status":0,"QTime":
|
35
|
+
string: '{"responseHeader":{"status":0,"QTime":12},"response":{"numFound":1,"start":0,"docs":[]}}
|
34
36
|
|
35
37
|
'
|
36
38
|
http_version:
|
37
|
-
recorded_at:
|
39
|
+
recorded_at: Wed, 29 Mar 2017 13:24:23 GMT
|
38
40
|
- request:
|
39
41
|
method: get
|
40
42
|
uri: https://search.datacite.org/api?fl=doi,resourceTypeGeneral,relatedIdentifier,nameIdentifier,minted,updated&fq=updated:%5B2013-01-01T00:00:00Z%20TO%202017-12-31T23:59:59Z%5D%20AND%20has_metadata:true%20AND%20is_active:true&q=relatedIdentifier:DOI%5C:10.7554/elife.01567&rows=1000&start=0&wt=json
|
@@ -58,20 +60,18 @@ http_interactions:
|
|
58
60
|
Content-Type:
|
59
61
|
- application/json;charset=UTF-8
|
60
62
|
Date:
|
61
|
-
-
|
63
|
+
- Wed, 29 Mar 2017 13:24:24 GMT
|
62
64
|
Server:
|
63
65
|
- openresty/1.11.2.2
|
64
|
-
Content-Length:
|
65
|
-
- '452'
|
66
66
|
Connection:
|
67
67
|
- keep-alive
|
68
68
|
body:
|
69
69
|
encoding: UTF-8
|
70
|
-
string: '{"responseHeader":{"status":0,"QTime":
|
70
|
+
string: '{"responseHeader":{"status":0,"QTime":3},"response":{"numFound":1,"start":0,"docs":[{"minted":"2014-01-23T19:20:48Z","updated":"2017-02-05T18:24:05Z","doi":"10.5061/DRYAD.B835K","relatedIdentifier":["HasPart:DOI:10.5061/DRYAD.B835K/1","HasPart:DOI:10.5061/DRYAD.B835K/2","HasPart:DOI:10.5061/DRYAD.B835K/3","HasPart:DOI:10.5061/DRYAD.B835K/4","IsReferencedBy:DOI:10.7554/ELIFE.01567","IsReferencedBy:PMID:24520159"],"resourceTypeGeneral":"Dataset"}]}}
|
71
71
|
|
72
72
|
'
|
73
73
|
http_version:
|
74
|
-
recorded_at:
|
74
|
+
recorded_at: Wed, 29 Mar 2017 13:24:24 GMT
|
75
75
|
- request:
|
76
76
|
method: get
|
77
77
|
uri: https://api.datacite.org/prefixes/10.5061
|
@@ -88,12 +88,10 @@ http_interactions:
|
|
88
88
|
code: 200
|
89
89
|
message: ''
|
90
90
|
headers:
|
91
|
-
Access-Control-Allow-Credentials:
|
92
|
-
- 'true'
|
93
91
|
Access-Control-Allow-Headers:
|
94
92
|
- Content-Type,Accept,Accept-Encoding,Origin,User-Agent,Cache-Control,Keep-Alive
|
95
93
|
Access-Control-Allow-Methods:
|
96
|
-
-
|
94
|
+
- GET, POST, OPTIONS
|
97
95
|
Access-Control-Allow-Origin:
|
98
96
|
- "*"
|
99
97
|
Access-Control-Max-Age:
|
@@ -103,7 +101,7 @@ http_interactions:
|
|
103
101
|
Content-Type:
|
104
102
|
- application/vnd.api+json; charset=utf-8
|
105
103
|
Date:
|
106
|
-
-
|
104
|
+
- Wed, 29 Mar 2017 13:24:25 GMT
|
107
105
|
Etag:
|
108
106
|
- W/"1eb3f4f371821b1becc6cd25a71755ce"
|
109
107
|
Server:
|
@@ -112,26 +110,16 @@ http_interactions:
|
|
112
110
|
- 200 OK
|
113
111
|
Vary:
|
114
112
|
- Accept-Encoding
|
115
|
-
Via:
|
116
|
-
- kong/0.10.0rc3
|
117
113
|
X-Content-Type-Options:
|
118
114
|
- nosniff
|
119
115
|
X-Frame-Options:
|
120
116
|
- SAMEORIGIN
|
121
|
-
X-Kong-Proxy-Latency:
|
122
|
-
- '20'
|
123
|
-
X-Kong-Upstream-Latency:
|
124
|
-
- '508'
|
125
117
|
X-Powered-By:
|
126
118
|
- Phusion Passenger 5.1.2
|
127
|
-
X-Ratelimit-Limit-Hour:
|
128
|
-
- '10000'
|
129
|
-
X-Ratelimit-Remaining-Hour:
|
130
|
-
- '9905'
|
131
119
|
X-Request-Id:
|
132
|
-
-
|
120
|
+
- d781c360-8089-4660-826b-0581b0245d3c
|
133
121
|
X-Runtime:
|
134
|
-
- '0.
|
122
|
+
- '0.789185'
|
135
123
|
X-Xss-Protection:
|
136
124
|
- 1; mode=block
|
137
125
|
Connection:
|
@@ -140,7 +128,7 @@ http_interactions:
|
|
140
128
|
encoding: UTF-8
|
141
129
|
string: '{"data":{"id":"10.5061","type":"prefixes","attributes":{"registration-agency":"DataCite","updated":"2016-09-21T20:27:07Z"}}}'
|
142
130
|
http_version:
|
143
|
-
recorded_at:
|
131
|
+
recorded_at: Wed, 29 Mar 2017 13:24:25 GMT
|
144
132
|
- request:
|
145
133
|
method: get
|
146
134
|
uri: https://api.datacite.org/prefixes/10.7554
|
@@ -157,12 +145,10 @@ http_interactions:
|
|
157
145
|
code: 200
|
158
146
|
message: ''
|
159
147
|
headers:
|
160
|
-
Access-Control-Allow-Credentials:
|
161
|
-
- 'true'
|
162
148
|
Access-Control-Allow-Headers:
|
163
149
|
- Content-Type,Accept,Accept-Encoding,Origin,User-Agent,Cache-Control,Keep-Alive
|
164
150
|
Access-Control-Allow-Methods:
|
165
|
-
-
|
151
|
+
- GET, POST, OPTIONS
|
166
152
|
Access-Control-Allow-Origin:
|
167
153
|
- "*"
|
168
154
|
Access-Control-Max-Age:
|
@@ -172,7 +158,7 @@ http_interactions:
|
|
172
158
|
Content-Type:
|
173
159
|
- application/vnd.api+json; charset=utf-8
|
174
160
|
Date:
|
175
|
-
-
|
161
|
+
- Wed, 29 Mar 2017 13:24:27 GMT
|
176
162
|
Etag:
|
177
163
|
- W/"daf85afdb45f3c2713bc7e75916ba82a"
|
178
164
|
Server:
|
@@ -181,43 +167,31 @@ http_interactions:
|
|
181
167
|
- 200 OK
|
182
168
|
Vary:
|
183
169
|
- Accept-Encoding
|
184
|
-
Via:
|
185
|
-
- kong/0.10.0rc3
|
186
170
|
X-Content-Type-Options:
|
187
171
|
- nosniff
|
188
172
|
X-Frame-Options:
|
189
173
|
- SAMEORIGIN
|
190
|
-
X-Kong-Proxy-Latency:
|
191
|
-
- '2'
|
192
|
-
X-Kong-Upstream-Latency:
|
193
|
-
- '253'
|
194
174
|
X-Powered-By:
|
195
175
|
- Phusion Passenger 5.1.2
|
196
|
-
X-Ratelimit-Limit-Hour:
|
197
|
-
- '10000'
|
198
|
-
X-Ratelimit-Remaining-Hour:
|
199
|
-
- '9904'
|
200
176
|
X-Request-Id:
|
201
|
-
-
|
177
|
+
- b974fc4e-d9ae-4746-acd7-b9c318c543cf
|
202
178
|
X-Runtime:
|
203
|
-
- '0.
|
179
|
+
- '0.552100'
|
204
180
|
X-Xss-Protection:
|
205
181
|
- 1; mode=block
|
206
|
-
Content-Length:
|
207
|
-
- '124'
|
208
182
|
Connection:
|
209
183
|
- keep-alive
|
210
184
|
body:
|
211
185
|
encoding: UTF-8
|
212
186
|
string: '{"data":{"id":"10.7554","type":"prefixes","attributes":{"registration-agency":"Crossref","updated":"2016-09-21T21:07:27Z"}}}'
|
213
187
|
http_version:
|
214
|
-
recorded_at:
|
188
|
+
recorded_at: Wed, 29 Mar 2017 13:24:27 GMT
|
215
189
|
- request:
|
216
190
|
method: post
|
217
191
|
uri: https://bus-staging.eventdata.crossref.org/events
|
218
192
|
body:
|
219
193
|
encoding: UTF-8
|
220
|
-
string: '{"id":"
|
194
|
+
string: '{"id":"6accc7dd-d727-4202-9d33-a314d357fc2f","message_action":"create","subj_id":"https://doi.org/10.5061/dryad.b835k","obj_id":"https://doi.org/10.7554/elife.01567","relation_type_id":"is_referenced_by","source_id":"datacite","source_token":"28276d12-b320-41ba-9272-bb0adc3466ff","occurred_at":"2014-01-23T19:20:48Z"}'
|
221
195
|
headers:
|
222
196
|
User-Agent:
|
223
197
|
- Maremma - https://github.com/datacite/maremma
|
@@ -243,10 +217,63 @@ http_interactions:
|
|
243
217
|
Server:
|
244
218
|
- http-kit
|
245
219
|
Date:
|
246
|
-
-
|
220
|
+
- Wed, 29 Mar 2017 13:24:28 GMT
|
247
221
|
body:
|
248
222
|
encoding: UTF-8
|
249
223
|
string: ''
|
250
224
|
http_version:
|
251
|
-
recorded_at:
|
225
|
+
recorded_at: Wed, 29 Mar 2017 13:24:28 GMT
|
226
|
+
- request:
|
227
|
+
method: post
|
228
|
+
uri: "<SLACK_WEBHOOK_URL>"
|
229
|
+
body:
|
230
|
+
encoding: US-ASCII
|
231
|
+
string: payload=%7B%22username%22%3A%22Event+Data+Agent%22%2C%22icon_url%22%3A%22https%3A%2F%2Fraw.githubusercontent.com%2Fdatacite%2Ftoccatore%2Fmaster%2Flib%2Ftoccatore%2Fimages%2Ftoccatore.png%22%2C%22attachments%22%3A%5B%7B%22title%22%3A%22Report+for+datacite_related%22%2C%22text%22%3A%221+works+processed+for+date+range+2013-01-01+-+2017-12-31.%22%2C%22color%22%3A%22good%22%7D%5D%7D
|
232
|
+
headers:
|
233
|
+
Accept-Encoding:
|
234
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
235
|
+
Accept:
|
236
|
+
- "*/*"
|
237
|
+
User-Agent:
|
238
|
+
- Ruby
|
239
|
+
Content-Type:
|
240
|
+
- application/x-www-form-urlencoded
|
241
|
+
response:
|
242
|
+
status:
|
243
|
+
code: 200
|
244
|
+
message: OK
|
245
|
+
headers:
|
246
|
+
Content-Type:
|
247
|
+
- text/html
|
248
|
+
Content-Length:
|
249
|
+
- '22'
|
250
|
+
Connection:
|
251
|
+
- keep-alive
|
252
|
+
Access-Control-Allow-Origin:
|
253
|
+
- "*"
|
254
|
+
Date:
|
255
|
+
- Wed, 29 Mar 2017 13:24:30 GMT
|
256
|
+
Referrer-Policy:
|
257
|
+
- no-referrer
|
258
|
+
Server:
|
259
|
+
- Apache
|
260
|
+
Strict-Transport-Security:
|
261
|
+
- max-age=31536000; includeSubDomains; preload
|
262
|
+
Vary:
|
263
|
+
- Accept-Encoding
|
264
|
+
X-Frame-Options:
|
265
|
+
- SAMEORIGIN
|
266
|
+
X-Slack-Backend:
|
267
|
+
- h
|
268
|
+
X-Cache:
|
269
|
+
- Miss from cloudfront
|
270
|
+
Via:
|
271
|
+
- 1.1 22e8ec6be29eb9755e0a8dfac5944c51.cloudfront.net (CloudFront)
|
272
|
+
X-Amz-Cf-Id:
|
273
|
+
- RvpNEBXMcbUkGEVXcqdntP72B6XerCU2Jm6Q8gPoJFSUHzlLkv208Q==
|
274
|
+
body:
|
275
|
+
encoding: ASCII-8BIT
|
276
|
+
string: ok
|
277
|
+
http_version:
|
278
|
+
recorded_at: Wed, 29 Mar 2017 13:24:30 GMT
|
252
279
|
recorded_with: VCR 3.0.3
|