toccatore 0.3.9 → 0.4.15

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.
Files changed (78) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile.lock +76 -54
  3. data/README.md +1 -1
  4. data/lib/toccatore/base.rb +15 -4
  5. data/lib/toccatore/cli.rb +12 -0
  6. data/lib/toccatore/datacite_related.rb +18 -3
  7. data/lib/toccatore/orcid_update.rb +6 -2
  8. data/lib/toccatore/queue.rb +56 -0
  9. data/lib/toccatore/usage_update.rb +183 -0
  10. data/lib/toccatore/version.rb +1 -1
  11. data/lib/toccatore.rb +2 -0
  12. data/spec/base_spec.rb +4 -4
  13. data/spec/cli_spec.rb +36 -3
  14. data/spec/datacite_related_spec.rb +10 -10
  15. data/spec/factories/default.rb +22 -0
  16. data/spec/fixtures/event_data_resp_1 +2 -0
  17. data/spec/fixtures/event_data_resp_2 +4 -0
  18. data/spec/fixtures/events_empty.json +33 -0
  19. data/spec/fixtures/usage_event.json +1 -0
  20. data/spec/fixtures/usage_event_fail.json +17 -0
  21. data/spec/fixtures/usage_events.json +63 -0
  22. data/spec/fixtures/usage_update.json +101 -0
  23. data/spec/fixtures/usage_update_1.json +36738 -0
  24. data/spec/fixtures/usage_update_2.json +171 -0
  25. data/spec/fixtures/usage_update_3.json +176 -0
  26. data/spec/fixtures/usage_update_4.json +101 -0
  27. data/spec/fixtures/usage_update_nil.json +6 -0
  28. data/spec/fixtures/vcr_cassettes/Toccatore_Base/get_doi_ra/crossref.yml +21 -45
  29. data/spec/fixtures/vcr_cassettes/Toccatore_Base/get_doi_ra/datacite.yml +23 -47
  30. data/spec/fixtures/vcr_cassettes/Toccatore_Base/send_notification_to_slack/datacite_related.yml +14 -12
  31. data/spec/fixtures/vcr_cassettes/Toccatore_Base/send_notification_to_slack/datacite_related_no_works.yml +15 -13
  32. data/spec/fixtures/vcr_cassettes/Toccatore_Base/send_notification_to_slack/orcid_update.yml +14 -12
  33. data/spec/fixtures/vcr_cassettes/Toccatore_Base/send_notification_to_slack/orcid_update_no_works.yml +15 -13
  34. data/spec/fixtures/vcr_cassettes/Toccatore_CLI/datacite_related/should_fail.yml +345 -852
  35. data/spec/fixtures/vcr_cassettes/Toccatore_CLI/datacite_related/should_query_by_DOI.yml +327 -409
  36. data/spec/fixtures/vcr_cassettes/Toccatore_CLI/datacite_related/should_query_by_related_identifier.yml +140 -117
  37. data/spec/fixtures/vcr_cassettes/Toccatore_CLI/datacite_related/should_succeed.yml +1267 -2068
  38. data/spec/fixtures/vcr_cassettes/Toccatore_CLI/datacite_related/should_succeed_with_no_works.yml +31 -25
  39. data/spec/fixtures/vcr_cassettes/Toccatore_CLI/orcid_update/should_fail.yml +47 -39
  40. data/spec/fixtures/vcr_cassettes/Toccatore_CLI/orcid_update/should_query_by_DOI.yml +673 -855
  41. data/spec/fixtures/vcr_cassettes/Toccatore_CLI/orcid_update/should_query_by_ORCID_ID.yml +1885 -2419
  42. data/spec/fixtures/vcr_cassettes/Toccatore_CLI/orcid_update/should_succeed.yml +1555 -1991
  43. data/spec/fixtures/vcr_cassettes/Toccatore_CLI/orcid_update/should_succeed_with_no_works.yml +31 -27
  44. data/spec/fixtures/vcr_cassettes/Toccatore_CLI/usage_update/no_reports_in_the_queue/should_succeed_with_no_works.yml +196 -0
  45. data/spec/fixtures/vcr_cassettes/Toccatore_DataciteRelated/get_data/should_allow_queries_by_DOI_of_the_Datacite_Metadata_Search_API.yml +16 -12
  46. data/spec/fixtures/vcr_cassettes/Toccatore_DataciteRelated/get_data/should_allow_queries_by_related_identifier_of_the_Datacite_Metadata_Search_API.yml +17 -13
  47. data/spec/fixtures/vcr_cassettes/Toccatore_DataciteRelated/get_data/should_report_if_there_are_no_works_returned_by_the_Datacite_Metadata_Search_API.yml +16 -12
  48. data/spec/fixtures/vcr_cassettes/Toccatore_DataciteRelated/get_data/should_report_if_there_are_works_returned_by_the_Datacite_Metadata_Search_API.yml +16 -14
  49. data/spec/fixtures/vcr_cassettes/Toccatore_DataciteRelated/get_total/with_no_works.yml +15 -11
  50. data/spec/fixtures/vcr_cassettes/Toccatore_DataciteRelated/get_total/with_works.yml +16 -12
  51. data/spec/fixtures/vcr_cassettes/Toccatore_DataciteRelated/parse_data/should_report_if_there_are_works_returned_by_the_Datacite_Metadata_Search_API.yml +437 -869
  52. data/spec/fixtures/vcr_cassettes/Toccatore_DataciteRelated/push_data/should_report_if_there_are_works_returned_by_the_Datacite_Metadata_Search_API.yml +1240 -1662
  53. data/spec/fixtures/vcr_cassettes/Toccatore_DataciteRelated/push_data/should_work_with_DataCite_Event_Data.yml +4026 -6556
  54. data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/get_data/should_allow_queries_by_DOI_of_the_Datacite_Metadata_Search_API.yml +15 -13
  55. data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/get_data/should_allow_queries_by_ORCID_ID_of_the_Datacite_Metadata_Search_API.yml +15 -11
  56. data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/get_data/should_report_if_there_are_no_works_returned_by_the_Datacite_Metadata_Search_API.yml +15 -11
  57. data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/get_data/should_report_if_there_are_works_returned_by_the_Datacite_Metadata_Search_API.yml +15 -13
  58. data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/get_total/with_no_works.yml +15 -13
  59. data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/get_total/with_works.yml +15 -13
  60. data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/push_data/should_delete_claims.yml +25 -32
  61. data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/push_data/should_report_if_there_are_works_returned_by_the_Datacite_Metadata_Search_API.yml +1347 -1791
  62. data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/queue_jobs/should_report_if_there_are_no_works_returned_by_the_Datacite_Metadata_Search_API.yml +14 -10
  63. data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/queue_jobs/should_report_if_there_are_works_returned_by_the_Datacite_Metadata_Search_API.yml +29 -25
  64. data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_data/when_there_are_messages/should_return_the_data_for_one_message.yml +73 -0
  65. data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_data/when_there_is_ONE_message/should_return_the_data_for_one_message.yml +73 -0
  66. data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_message/should_return_no_meessage_when_the_queue_is_empty.yml +95 -0
  67. data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_message/should_return_one_message_when_there_are_multiple_messages.yml +95 -0
  68. data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_total/when_is_working_with_AWS.yml +187 -0
  69. data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/push_data/should_fail_if_format_of_the_event_is_empty.yml +169 -0
  70. data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/push_data/should_fail_if_format_of_the_event_is_wrong.yml +667 -0
  71. data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/push_data/should_work_with_a_single_item.yml +169 -0
  72. data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/queue_url/should_return_always_correct_queue_url.yml +49 -0
  73. data/spec/orcid_update_spec.rb +1 -1
  74. data/spec/queue_spec.rb +47 -0
  75. data/spec/spec_helper.rb +23 -1
  76. data/spec/usage_update_spec.rb +146 -0
  77. data/toccatore.gemspec +11 -5
  78. metadata +109 -26
