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
@@ -0,0 +1,187 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://sqs.eu-west-1.amazonaws.com/
6
+ body:
7
+ encoding: UTF-8
8
+ string: Action=GetQueueUrl&QueueName=test_usage&Version=2012-11-05
9
+ headers:
10
+ Content-Type:
11
+ - application/x-www-form-urlencoded; charset=utf-8
12
+ Accept-Encoding:
13
+ - ''
14
+ User-Agent:
15
+ - aws-sdk-ruby3/3.24.0 ruby/2.4.2 x86_64-darwin16 aws-sdk-sqs/1.4.0
16
+ X-Amz-Date:
17
+ - 20180810T162254Z
18
+ X-Amz-Content-Sha256:
19
+ - 5761efd13dd0ed81182207171d3660628968189941431d6044920ef8fe7b1160
20
+ Authorization:
21
+ - AWS4-HMAC-SHA256 Credential=AKIAIUG4XO77LTVIG3PA/20180810/eu-west-1/sqs/aws4_request,
22
+ SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=ac222f1bc09285fb32e9d97ca94a560d1a60e34aebe2ca3bfbc704bcf8bd657b
23
+ Content-Length:
24
+ - '58'
25
+ Accept:
26
+ - "*/*"
27
+ response:
28
+ status:
29
+ code: 200
30
+ message: OK
31
+ headers:
32
+ Server:
33
+ - Server
34
+ Date:
35
+ - Fri, 10 Aug 2018 16:22:54 GMT
36
+ Content-Type:
37
+ - text/xml
38
+ Content-Length:
39
+ - '330'
40
+ Connection:
41
+ - keep-alive
42
+ X-Amzn-Requestid:
43
+ - fc9589db-bd6a-518c-bbdd-da3c03741f7e
44
+ body:
45
+ encoding: UTF-8
46
+ string: <?xml version="1.0"?><GetQueueUrlResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><GetQueueUrlResult><QueueUrl>https://sqs.eu-west-1.amazonaws.com/404017989009/test_usage</QueueUrl></GetQueueUrlResult><ResponseMetadata><RequestId>fc9589db-bd6a-518c-bbdd-da3c03741f7e</RequestId></ResponseMetadata></GetQueueUrlResponse>
47
+ http_version:
48
+ recorded_at: Fri, 10 Aug 2018 16:22:54 GMT
49
+ - request:
50
+ method: post
51
+ uri: https://sqs.eu-west-1.amazonaws.com/404017989009/test_usage
52
+ body:
53
+ encoding: UTF-8
54
+ string: Action=GetQueueAttributes&AttributeName.1=ApproximateNumberOfMessages&AttributeName.2=ApproximateNumberOfMessagesNotVisible&QueueUrl=https%3A%2F%2Fsqs.eu-west-1.amazonaws.com%2F404017989009%2Ftest_usage&Version=2012-11-05
55
+ headers:
56
+ Content-Type:
57
+ - application/x-www-form-urlencoded; charset=utf-8
58
+ Accept-Encoding:
59
+ - ''
60
+ User-Agent:
61
+ - aws-sdk-ruby3/3.24.0 ruby/2.4.2 x86_64-darwin16 aws-sdk-sqs/1.4.0
62
+ X-Amz-Date:
63
+ - 20180810T162254Z
64
+ X-Amz-Content-Sha256:
65
+ - 4fa1f9790ab8d8b778fc048ef890ef00e82c1fd4658cd21964eff9eb5dc9426d
66
+ Authorization:
67
+ - AWS4-HMAC-SHA256 Credential=AKIAIUG4XO77LTVIG3PA/20180810/eu-west-1/sqs/aws4_request,
68
+ SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=77687e43c4a58891077db4c22e99e664fb89245586008ec9fd91ea4072ace55d
69
+ Content-Length:
70
+ - '221'
71
+ Accept:
72
+ - "*/*"
73
+ response:
74
+ status:
75
+ code: 200
76
+ message: OK
77
+ headers:
78
+ Server:
79
+ - Server
80
+ Date:
81
+ - Fri, 10 Aug 2018 16:22:54 GMT
82
+ Content-Type:
83
+ - text/xml
84
+ Content-Length:
85
+ - '446'
86
+ Connection:
87
+ - keep-alive
88
+ X-Amzn-Requestid:
89
+ - 6f9d09a0-1895-5275-bddb-5a47a68bca9f
90
+ body:
91
+ encoding: UTF-8
92
+ string: <?xml version="1.0"?><GetQueueAttributesResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><GetQueueAttributesResult><Attribute><Name>ApproximateNumberOfMessages</Name><Value>0</Value></Attribute><Attribute><Name>ApproximateNumberOfMessagesNotVisible</Name><Value>0</Value></Attribute></GetQueueAttributesResult><ResponseMetadata><RequestId>6f9d09a0-1895-5275-bddb-5a47a68bca9f</RequestId></ResponseMetadata></GetQueueAttributesResponse>
93
+ http_version:
94
+ recorded_at: Fri, 10 Aug 2018 16:22:54 GMT
95
+ - request:
96
+ method: post
97
+ uri: https://sqs.eu-west-1.amazonaws.com/
98
+ body:
99
+ encoding: UTF-8
100
+ string: Action=GetQueueUrl&QueueName=test_usage&Version=2012-11-05
101
+ headers:
102
+ Content-Type:
103
+ - application/x-www-form-urlencoded; charset=utf-8
104
+ Accept-Encoding:
105
+ - ''
106
+ User-Agent:
107
+ - aws-sdk-ruby3/3.24.0 ruby/2.4.2 x86_64-darwin16 aws-sdk-sqs/1.4.0
108
+ X-Amz-Date:
109
+ - 20180810T162254Z
110
+ X-Amz-Content-Sha256:
111
+ - 5761efd13dd0ed81182207171d3660628968189941431d6044920ef8fe7b1160
112
+ Authorization:
113
+ - AWS4-HMAC-SHA256 Credential=AKIAIUG4XO77LTVIG3PA/20180810/eu-west-1/sqs/aws4_request,
114
+ SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=ac222f1bc09285fb32e9d97ca94a560d1a60e34aebe2ca3bfbc704bcf8bd657b
115
+ Content-Length:
116
+ - '58'
117
+ Accept:
118
+ - "*/*"
119
+ response:
120
+ status:
121
+ code: 200
122
+ message: OK
123
+ headers:
124
+ Server:
125
+ - Server
126
+ Date:
127
+ - Fri, 10 Aug 2018 16:22:54 GMT
128
+ Content-Type:
129
+ - text/xml
130
+ Content-Length:
131
+ - '330'
132
+ Connection:
133
+ - keep-alive
134
+ X-Amzn-Requestid:
135
+ - af567e69-ffd1-5146-9d52-2d8e41cfee16
136
+ body:
137
+ encoding: UTF-8
138
+ string: <?xml version="1.0"?><GetQueueUrlResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><GetQueueUrlResult><QueueUrl>https://sqs.eu-west-1.amazonaws.com/404017989009/test_usage</QueueUrl></GetQueueUrlResult><ResponseMetadata><RequestId>af567e69-ffd1-5146-9d52-2d8e41cfee16</RequestId></ResponseMetadata></GetQueueUrlResponse>
139
+ http_version:
140
+ recorded_at: Fri, 10 Aug 2018 16:22:55 GMT
141
+ - request:
142
+ method: post
143
+ uri: https://sqs.eu-west-1.amazonaws.com/404017989009/test_usage
144
+ body:
145
+ encoding: UTF-8
146
+ string: Action=GetQueueAttributes&AttributeName.1=ApproximateNumberOfMessages&AttributeName.2=ApproximateNumberOfMessagesNotVisible&QueueUrl=https%3A%2F%2Fsqs.eu-west-1.amazonaws.com%2F404017989009%2Ftest_usage&Version=2012-11-05
147
+ headers:
148
+ Content-Type:
149
+ - application/x-www-form-urlencoded; charset=utf-8
150
+ Accept-Encoding:
151
+ - ''
152
+ User-Agent:
153
+ - aws-sdk-ruby3/3.24.0 ruby/2.4.2 x86_64-darwin16 aws-sdk-sqs/1.4.0
154
+ X-Amz-Date:
155
+ - 20180810T162255Z
156
+ X-Amz-Content-Sha256:
157
+ - 4fa1f9790ab8d8b778fc048ef890ef00e82c1fd4658cd21964eff9eb5dc9426d
158
+ Authorization:
159
+ - AWS4-HMAC-SHA256 Credential=AKIAIUG4XO77LTVIG3PA/20180810/eu-west-1/sqs/aws4_request,
160
+ SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=396f63217baca90c144eddc37328ecba77ed0a74727cb31f8f3cb1a228a9cff7
161
+ Content-Length:
162
+ - '221'
163
+ Accept:
164
+ - "*/*"
165
+ response:
166
+ status:
167
+ code: 200
168
+ message: OK
169
+ headers:
170
+ Server:
171
+ - Server
172
+ Date:
173
+ - Fri, 10 Aug 2018 16:22:55 GMT
174
+ Content-Type:
175
+ - text/xml
176
+ Content-Length:
177
+ - '446'
178
+ Connection:
179
+ - keep-alive
180
+ X-Amzn-Requestid:
181
+ - 1c6782f9-9d5c-5d1c-9aab-d11e2343f239
182
+ body:
183
+ encoding: UTF-8
184
+ string: <?xml version="1.0"?><GetQueueAttributesResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><GetQueueAttributesResult><Attribute><Name>ApproximateNumberOfMessages</Name><Value>0</Value></Attribute><Attribute><Name>ApproximateNumberOfMessagesNotVisible</Name><Value>0</Value></Attribute></GetQueueAttributesResult><ResponseMetadata><RequestId>1c6782f9-9d5c-5d1c-9aab-d11e2343f239</RequestId></ResponseMetadata></GetQueueAttributesResponse>
185
+ http_version:
186
+ recorded_at: Fri, 10 Aug 2018 16:22:55 GMT
187
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,169 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://api.test.datacite.org/events/fc6860b8-4230-41bc-8b8e-21d60e9a7d9a
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"data":{"id":"fc6860b8-4230-41bc-8b8e-21d60e9a7d9a","type":"events","attributes":{"uuid":"fc6860b8-4230-41bc-8b8e-21d60e9a7d9a","message-action":"create","subj-id":"https://api.test.datacite.org/reports/2018-3-Dashs","subj":{"pid":"https://api.test.datacite.org/reports/2018-3-Dashs","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/"}}}'
9
+ headers:
10
+ User-Agent:
11
+ - Mozilla/5.0 (compatible; Maremma/4.1; +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 <LAGOTTINO_TOKEN>
18
+ response:
19
+ status:
20
+ code: 500
21
+ message: Internal Server Error
22
+ headers:
23
+ Date:
24
+ - Fri, 10 Aug 2018 17:13:54 GMT
25
+ Content-Type:
26
+ - application/json; charset=UTF-8
27
+ Content-Length:
28
+ - '14601'
29
+ Connection:
30
+ - keep-alive
31
+ Status:
32
+ - 500 Internal Server Error
33
+ Vary:
34
+ - Origin
35
+ X-Runtime:
36
+ - '0.028623'
37
+ X-Request-Id:
38
+ - cd66aea2-5006-4e21-bcc7-b14fb388dccd
39
+ X-Powered-By:
40
+ - Phusion Passenger 5.3.4
41
+ Server:
42
+ - nginx/1.14.0 + Phusion Passenger 5.3.4
43
+ body:
44
+ encoding: ASCII-8BIT
45
+ string: '{"status":500,"error":"Internal Server Error","exception":"#<CanCan::AccessDenied:
46
+ You are not authorized to access this page.>","traces":{"Application Trace":[{"id":2,"trace":"app/controllers/events_controller.rb:30:in
47
+ `update''"}],"Framework Trace":[{"id":0,"trace":"vendor/bundle/ruby/2.4.0/gems/cancancan-2.2.0/lib/cancan/ability.rb:176:in
48
+ `authorize!''"},{"id":1,"trace":"vendor/bundle/ruby/2.4.0/gems/cancancan-2.2.0/lib/cancan/controller_additions.rb:336:in
49
+ `authorize!''"},{"id":3,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_controller/metal/basic_implicit_render.rb:6:in
50
+ `send_action''"},{"id":4,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/abstract_controller/base.rb:194:in
51
+ `process_action''"},{"id":5,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_controller/metal/rendering.rb:30:in
52
+ `process_action''"},{"id":6,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/abstract_controller/callbacks.rb:42:in
53
+ `block in process_action''"},{"id":7,"trace":"vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/callbacks.rb:132:in
54
+ `run_callbacks''"},{"id":8,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/abstract_controller/callbacks.rb:41:in
55
+ `process_action''"},{"id":9,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_controller/metal/rescue.rb:22:in
56
+ `process_action''"},{"id":10,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_controller/metal/instrumentation.rb:34:in
57
+ `block in process_action''"},{"id":11,"trace":"vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/notifications.rb:168:in
58
+ `block in instrument''"},{"id":12,"trace":"vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/notifications/instrumenter.rb:23:in
59
+ `instrument''"},{"id":13,"trace":"vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/notifications.rb:168:in
60
+ `instrument''"},{"id":14,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_controller/metal/instrumentation.rb:32:in
61
+ `process_action''"},{"id":15,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_controller/metal/params_wrapper.rb:256:in
62
+ `process_action''"},{"id":16,"trace":"vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/railties/controller_runtime.rb:24:in
63
+ `process_action''"},{"id":17,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/abstract_controller/base.rb:134:in
64
+ `process''"},{"id":18,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_controller/metal.rb:191:in
65
+ `dispatch''"},{"id":19,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_controller/metal.rb:252:in
66
+ `dispatch''"},{"id":20,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/routing/route_set.rb:52:in
67
+ `dispatch''"},{"id":21,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/routing/route_set.rb:34:in
68
+ `serve''"},{"id":22,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/journey/router.rb:52:in
69
+ `block in serve''"},{"id":23,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/journey/router.rb:35:in
70
+ `each''"},{"id":24,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/journey/router.rb:35:in
71
+ `serve''"},{"id":25,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/routing/route_set.rb:840:in
72
+ `call''"},{"id":26,"trace":"vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/deflater.rb:34:in
73
+ `call''"},{"id":27,"trace":"vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/etag.rb:25:in
74
+ `call''"},{"id":28,"trace":"vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/conditional_get.rb:38:in
75
+ `call''"},{"id":29,"trace":"vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/head.rb:12:in
76
+ `call''"},{"id":30,"trace":"vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:559:in
77
+ `call''"},{"id":31,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/callbacks.rb:28:in
78
+ `block in call''"},{"id":32,"trace":"vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/callbacks.rb:98:in
79
+ `run_callbacks''"},{"id":33,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/callbacks.rb:26:in
80
+ `call''"},{"id":34,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/executor.rb:14:in
81
+ `call''"},{"id":35,"trace":"vendor/bundle/ruby/2.4.0/gems/bugsnag-6.8.0/lib/bugsnag/integrations/rack.rb:46:in
82
+ `call''"},{"id":36,"trace":"vendor/bundle/ruby/2.4.0/gems/better_errors-2.4.0/lib/better_errors/middleware.rb:59:in
83
+ `call''"},{"id":37,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/debug_exceptions.rb:61:in
84
+ `call''"},{"id":38,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/show_exceptions.rb:33:in
85
+ `call''"},{"id":39,"trace":"vendor/bundle/ruby/2.4.0/gems/lograge-0.10.0/lib/lograge/rails_ext/rack/logger.rb:15:in
86
+ `call_app''"},{"id":40,"trace":"vendor/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/rack/logger.rb:26:in
87
+ `block in call''"},{"id":41,"trace":"vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/tagged_logging.rb:71:in
88
+ `block in tagged''"},{"id":42,"trace":"vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/tagged_logging.rb:28:in
89
+ `tagged''"},{"id":43,"trace":"vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/tagged_logging.rb:71:in
90
+ `tagged''"},{"id":44,"trace":"vendor/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/rack/logger.rb:26:in
91
+ `call''"},{"id":45,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/remote_ip.rb:81:in
92
+ `call''"},{"id":46,"trace":"vendor/bundle/ruby/2.4.0/gems/request_store-1.4.1/lib/request_store/middleware.rb:19:in
93
+ `call''"},{"id":47,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/request_id.rb:27:in
94
+ `call''"},{"id":48,"trace":"vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/runtime.rb:22:in
95
+ `call''"},{"id":49,"trace":"vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in
96
+ `call''"},{"id":50,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/executor.rb:14:in
97
+ `call''"},{"id":51,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/static.rb:127:in
98
+ `call''"},{"id":52,"trace":"vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/sendfile.rb:111:in
99
+ `call''"},{"id":53,"trace":"vendor/bundle/ruby/2.4.0/gems/rack-cors-1.0.2/lib/rack/cors.rb:97:in
100
+ `call''"},{"id":54,"trace":"vendor/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/engine.rb:524:in
101
+ `call''"},{"id":55,"trace":"/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:97:in
102
+ `process_request''"},{"id":56,"trace":"/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:157:in
103
+ `accept_and_process_next_request''"},{"id":57,"trace":"/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in
104
+ `main_loop''"},{"id":58,"trace":"/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:415:in
105
+ `block (3 levels) in start_threads''"},{"id":59,"trace":"/usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in
106
+ `block in create_thread_and_abort_on_exception''"}],"Full Trace":[{"id":0,"trace":"vendor/bundle/ruby/2.4.0/gems/cancancan-2.2.0/lib/cancan/ability.rb:176:in
107
+ `authorize!''"},{"id":1,"trace":"vendor/bundle/ruby/2.4.0/gems/cancancan-2.2.0/lib/cancan/controller_additions.rb:336:in
108
+ `authorize!''"},{"id":2,"trace":"app/controllers/events_controller.rb:30:in
109
+ `update''"},{"id":3,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_controller/metal/basic_implicit_render.rb:6:in
110
+ `send_action''"},{"id":4,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/abstract_controller/base.rb:194:in
111
+ `process_action''"},{"id":5,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_controller/metal/rendering.rb:30:in
112
+ `process_action''"},{"id":6,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/abstract_controller/callbacks.rb:42:in
113
+ `block in process_action''"},{"id":7,"trace":"vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/callbacks.rb:132:in
114
+ `run_callbacks''"},{"id":8,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/abstract_controller/callbacks.rb:41:in
115
+ `process_action''"},{"id":9,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_controller/metal/rescue.rb:22:in
116
+ `process_action''"},{"id":10,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_controller/metal/instrumentation.rb:34:in
117
+ `block in process_action''"},{"id":11,"trace":"vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/notifications.rb:168:in
118
+ `block in instrument''"},{"id":12,"trace":"vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/notifications/instrumenter.rb:23:in
119
+ `instrument''"},{"id":13,"trace":"vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/notifications.rb:168:in
120
+ `instrument''"},{"id":14,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_controller/metal/instrumentation.rb:32:in
121
+ `process_action''"},{"id":15,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_controller/metal/params_wrapper.rb:256:in
122
+ `process_action''"},{"id":16,"trace":"vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/railties/controller_runtime.rb:24:in
123
+ `process_action''"},{"id":17,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/abstract_controller/base.rb:134:in
124
+ `process''"},{"id":18,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_controller/metal.rb:191:in
125
+ `dispatch''"},{"id":19,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_controller/metal.rb:252:in
126
+ `dispatch''"},{"id":20,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/routing/route_set.rb:52:in
127
+ `dispatch''"},{"id":21,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/routing/route_set.rb:34:in
128
+ `serve''"},{"id":22,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/journey/router.rb:52:in
129
+ `block in serve''"},{"id":23,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/journey/router.rb:35:in
130
+ `each''"},{"id":24,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/journey/router.rb:35:in
131
+ `serve''"},{"id":25,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/routing/route_set.rb:840:in
132
+ `call''"},{"id":26,"trace":"vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/deflater.rb:34:in
133
+ `call''"},{"id":27,"trace":"vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/etag.rb:25:in
134
+ `call''"},{"id":28,"trace":"vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/conditional_get.rb:38:in
135
+ `call''"},{"id":29,"trace":"vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/head.rb:12:in
136
+ `call''"},{"id":30,"trace":"vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:559:in
137
+ `call''"},{"id":31,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/callbacks.rb:28:in
138
+ `block in call''"},{"id":32,"trace":"vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/callbacks.rb:98:in
139
+ `run_callbacks''"},{"id":33,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/callbacks.rb:26:in
140
+ `call''"},{"id":34,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/executor.rb:14:in
141
+ `call''"},{"id":35,"trace":"vendor/bundle/ruby/2.4.0/gems/bugsnag-6.8.0/lib/bugsnag/integrations/rack.rb:46:in
142
+ `call''"},{"id":36,"trace":"vendor/bundle/ruby/2.4.0/gems/better_errors-2.4.0/lib/better_errors/middleware.rb:59:in
143
+ `call''"},{"id":37,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/debug_exceptions.rb:61:in
144
+ `call''"},{"id":38,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/show_exceptions.rb:33:in
145
+ `call''"},{"id":39,"trace":"vendor/bundle/ruby/2.4.0/gems/lograge-0.10.0/lib/lograge/rails_ext/rack/logger.rb:15:in
146
+ `call_app''"},{"id":40,"trace":"vendor/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/rack/logger.rb:26:in
147
+ `block in call''"},{"id":41,"trace":"vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/tagged_logging.rb:71:in
148
+ `block in tagged''"},{"id":42,"trace":"vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/tagged_logging.rb:28:in
149
+ `tagged''"},{"id":43,"trace":"vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/tagged_logging.rb:71:in
150
+ `tagged''"},{"id":44,"trace":"vendor/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/rack/logger.rb:26:in
151
+ `call''"},{"id":45,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/remote_ip.rb:81:in
152
+ `call''"},{"id":46,"trace":"vendor/bundle/ruby/2.4.0/gems/request_store-1.4.1/lib/request_store/middleware.rb:19:in
153
+ `call''"},{"id":47,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/request_id.rb:27:in
154
+ `call''"},{"id":48,"trace":"vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/runtime.rb:22:in
155
+ `call''"},{"id":49,"trace":"vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in
156
+ `call''"},{"id":50,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/executor.rb:14:in
157
+ `call''"},{"id":51,"trace":"vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/static.rb:127:in
158
+ `call''"},{"id":52,"trace":"vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/sendfile.rb:111:in
159
+ `call''"},{"id":53,"trace":"vendor/bundle/ruby/2.4.0/gems/rack-cors-1.0.2/lib/rack/cors.rb:97:in
160
+ `call''"},{"id":54,"trace":"vendor/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/engine.rb:524:in
161
+ `call''"},{"id":55,"trace":"/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:97:in
162
+ `process_request''"},{"id":56,"trace":"/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:157:in
163
+ `accept_and_process_next_request''"},{"id":57,"trace":"/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in
164
+ `main_loop''"},{"id":58,"trace":"/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:415:in
165
+ `block (3 levels) in start_threads''"},{"id":59,"trace":"/usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in
166
+ `block in create_thread_and_abort_on_exception''"}]}}'
167
+ http_version:
168
+ recorded_at: Fri, 10 Aug 2018 17:13:54 GMT
169
+ recorded_with: VCR 3.0.3