toccatore 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -48,14 +48,24 @@ describe Toccatore::UsageUpdate, vcr: true do
48
48
  it "should return errors" do
49
49
  body = File.read(fixture_path + 'usage_update_nil.json')
50
50
  result = OpenStruct.new(body: JSON.parse(body) )
51
+ expect(subject.parse_data(result)).to be_a(Array)
51
52
  expect(subject.parse_data(result)).to eq([{"status"=>"404", "title"=>"The resource you are looking for doesn't exist."}])
52
53
  end
53
54
  end
54
55
 
56
+ # context "when the queue is empty" do
57
+ # it "should return errors" do
58
+ # result = OpenStruct.new(body: { "errors" => "Queue is empty" })
59
+ # expect(subject.parse_data(result)).to be_a(Array)
60
+ # expect(subject.parse_data(result)).to eq([{"status"=>"404", "title"=>"The resource you are looking for doesn't exist."}])
61
+ # end
62
+ # end
63
+
55
64
  context "when the usage report was NOT found" do
56
65
  it "should return errors" do
57
66
  body = File.read(fixture_path + 'usage_update_nil.json')
58
67
  result = OpenStruct.new(body: JSON.parse(body) )
68
+ expect(subject.parse_data(result)).to be_a(Array)
59
69
  expect(subject.parse_data(result)).to eq([{"status"=>"404", "title"=>"The resource you are looking for doesn't exist."}])
60
70
  end
61
71
  end
@@ -63,34 +73,35 @@ describe Toccatore::UsageUpdate, vcr: true do
63
73
  context "when the report was found" do
64
74
  it "should parsed it correctly" do
65
75
  body = File.read(fixture_path + 'usage_update.json')
66
- result = OpenStruct.new(body: JSON.parse(body) )
76
+ result = OpenStruct.new(body: JSON.parse(body), url:"https://metrics.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad" )
67
77
  response = subject.parse_data(result, source_token: ENV['SOURCE_TOKEN'])
68
78
  expect(response.length).to eq(2)