@@ -2,76 +2,82 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- 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=0&start=0&wt=json
5
+ uri: https://search.datacite.org/api?fl=doi,resourceTypeGeneral,relatedIdentifier,nameIdentifier,minted,updated&fq=updated:%5B2013-01-01T00:00:00Z%20TO%202018-12-31T23:59:59Z%5D%20AND%20has_metadata:true%20AND%20is_active:true&q=relatedIdentifier:DOI%5C:10.7554/elife.01567&rows=0&start=0&wt=json
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - Maremma - https://github.com/datacite/maremma
11
+ - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma)
12
12
  Accept:
13
13
  - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
14
14
  response:
15
15
  status:
16
16
  code: 200
17
- message: ''
17
+ message: OK
18
18
  headers:
19
- Access-Control-Allow-Methods:
20
- - GET, POST, OPTIONS
21
- Access-Control-Allow-Origin:
22
- - "*"
19
+ Date:
20
+ - Fri, 10 Aug 2018 18:38:39 GMT
23
21
  Content-Type:
24
22
  - application/json;charset=UTF-8
25
- Date:
26
- - Wed, 29 Mar 2017 13:24:23 GMT
27
- Server:
28
- - openresty/1.11.2.2
29
- Content-Length:
30
- - '89'
31
23
  Connection:
