toccatore 0.4.3 → 0.4.4
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 +11 -11
- data/lib/toccatore/queue.rb +2 -0
- data/lib/toccatore/usage_update.rb +10 -16
- data/lib/toccatore/version.rb +1 -1
- data/spec/cli_spec.rb +1 -1
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/push_data/should_fail_if_format_of_the_event_is_wrong.yml +23 -22
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/push_data/should_work_with_DataCite_Event_Data_2.yml +80 -80
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/queue_url/should_return_always_correct_queue_url.yml +8 -8
- data/spec/usage_update_spec.rb +2 -28
- data/toccatore.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fabeba004ef4419093188933672c34867c446c3a2b384a89d3f3782b9f8a1b33
|
4
|
+
data.tar.gz: 9364506a6b6301260f4b1e1e40ad4238e55a81ac62e7eb16a3cdd90e412ab28c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af215971b7032b25347572465f41eb252e326994e1835228c548d58ba75a5eda88e8b666b261a2af9a2d881e666f744c059902be3fc6e6717f35515a95c758f5
|
7
|
+
data.tar.gz: 41f0bdcd98165d837e12fa6f82cbf309d8c11062004046257940f1ca52731764e7f7ae8a72ef9c25da129fcc6b399cd1602a50c6e68360493ab08b2e236eeb95
|
data/Gemfile.lock
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
toccatore (0.4.
|
4
|
+
toccatore (0.4.4)
|
5
5
|
activesupport (~> 4.2, >= 4.2.5)
|
6
6
|
aws-sdk-sqs
|
7
7
|
dotenv (~> 2.1, >= 2.1.1)
|
8
8
|
factory_bot
|
9
9
|
gender_detector (~> 1.0)
|
10
|
-
maremma (~>
|
10
|
+
maremma (~> 4.0)
|
11
11
|
namae (~> 0.11.0)
|
12
12
|
slack-notifier (= 2.2.2)
|
13
13
|
thor (~> 0.19)
|
@@ -24,7 +24,7 @@ GEM
|
|
24
24
|
public_suffix (~> 2.0, >= 2.0.2)
|
25
25
|
aws-eventstream (1.0.0)
|
26
26
|
aws-partitions (1.87.0)
|
27
|
-
aws-sdk-core (3.21.
|
27
|
+
aws-sdk-core (3.21.2)
|
28
28
|
aws-eventstream (~> 1.0)
|
29
29
|
aws-partitions (~> 1.0)
|
30
30
|
aws-sigv4 (~> 1.0)
|
@@ -42,16 +42,16 @@ GEM
|
|
42
42
|
diff-lcs (1.3)
|
43
43
|
docile (1.1.5)
|
44
44
|
dotenv (2.4.0)
|
45
|
-
excon (0.
|
45
|
+
excon (0.62.0)
|
46
46
|
factory_bot (4.8.2)
|
47
47
|
activesupport (>= 3.0.0)
|
48
48
|
faker (1.8.7)
|
49
49
|
i18n (>= 0.7)
|
50
|
-
faraday (0.
|
50
|
+
faraday (0.15.2)
|
51
51
|
multipart-post (>= 1.2, < 3)
|
52
52
|
faraday-encoding (0.0.4)
|
53
53
|
faraday
|
54
|
-
faraday_middleware (0.
|
54
|
+
faraday_middleware (0.12.2)
|
55
55
|
faraday (>= 0.7.4, < 1.0)
|
56
56
|
gender_detector (1.0.0)
|
57
57
|
hashdiff (0.3.4)
|
@@ -59,14 +59,14 @@ GEM
|
|
59
59
|
concurrent-ruby (~> 1.0)
|
60
60
|
jmespath (1.4.0)
|
61
61
|
json (2.1.0)
|
62
|
-
maremma (
|
62
|
+
maremma (4.0.5)
|
63
63
|
activesupport (>= 4.2.5, < 6)
|
64
64
|
addressable (>= 2.3.6)
|
65
65
|
builder (~> 3.2, >= 3.2.2)
|
66
|
-
excon (~> 0.
|
67
|
-
faraday (~> 0.
|
68
|
-
faraday-encoding (~> 0.0.
|
69
|
-
faraday_middleware (~> 0.
|
66
|
+
excon (~> 0.60)
|
67
|
+
faraday (~> 0.14)
|
68
|
+
faraday-encoding (~> 0.0.4)
|
69
|
+
faraday_middleware (~> 0.12.0)
|
70
70
|
multi_json (~> 1.12)
|
71
71
|
nokogiri (~> 1.8.1)
|
72
72
|
oj (>= 2.8.3)
|
data/lib/toccatore/queue.rb
CHANGED
@@ -4,6 +4,8 @@ module Toccatore
|
|
4
4
|
module Queue
|
5
5
|
|
6
6
|
def queue options={}
|
7
|
+
puts "Queue name has not been specified" unless ENV['ENVIRONMENT'].present?
|
8
|
+
puts "AWS_REGION has not been specified" unless ENV['AWS_REGION'].present?
|
7
9
|
region = ENV['AWS_REGION'] ||= 'eu-west-1'
|
8
10
|
Aws::SQS::Client.new(region: region.to_s, stub_responses: false)
|
9
11
|
end
|
@@ -20,13 +20,15 @@ module Toccatore
|
|
20
20
|
end
|
21
21
|
|
22
22
|
error_total = 0
|
23
|
+
proccessed_messages = 0
|
23
24
|
num_messages = total
|
24
|
-
while num_messages
|
25
|
+
while num_messages != 0
|
25
26
|
processed = process_data(options)
|
26
27
|
error_total += processed
|
27
|
-
|
28
|
+
proccessed_messages += 1 if processed == 0
|
29
|
+
num_messages -= proccessed_messages
|
28
30
|
end
|
29
|
-
text = "#{
|
31
|
+
text = "#{proccessed_messages} works processed with #{error_total} errors for Usage Reports Queue #{queue_url}"
|
30
32
|
|
31
33
|
puts text
|
32
34
|
# send slack notification
|
@@ -35,16 +37,15 @@ module Toccatore
|
|
35
37
|
send_notification_to_slack(text, options) if options[:slack_webhook_url].present?
|
36
38
|
|
37
39
|
# return number of works queued
|
38
|
-
|
40
|
+
proccessed_messages
|
39
41
|
end
|
40
42
|
|
41
43
|
def process_data(options = {})
|
42
44
|
message = get_message
|
45
|
+
return [OpenStruct.new(body: { "data" => [] })] if message.empty?
|
43
46
|
data = get_data(message)
|
44
47
|
events = parse_data(data, options)
|
45
|
-
|
46
48
|
return [OpenStruct.new(body: { "data" => [] })] if events.empty?
|
47
|
-
|
48
49
|
errors = push_data(events, options)
|
49
50
|
if errors < 1
|
50
51
|
delete_message message
|
@@ -108,7 +109,7 @@ module Toccatore
|
|
108
109
|
|
109
110
|
items = result.body.dig("data","report","report-datasets")
|
110
111
|
header = result.body.dig("data","report","report-header")
|
111
|
-
report_id = metrics_url
|
112
|
+
report_id = "#{metrics_url}/#{result.body.dig("data","report","id")}"
|
112
113
|
|
113
114
|
created = header.fetch("created")
|
114
115
|
Array.wrap(items).reduce([]) do |x, item|
|
@@ -144,16 +145,9 @@ module Toccatore
|
|
144
145
|
"attributes" => item.except("id") }}
|
145
146
|
response = Maremma.put(push_url, data: data.to_json,
|
146
147
|
bearer: options[:access_token],
|
147
|
-
content_type: 'json',
|
148
|
+
content_type: 'application/json',
|
148
149
|
host: host)
|
149
|
-
|
150
|
-
# response = Maremma.post(push_url, data: item.to_json,
|
151
|
-
# bearer: options[:access_token],
|
152
|
-
# content_type: 'json',
|
153
|
-
# host: host)
|
154
|
-
# end
|
155
|
-
|
156
|
-
# return 0 if successful, 1 if error
|
150
|
+
|
157
151
|
if response.status == 201
|
158
152
|
puts "#{item['subj-id']} #{item['relation-type-id']} #{item['obj-id']} pushed to Event Data service."
|
159
153
|
0
|
data/lib/toccatore/version.rb
CHANGED
data/spec/cli_spec.rb
CHANGED
@@ -21,11 +21,11 @@ http_interactions:
|
|
21
21
|
message: ''
|
22
22
|
headers:
|
23
23
|
Date:
|
24
|
-
-
|
24
|
+
- Thu, 24 May 2018 15:47:18 GMT
|
25
25
|
Content-Type:
|
26
26
|
- application/json; charset=UTF-8
|
27
27
|
Content-Length:
|
28
|
-
- '
|
28
|
+
- '30851'
|
29
29
|
Connection:
|
30
30
|
- keep-alive
|
31
31
|
Status:
|
@@ -33,9 +33,9 @@ http_interactions:
|
|
33
33
|
Vary:
|
34
34
|
- Origin
|
35
35
|
X-Runtime:
|
36
|
-
- '0.
|
36
|
+
- '0.098277'
|
37
37
|
X-Request-Id:
|
38
|
-
-
|
38
|
+
- fd26705c-4733-41b7-978b-9ca28d9e1878
|
39
39
|
X-Powered-By:
|
40
40
|
- Phusion Passenger 5.3.1
|
41
41
|
Server:
|
@@ -45,8 +45,9 @@ http_interactions:
|
|
45
45
|
string: '{"status":500,"error":"Internal Server Error","exception":"#\u003cActiveRecord::RecordNotUnique:
|
46
46
|
Mysql2::Error: Duplicate entry ''https://metrics.test.datacite.org/reports/2018-3-Dash-https://do''
|
47
47
|
for key ''index_events_on_multiple_columns'': UPDATE `events` SET `subj_id`
|
48
|
-
= ''https://metrics.test.datacite.org/reports/2018-3-Dash'', `
|
49
|
-
= ''
|
48
|
+
= ''https://metrics.test.datacite.org/reports/2018-3-Dash'', `source_token`
|
49
|
+
= ''43ba99ae-5cf0-11e8-9c2d-fa7ae01bbebc'', `updated_at` = ''2018-05-24 15:47:18'',
|
50
|
+
`subj` = ''{\\\"pid\\\":\\\"https://metrics.test.datacite.org/reports/2018-3-Dash\\\",\\\"issued\\\":\\\"2128-04-09\\\"}''
|
50
51
|
WHERE `events`.`id` = 337\u003e","traces":{"Application Trace":[{"id":58,"trace":"app/controllers/events_controller.rb:30:in
|
51
52
|
`update''"}],"Framework Trace":[{"id":0,"trace":"vendor/bundle/ruby/2.4.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in
|
52
53
|
`_query''"},{"id":1,"trace":"vendor/bundle/ruby/2.4.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in
|
@@ -284,7 +285,7 @@ http_interactions:
|
|
284
285
|
`block (3 levels) in start_threads''"},{"id":117,"trace":"/usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in
|
285
286
|
`block in create_thread_and_abort_on_exception''"}]}}'
|
286
287
|
http_version:
|
287
|
-
recorded_at:
|
288
|
+
recorded_at: Thu, 24 May 2018 15:47:18 GMT
|
288
289
|
- request:
|
289
290
|
method: put
|
290
291
|
uri: https://api.test.datacite.org/events/fc6860b8-4230-41bc-8b8e-21d60e9a7d9a
|
@@ -306,7 +307,7 @@ http_interactions:
|
|
306
307
|
message: ''
|
307
308
|
headers:
|
308
309
|
Date:
|
309
|
-
-
|
310
|
+
- Thu, 24 May 2018 15:47:19 GMT
|
310
311
|
Content-Type:
|
311
312
|
- application/json; charset=UTF-8
|
312
313
|
Content-Length:
|
@@ -318,9 +319,9 @@ http_interactions:
|
|
318
319
|
Vary:
|
319
320
|
- Origin
|
320
321
|
X-Runtime:
|
321
|
-
- '0.
|
322
|
+
- '0.100131'
|
322
323
|
X-Request-Id:
|
323
|
-
-
|
324
|
+
- b3099b53-8e4c-46eb-a465-b7943f5be386
|
324
325
|
X-Powered-By:
|
325
326
|
- Phusion Passenger 5.3.1
|
326
327
|
Server:
|
@@ -334,7 +335,7 @@ http_interactions:
|
|
334
335
|
`updated_at`, `occurred_at`, `relation_type_id`, `subj`, `obj`, `total`, `license`)
|
335
336
|
VALUES (''fc6860b8-4230-41bc-8b8e-21d60e9a7d9a'', ''https://metrics.test.datacite.org/reports/2018-3-Dash'',
|
336
337
|
''https://doi.org/10.7291/d1q94r'', ''datacite'', ''waiting'', ''43ba99ae-5cf0-11e8-9c2d-fa7ae01bbebc'',
|
337
|
-
''2018-05-
|
338
|
+
''2018-05-24 15:47:19'', ''2018-05-24 15:47:19'', ''2128-04-09 00:00:00'',
|
338
339
|
''unique-dataset-investigations-regular'', ''{\\\"pid\\\":\\\"https://metrics.test.datacite.org/reports/2018-3-Dash\\\",\\\"issued\\\":\\\"2128-04-09\\\"}'',
|
339
340
|
''{}'', 3, ''https://creativecommons.org/publicdomain/zero/1.0/'')\u003e","traces":{"Application
|
340
341
|
Trace":[{"id":59,"trace":"app/controllers/events_controller.rb:30:in `update''"}],"Framework
|
@@ -576,7 +577,7 @@ http_interactions:
|
|
576
577
|
`block (3 levels) in start_threads''"},{"id":118,"trace":"/usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in
|
577
578
|
`block in create_thread_and_abort_on_exception''"}]}}'
|
578
579
|
http_version:
|
579
|
-
recorded_at:
|
580
|
+
recorded_at: Thu, 24 May 2018 15:47:19 GMT
|
580
581
|
- request:
|
581
582
|
method: put
|
582
583
|
uri: https://api.test.datacite.org/events/054da0ad-9821-492e-877e-5c3adbfd5ccf
|
@@ -598,7 +599,7 @@ http_interactions:
|
|
598
599
|
message: ''
|
599
600
|
headers:
|
600
601
|
Date:
|
601
|
-
-
|
602
|
+
- Thu, 24 May 2018 15:47:19 GMT
|
602
603
|
Content-Type:
|
603
604
|
- application/json; charset=UTF-8
|
604
605
|
Content-Length:
|
@@ -610,9 +611,9 @@ http_interactions:
|
|
610
611
|
Vary:
|
611
612
|
- Origin
|
612
613
|
X-Runtime:
|
613
|
-
- '0.
|
614
|
+
- '0.095105'
|
614
615
|
X-Request-Id:
|
615
|
-
-
|
616
|
+
- 38b75dd5-c6a2-4fc4-9ae9-19e8522cf07f
|
616
617
|
X-Powered-By:
|
617
618
|
- Phusion Passenger 5.3.1
|
618
619
|
Server:
|
@@ -626,7 +627,7 @@ http_interactions:
|
|
626
627
|
`updated_at`, `occurred_at`, `relation_type_id`, `subj`, `obj`, `total`, `license`)
|
627
628
|
VALUES (''054da0ad-9821-492e-877e-5c3adbfd5ccf'', ''https://metrics.test.datacite.org/reports/2018-3-Dash'',
|
628
629
|
''https://doi.org/10.6071/z7wc73'', ''datacite'', ''waiting'', ''43ba99ae-5cf0-11e8-9c2d-fa7ae01bbebc'',
|
629
|
-
''2018-05-
|
630
|
+
''2018-05-24 15:47:19'', ''2018-05-24 15:47:19'', ''2128-04-09 00:00:00'',
|
630
631
|
''Total-Dataset-Requests-Machine'', ''{\\\"pid\\\":\\\"https://metrics.test.datacite.org/reports/2018-3-Dash\\\",\\\"issued\\\":\\\"2128-04-09\\\"}'',
|
631
632
|
''{}'', 254, ''https://creativecommons.org/publicdomain/zero/1.0/'')\u003e","traces":{"Application
|
632
633
|
Trace":[{"id":59,"trace":"app/controllers/events_controller.rb:30:in `update''"}],"Framework
|
@@ -868,7 +869,7 @@ http_interactions:
|
|
868
869
|
`block (3 levels) in start_threads''"},{"id":118,"trace":"/usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in
|
869
870
|
`block in create_thread_and_abort_on_exception''"}]}}'
|
870
871
|
http_version:
|
871
|
-
recorded_at:
|
872
|
+
recorded_at: Thu, 24 May 2018 15:47:19 GMT
|
872
873
|
- request:
|
873
874
|
method: put
|
874
875
|
uri: https://api.test.datacite.org/events/6d6fd620-2123-42da-91f3-6c02e63f3cec
|
@@ -890,7 +891,7 @@ http_interactions:
|
|
890
891
|
message: ''
|
891
892
|
headers:
|
892
893
|
Date:
|
893
|
-
-
|
894
|
+
- Thu, 24 May 2018 15:47:20 GMT
|
894
895
|
Content-Type:
|
895
896
|
- application/json; charset=UTF-8
|
896
897
|
Content-Length:
|
@@ -902,9 +903,9 @@ http_interactions:
|
|
902
903
|
Vary:
|
903
904
|
- Origin
|
904
905
|
X-Runtime:
|
905
|
-
- '0.
|
906
|
+
- '0.097231'
|
906
907
|
X-Request-Id:
|
907
|
-
-
|
908
|
+
- d8dc2be4-65f4-4534-8f47-28afc9e86d71
|
908
909
|
X-Powered-By:
|
909
910
|
- Phusion Passenger 5.3.1
|
910
911
|
Server:
|
@@ -918,7 +919,7 @@ http_interactions:
|
|
918
919
|
`updated_at`, `occurred_at`, `relation_type_id`, `subj`, `obj`, `total`, `license`)
|
919
920
|
VALUES (''6d6fd620-2123-42da-91f3-6c02e63f3cec'', ''https://metrics.test.datacite.org/reports/2018-3-Dash'',
|
920
921
|
''https://doi.org/10.6071/z7wc73'', ''datacite'', ''waiting'', ''43ba99ae-5cf0-11e8-9c2d-fa7ae01bbebc'',
|
921
|
-
''2018-05-
|
922
|
+
''2018-05-24 15:47:19'', ''2018-05-24 15:47:19'', ''2128-04-09 00:00:00'',
|
922
923
|
''Unique-Dataset-Requests-Machine'', ''{\\\"pid\\\":\\\"https://metrics.test.datacite.org/reports/2018-3-Dash\\\",\\\"issued\\\":\\\"2128-04-09\\\"}'',
|
923
924
|
''{}'', 208, ''https://creativecommons.org/publicdomain/zero/1.0/'')\u003e","traces":{"Application
|
924
925
|
Trace":[{"id":59,"trace":"app/controllers/events_controller.rb:30:in `update''"}],"Framework
|
@@ -1160,5 +1161,5 @@ http_interactions:
|
|
1160
1161
|
`block (3 levels) in start_threads''"},{"id":118,"trace":"/usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in
|
1161
1162
|
`block in create_thread_and_abort_on_exception''"}]}}'
|
1162
1163
|
http_version:
|
1163
|
-
recorded_at:
|
1164
|
+
recorded_at: Thu, 24 May 2018 15:47:20 GMT
|
1164
1165
|
recorded_with: VCR 3.0.3
|
@@ -2,10 +2,10 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: put
|
5
|
-
uri: https://api.test.datacite.org/events/
|
5
|
+
uri: https://api.test.datacite.org/events/20ce375e-2610-44d5-9755-293513617d18-1
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"data":{"id":"
|
8
|
+
string: '{"data":{"id":"20ce375e-2610-44d5-9755-293513617d18-1","type":"events","attributes":{"uuid":"20ce375e-2610-44d5-9755-293513617d18-1","message-action":"add","obj-id":"http://quigleyrunolfsdottir.net/amy_christiansen1","subj-id":"http://connellyokeefe.net/caden1","total":"298","subj":{"pid":"fdfdfd","issued":"2018-05-22T14:54:33.000+02:00"},"relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","source-token":"3d2677ee-3413-4567-bb27-f699c5451d62-1","occurred-at":"2018-05-24T10:32:28.000+02:00","license":"https://creativecommons.org/publicdomain/zero/1.0/"}}}'
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
11
|
- Maremma - https://github.com/datacite/maremma
|
@@ -21,7 +21,7 @@ http_interactions:
|
|
21
21
|
message: ''
|
22
22
|
headers:
|
23
23
|
Date:
|
24
|
-
-
|
24
|
+
- Thu, 24 May 2018 15:47:15 GMT
|
25
25
|
Content-Type:
|
26
26
|
- application/vnd.api+json; charset=utf-8
|
27
27
|
Connection:
|
@@ -33,28 +33,28 @@ http_interactions:
|
|
33
33
|
Vary:
|
34
34
|
- Accept-Encoding, Origin
|
35
35
|
Etag:
|
36
|
-
- W/"
|
36
|
+
- W/"d0c80e0e25d20a9c9ec91f11340ecbb7"
|
37
37
|
X-Runtime:
|
38
|
-
- '0.
|
38
|
+
- '0.015749'
|
39
39
|
X-Credential-Username:
|
40
40
|
- 0000-0001-5489-3594
|
41
41
|
X-Request-Id:
|
42
|
-
-
|
42
|
+
- 743bf939-b491-4da7-bb60-c0fdd70749fc
|
43
43
|
X-Powered-By:
|
44
44
|
- Phusion Passenger 5.3.1
|
45
45
|
Server:
|
46
46
|
- nginx/1.14.0 + Phusion Passenger 5.3.1
|
47
47
|
body:
|
48
48
|
encoding: UTF-8
|
49
|
-
string: '{"data":{"id":"
|
49
|
+
string: '{"data":{"id":"20ce375e-2610-44d5-9755-293513617d18-1","type":"events","attributes":{"subj-id":"http://connellyokeefe.net/caden1","obj-id":"http://quigleyrunolfsdottir.net/amy_christiansen1","message-action":"add","source-token":"3d2677ee-3413-4567-bb27-f699c5451d62-1","relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","total":298,"license":"https://creativecommons.org/publicdomain/zero/1.0/","occurred-at":"2018-05-24T08:32:28.000Z","timestamp":"2018-05-24T15:47:15Z","subj":{"pid":"fdfdfd","issued":"2018-05-22T14:54:33.000+02:00"},"obj":{}}}}'
|
50
50
|
http_version:
|
51
|
-
recorded_at:
|
51
|
+
recorded_at: Thu, 24 May 2018 15:47:15 GMT
|
52
52
|
- request:
|
53
53
|
method: put
|
54
|
-
uri: https://api.test.datacite.org/events/
|
54
|
+
uri: https://api.test.datacite.org/events/7a973d3f-9471-48b8-a5f3-e6e0e14ad6b9-2
|
55
55
|
body:
|
56
56
|
encoding: UTF-8
|
57
|
-
string: '{"data":{"id":"
|
57
|
+
string: '{"data":{"id":"7a973d3f-9471-48b8-a5f3-e6e0e14ad6b9-2","type":"events","attributes":{"uuid":"7a973d3f-9471-48b8-a5f3-e6e0e14ad6b9-2","message-action":"add","obj-id":"http://osinski.biz/jaquan_brakus2","subj-id":"http://kuvalis.info/verna2","total":"298","subj":{"pid":"fdfdfd","issued":"2018-05-23T18:17:04.000+02:00"},"relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","source-token":"935a1d95-2192-4fa7-9f96-b03c8ce39c74-2","occurred-at":"2018-05-24T10:32:28.000+02:00","license":"https://creativecommons.org/publicdomain/zero/1.0/"}}}'
|
58
58
|
headers:
|
59
59
|
User-Agent:
|
60
60
|
- Maremma - https://github.com/datacite/maremma
|
@@ -70,7 +70,7 @@ http_interactions:
|
|
70
70
|
message: ''
|
71
71
|
headers:
|
72
72
|
Date:
|
73
|
-
-
|
73
|
+
- Thu, 24 May 2018 15:47:15 GMT
|
74
74
|
Content-Type:
|
75
75
|
- application/vnd.api+json; charset=utf-8
|
76
76
|
Connection:
|
@@ -82,28 +82,28 @@ http_interactions:
|
|
82
82
|
Vary:
|
83
83
|
- Accept-Encoding, Origin
|
84
84
|
Etag:
|
85
|
-
- W/"
|
85
|
+
- W/"6952b0210ed3e39853d289d4ec0ee1f4"
|
86
86
|
X-Runtime:
|
87
|
-
- '0.
|
87
|
+
- '0.014183'
|
88
88
|
X-Credential-Username:
|
89
89
|
- 0000-0001-5489-3594
|
90
90
|
X-Request-Id:
|
91
|
-
-
|
91
|
+
- e489dd62-456b-4512-981d-5ec1a1144d58
|
92
92
|
X-Powered-By:
|
93
93
|
- Phusion Passenger 5.3.1
|
94
94
|
Server:
|
95
95
|
- nginx/1.14.0 + Phusion Passenger 5.3.1
|
96
96
|
body:
|
97
97
|
encoding: UTF-8
|
98
|
-
string: '{"data":{"id":"
|
98
|
+
string: '{"data":{"id":"7a973d3f-9471-48b8-a5f3-e6e0e14ad6b9-2","type":"events","attributes":{"subj-id":"http://kuvalis.info/verna2","obj-id":"http://osinski.biz/jaquan_brakus2","message-action":"add","source-token":"935a1d95-2192-4fa7-9f96-b03c8ce39c74-2","relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","total":298,"license":"https://creativecommons.org/publicdomain/zero/1.0/","occurred-at":"2018-05-24T08:32:28.000Z","timestamp":"2018-05-24T15:47:15Z","subj":{"pid":"fdfdfd","issued":"2018-05-23T18:17:04.000+02:00"},"obj":{}}}}'
|
99
99
|
http_version:
|
100
|
-
recorded_at:
|
100
|
+
recorded_at: Thu, 24 May 2018 15:47:15 GMT
|
101
101
|
- request:
|
102
102
|
method: put
|
103
|
-
uri: https://api.test.datacite.org/events/
|
103
|
+
uri: https://api.test.datacite.org/events/1dae49af-2caa-4426-8e7c-bdc664abc8f6-3
|
104
104
|
body:
|
105
105
|
encoding: UTF-8
|
106
|
-
string: '{"data":{"id":"
|
106
|
+
string: '{"data":{"id":"1dae49af-2caa-4426-8e7c-bdc664abc8f6-3","type":"events","attributes":{"uuid":"1dae49af-2caa-4426-8e7c-bdc664abc8f6-3","message-action":"add","obj-id":"http://bernhardzieme.io/kobe3","subj-id":"http://mcglynn.net/clifton3","total":"298","subj":{"pid":"fdfdfd","issued":"2018-05-22T07:55:18.000+02:00"},"relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","source-token":"7705d851-0540-40b2-9ce2-8d9ec30d585b-3","occurred-at":"2018-05-24T10:32:28.000+02:00","license":"https://creativecommons.org/publicdomain/zero/1.0/"}}}'
|
107
107
|
headers:
|
108
108
|
User-Agent:
|
109
109
|
- Maremma - https://github.com/datacite/maremma
|
@@ -119,7 +119,7 @@ http_interactions:
|
|
119
119
|
message: ''
|
120
120
|
headers:
|
121
121
|
Date:
|
122
|
-
-
|
122
|
+
- Thu, 24 May 2018 15:47:15 GMT
|
123
123
|
Content-Type:
|
124
124
|
- application/vnd.api+json; charset=utf-8
|
125
125
|
Connection:
|
@@ -131,28 +131,28 @@ http_interactions:
|
|
131
131
|
Vary:
|
132
132
|
- Accept-Encoding, Origin
|
133
133
|
Etag:
|
134
|
-
- W/"
|
134
|
+
- W/"c78a953fd8bafd97196c2ecd584e5d74"
|
135
135
|
X-Runtime:
|
136
|
-
- '0.
|
136
|
+
- '0.014078'
|
137
137
|
X-Credential-Username:
|
138
138
|
- 0000-0001-5489-3594
|
139
139
|
X-Request-Id:
|
140
|
-
-
|
140
|
+
- 4e2f3842-7043-4296-a206-e14804400ba7
|
141
141
|
X-Powered-By:
|
142
142
|
- Phusion Passenger 5.3.1
|
143
143
|
Server:
|
144
144
|
- nginx/1.14.0 + Phusion Passenger 5.3.1
|
145
145
|
body:
|
146
146
|
encoding: UTF-8
|
147
|
-
string: '{"data":{"id":"
|
147
|
+
string: '{"data":{"id":"1dae49af-2caa-4426-8e7c-bdc664abc8f6-3","type":"events","attributes":{"subj-id":"http://mcglynn.net/clifton3","obj-id":"http://bernhardzieme.io/kobe3","message-action":"add","source-token":"7705d851-0540-40b2-9ce2-8d9ec30d585b-3","relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","total":298,"license":"https://creativecommons.org/publicdomain/zero/1.0/","occurred-at":"2018-05-24T08:32:28.000Z","timestamp":"2018-05-24T15:47:15Z","subj":{"pid":"fdfdfd","issued":"2018-05-22T07:55:18.000+02:00"},"obj":{}}}}'
|
148
148
|
http_version:
|
149
|
-
recorded_at:
|
149
|
+
recorded_at: Thu, 24 May 2018 15:47:15 GMT
|
150
150
|
- request:
|
151
151
|
method: put
|
152
|
-
uri: https://api.test.datacite.org/events/
|
152
|
+
uri: https://api.test.datacite.org/events/f8bd9a18-a4b9-467b-85f0-14fb13e1ac63-4
|
153
153
|
body:
|
154
154
|
encoding: UTF-8
|
155
|
-
string: '{"data":{"id":"
|
155
|
+
string: '{"data":{"id":"f8bd9a18-a4b9-467b-85f0-14fb13e1ac63-4","type":"events","attributes":{"uuid":"f8bd9a18-a4b9-467b-85f0-14fb13e1ac63-4","message-action":"add","obj-id":"http://stokes.io/jude.mueller4","subj-id":"http://rennerjacobi.co/megane_gutkowski4","total":"298","subj":{"pid":"fdfdfd","issued":"2018-05-22T00:57:04.000+02:00"},"relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","source-token":"78168848-f306-46c2-a604-f12edd85d840-4","occurred-at":"2018-05-24T10:32:28.000+02:00","license":"https://creativecommons.org/publicdomain/zero/1.0/"}}}'
|
156
156
|
headers:
|
157
157
|
User-Agent:
|
158
158
|
- Maremma - https://github.com/datacite/maremma
|
@@ -168,7 +168,7 @@ http_interactions:
|
|
168
168
|
message: ''
|
169
169
|
headers:
|
170
170
|
Date:
|
171
|
-
-
|
171
|
+
- Thu, 24 May 2018 15:47:16 GMT
|
172
172
|
Content-Type:
|
173
173
|
- application/vnd.api+json; charset=utf-8
|
174
174
|
Connection:
|
@@ -180,28 +180,28 @@ http_interactions:
|
|
180
180
|
Vary:
|
181
181
|
- Accept-Encoding, Origin
|
182
182
|
Etag:
|
183
|
-
- W/"
|
183
|
+
- W/"1caabaa6ebbe1e16156157c292f08cf2"
|
184
184
|
X-Runtime:
|
185
|
-
- '0.
|
185
|
+
- '0.015125'
|
186
186
|
X-Credential-Username:
|
187
187
|
- 0000-0001-5489-3594
|
188
188
|
X-Request-Id:
|
189
|
-
-
|
189
|
+
- 6a68f365-d6db-4638-9882-0ab885388cb6
|
190
190
|
X-Powered-By:
|
191
191
|
- Phusion Passenger 5.3.1
|
192
192
|
Server:
|
193
193
|
- nginx/1.14.0 + Phusion Passenger 5.3.1
|
194
194
|
body:
|
195
195
|
encoding: UTF-8
|
196
|
-
string: '{"data":{"id":"
|
196
|
+
string: '{"data":{"id":"f8bd9a18-a4b9-467b-85f0-14fb13e1ac63-4","type":"events","attributes":{"subj-id":"http://rennerjacobi.co/megane_gutkowski4","obj-id":"http://stokes.io/jude.mueller4","message-action":"add","source-token":"78168848-f306-46c2-a604-f12edd85d840-4","relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","total":298,"license":"https://creativecommons.org/publicdomain/zero/1.0/","occurred-at":"2018-05-24T08:32:28.000Z","timestamp":"2018-05-24T15:47:16Z","subj":{"pid":"fdfdfd","issued":"2018-05-22T00:57:04.000+02:00"},"obj":{}}}}'
|
197
197
|
http_version:
|
198
|
-
recorded_at:
|
198
|
+
recorded_at: Thu, 24 May 2018 15:47:16 GMT
|
199
199
|
- request:
|
200
200
|
method: put
|
201
|
-
uri: https://api.test.datacite.org/events/
|
201
|
+
uri: https://api.test.datacite.org/events/2096a15c-619c-4d09-a220-5218dcf117d5-5
|
202
202
|
body:
|
203
203
|
encoding: UTF-8
|
204
|
-
string: '{"data":{"id":"
|
204
|
+
string: '{"data":{"id":"2096a15c-619c-4d09-a220-5218dcf117d5-5","type":"events","attributes":{"uuid":"2096a15c-619c-4d09-a220-5218dcf117d5-5","message-action":"add","obj-id":"http://abbotthagenes.info/hanna5","subj-id":"http://smitham.name/wilma5","total":"298","subj":{"pid":"fdfdfd","issued":"2018-05-23T00:46:00.000+02:00"},"relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","source-token":"b9a14201-f1b8-46e4-98be-27faa44ee42d-5","occurred-at":"2018-05-24T10:32:28.000+02:00","license":"https://creativecommons.org/publicdomain/zero/1.0/"}}}'
|
205
205
|
headers:
|
206
206
|
User-Agent:
|
207
207
|
- Maremma - https://github.com/datacite/maremma
|
@@ -217,7 +217,7 @@ http_interactions:
|
|
217
217
|
message: ''
|
218
218
|
headers:
|
219
219
|
Date:
|
220
|
-
-
|
220
|
+
- Thu, 24 May 2018 15:47:16 GMT
|
221
221
|
Content-Type:
|
222
222
|
- application/vnd.api+json; charset=utf-8
|
223
223
|
Connection:
|
@@ -229,28 +229,28 @@ http_interactions:
|
|
229
229
|
Vary:
|
230
230
|
- Accept-Encoding, Origin
|
231
231
|
Etag:
|
232
|
-
- W/"
|
232
|
+
- W/"167f146a048f3d91b9e2913bd86dd04e"
|
233
233
|
X-Runtime:
|
234
|
-
- '0.
|
234
|
+
- '0.013974'
|
235
235
|
X-Credential-Username:
|
236
236
|
- 0000-0001-5489-3594
|
237
237
|
X-Request-Id:
|
238
|
-
-
|
238
|
+
- 76085a18-5667-4ec0-89e3-9fcc76302dc4
|
239
239
|
X-Powered-By:
|
240
240
|
- Phusion Passenger 5.3.1
|
241
241
|
Server:
|
242
242
|
- nginx/1.14.0 + Phusion Passenger 5.3.1
|
243
243
|
body:
|
244
244
|
encoding: UTF-8
|
245
|
-
string: '{"data":{"id":"
|
245
|
+
string: '{"data":{"id":"2096a15c-619c-4d09-a220-5218dcf117d5-5","type":"events","attributes":{"subj-id":"http://smitham.name/wilma5","obj-id":"http://abbotthagenes.info/hanna5","message-action":"add","source-token":"b9a14201-f1b8-46e4-98be-27faa44ee42d-5","relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","total":298,"license":"https://creativecommons.org/publicdomain/zero/1.0/","occurred-at":"2018-05-24T08:32:28.000Z","timestamp":"2018-05-24T15:47:16Z","subj":{"pid":"fdfdfd","issued":"2018-05-23T00:46:00.000+02:00"},"obj":{}}}}'
|
246
246
|
http_version:
|
247
|
-
recorded_at:
|
247
|
+
recorded_at: Thu, 24 May 2018 15:47:16 GMT
|
248
248
|
- request:
|
249
249
|
method: put
|
250
|
-
uri: https://api.test.datacite.org/events/
|
250
|
+
uri: https://api.test.datacite.org/events/a80cbb73-0950-401a-b222-155c617e81d3-6
|
251
251
|
body:
|
252
252
|
encoding: UTF-8
|
253
|
-
string: '{"data":{"id":"
|
253
|
+
string: '{"data":{"id":"a80cbb73-0950-401a-b222-155c617e81d3-6","type":"events","attributes":{"uuid":"a80cbb73-0950-401a-b222-155c617e81d3-6","message-action":"add","obj-id":"http://deckow.io/octavia6","subj-id":"http://heathcote.name/sunny_steuber6","total":"298","subj":{"pid":"fdfdfd","issued":"2018-05-22T18:52:24.000+02:00"},"relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","source-token":"98cf033f-cbef-4f34-a6d0-516eba3d3043-6","occurred-at":"2018-05-24T10:32:28.000+02:00","license":"https://creativecommons.org/publicdomain/zero/1.0/"}}}'
|
254
254
|
headers:
|
255
255
|
User-Agent:
|
256
256
|
- Maremma - https://github.com/datacite/maremma
|
@@ -266,7 +266,7 @@ http_interactions:
|
|
266
266
|
message: ''
|
267
267
|
headers:
|
268
268
|
Date:
|
269
|
-
-
|
269
|
+
- Thu, 24 May 2018 15:47:16 GMT
|
270
270
|
Content-Type:
|
271
271
|
- application/vnd.api+json; charset=utf-8
|
272
272
|
Connection:
|
@@ -278,28 +278,28 @@ http_interactions:
|
|
278
278
|
Vary:
|
279
279
|
- Accept-Encoding, Origin
|
280
280
|
Etag:
|
281
|
-
- W/"
|
281
|
+
- W/"7c91f7162b18dc55ce0932a36170b472"
|
282
282
|
X-Runtime:
|
283
|
-
- '0.
|
283
|
+
- '0.014174'
|
284
284
|
X-Credential-Username:
|
285
285
|
- 0000-0001-5489-3594
|
286
286
|
X-Request-Id:
|
287
|
-
-
|
287
|
+
- f2092d7b-fdf5-485f-94a3-065df54c01f9
|
288
288
|
X-Powered-By:
|
289
289
|
- Phusion Passenger 5.3.1
|
290
290
|
Server:
|
291
291
|
- nginx/1.14.0 + Phusion Passenger 5.3.1
|
292
292
|
body:
|
293
293
|
encoding: UTF-8
|
294
|
-
string: '{"data":{"id":"
|
294
|
+
string: '{"data":{"id":"a80cbb73-0950-401a-b222-155c617e81d3-6","type":"events","attributes":{"subj-id":"http://heathcote.name/sunny_steuber6","obj-id":"http://deckow.io/octavia6","message-action":"add","source-token":"98cf033f-cbef-4f34-a6d0-516eba3d3043-6","relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","total":298,"license":"https://creativecommons.org/publicdomain/zero/1.0/","occurred-at":"2018-05-24T08:32:28.000Z","timestamp":"2018-05-24T15:47:16Z","subj":{"pid":"fdfdfd","issued":"2018-05-22T18:52:24.000+02:00"},"obj":{}}}}'
|
295
295
|
http_version:
|
296
|
-
recorded_at:
|
296
|
+
recorded_at: Thu, 24 May 2018 15:47:16 GMT
|
297
297
|
- request:
|
298
298
|
method: put
|
299
|
-
uri: https://api.test.datacite.org/events/
|
299
|
+
uri: https://api.test.datacite.org/events/4cc6cfba-528f-4590-b1dc-03b8a3397005-7
|
300
300
|
body:
|
301
301
|
encoding: UTF-8
|
302
|
-
string: '{"data":{"id":"
|
302
|
+
string: '{"data":{"id":"4cc6cfba-528f-4590-b1dc-03b8a3397005-7","type":"events","attributes":{"uuid":"4cc6cfba-528f-4590-b1dc-03b8a3397005-7","message-action":"add","obj-id":"http://wiegand.io/crystel7","subj-id":"http://dietrich.org/randal7","total":"298","subj":{"pid":"fdfdfd","issued":"2018-05-22T07:38:29.000+02:00"},"relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","source-token":"63be9257-e190-499b-9982-ec11e44d37d3-7","occurred-at":"2018-05-24T10:32:28.000+02:00","license":"https://creativecommons.org/publicdomain/zero/1.0/"}}}'
|
303
303
|
headers:
|
304
304
|
User-Agent:
|
305
305
|
- Maremma - https://github.com/datacite/maremma
|
@@ -315,7 +315,7 @@ http_interactions:
|
|
315
315
|
message: ''
|
316
316
|
headers:
|
317
317
|
Date:
|
318
|
-
-
|
318
|
+
- Thu, 24 May 2018 15:47:17 GMT
|
319
319
|
Content-Type:
|
320
320
|
- application/vnd.api+json; charset=utf-8
|
321
321
|
Connection:
|
@@ -327,28 +327,28 @@ http_interactions:
|
|
327
327
|
Vary:
|
328
328
|
- Accept-Encoding, Origin
|
329
329
|
Etag:
|
330
|
-
- W/"
|
330
|
+
- W/"e502dec0091a1785dcca1e53843d0412"
|
331
331
|
X-Runtime:
|
332
|
-
- '0.
|
332
|
+
- '0.015009'
|
333
333
|
X-Credential-Username:
|
334
334
|
- 0000-0001-5489-3594
|
335
335
|
X-Request-Id:
|
336
|
-
-
|
336
|
+
- 3d1e3630-4037-4160-a24d-11743abd24d6
|
337
337
|
X-Powered-By:
|
338
338
|
- Phusion Passenger 5.3.1
|
339
339
|
Server:
|
340
340
|
- nginx/1.14.0 + Phusion Passenger 5.3.1
|
341
341
|
body:
|
342
342
|
encoding: UTF-8
|
343
|
-
string: '{"data":{"id":"
|
343
|
+
string: '{"data":{"id":"4cc6cfba-528f-4590-b1dc-03b8a3397005-7","type":"events","attributes":{"subj-id":"http://dietrich.org/randal7","obj-id":"http://wiegand.io/crystel7","message-action":"add","source-token":"63be9257-e190-499b-9982-ec11e44d37d3-7","relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","total":298,"license":"https://creativecommons.org/publicdomain/zero/1.0/","occurred-at":"2018-05-24T08:32:28.000Z","timestamp":"2018-05-24T15:47:17Z","subj":{"pid":"fdfdfd","issued":"2018-05-22T07:38:29.000+02:00"},"obj":{}}}}'
|
344
344
|
http_version:
|
345
|
-
recorded_at:
|
345
|
+
recorded_at: Thu, 24 May 2018 15:47:17 GMT
|
346
346
|
- request:
|
347
347
|
method: put
|
348
|
-
uri: https://api.test.datacite.org/events/
|
348
|
+
uri: https://api.test.datacite.org/events/debf4e3f-b9f6-45c8-879b-356ddddafc2f-8
|
349
349
|
body:
|
350
350
|
encoding: UTF-8
|
351
|
-
string: '{"data":{"id":"
|
351
|
+
string: '{"data":{"id":"debf4e3f-b9f6-45c8-879b-356ddddafc2f-8","type":"events","attributes":{"uuid":"debf4e3f-b9f6-45c8-879b-356ddddafc2f-8","message-action":"add","obj-id":"http://nikolaus.biz/justice.trantow8","subj-id":"http://kub.net/karianne_windler8","total":"298","subj":{"pid":"fdfdfd","issued":"2018-05-22T22:13:33.000+02:00"},"relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","source-token":"cf050bec-21d0-4d05-b1d1-7f2cc7d9f35a-8","occurred-at":"2018-05-24T10:32:28.000+02:00","license":"https://creativecommons.org/publicdomain/zero/1.0/"}}}'
|
352
352
|
headers:
|
353
353
|
User-Agent:
|
354
354
|
- Maremma - https://github.com/datacite/maremma
|
@@ -364,7 +364,7 @@ http_interactions:
|
|
364
364
|
message: ''
|
365
365
|
headers:
|
366
366
|
Date:
|
367
|
-
-
|
367
|
+
- Thu, 24 May 2018 15:47:17 GMT
|
368
368
|
Content-Type:
|
369
369
|
- application/vnd.api+json; charset=utf-8
|
370
370
|
Connection:
|
@@ -376,28 +376,28 @@ http_interactions:
|
|
376
376
|
Vary:
|
377
377
|
- Accept-Encoding, Origin
|
378
378
|
Etag:
|
379
|
-
- W/"
|
379
|
+
- W/"636cde3b11fe7f11c064587f89927e13"
|
380
380
|
X-Runtime:
|
381
|
-
- '0.
|
381
|
+
- '0.014082'
|
382
382
|
X-Credential-Username:
|
383
383
|
- 0000-0001-5489-3594
|
384
384
|
X-Request-Id:
|
385
|
-
-
|
385
|
+
- ce97dc76-cf01-474a-9b38-b58114dae21c
|
386
386
|
X-Powered-By:
|
387
387
|
- Phusion Passenger 5.3.1
|
388
388
|
Server:
|
389
389
|
- nginx/1.14.0 + Phusion Passenger 5.3.1
|
390
390
|
body:
|
391
391
|
encoding: UTF-8
|
392
|
-
string: '{"data":{"id":"
|
392
|
+
string: '{"data":{"id":"debf4e3f-b9f6-45c8-879b-356ddddafc2f-8","type":"events","attributes":{"subj-id":"http://kub.net/karianne_windler8","obj-id":"http://nikolaus.biz/justice.trantow8","message-action":"add","source-token":"cf050bec-21d0-4d05-b1d1-7f2cc7d9f35a-8","relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","total":298,"license":"https://creativecommons.org/publicdomain/zero/1.0/","occurred-at":"2018-05-24T08:32:28.000Z","timestamp":"2018-05-24T15:47:17Z","subj":{"pid":"fdfdfd","issued":"2018-05-22T22:13:33.000+02:00"},"obj":{}}}}'
|
393
393
|
http_version:
|
394
|
-
recorded_at:
|
394
|
+
recorded_at: Thu, 24 May 2018 15:47:17 GMT
|
395
395
|
- request:
|
396
396
|
method: put
|
397
|
-
uri: https://api.test.datacite.org/events/
|
397
|
+
uri: https://api.test.datacite.org/events/ebcbb9cd-6724-428e-88a9-75e5f06f175d-9
|
398
398
|
body:
|
399
399
|
encoding: UTF-8
|
400
|
-
string: '{"data":{"id":"
|
400
|
+
string: '{"data":{"id":"ebcbb9cd-6724-428e-88a9-75e5f06f175d-9","type":"events","attributes":{"uuid":"ebcbb9cd-6724-428e-88a9-75e5f06f175d-9","message-action":"add","obj-id":"http://steuberankunding.co/gerson9","subj-id":"http://adamsrobel.io/kylie9","total":"298","subj":{"pid":"fdfdfd","issued":"2018-05-22T03:59:01.000+02:00"},"relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","source-token":"fd033d2e-aa1b-4027-a472-09ceea3583d1-9","occurred-at":"2018-05-24T10:32:28.000+02:00","license":"https://creativecommons.org/publicdomain/zero/1.0/"}}}'
|
401
401
|
headers:
|
402
402
|
User-Agent:
|
403
403
|
- Maremma - https://github.com/datacite/maremma
|
@@ -413,7 +413,7 @@ http_interactions:
|
|
413
413
|
message: ''
|
414
414
|
headers:
|
415
415
|
Date:
|
416
|
-
-
|
416
|
+
- Thu, 24 May 2018 15:47:17 GMT
|
417
417
|
Content-Type:
|
418
418
|
- application/vnd.api+json; charset=utf-8
|
419
419
|
Connection:
|
@@ -425,28 +425,28 @@ http_interactions:
|
|
425
425
|
Vary:
|
426
426
|
- Accept-Encoding, Origin
|
427
427
|
Etag:
|
428
|
-
- W/"
|
428
|
+
- W/"d138048cb67b6b6efabcc28fc7d9fcc7"
|
429
429
|
X-Runtime:
|
430
|
-
- '0.
|
430
|
+
- '0.013904'
|
431
431
|
X-Credential-Username:
|
432
432
|
- 0000-0001-5489-3594
|
433
433
|
X-Request-Id:
|
434
|
-
-
|
434
|
+
- 56d9bbba-2297-4fac-a758-8ba1656bdfdb
|
435
435
|
X-Powered-By:
|
436
436
|
- Phusion Passenger 5.3.1
|
437
437
|
Server:
|
438
438
|
- nginx/1.14.0 + Phusion Passenger 5.3.1
|
439
439
|
body:
|
440
440
|
encoding: UTF-8
|
441
|
-
string: '{"data":{"id":"
|
441
|
+
string: '{"data":{"id":"ebcbb9cd-6724-428e-88a9-75e5f06f175d-9","type":"events","attributes":{"subj-id":"http://adamsrobel.io/kylie9","obj-id":"http://steuberankunding.co/gerson9","message-action":"add","source-token":"fd033d2e-aa1b-4027-a472-09ceea3583d1-9","relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","total":298,"license":"https://creativecommons.org/publicdomain/zero/1.0/","occurred-at":"2018-05-24T08:32:28.000Z","timestamp":"2018-05-24T15:47:17Z","subj":{"pid":"fdfdfd","issued":"2018-05-22T03:59:01.000+02:00"},"obj":{}}}}'
|
442
442
|
http_version:
|
443
|
-
recorded_at:
|
443
|
+
recorded_at: Thu, 24 May 2018 15:47:17 GMT
|
444
444
|
- request:
|
445
445
|
method: put
|
446
|
-
uri: https://api.test.datacite.org/events/
|
446
|
+
uri: https://api.test.datacite.org/events/86d95e21-0a9f-4c6f-a7d6-eb31e8da648e-10
|
447
447
|
body:
|
448
448
|
encoding: UTF-8
|
449
|
-
string: '{"data":{"id":"
|
449
|
+
string: '{"data":{"id":"86d95e21-0a9f-4c6f-a7d6-eb31e8da648e-10","type":"events","attributes":{"uuid":"86d95e21-0a9f-4c6f-a7d6-eb31e8da648e-10","message-action":"add","obj-id":"http://orn.co/adela10","subj-id":"http://heelmclaughlin.org/burdette10","total":"298","subj":{"pid":"fdfdfd","issued":"2018-05-24T14:58:16.000+02:00"},"relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","source-token":"4c47b752-8879-4876-8b29-aed1b44ee5c2-10","occurred-at":"2018-05-24T10:32:28.000+02:00","license":"https://creativecommons.org/publicdomain/zero/1.0/"}}}'
|
450
450
|
headers:
|
451
451
|
User-Agent:
|
452
452
|
- Maremma - https://github.com/datacite/maremma
|
@@ -462,7 +462,7 @@ http_interactions:
|
|
462
462
|
message: ''
|
463
463
|
headers:
|
464
464
|
Date:
|
465
|
-
-
|
465
|
+
- Thu, 24 May 2018 15:47:18 GMT
|
466
466
|
Content-Type:
|
467
467
|
- application/vnd.api+json; charset=utf-8
|
468
468
|
Connection:
|
@@ -474,20 +474,20 @@ http_interactions:
|
|
474
474
|
Vary:
|
475
475
|
- Accept-Encoding, Origin
|
476
476
|
Etag:
|
477
|
-
- W/"
|
477
|
+
- W/"79e0b130827cf6722aff3bfe2ed3722c"
|
478
478
|
X-Runtime:
|
479
|
-
- '0.
|
479
|
+
- '0.015458'
|
480
480
|
X-Credential-Username:
|
481
481
|
- 0000-0001-5489-3594
|
482
482
|
X-Request-Id:
|
483
|
-
-
|
483
|
+
- 75183b82-ff7b-48b9-8399-9d1914cf35e5
|
484
484
|
X-Powered-By:
|
485
485
|
- Phusion Passenger 5.3.1
|
486
486
|
Server:
|
487
487
|
- nginx/1.14.0 + Phusion Passenger 5.3.1
|
488
488
|
body:
|
489
489
|
encoding: UTF-8
|
490
|
-
string: '{"data":{"id":"
|
490
|
+
string: '{"data":{"id":"86d95e21-0a9f-4c6f-a7d6-eb31e8da648e-10","type":"events","attributes":{"subj-id":"http://heelmclaughlin.org/burdette10","obj-id":"http://orn.co/adela10","message-action":"add","source-token":"4c47b752-8879-4876-8b29-aed1b44ee5c2-10","relation-type-id":"total-dataset-investigations-machine","source-id":"datacite-usage","total":298,"license":"https://creativecommons.org/publicdomain/zero/1.0/","occurred-at":"2018-05-24T08:32:28.000Z","timestamp":"2018-05-24T15:47:18Z","subj":{"pid":"fdfdfd","issued":"2018-05-24T14:58:16.000+02:00"},"obj":{}}}}'
|
491
491
|
http_version:
|
492
|
-
recorded_at:
|
492
|
+
recorded_at: Thu, 24 May 2018 15:47:18 GMT
|
493
493
|
recorded_with: VCR 3.0.3
|
@@ -12,14 +12,14 @@ http_interactions:
|
|
12
12
|
Accept-Encoding:
|
13
13
|
- ''
|
14
14
|
User-Agent:
|
15
|
-
- aws-sdk-ruby3/3.
|
15
|
+
- aws-sdk-ruby3/3.21.2 ruby/2.3.3 x86_64-darwin15 aws-sdk-sqs/1.3.0
|
16
16
|
X-Amz-Date:
|
17
|
-
-
|
17
|
+
- 20180525T092327Z
|
18
18
|
X-Amz-Content-Sha256:
|
19
19
|
- 5761efd13dd0ed81182207171d3660628968189941431d6044920ef8fe7b1160
|
20
20
|
Authorization:
|
21
|
-
- AWS4-HMAC-SHA256 Credential=AKIAIXLDUBIDM74CC6KQ/
|
22
|
-
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=
|
21
|
+
- AWS4-HMAC-SHA256 Credential=AKIAIXLDUBIDM74CC6KQ/20180525/eu-west-1/sqs/aws4_request,
|
22
|
+
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=8865828e82ec807f577b2a5cc1017c9f8dc3223b4df5776e724fccf0561c5927
|
23
23
|
Content-Length:
|
24
24
|
- '58'
|
25
25
|
Accept:
|
@@ -32,7 +32,7 @@ http_interactions:
|
|
32
32
|
Server:
|
33
33
|
- Server
|
34
34
|
Date:
|
35
|
-
-
|
35
|
+
- Fri, 25 May 2018 09:23:27 GMT
|
36
36
|
Content-Type:
|
37
37
|
- text/xml
|
38
38
|
Content-Length:
|
@@ -40,10 +40,10 @@ http_interactions:
|
|
40
40
|
Connection:
|
41
41
|
- keep-alive
|
42
42
|
X-Amzn-Requestid:
|
43
|
-
-
|
43
|
+
- bffeadd2-685a-5460-9fa9-fe53b0150974
|
44
44
|
body:
|
45
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>
|
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>bffeadd2-685a-5460-9fa9-fe53b0150974</RequestId></ResponseMetadata></GetQueueUrlResponse>
|
47
47
|
http_version:
|
48
|
-
recorded_at:
|
48
|
+
recorded_at: Fri, 25 May 2018 09:23:27 GMT
|
49
49
|
recorded_with: VCR 3.0.3
|
data/spec/usage_update_spec.rb
CHANGED
@@ -10,32 +10,6 @@ describe Toccatore::UsageUpdate, vcr: true do
|
|
10
10
|
|
11
11
|
let(:dummy_message){sqs.receive_message(queue_url: queue_url, max_number_of_messages: 1, wait_time_seconds: 1)}
|
12
12
|
|
13
|
-
# context "queue_jobs" do
|
14
|
-
# it "should report if there are no works returned by the Usage Queue" do
|
15
|
-
# puts subject.queue_url
|
16
|
-
# response = subject.queue_jobs
|
17
|
-
# expect(response).to eq(0)
|
18
|
-
# end
|
19
|
-
|
20
|
-
# it "should report if there are works returned by the Usage Queue" do
|
21
|
-
# response = subject.queue_jobs
|
22
|
-
# expect(response).to eq(3)
|
23
|
-
# end
|
24
|
-
# end
|
25
|
-
|
26
|
-
# context "format_event" do
|
27
|
-
# it "should report if there are no works returned by the Usage Queue" do
|
28
|
-
# body = File.read(fixture_path + 'usage_update_nil.json')
|
29
|
-
# result = OpenStruct.new(body: JSON.parse(body) )
|
30
|
-
# expect(subject.format_event(result)).to eq([])
|
31
|
-
# end
|
32
|
-
|
33
|
-
# it "should report if there are works returned by the Usage Queue" do
|
34
|
-
# body = File.read(fixture_path + 'usage_update.json')
|
35
|
-
# result = OpenStruct.new(body: JSON.parse(body) )
|
36
|
-
# expect(subject.format_event(result).length).to eq(40)
|
37
|
-
# end
|
38
|
-
# end
|
39
13
|
|
40
14
|
describe "get_data" do
|
41
15
|
context "when there are messages" do
|
@@ -132,14 +106,14 @@ describe Toccatore::UsageUpdate, vcr: true do
|
|
132
106
|
body = File.read(fixture_path + 'usage_events.json')
|
133
107
|
expect = File.read(fixture_path + 'event_data_resp_2')
|
134
108
|
result = JSON.parse(body)
|
135
|
-
options = { push_url: ENV['LAGOTTINO_URL'], access_token: ENV['
|
109
|
+
options = { push_url: ENV['LAGOTTINO_URL'], access_token: ENV['ACCESS_TOKEN'], jsonapi: true }
|
136
110
|
expect(subject.push_data(result, options)).to eq(4)
|
137
111
|
end
|
138
112
|
|
139
113
|
it "should work with DataCite Event Data 2" do
|
140
114
|
dd = events.map {|event| event.to_h.stringify_keys}
|
141
115
|
all_events = dd.map {|item| item.map{ |k, v| [k.dasherize, v] }.to_h}
|
142
|
-
options = { push_url: ENV['LAGOTTINO_URL'], access_token: ENV['
|
116
|
+
options = { push_url: ENV['LAGOTTINO_URL'], access_token: ENV['ACCESS_TOKEN'], jsonapi: true }
|
143
117
|
# expect(subject.push_data(all_events, options)).to eq(0)
|
144
118
|
end
|
145
119
|
end
|
data/toccatore.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
|
17
17
|
# Declary dependencies here, rather than in the Gemfile
|
18
18
|
|
19
|
-
s.add_dependency 'maremma', '~>
|
19
|
+
s.add_dependency 'maremma', '~> 4.0'
|
20
20
|
s.add_dependency 'activesupport', '~> 4.2', '>= 4.2.5'
|
21
21
|
s.add_dependency 'dotenv', '~> 2.1', '>= 2.1.1'
|
22
22
|
s.add_dependency 'namae', '~> 0.11.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toccatore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Fenner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: maremma
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|