69
- expect(response.last.except("uuid")).to eq("subj"=>{"pid"=>"https://metrics.test.datacite.org/reports/2018-3-Dash", "issued"=>"2128-04-09"},"total"=>3,"message-action" => "add", "subj-id"=>"https://metrics.test.datacite.org/reports/2018-3-Dash", "obj-id"=>"https://doi.org/10.7291/d1q94r", "relation-type-id"=>"unique-dataset-investigations-regular", "source-id"=>"datacite-usage", "occurred-at"=>"2128-04-09", "license" => "https://creativecommons.org/publicdomain/zero/1.0/", "source-token" => "43ba99ae-5cf0-11e8-9c2d-fa7ae01bbebc")
79
+ expect(response.last.except("uuid")).to eq("subj"=>{"pid"=>"https://metrics.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "issued"=>"2128-04-09"},"total"=>3,"message-action" => "add", "subj-id"=>"https://metrics.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "obj-id"=>"https://doi.org/10.7291/d1q94r", "relation-type-id"=>"unique-dataset-investigations-regular", "source-id"=>"datacite-usage", "occurred-at"=>"2128-04-09", "license" => "https://creativecommons.org/publicdomain/zero/1.0/", "source-token" => "43ba99ae-5cf0-11e8-9c2d-fa7ae01bbebc")
70
80
  end
71
81
 
72
82
  it "should parsed it correctly when it has five metrics and two DOIs" do
73
83
  body = File.read(fixture_path + 'usage_update_3.json')
74
- result = OpenStruct.new(body: JSON.parse(body) )
84
+ result = OpenStruct.new(body: JSON.parse(body), url:"https://metrics.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad" )
75
85
  response = subject.parse_data(result, source_token: ENV['SOURCE_TOKEN'])
76
86
  expect(response.length).to eq(5)
77
- expect(response.last.except("uuid")).to eq("message-action"=>"add", "subj-id"=>"https://metrics.test.datacite.org/reports/2018-3-Dash", "subj"=>{"pid"=>"https://metrics.test.datacite.org/reports/2018-3-Dash", "issued"=>"2128-04-09"}, "total"=>208, "obj-id"=>"https://doi.org/10.6071/z7wc73", "relation-type-id"=>"Unique-Dataset-Requests-Machine", "source-id"=>"datacite-usage", "source-token"=>"43ba99ae-5cf0-11e8-9c2d-fa7ae01bbebc", "occurred-at"=>"2128-04-09", "license"=>"https://creativecommons.org/publicdomain/zero/1.0/")
87
+ expect(response.last.except("uuid")).to eq("message-action"=>"add", "subj-id"=>"https://metrics.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "subj"=>{"pid"=>"https://metrics.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "issued"=>"2128-04-09"}, "total"=>208, "obj-id"=>"https://doi.org/10.6071/z7wc73", "relation-type-id"=>"Unique-Dataset-Requests-Machine", "source-id"=>"datacite-usage", "source-token"=>"43ba99ae-5cf0-11e8-9c2d-fa7ae01bbebc", "occurred-at"=>"2128-04-09", "license"=>"https://creativecommons.org/publicdomain/zero/1.0/")
78
88
  end
79
89
 
80
90
  it "should parsed it correctly when it has two metrics per DOI " do
81
91
  body = File.read(fixture_path + 'usage_update_2.json')
82
- result = OpenStruct.new(body: JSON.parse(body) )
92
+ result = OpenStruct.new(body: JSON.parse(body), url:"https://metrics.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad" , url:"https://metrics.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad" )
83
93
  response = subject.parse_data(result, source_token: ENV['SOURCE_TOKEN'])
84
94
  expect(response.length).to eq(4)
85
- expect(response.last.except("uuid")).to eq("message-action"=>"add", "subj-id"=>"https://metrics.test.datacite.org/reports/2018-3-Dash", "subj"=>{"pid"=>"https://metrics.test.datacite.org/reports/2018-3-Dash", "issued"=>"2128-04-09"}, "total"=>208, "obj-id"=>"https://doi.org/10.6071/z7wc73", "relation-type-id"=>"Unique-Dataset-Requests-Machine", "source-id"=>"datacite-usage", "source-token"=>"43ba99ae-5cf0-11e8-9c2d-fa7ae01bbebc", "occurred-at"=>"2128-04-09", "license"=>"https://creativecommons.org/publicdomain/zero/1.0/")
95
+ expect(response.last.except("uuid")).to eq("message-action"=>"add", "subj-id"=>"https://metrics.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "subj"=>{"pid"=>"https://metrics.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad", "issued"=>"2128-04-09"}, "total"=>208, "obj-id"=>"https://doi.org/10.6071/z7wc73", "relation-type-id"=>"Unique-Dataset-Requests-Machine", "source-id"=>"datacite-usage", "source-token"=>"43ba99ae-5cf0-11e8-9c2d-fa7ae01bbebc", "occurred-at"=>"2128-04-09", "license"=>"https://creativecommons.org/publicdomain/zero/1.0/")
86
96
  end
87
97
 
88
98
  it "should send a warning if there are more than 4 metrics" do
89
99
  body = File.read(fixture_path + 'usage_update_1.json')
90
- result = OpenStruct.new(body: JSON.parse(body) )
100
+ result = OpenStruct.new(body: JSON.parse(body), url:"https://metrics.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad" )
91
101
  response = subject.parse_data(result, source_token: ENV['SOURCE_TOKEN'])
92
102
  expect(response.length).to eq(1)
93
- expect(response.last.body).to eq({"errors"=>"There are too many instances in 10.7291/D1Q94R for report https://metrics.test.datacite.org/reports/2018-3-Dash. There can only be 4"})
103
+ expect(subject.parse_data(result)).to be_a(Array)
104
+ expect(response.last.body).to eq({"errors"=>"There are too many instances in 10.7291/D1Q94R for report https://metrics.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad. There can only be 4"})
94
105
  end
95
106
  end
96
107
  end
@@ -110,11 +121,18 @@ describe Toccatore::UsageUpdate, vcr: true do
110
121
  expect(subject.push_data(result, options)).to eq(4)
111
122
  end
112
123
 
113
- it "should work with DataCite Event Data 2" do
114
- dd = events.map {|event| event.to_h.stringify_keys}
115
- all_events = dd.map {|item| item.map{ |k, v| [k.dasherize, v] }.to_h}
124
+ # it "should work with DataCite Event Data 2" do
125
+ # dd = events.map {|event| event.to_h.stringify_keys}
126
+ # all_events = dd.map {|item| item.map{ |k, v| [k.dasherize, v] }.to_h}
127
+ # options = { push_url: ENV['LAGOTTINO_URL'], access_token: ENV['ACCESS_TOKEN'], jsonapi: true }
128
+ # expect(subject.push_data(all_events, options)).to eq(0)
129
+ # end
130
+
131
+ it "should work with a single item" do
132
+ body = File.read(fixture_path + 'usage_events.json')
133
+ result = JSON.parse(body)
116
134
  options = { push_url: ENV['LAGOTTINO_URL'], access_token: ENV['ACCESS_TOKEN'], jsonapi: true }
117
- # expect(subject.push_data(all_events, options)).to eq(0)
135
+ expect(subject.push_item(result.first, options)).to eq(1)
118
136
  end
119
137
  end
120
138
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toccatore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner
@@ -397,7 +397,7 @@ files:
397
397
  - spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_message/should_return_one_message_when_there_are_multiple_messages.yml
398
398
  - spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_total/when_is_working_with_AWS.yml
399
399
  - spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/push_data/should_fail_if_format_of_the_event_is_wrong.yml
400
- - spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/push_data/should_work_with_DataCite_Event_Data_2.yml
400
+ - spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/push_data/should_work_with_a_single_item.yml
401
401
  - spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/queue_url/should_return_always_correct_queue_url.yml
402
402
  - spec/orcid_update_spec.rb
403
403
  - spec/queque_spec.rb
@@ -1,493 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: put
5
- uri: https://api.test.datacite.org/events/20ce375e-2610-44d5-9755-293513617d18-1
6
- body:
7
- encoding: UTF-8
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
- headers:
10
- User-Agent:
11
- - Maremma - https://github.com/datacite/maremma
12
- Content-Type:
13
- - application/json
14
- Accept:
15
- - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
16
- Authorization:
17
- - Bearer <LAGOTTO_TOKEN>
18
- response:
19
- status:
20
- code: 201
21
- message: ''
22
- headers:
23
- Date:
24
- - Thu, 24 May 2018 15:47:15 GMT
25
- Content-Type:
26
- - application/vnd.api+json; charset=utf-8
27
- Connection:
28
- - keep-alive
29
- Status:
30
- - 201 Created
31
- Cache-Control:
32
- - max-age=0, private, must-revalidate
33
- Vary:
34
- - Accept-Encoding, Origin
35
- Etag:
36
- - W/"d0c80e0e25d20a9c9ec91f11340ecbb7"
37
- X-Runtime:
38
- - '0.015749'
39
- X-Credential-Username:
40
- - 0000-0001-5489-3594
41
- X-Request-Id:
42
- - 743bf939-b491-4da7-bb60-c0fdd70749fc
43
- X-Powered-By:
44
- - Phusion Passenger 5.3.1
45
- Server:
46
- - nginx/1.14.0 + Phusion Passenger 5.3.1
47
- body:
48
- encoding: UTF-8
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
- http_version:
51
- recorded_at: Thu, 24 May 2018 15:47:15 GMT
52
- - request:
53
- method: put
54
- uri: https://api.test.datacite.org/events/7a973d3f-9471-48b8-a5f3-e6e0e14ad6b9-2
55
- body:
56
- encoding: UTF-8
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
- headers:
59
- User-Agent:
60
- - Maremma - https://github.com/datacite/maremma
61
- Content-Type:
62
- - application/json
63
- Accept:
64
- - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
65
- Authorization:
66
- - Bearer <LAGOTTO_TOKEN>
67
- response:
68
- status:
69
- code: 201
70
- message: ''
71
- headers:
72
- Date:
73
- - Thu, 24 May 2018 15:47:15 GMT
74
- Content-Type:
75
- - application/vnd.api+json; charset=utf-8
76
- Connection:
77
- - keep-alive
78
- Status:
79
- - 201 Created
80
- Cache-Control:
81
- - max-age=0, private, must-revalidate
82
- Vary:
83
- - Accept-Encoding, Origin
84
- Etag:
85
- - W/"6952b0210ed3e39853d289d4ec0ee1f4"
86
- X-Runtime:
87
- - '0.014183'
88
- X-Credential-Username:
89
- - 0000-0001-5489-3594
90
- X-Request-Id:
91
- - e489dd62-456b-4512-981d-5ec1a1144d58
92
- X-Powered-By:
93
- - Phusion Passenger 5.3.1
94
- Server:
95
- - nginx/1.14.0 + Phusion Passenger 5.3.1
96
- body:
97
- encoding: UTF-8
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
- http_version:
100
- recorded_at: Thu, 24 May 2018 15:47:15 GMT
101
- - request:
102
- method: put
103
- uri: https://api.test.datacite.org/events/1dae49af-2caa-4426-8e7c-bdc664abc8f6-3
104
- body:
105
- encoding: UTF-8
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
- headers:
108
- User-Agent:
109
- - Maremma - https://github.com/datacite/maremma
110
- Content-Type:
111
- - application/json
112
- Accept:
113
- - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
114
- Authorization:
115
- - Bearer <LAGOTTO_TOKEN>
116
- response:
117
- status:
118
- code: 201
119
- message: ''
120
- headers:
121
- Date:
122
- - Thu, 24 May 2018 15:47:15 GMT
123
- Content-Type:
124
- - application/vnd.api+json; charset=utf-8
125
- Connection:
126
- - keep-alive
127
- Status:
128
- - 201 Created
129
- Cache-Control:
130
- - max-age=0, private, must-revalidate
131
- Vary:
132
- - Accept-Encoding, Origin
133
- Etag:
134
- - W/"c78a953fd8bafd97196c2ecd584e5d74"
135
- X-Runtime:
136
- - '0.014078'
137
- X-Credential-Username:
138
- - 0000-0001-5489-3594
139
- X-Request-Id:
140
- - 4e2f3842-7043-4296-a206-e14804400ba7
141
- X-Powered-By:
142
- - Phusion Passenger 5.3.1
143
- Server:
144
- - nginx/1.14.0 + Phusion Passenger 5.3.1
145
- body:
146
- encoding: UTF-8
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
- http_version:
149
- recorded_at: Thu, 24 May 2018 15:47:15 GMT
150
- - request:
151
- method: put
152
- uri: https://api.test.datacite.org/events/f8bd9a18-a4b9-467b-85f0-14fb13e1ac63-4
153
- body:
154
- encoding: UTF-8
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
- headers:
157
- User-Agent:
158
- - Maremma - https://github.com/datacite/maremma
159
- Content-Type:
160
- - application/json
161
- Accept:
162
- - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
163
- Authorization:
164
- - Bearer <LAGOTTO_TOKEN>
165
- response:
166
- status:
167
- code: 201
168
- message: ''
169
- headers:
170
- Date:
171
- - Thu, 24 May 2018 15:47:16 GMT
172
- Content-Type:
173
- - application/vnd.api+json; charset=utf-8
174
- Connection:
175
- - keep-alive
176
- Status:
177
- - 201 Created
178
- Cache-Control:
179
- - max-age=0, private, must-revalidate
180
- Vary:
181
- - Accept-Encoding, Origin
182
- Etag:
183
- - W/"1caabaa6ebbe1e16156157c292f08cf2"
184
- X-Runtime:
185
- - '0.015125'
186
- X-Credential-Username:
187
- - 0000-0001-5489-3594
188
- X-Request-Id:
189
- - 6a68f365-d6db-4638-9882-0ab885388cb6
190
- X-Powered-By:
191
- - Phusion Passenger 5.3.1
192
- Server:
193
- - nginx/1.14.0 + Phusion Passenger 5.3.1
194
- body:
195
- encoding: UTF-8
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
- http_version:
198
- recorded_at: Thu, 24 May 2018 15:47:16 GMT
199
- - request:
200
- method: put
201
- uri: https://api.test.datacite.org/events/2096a15c-619c-4d09-a220-5218dcf117d5-5
202
- body:
203
- encoding: UTF-8
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
- headers:
206
- User-Agent:
207
- - Maremma - https://github.com/datacite/maremma
208
- Content-Type:
209
- - application/json
210
- Accept:
211
- - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
212
- Authorization:
213
- - Bearer <LAGOTTO_TOKEN>
214
- response:
215
- status:
216
- code: 201
217
- message: ''
218
- headers:
219
- Date:
220
- - Thu, 24 May 2018 15:47:16 GMT
221
- Content-Type:
222
- - application/vnd.api+json; charset=utf-8
223
- Connection:
224
- - keep-alive
225
- Status:
226
- - 201 Created
227
- Cache-Control:
228
- - max-age=0, private, must-revalidate
229
- Vary:
230
- - Accept-Encoding, Origin
231
- Etag:
232
- - W/"167f146a048f3d91b9e2913bd86dd04e"
233
- X-Runtime:
234
- - '0.013974'
235
- X-Credential-Username:
236
- - 0000-0001-5489-3594
237
- X-Request-Id:
238
- - 76085a18-5667-4ec0-89e3-9fcc76302dc4
239
- X-Powered-By:
240
- - Phusion Passenger 5.3.1
241
- Server:
242
- - nginx/1.14.0 + Phusion Passenger 5.3.1
243
- body:
244
- encoding: UTF-8
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
- http_version:
247
- recorded_at: Thu, 24 May 2018 15:47:16 GMT
248
- - request:
249
- method: put
250
- uri: https://api.test.datacite.org/events/a80cbb73-0950-401a-b222-155c617e81d3-6
251
- body:
252
- encoding: UTF-8
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
- headers:
255
- User-Agent:
256
- - Maremma - https://github.com/datacite/maremma
257
- Content-Type:
258
- - application/json
259
- Accept:
260
- - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
261
- Authorization:
262
- - Bearer <LAGOTTO_TOKEN>
263
- response:
264
- status:
265
- code: 201
266
- message: ''
267
- headers:
268
- Date:
269
- - Thu, 24 May 2018 15:47:16 GMT
270
- Content-Type:
271
- - application/vnd.api+json; charset=utf-8
272
- Connection:
273
- - keep-alive
274
- Status:
275
- - 201 Created
276
- Cache-Control:
277
- - max-age=0, private, must-revalidate
278
- Vary:
279
- - Accept-Encoding, Origin
280
- Etag:
281
- - W/"7c91f7162b18dc55ce0932a36170b472"
282
- X-Runtime:
283
- - '0.014174'
284
- X-Credential-Username:
285
- - 0000-0001-5489-3594
286
- X-Request-Id:
287
- - f2092d7b-fdf5-485f-94a3-065df54c01f9
288
- X-Powered-By:
289
- - Phusion Passenger 5.3.1
290
- Server:
291
- - nginx/1.14.0 + Phusion Passenger 5.3.1
292
- body:
293
- encoding: UTF-8
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
- http_version:
296
- recorded_at: Thu, 24 May 2018 15:47:16 GMT
297
- - request:
298
- method: put
299
- uri: https://api.test.datacite.org/events/4cc6cfba-528f-4590-b1dc-03b8a3397005-7
300
- body:
301
- encoding: UTF-8
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
- headers:
304
- User-Agent:
305
- - Maremma - https://github.com/datacite/maremma
306
- Content-Type:
307
- - application/json
308
- Accept:
309
- - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
310
- Authorization:
311
- - Bearer <LAGOTTO_TOKEN>
312
- response:
313
- status:
314
- code: 201
315
- message: ''
316
- headers:
317
- Date:
318
- - Thu, 24 May 2018 15:47:17 GMT
319
- Content-Type:
320
- - application/vnd.api+json; charset=utf-8
321
- Connection:
322
- - keep-alive
323
- Status:
324
- - 201 Created
325
- Cache-Control:
326
- - max-age=0, private, must-revalidate
327
- Vary:
328
- - Accept-Encoding, Origin
329
- Etag:
330
- - W/"e502dec0091a1785dcca1e53843d0412"
331
- X-Runtime:
332
- - '0.015009'
333
- X-Credential-Username:
334
- - 0000-0001-5489-3594
335
- X-Request-Id:
336
- - 3d1e3630-4037-4160-a24d-11743abd24d6
337
- X-Powered-By:
338
- - Phusion Passenger 5.3.1
339
- Server:
340
- - nginx/1.14.0 + Phusion Passenger 5.3.1
341
- body:
342
- encoding: UTF-8
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
- http_version:
345
- recorded_at: Thu, 24 May 2018 15:47:17 GMT
346
- - request:
347
- method: put
348
- uri: https://api.test.datacite.org/events/debf4e3f-b9f6-45c8-879b-356ddddafc2f-8
349
- body:
350
- encoding: UTF-8
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
- headers:
353
- User-Agent:
354
- - Maremma - https://github.com/datacite/maremma
355
- Content-Type:
356
- - application/json
357
- Accept:
358
- - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
359
- Authorization:
360
- - Bearer <LAGOTTO_TOKEN>
361
- response:
362
- status:
363
- code: 201
364
- message: ''
365
- headers:
366
- Date:
367
- - Thu, 24 May 2018 15:47:17 GMT
368
- Content-Type:
369
- - application/vnd.api+json; charset=utf-8
370
- Connection:
371
- - keep-alive
372
- Status:
373
- - 201 Created
374
- Cache-Control:
375
- - max-age=0, private, must-revalidate
376
- Vary:
377
- - Accept-Encoding, Origin
378
- Etag:
379
- - W/"636cde3b11fe7f11c064587f89927e13"
380
- X-Runtime:
381
- - '0.014082'
382
- X-Credential-Username:
383
- - 0000-0001-5489-3594
384
- X-Request-Id:
385
- - ce97dc76-cf01-474a-9b38-b58114dae21c
386
- X-Powered-By:
387
- - Phusion Passenger 5.3.1
388
- Server:
389
- - nginx/1.14.0 + Phusion Passenger 5.3.1
390
- body:
391
- encoding: UTF-8
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
- http_version:
394
- recorded_at: Thu, 24 May 2018 15:47:17 GMT
395
- - request:
396
- method: put
397
- uri: https://api.test.datacite.org/events/ebcbb9cd-6724-428e-88a9-75e5f06f175d-9
398
- body:
399
- encoding: UTF-8
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
- headers:
402
- User-Agent:
403
- - Maremma - https://github.com/datacite/maremma
404
- Content-Type:
405
- - application/json
406
- Accept:
407
- - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
408
- Authorization:
409
- - Bearer <LAGOTTO_TOKEN>
410
- response:
411
- status:
412
- code: 201
413
- message: ''
414
- headers:
415
- Date:
416
- - Thu, 24 May 2018 15:47:17 GMT
417
- Content-Type:
418
- - application/vnd.api+json; charset=utf-8
419
- Connection:
420
- - keep-alive
421
- Status:
422
- - 201 Created
423
- Cache-Control:
424
- - max-age=0, private, must-revalidate
425
- Vary:
426
- - Accept-Encoding, Origin
427
- Etag:
428
- - W/"d138048cb67b6b6efabcc28fc7d9fcc7"
429
- X-Runtime:
430
- - '0.013904'
431
- X-Credential-Username:
432
- - 0000-0001-5489-3594
433
- X-Request-Id:
434
- - 56d9bbba-2297-4fac-a758-8ba1656bdfdb
435
- X-Powered-By:
436
- - Phusion Passenger 5.3.1
437
- Server:
438
- - nginx/1.14.0 + Phusion Passenger 5.3.1
439
- body:
440
- encoding: UTF-8
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
- http_version:
443
- recorded_at: Thu, 24 May 2018 15:47:17 GMT
444
- - request:
445
- method: put
446
- uri: https://api.test.datacite.org/events/86d95e21-0a9f-4c6f-a7d6-eb31e8da648e-10
447
- body:
448
- encoding: UTF-8
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
- headers:
451
- User-Agent:
452
- - Maremma - https://github.com/datacite/maremma
453
- Content-Type:
454
- - application/json
455
- Accept:
456
- - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
457
- Authorization:
458
- - Bearer <LAGOTTO_TOKEN>
459
- response:
460
- status:
461
- code: 201
462
- message: ''
463
- headers:
464
- Date:
465
- - Thu, 24 May 2018 15:47:18 GMT
466
- Content-Type:
467
- - application/vnd.api+json; charset=utf-8
468
- Connection:
469
- - keep-alive
470
- Status:
471
- - 201 Created
472
- Cache-Control:
473
- - max-age=0, private, must-revalidate
474
- Vary:
475
- - Accept-Encoding, Origin
476
- Etag:
477
- - W/"79e0b130827cf6722aff3bfe2ed3722c"
478
- X-Runtime:
479
- - '0.015458'
480
- X-Credential-Username:
481
- - 0000-0001-5489-3594
482
- X-Request-Id:
483
- - 75183b82-ff7b-48b9-8399-9d1914cf35e5
484
- X-Powered-By:
485
- - Phusion Passenger 5.3.1
486
- Server:
487
- - nginx/1.14.0 + Phusion Passenger 5.3.1
488
- body:
489
- encoding: UTF-8
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
- http_version:
492
- recorded_at: Thu, 24 May 2018 15:47:18 GMT
493
- recorded_with: VCR 3.0.3