32
24
  - keep-alive
25
+ Server:
26
+ - nginx/1.10.3 (Ubuntu)
27
+ Access-Control-Allow-Origin:
28
+ - "*"
29
+ Access-Control-Allow-Methods:
30
+ - GET, POST, PUT, DELETE, OPTIONS
31
+ Access-Control-Allow-Headers:
32
+ - DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Authorization
33
+ Access-Control-Expose-Headers:
34
+ - DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Authorization
33
35
  body:
34
- encoding: UTF-8
35
- string: '{"responseHeader":{"status":0,"QTime":12},"response":{"numFound":1,"start":0,"docs":[]}}
36
+ encoding: ASCII-8BIT
37
+ string: '{"responseHeader":{"status":0,"QTime":2316},"response":{"numFound":1,"start":0,"docs":[]}}
36
38
 
37
39
  '
38
40
  http_version:
39
- recorded_at: Wed, 29 Mar 2017 13:24:23 GMT
41
+ recorded_at: Fri, 10 Aug 2018 18:38:39 GMT
40
42
  - request:
41
43
  method: get
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
44
+ uri: https://search.datacite.org/api?fl=doi,resourceTypeGeneral,relatedIdentifier,nameIdentifier,minted,updated&fq=updated:%5B2013-01-01T00:00:00Z%20TO%202018-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
43
45
  body:
44
46
  encoding: US-ASCII
45
47
  string: ''
46
48
  headers:
47
49
  User-Agent:
48
- - Maremma - https://github.com/datacite/maremma
50
+ - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma)
49
51
  Accept:
50
52
  - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
51
53
  response:
52
54
  status:
53
55
  code: 200
54
- message: ''
56
+ message: OK
55
57
  headers:
56
- Access-Control-Allow-Methods:
57
- - GET, POST, OPTIONS
58
- Access-Control-Allow-Origin:
59
- - "*"
58
+ Date:
59
+ - Fri, 10 Aug 2018 18:38:39 GMT
60
60
  Content-Type:
61
61
  - application/json;charset=UTF-8
62
- Date:
63
- - Wed, 29 Mar 2017 13:24:24 GMT
64
- Server:
65
- - openresty/1.11.2.2
66
62
  Connection:
67
63
  - keep-alive
64
+ Server:
65
+ - nginx/1.10.3 (Ubuntu)
66
+ Access-Control-Allow-Origin:
67
+ - "*"
68
+ Access-Control-Allow-Methods:
69
+ - GET, POST, PUT, DELETE, OPTIONS
70
+ Access-Control-Allow-Headers:
71
+ - DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Authorization
72
+ Access-Control-Expose-Headers:
73
+ - DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Authorization
68
74
  body:
69
- encoding: UTF-8
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"}]}}
75
+ encoding: ASCII-8BIT
76
+ string: '{"responseHeader":{"status":0,"QTime":1},"response":{"numFound":1,"start":0,"docs":[{"minted":"2014-01-23T19:20:48Z","updated":"2018-04-21T07:07:59Z","doi":"10.5061/DRYAD.B835K","resourceTypeGeneral":"Dataset","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","IsSupplementTo:DOI:10.7554/ELIFE.01567","IsReferencedBy:PMID:24520159","IsSupplementTo:PMID:24520159"]}]}}
71
77
 
72
78
  '
73
79
  http_version:
74
- recorded_at: Wed, 29 Mar 2017 13:24:24 GMT
80
+ recorded_at: Fri, 10 Aug 2018 18:38:39 GMT
75
81
  - request:
76
82
  method: get
77
83
  uri: https://api.datacite.org/prefixes/10.5061
@@ -80,55 +86,45 @@ http_interactions:
80
86
  string: ''
81
87
  headers:
82
88
  User-Agent:
83
- - Maremma - https://github.com/datacite/maremma
89
+ - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma)
84
90
  Accept:
85
91
  - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
86
92
  response:
87
93
  status:
88
94
  code: 200
89
- message: ''
95
+ message: OK
90
96
  headers:
91
- Access-Control-Allow-Headers:
92
- - Content-Type,Accept,Accept-Encoding,Origin,User-Agent,Cache-Control,Keep-Alive
93
- Access-Control-Allow-Methods:
94
- - GET, POST, OPTIONS
95
- Access-Control-Allow-Origin:
96
- - "*"
97
- Access-Control-Max-Age:
98
- - '1728000'
99
- Cache-Control:
100
- - max-age=0, private, must-revalidate
97
+ Date:
98
+ - Fri, 10 Aug 2018 18:38:39 GMT
101
99
  Content-Type:
102
100
  - application/vnd.api+json; charset=utf-8
103
- Date:
104
- - Wed, 29 Mar 2017 13:24:25 GMT
105
- Etag:
106
- - W/"1eb3f4f371821b1becc6cd25a71755ce"
107
- Server:
108
- - openresty/1.11.2.2
101
+ Connection:
102
+ - keep-alive
109
103
  Status:
110
104
  - 200 OK
105
+ X-Anonymous-Consumer:
106
+ - 'true'
107
+ Cache-Control:
108
+ - max-age=0, private, must-revalidate
111
109
  Vary:
112
- - Accept-Encoding
113
- X-Content-Type-Options:
114
- - nosniff
115
- X-Frame-Options:
116
- - SAMEORIGIN
117
- X-Powered-By:
118
- - Phusion Passenger 5.1.2
110
+ - Accept-Encoding, Origin
119
111
  X-Request-Id:
120
- - d781c360-8089-4660-826b-0581b0245d3c
112
+ - a6ac8ccc-456c-45a4-9542-8ec4d8906781
113
+ Etag:
114
+ - W/"2d33bfdf34ccb1bfea6ae7d2cd01cb9b"
121
115
  X-Runtime:
122
- - '0.789185'
123
- X-Xss-Protection:
124
- - 1; mode=block
125
- Connection:
126
- - keep-alive
116
+ - '0.011491'
117
+ X-Powered-By:
118
+ - Phusion Passenger 5.3.4
119
+ Server:
120
+ - nginx/1.14.0 + Phusion Passenger 5.3.4
127
121
  body:
128
- encoding: UTF-8
129
- string: '{"data":{"id":"10.5061","type":"prefixes","attributes":{"registration-agency":"DataCite","updated":"2016-09-21T20:27:07Z"}}}'
122
+ encoding: ASCII-8BIT
123
+ string: '{"data":{"id":"10.5061","type":"prefixes","attributes":{"registration-agency":"DataCite","created":"2010-01-01T00:00:00.000Z","updated":null},"relationships":{"clients":{"data":[{"id":"dryad.dryad","type":"clients"}]},"providers":{"data":[{"id":"dryad","type":"providers"}]}}},"included":[{"id":"dryad.dryad","type":"clients","attributes":{"name":"DRYAD","symbol":"DRYAD.DRYAD","year":2018,"contact-name":"Dryad
124
+ Administrator","contact-email":"admin@datadryad.org","domains":"*","url":null,"is-active":true,"has-password":true,"created":"2018-04-24T20:59:15Z","updated":"2018-08-10T02:36:18Z"},"relationships":{"prefixes":{"meta":{}},"provider":{"meta":{}},"repository":{"meta":{}}}},{"id":"dryad","type":"providers","attributes":{"name":"Dryad","symbol":"DRYAD","website":null,"contact-name":"Elizabeth
125
+ Hull","contact-email":"ehull@datadryad.org","phone":null,"description":null,"country":"US","logo-url":"https://assets.datacite.org/images/members/dryad.png","institution-type":null,"is-active":true,"has-password":true,"joined":"2017-12-30","created":"2018-02-08T23:35:26.000Z","updated":"2018-08-10T02:25:53.000Z"},"relationships":{"clients":{"meta":{}},"prefixes":{"meta":{}}}}]}'
130
126
  http_version:
131
- recorded_at: Wed, 29 Mar 2017 13:24:25 GMT
127
+ recorded_at: Fri, 10 Aug 2018 18:38:39 GMT
132
128
  - request:
133
129
  method: get
134
130
  uri: https://api.datacite.org/prefixes/10.7554
@@ -137,66 +133,54 @@ http_interactions:
137
133
  string: ''
138
134
  headers:
139
135
  User-Agent:
140
- - Maremma - https://github.com/datacite/maremma
136
+ - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma)
141
137
  Accept:
142
138
  - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
143
139
  response:
144
140
  status:
145
141
  code: 200
146
- message: ''
142
+ message: OK
147
143
  headers:
148
- Access-Control-Allow-Headers:
149
- - Content-Type,Accept,Accept-Encoding,Origin,User-Agent,Cache-Control,Keep-Alive
150
- Access-Control-Allow-Methods:
151
- - GET, POST, OPTIONS
152
- Access-Control-Allow-Origin:
153
- - "*"
154
- Access-Control-Max-Age:
155
- - '1728000'
156
- Cache-Control:
157
- - max-age=0, private, must-revalidate
144
+ Date:
145
+ - Fri, 10 Aug 2018 18:38:39 GMT
158
146
  Content-Type:
159
147
  - application/vnd.api+json; charset=utf-8
160
- Date:
161
- - Wed, 29 Mar 2017 13:24:27 GMT
162
- Etag:
163
- - W/"daf85afdb45f3c2713bc7e75916ba82a"
164
- Server:
165
- - openresty/1.11.2.2
148
+ Connection:
149
+ - keep-alive
166
150
  Status:
167
151
  - 200 OK
152
+ X-Anonymous-Consumer:
153
+ - 'true'
154
+ Cache-Control:
155
+ - max-age=0, private, must-revalidate
168
156
  Vary:
169
- - Accept-Encoding
170
- X-Content-Type-Options:
171
- - nosniff
172
- X-Frame-Options:
173
- - SAMEORIGIN
174
- X-Powered-By:
175
- - Phusion Passenger 5.1.2
157
+ - Accept-Encoding, Origin
176
158
  X-Request-Id:
177
- - b974fc4e-d9ae-4746-acd7-b9c318c543cf
159
+ - d9208564-f198-4c39-b461-a82515f963b2
160
+ Etag:
161
+ - W/"258c3a49bbc303b1229efe2fae9cc9e2"
178
162
  X-Runtime:
179
- - '0.552100'
180
- X-Xss-Protection:
181
- - 1; mode=block
182
- Connection:
183
- - keep-alive
163
+ - '0.096828'
164
+ X-Powered-By:
165
+ - Phusion Passenger 5.3.4
166
+ Server:
167
+ - nginx/1.14.0 + Phusion Passenger 5.3.4
184
168
  body:
185
- encoding: UTF-8
186
- string: '{"data":{"id":"10.7554","type":"prefixes","attributes":{"registration-agency":"Crossref","updated":"2016-09-21T21:07:27Z"}}}'
169
+ encoding: ASCII-8BIT
170
+ string: '{"data":{"id":"10.7554","type":"handles","attributes":{"registration-agency":"Crossref","created":null,"updated":"2016-09-21T21:07:27Z"},"relationships":{"clients":{"data":[]},"providers":{"data":[]}}}}'
187
171
  http_version:
188
- recorded_at: Wed, 29 Mar 2017 13:24:27 GMT
172
+ recorded_at: Fri, 10 Aug 2018 18:38:39 GMT
189
173
  - request:
190
174
  method: post
191
175
  uri: https://bus-staging.eventdata.crossref.org/events
192
176
  body:
193
177
  encoding: UTF-8
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"}'
178
+ string: '{"id":"cf0cba13-65f0-4f40-8566-934d9e139908","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","license":"https://creativecommons.org/publicdomain/zero/1.0/"}'
195
179
  headers:
196
180
  User-Agent:
197
- - Maremma - https://github.com/datacite/maremma
181
+ - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma)
198
182
  Content-Type:
199
- - application/json
183
+ - application/json;charset=UTF-8
200
184
  Accept:
201
185
  - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
202
186
  Authorization:
@@ -204,7 +188,7 @@ http_interactions:
204
188
  response:
205
189
  status:
206
190
  code: 201
207
- message: ''
191
+ message: Created
208
192
  headers:
209
193
  Content-Type:
210
194
  - application/json
@@ -217,18 +201,55 @@ http_interactions:
217
201
  Server:
218
202
  - http-kit
219
203
  Date:
220
- - Wed, 29 Mar 2017 13:24:28 GMT
204
+ - Fri, 10 Aug 2018 18:38:40 GMT
205
+ body:
206
+ encoding: ASCII-8BIT
207
+ string: ''
208
+ http_version:
209
+ recorded_at: Fri, 10 Aug 2018 18:38:40 GMT
210
+ - request:
211
+ method: post
212
+ uri: https://bus-staging.eventdata.crossref.org/events
221
213
  body:
222
214
  encoding: UTF-8
215
+ string: '{"id":"4141790b-66ea-45c8-91b4-2f446e6de325","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_supplement_to","source_id":"datacite","source_token":"28276d12-b320-41ba-9272-bb0adc3466ff","occurred_at":"2014-01-23T19:20:48Z","license":"https://creativecommons.org/publicdomain/zero/1.0/"}'
216
+ headers:
217
+ User-Agent:
218
+ - Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma)
219
+ Content-Type:
220
+ - application/json;charset=UTF-8
221
+ Accept:
222
+ - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
223
+ Authorization:
224
+ - Bearer <EVENTDATA_TOKEN>
225
+ response:
226
+ status:
227
+ code: 201
228
+ message: Created
229
+ headers:
230
+ Content-Type:
231
+ - application/json
232
+ Vary:
233
+ - Accept
234
+ Access-Control-Allow-Origin:
235
+ - "*"
236
+ Content-Length:
237
+ - '0'
238
+ Server:
239
+ - http-kit
240
+ Date:
241
+ - Fri, 10 Aug 2018 18:38:40 GMT
242
+ body:
243
+ encoding: ASCII-8BIT
223
244
  string: ''
224
245
  http_version:
225
- recorded_at: Wed, 29 Mar 2017 13:24:28 GMT
246
+ recorded_at: Fri, 10 Aug 2018 18:38:40 GMT
226
247
  - request:
227
248
  method: post
228
249
  uri: "<SLACK_WEBHOOK_URL>"
229
250
  body:
230
251
  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
252
+ 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+with+0+errors+for+date+range+2013-01-01+-+2018-12-31.%22%2C%22color%22%3A%22good%22%7D%5D%7D
232
253
  headers:
233
254
  Accept-Encoding:
234
255
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -249,31 +270,33 @@ http_interactions:
249
270
  - '22'
250
271
  Connection:
251
272
  - keep-alive
252
- Access-Control-Allow-Origin:
253
- - "*"
254
273
  Date:
255
- - Wed, 29 Mar 2017 13:24:30 GMT
256
- Referrer-Policy:
257
- - no-referrer
274
+ - Fri, 10 Aug 2018 18:38:40 GMT
258
275
  Server:
259
276
  - Apache
277
+ X-Slack-Backend:
278
+ - h
279
+ Referrer-Policy:
280
+ - no-referrer
260
281
  Strict-Transport-Security:
261
282
  - max-age=31536000; includeSubDomains; preload
262
- Vary:
263
- - Accept-Encoding
264
283
  X-Frame-Options:
265
284
  - SAMEORIGIN
266
- X-Slack-Backend:
267
- - h
285
+ Vary:
286
+ - Accept-Encoding
287
+ Access-Control-Allow-Origin:
288
+ - "*"
289
+ X-Via:
290
+ - haproxy-www-94ks
268
291
  X-Cache:
269
292
  - Miss from cloudfront
270
293
  Via:
271
- - 1.1 22e8ec6be29eb9755e0a8dfac5944c51.cloudfront.net (CloudFront)
294
+ - 1.1 3aa04125cfbe212eb3783a1b1caebdb5.cloudfront.net (CloudFront)
272
295
  X-Amz-Cf-Id:
273
- - RvpNEBXMcbUkGEVXcqdntP72B6XerCU2Jm6Q8gPoJFSUHzlLkv208Q==
296
+ - sCbTMcwtHo3iFNqzzPLPfX14cRF0nv2xEuU_l5JbEcsrZHo1TAGTSw==
274
297
  body:
275
298
  encoding: ASCII-8BIT
276
299
  string: ok
277
300
  http_version:
278
- recorded_at: Wed, 29 Mar 2017 13:24:30 GMT
301
+ recorded_at: Fri, 10 Aug 2018 18:38:40 GMT
279
302
  recorded_with: VCR 3.0.3