toccatore 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/toccatore/usage_update.rb +6 -9
- data/lib/toccatore/version.rb +1 -1
- data/spec/cli_spec.rb +1 -1
- data/spec/fixtures/usage_event.json +1 -1
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_data/when_there_are_messages/should_return_the_data_for_one_message.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_data/when_there_is_ONE_message/should_return_the_data_for_one_message.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_message/should_return_no_meessage_when_the_queue_is_empty.yml +17 -17
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_message/should_return_one_message_when_there_are_multiple_messages.yml +17 -17
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_total/when_is_working_with_AWS.yml +32 -32
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/push_data/should_fail_if_format_of_the_event_is_wrong.yml +20 -20
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/push_data/should_work_with_a_single_item.yml +289 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/queue_url/should_return_always_correct_queue_url.yml +6 -6
- data/spec/usage_update_spec.rb +30 -12
- metadata +2 -2
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/push_data/should_work_with_DataCite_Event_Data_2.yml +0 -493
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 159b4c1dd6c8667065b9a6638d622450df216d68181c0947ffbcf5ac7e2f9498
|
4
|
+
data.tar.gz: 6333c2570c1be15e1c3c676bffc54ea28aece621365df258d2dd95f8828a8c36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13f94c3907ccddec7b56644800b1c072369c2a9d991da3ef5cac61edbf1b123c38557a3eb0fafc9975210e59750968b6c22c1cd1e32e579f2531f4ba80b59f4f
|
7
|
+
data.tar.gz: 343caecdd82fa0613717350d3a8e8ae76f3a68e2d2f2d12d6664e2096be365931ed5df167ba2c290aed24a2ff21000b2aaed43b7b72507eed3f943faf6c25317
|
data/Gemfile.lock
CHANGED
@@ -42,8 +42,8 @@ module Toccatore
|
|
42
42
|
|
43
43
|
def process_data(options = {})
|
44
44
|
message = get_message
|
45
|
-
return [OpenStruct.new(body: { "data" => [] })] if message.empty?
|
46
45
|
data = get_data(message)
|
46
|
+
return 1 if data.body.nil?
|
47
47
|
events = parse_data(data, options)
|
48
48
|
return [OpenStruct.new(body: { "data" => [] })] if events.empty?
|
49
49
|
errors = push_data(events, options)
|
@@ -78,10 +78,6 @@ module Toccatore
|
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
|
-
def metrics_url
|
82
|
-
ENV['SASHIMI_URL']
|
83
|
-
end
|
84
|
-
|
85
81
|
def source_id
|
86
82
|
"usage_update"
|
87
83
|
end
|
@@ -106,10 +102,10 @@ module Toccatore
|
|
106
102
|
|
107
103
|
def parse_data(result, options={})
|
108
104
|
return result.body.fetch("errors") if result.body.fetch("errors", nil).present?
|
109
|
-
|
105
|
+
|
110
106
|
items = result.body.dig("data","report","report-datasets")
|
111
107
|
header = result.body.dig("data","report","report-header")
|
112
|
-
report_id =
|
108
|
+
report_id = result.url
|
113
109
|
|
114
110
|
created = header.fetch("created")
|
115
111
|
Array.wrap(items).reduce([]) do |x, item|
|
@@ -135,7 +131,8 @@ module Toccatore
|
|
135
131
|
|
136
132
|
def push_item(item, options={})
|
137
133
|
return OpenStruct.new(body: { "errors" => [{ "title" => "Access token missing." }] }) if options[:access_token].blank?
|
138
|
-
return
|
134
|
+
return OpenStruct.new(body: { "errors" => [{ "title" => "Queue is empty." }] }) if item == "Queue is empty"
|
135
|
+
return OpenStruct.new(body: { "errors" => [{ "title" => "Report not found" }] }) if item["subj-id"].nil?
|
139
136
|
|
140
137
|
host = options[:push_url].presence || "https://api.test.datacite.org"
|
141
138
|
push_url = host + "/events/" + item["uuid"].to_s
|
@@ -147,7 +144,7 @@ module Toccatore
|
|
147
144
|
bearer: options[:access_token],
|
148
145
|
content_type: 'application/json',
|
149
146
|
host: host)
|
150
|
-
|
147
|
+
|
151
148
|
if response.status == 201
|
152
149
|
puts "#{item['subj-id']} #{item['relation-type-id']} #{item['obj-id']} pushed to Event Data service."
|
153
150
|
0
|
data/lib/toccatore/version.rb
CHANGED
data/spec/cli_spec.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"report_id":"https://metrics.test.datacite.org/reports/
|
1
|
+
{"report_id":"https://metrics.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad"}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://metrics.test.datacite.org/reports/
|
5
|
+
uri: https://metrics.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -17,7 +17,7 @@ http_interactions:
|
|
17
17
|
message: ''
|
18
18
|
headers:
|
19
19
|
Date:
|
20
|
-
-
|
20
|
+
- Fri, 25 May 2018 15:22:43 GMT
|
21
21
|
Content-Type:
|
22
22
|
- application/json; charset=utf-8
|
23
23
|
Connection:
|
@@ -31,22 +31,22 @@ http_interactions:
|
|
31
31
|
Vary:
|
32
32
|
- Accept-Encoding, Origin
|
33
33
|
Etag:
|
34
|
-
- W/"
|
34
|
+
- W/"a2af7c772d0e1af937e036db75f8bbb1"
|
35
35
|
X-Runtime:
|
36
|
-
- '0.
|
36
|
+
- '0.005482'
|
37
37
|
X-Request-Id:
|
38
|
-
-
|
38
|
+
- 42e72cd5-37ba-4030-b2fa-e3d1bb647ca8
|
39
39
|
X-Powered-By:
|
40
40
|
- Phusion Passenger 5.3.1
|
41
41
|
Server:
|
42
42
|
- nginx/1.14.0 + Phusion Passenger 5.3.1
|
43
43
|
body:
|
44
44
|
encoding: UTF-8
|
45
|
-
string: '{"report":{"id":"
|
46
|
-
Master Report","report-id":"
|
47
|
-
|
48
|
-
|
49
|
-
|
45
|
+
string: '{"report":{"id":"5cac6ca0-9391-4e1d-95cf-ba2f475cbfad","report-header":{"report-name":"Dataset
|
46
|
+
Master Report","report-id":"SDR","release":"RD1","created-by":"test9","created":"2018-05-22","reporting-period":{"end-date":"2063-02-30T00:00:00","begin-date":"2063-02-01T00:00:00"},"report-filters":[],"report-attributes":[]},"report-datasets":[{"uri":"https://search.DataONE.org/index.html#view/https://pasta.lternet.edu/package/metadata/eml/knb-lter-luq/88/559501","yop":"2010","platform":"DataONE","data-type":"dataset","publisher":"LTER
|
47
|
+
Network","dataset-id":[{"type":"DOI","value":"10.6073/pasta/aec48ca27decb1fd2c2f454f1c5f88e4"}],"performance":[{"period":{"end-date":"2018-03-31","begin-date":"2018-03-01"},"instance":[{"count":349,"metric-type":"total-dataset-requests","access-method":"regular","country-counts":{"au":9,"ca":4,"de":4,"dk":2,"ie":2,"ru":2,"us":9}},{"count":27,"metric-type":"unique-dataset-requests","access-method":"regular","country-counts":{"au":9,"ca":4,"de":4,"dk":2,"ie":2,"ru":2,"us":9}},{"count":8,"metric-type":"total-dataset-investigations","access-method":"regular","country-counts":{"de":4,"ie":2,"ru":2}},{"count":8,"metric-type":"unique-dataset-investigations","access-method":"regular","country-counts":{"de":4,"ie":2,"ru":2}}]}],"publisher-id":[{"type":"orcid","value":"205975.c"}],"dataset-title":"Phenologies
|
48
|
+
of the Tabonuco Forest trees and shrubs.","dataset-contributors":[{"type":"name","value":"Jess
|
49
|
+
Zimmerman"}]}]}}'
|
50
50
|
http_version:
|
51
|
-
recorded_at:
|
51
|
+
recorded_at: Fri, 25 May 2018 15:22:43 GMT
|
52
52
|
recorded_with: VCR 3.0.3
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://metrics.test.datacite.org/reports/
|
5
|
+
uri: https://metrics.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -17,7 +17,7 @@ http_interactions:
|
|
17
17
|
message: ''
|
18
18
|
headers:
|
19
19
|
Date:
|
20
|
-
-
|
20
|
+
- Fri, 25 May 2018 15:22:43 GMT
|
21
21
|
Content-Type:
|
22
22
|
- application/json; charset=utf-8
|
23
23
|
Connection:
|
@@ -31,22 +31,22 @@ http_interactions:
|
|
31
31
|
Vary:
|
32
32
|
- Accept-Encoding, Origin
|
33
33
|
Etag:
|
34
|
-
- W/"
|
34
|
+
- W/"a2af7c772d0e1af937e036db75f8bbb1"
|
35
35
|
X-Runtime:
|
36
|
-
- '0.
|
36
|
+
- '0.005124'
|
37
37
|
X-Request-Id:
|
38
|
-
-
|
38
|
+
- bc7ffb44-993f-4506-a24a-fe51639eff2d
|
39
39
|
X-Powered-By:
|
40
40
|
- Phusion Passenger 5.3.1
|
41
41
|
Server:
|
42
42
|
- nginx/1.14.0 + Phusion Passenger 5.3.1
|
43
43
|
body:
|
44
44
|
encoding: UTF-8
|
45
|
-
string: '{"report":{"id":"
|
46
|
-
Master Report","report-id":"
|
47
|
-
|
48
|
-
|
49
|
-
|
45
|
+
string: '{"report":{"id":"5cac6ca0-9391-4e1d-95cf-ba2f475cbfad","report-header":{"report-name":"Dataset
|
46
|
+
Master Report","report-id":"SDR","release":"RD1","created-by":"test9","created":"2018-05-22","reporting-period":{"end-date":"2063-02-30T00:00:00","begin-date":"2063-02-01T00:00:00"},"report-filters":[],"report-attributes":[]},"report-datasets":[{"uri":"https://search.DataONE.org/index.html#view/https://pasta.lternet.edu/package/metadata/eml/knb-lter-luq/88/559501","yop":"2010","platform":"DataONE","data-type":"dataset","publisher":"LTER
|
47
|
+
Network","dataset-id":[{"type":"DOI","value":"10.6073/pasta/aec48ca27decb1fd2c2f454f1c5f88e4"}],"performance":[{"period":{"end-date":"2018-03-31","begin-date":"2018-03-01"},"instance":[{"count":349,"metric-type":"total-dataset-requests","access-method":"regular","country-counts":{"au":9,"ca":4,"de":4,"dk":2,"ie":2,"ru":2,"us":9}},{"count":27,"metric-type":"unique-dataset-requests","access-method":"regular","country-counts":{"au":9,"ca":4,"de":4,"dk":2,"ie":2,"ru":2,"us":9}},{"count":8,"metric-type":"total-dataset-investigations","access-method":"regular","country-counts":{"de":4,"ie":2,"ru":2}},{"count":8,"metric-type":"unique-dataset-investigations","access-method":"regular","country-counts":{"de":4,"ie":2,"ru":2}}]}],"publisher-id":[{"type":"orcid","value":"205975.c"}],"dataset-title":"Phenologies
|
48
|
+
of the Tabonuco Forest trees and shrubs.","dataset-contributors":[{"type":"name","value":"Jess
|
49
|
+
Zimmerman"}]}]}}'
|
50
50
|
http_version:
|
51
|
-
recorded_at:
|
51
|
+
recorded_at: Fri, 25 May 2018 15:22:43 GMT
|
52
52
|
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
|
+
- 20180525T152239Z
|
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=a6edcb7489579924dcfc1f37a6f9cabc8b74403288d8ceb4da86c56c117fbec5
|
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 15:22:40 GMT
|
36
36
|
Content-Type:
|
37
37
|
- text/xml
|
38
38
|
Content-Length:
|
@@ -40,12 +40,12 @@ http_interactions:
|
|
40
40
|
Connection:
|
41
41
|
- keep-alive
|
42
42
|
X-Amzn-Requestid:
|
43
|
-
-
|
43
|
+
- 2f378b0f-869c-5426-901e-d88daae3ef94
|
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>2f378b0f-869c-5426-901e-d88daae3ef94</RequestId></ResponseMetadata></GetQueueUrlResponse>
|
47
47
|
http_version:
|
48
|
-
recorded_at:
|
48
|
+
recorded_at: Fri, 25 May 2018 15:22:40 GMT
|
49
49
|
- request:
|
50
50
|
method: post
|
51
51
|
uri: https://sqs.eu-west-1.amazonaws.com/404017989009/test_usage
|
@@ -58,14 +58,14 @@ http_interactions:
|
|
58
58
|
Accept-Encoding:
|
59
59
|
- ''
|
60
60
|
User-Agent:
|
61
|
-
- aws-sdk-ruby3/3.
|
61
|
+
- aws-sdk-ruby3/3.21.2 ruby/2.3.3 x86_64-darwin15 aws-sdk-sqs/1.3.0
|
62
62
|
X-Amz-Date:
|
63
|
-
-
|
63
|
+
- 20180525T152240Z
|
64
64
|
X-Amz-Content-Sha256:
|
65
65
|
- b7f76556fe5b5efa85dad3a27ea532b3b8e01ad962d40f74c728489bf8a4b2f7
|
66
66
|
Authorization:
|
67
|
-
- AWS4-HMAC-SHA256 Credential=AKIAIXLDUBIDM74CC6KQ/
|
68
|
-
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=
|
67
|
+
- AWS4-HMAC-SHA256 Credential=AKIAIXLDUBIDM74CC6KQ/20180525/eu-west-1/sqs/aws4_request,
|
68
|
+
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=9fce997db1327949caa32c285d3115e3898ed83f0362756c3b0628903c254b09
|
69
69
|
Content-Length:
|
70
70
|
- '159'
|
71
71
|
Accept:
|
@@ -78,18 +78,18 @@ http_interactions:
|
|
78
78
|
Server:
|
79
79
|
- Server
|
80
80
|
Date:
|
81
|
-
-
|
81
|
+
- Fri, 25 May 2018 15:22:40 GMT
|
82
82
|
Content-Type:
|
83
83
|
- text/xml
|
84
84
|
Content-Length:
|
85
|
-
- '
|
85
|
+
- '941'
|
86
86
|
Connection:
|
87
87
|
- keep-alive
|
88
88
|
X-Amzn-Requestid:
|
89
|
-
-
|
89
|
+
- 6ba8fb4d-755c-52fd-b60c-a8cf59dcaa55
|
90
90
|
body:
|
91
91
|
encoding: UTF-8
|
92
|
-
string: <?xml version="1.0"?><ReceiveMessageResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><ReceiveMessageResult><Message><MessageId>
|
92
|
+
string: <?xml version="1.0"?><ReceiveMessageResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><ReceiveMessageResult><Message><MessageId>c9476d03-e892-4291-a612-483d220a207e</MessageId><ReceiptHandle>AQEByLu/8sGfo5/FE48jWS1qrKAwHZDpJ24aCd1oWMhxo1J6Ulzqr2og0lhulocEY9yCkmXrmzr3dZxAuOdB6TpQdSBgIQHo4aMq5J2IGUHarELiayUBrEqFg4vYjPrSJTtbKIJ9HQ/XodHz89FfvHSVWqr8VRaY0Qwvsdnnph+9pcAW3/r+QL2plBP34x6m/9JrImX5X5zzg2EtzXKzK/nbwNNywoVKa21eaHpg9ldrmQbTiVrhUvp4htH0eKGsaZS1JADc5FPTqTxXZMhbW6sAGydL9nrPSadDXAsFSHRV6gXlaxan7dDMiEU7tpL0D6+vgGduZqyGsYk84EbP99xZjEak3XIu8J/omaxpiEwxwUXtx0fw+Olj6JTCazm+eDxK</ReceiptHandle><MD5OfBody>bbac5118a088ff64cfde70bb7f0d219b</MD5OfBody><Body>{"report_id":"https://metrics.test.datacite.org/reports/1ff910bc-fe6b-4410-a727-c9ec39990215"}</Body></Message></ReceiveMessageResult><ResponseMetadata><RequestId>6ba8fb4d-755c-52fd-b60c-a8cf59dcaa55</RequestId></ResponseMetadata></ReceiveMessageResponse>
|
93
93
|
http_version:
|
94
|
-
recorded_at:
|
94
|
+
recorded_at: Fri, 25 May 2018 15:22:40 GMT
|
95
95
|
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
|
+
- 20180525T152240Z
|
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=71e8bbe095cc11cde22fd22dfd8eb5958a0bc1e84788c9c07707046beaf97595
|
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 15:22:40 GMT
|
36
36
|
Content-Type:
|
37
37
|
- text/xml
|
38
38
|
Content-Length:
|
@@ -40,12 +40,12 @@ http_interactions:
|
|
40
40
|
Connection:
|
41
41
|
- keep-alive
|
42
42
|
X-Amzn-Requestid:
|
43
|
-
-
|
43
|
+
- 47f72955-18f7-501e-bb30-7ad7347763e7
|
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>47f72955-18f7-501e-bb30-7ad7347763e7</RequestId></ResponseMetadata></GetQueueUrlResponse>
|
47
47
|
http_version:
|
48
|
-
recorded_at:
|
48
|
+
recorded_at: Fri, 25 May 2018 15:22:40 GMT
|
49
49
|
- request:
|
50
50
|
method: post
|
51
51
|
uri: https://sqs.eu-west-1.amazonaws.com/404017989009/test_usage
|
@@ -58,14 +58,14 @@ http_interactions:
|
|
58
58
|
Accept-Encoding:
|
59
59
|
- ''
|
60
60
|
User-Agent:
|
61
|
-
- aws-sdk-ruby3/3.
|
61
|
+
- aws-sdk-ruby3/3.21.2 ruby/2.3.3 x86_64-darwin15 aws-sdk-sqs/1.3.0
|
62
62
|
X-Amz-Date:
|
63
|
-
-
|
63
|
+
- 20180525T152240Z
|
64
64
|
X-Amz-Content-Sha256:
|
65
65
|
- b7f76556fe5b5efa85dad3a27ea532b3b8e01ad962d40f74c728489bf8a4b2f7
|
66
66
|
Authorization:
|
67
|
-
- AWS4-HMAC-SHA256 Credential=AKIAIXLDUBIDM74CC6KQ/
|
68
|
-
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=
|
67
|
+
- AWS4-HMAC-SHA256 Credential=AKIAIXLDUBIDM74CC6KQ/20180525/eu-west-1/sqs/aws4_request,
|
68
|
+
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=9fce997db1327949caa32c285d3115e3898ed83f0362756c3b0628903c254b09
|
69
69
|
Content-Length:
|
70
70
|
- '159'
|
71
71
|
Accept:
|
@@ -78,18 +78,18 @@ http_interactions:
|
|
78
78
|
Server:
|
79
79
|
- Server
|
80
80
|
Date:
|
81
|
-
-
|
81
|
+
- Fri, 25 May 2018 15:22:40 GMT
|
82
82
|
Content-Type:
|
83
83
|
- text/xml
|
84
84
|
Content-Length:
|
85
|
-
- '
|
85
|
+
- '941'
|
86
86
|
Connection:
|
87
87
|
- keep-alive
|
88
88
|
X-Amzn-Requestid:
|
89
|
-
-
|
89
|
+
- ffa8aeb7-6a63-5a52-aa04-fd3546e3ae3d
|
90
90
|
body:
|
91
91
|
encoding: UTF-8
|
92
|
-
string: <?xml version="1.0"?><ReceiveMessageResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><ReceiveMessageResult><Message><MessageId>
|
92
|
+
string: <?xml version="1.0"?><ReceiveMessageResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><ReceiveMessageResult><Message><MessageId>9a6a8a20-e357-45b8-a125-3c59d3fd9f79</MessageId><ReceiptHandle>AQEBaXh+zydlheibEEbsexY1ZWQfN2olRqtH5cPFYXk47TvngfrbpbxXyzeI/hTPyA6nCyr4GnJAXh5uFf/oZ0Aqi+29fCj9vt+NusVN5gEfQWZ3qyTLHXP3R1cAizZBVGO1l63A1Ccht6Gd1IQAEouMKkZAacjdk05jcMLmtCyWt6wGwhrKtp4c/DXAMOfb+21sH8A/NpN5v997HddYBtU+0x4YJxPaIwTQgzz3Gz+Npvi0S+slRyCRwPii2gnSw5kI4kr5fpS058mLySWJ+QHRHhyqR+fPw8KV+JNgl64PSVWS6UNY5FbQLt30YKcuAuaZ8GFNBgPRO4zCHUCYN4Ui5aMPoNulBQrH1p3Ta9SUmtgKK6CxzFn1Wl9pYMHlBYK7</ReceiptHandle><MD5OfBody>bfa6de38511ab45440d0ec2d3f02d480</MD5OfBody><Body>{"report_id":"https://metrics.test.datacite.org/reports/dd0a591a-8ce3-4f65-ab3b-86fdc0ddc18f"}</Body></Message></ReceiveMessageResult><ResponseMetadata><RequestId>ffa8aeb7-6a63-5a52-aa04-fd3546e3ae3d</RequestId></ResponseMetadata></ReceiveMessageResponse>
|
93
93
|
http_version:
|
94
|
-
recorded_at:
|
94
|
+
recorded_at: Fri, 25 May 2018 15:22:40 GMT
|
95
95
|
recorded_with: VCR 3.0.3
|
data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_total/when_is_working_with_AWS.yml
CHANGED
@@ -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
|
+
- 20180525T152238Z
|
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=17bc83aac8908003f36714827be9adbe753390ba30d3e09f79974c430d724bd4
|
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 15:22:39 GMT
|
36
36
|
Content-Type:
|
37
37
|
- text/xml
|
38
38
|
Content-Length:
|
@@ -40,12 +40,12 @@ http_interactions:
|
|
40
40
|
Connection:
|
41
41
|
- keep-alive
|
42
42
|
X-Amzn-Requestid:
|
43
|
-
-
|
43
|
+
- a2287ab8-019f-52aa-b48d-293a2de0b0fa
|
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>a2287ab8-019f-52aa-b48d-293a2de0b0fa</RequestId></ResponseMetadata></GetQueueUrlResponse>
|
47
47
|
http_version:
|
48
|
-
recorded_at:
|
48
|
+
recorded_at: Fri, 25 May 2018 15:22:39 GMT
|
49
49
|
- request:
|
50
50
|
method: post
|
51
51
|
uri: https://sqs.eu-west-1.amazonaws.com/404017989009/test_usage
|
@@ -58,14 +58,14 @@ http_interactions:
|
|
58
58
|
Accept-Encoding:
|
59
59
|
- ''
|
60
60
|
User-Agent:
|
61
|
-
- aws-sdk-ruby3/3.
|
61
|
+
- aws-sdk-ruby3/3.21.2 ruby/2.3.3 x86_64-darwin15 aws-sdk-sqs/1.3.0
|
62
62
|
X-Amz-Date:
|
63
|
-
-
|
63
|
+
- 20180525T152239Z
|
64
64
|
X-Amz-Content-Sha256:
|
65
65
|
- 4fa1f9790ab8d8b778fc048ef890ef00e82c1fd4658cd21964eff9eb5dc9426d
|
66
66
|
Authorization:
|
67
|
-
- AWS4-HMAC-SHA256 Credential=AKIAIXLDUBIDM74CC6KQ/
|
68
|
-
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=
|
67
|
+
- AWS4-HMAC-SHA256 Credential=AKIAIXLDUBIDM74CC6KQ/20180525/eu-west-1/sqs/aws4_request,
|
68
|
+
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=bb69345d3ca1d72c626bd265a9f33169e9d78e353b5a2d521b350034f12a7688
|
69
69
|
Content-Length:
|
70
70
|
- '221'
|
71
71
|
Accept:
|
@@ -78,7 +78,7 @@ http_interactions:
|
|
78
78
|
Server:
|
79
79
|
- Server
|
80
80
|
Date:
|
81
|
-
-
|
81
|
+
- Fri, 25 May 2018 15:22:39 GMT
|
82
82
|
Content-Type:
|
83
83
|
- text/xml
|
84
84
|
Content-Length:
|
@@ -86,12 +86,12 @@ http_interactions:
|
|
86
86
|
Connection:
|
87
87
|
- keep-alive
|
88
88
|
X-Amzn-Requestid:
|
89
|
-
-
|
89
|
+
- 69c1891a-5046-5833-8224-da987c39eb2a
|
90
90
|
body:
|
91
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>
|
92
|
+
string: <?xml version="1.0"?><GetQueueAttributesResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><GetQueueAttributesResult><Attribute><Name>ApproximateNumberOfMessages</Name><Value>3</Value></Attribute><Attribute><Name>ApproximateNumberOfMessagesNotVisible</Name><Value>0</Value></Attribute></GetQueueAttributesResult><ResponseMetadata><RequestId>69c1891a-5046-5833-8224-da987c39eb2a</RequestId></ResponseMetadata></GetQueueAttributesResponse>
|
93
93
|
http_version:
|
94
|
-
recorded_at:
|
94
|
+
recorded_at: Fri, 25 May 2018 15:22:39 GMT
|
95
95
|
- request:
|
96
96
|
method: post
|
97
97
|
uri: https://sqs.eu-west-1.amazonaws.com/
|
@@ -104,14 +104,14 @@ http_interactions:
|
|
104
104
|
Accept-Encoding:
|
105
105
|
- ''
|
106
106
|
User-Agent:
|
107
|
-
- aws-sdk-ruby3/3.
|
107
|
+
- aws-sdk-ruby3/3.21.2 ruby/2.3.3 x86_64-darwin15 aws-sdk-sqs/1.3.0
|
108
108
|
X-Amz-Date:
|
109
|
-
-
|
109
|
+
- 20180525T152239Z
|
110
110
|
X-Amz-Content-Sha256:
|
111
111
|
- 5761efd13dd0ed81182207171d3660628968189941431d6044920ef8fe7b1160
|
112
112
|
Authorization:
|
113
|
-
- AWS4-HMAC-SHA256 Credential=AKIAIXLDUBIDM74CC6KQ/
|
114
|
-
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=
|
113
|
+
- AWS4-HMAC-SHA256 Credential=AKIAIXLDUBIDM74CC6KQ/20180525/eu-west-1/sqs/aws4_request,
|
114
|
+
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=a6edcb7489579924dcfc1f37a6f9cabc8b74403288d8ceb4da86c56c117fbec5
|
115
115
|
Content-Length:
|
116
116
|
- '58'
|
117
117
|
Accept:
|
@@ -124,7 +124,7 @@ http_interactions:
|
|
124
124
|
Server:
|
125
125
|
- Server
|
126
126
|
Date:
|
127
|
-
-
|
127
|
+
- Fri, 25 May 2018 15:22:39 GMT
|
128
128
|
Content-Type:
|
129
129
|
- text/xml
|
130
130
|
Content-Length:
|
@@ -132,12 +132,12 @@ http_interactions:
|
|
132
132
|
Connection:
|
133
133
|
- keep-alive
|
134
134
|
X-Amzn-Requestid:
|
135
|
-
-
|
135
|
+
- e4cc409d-adc5-5279-b06b-131f81ba589e
|
136
136
|
body:
|
137
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>
|
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>e4cc409d-adc5-5279-b06b-131f81ba589e</RequestId></ResponseMetadata></GetQueueUrlResponse>
|
139
139
|
http_version:
|
140
|
-
recorded_at:
|
140
|
+
recorded_at: Fri, 25 May 2018 15:22:39 GMT
|
141
141
|
- request:
|
142
142
|
method: post
|
143
143
|
uri: https://sqs.eu-west-1.amazonaws.com/404017989009/test_usage
|
@@ -150,14 +150,14 @@ http_interactions:
|
|
150
150
|
Accept-Encoding:
|
151
151
|
- ''
|
152
152
|
User-Agent:
|
153
|
-
- aws-sdk-ruby3/3.
|
153
|
+
- aws-sdk-ruby3/3.21.2 ruby/2.3.3 x86_64-darwin15 aws-sdk-sqs/1.3.0
|
154
154
|
X-Amz-Date:
|
155
|
-
-
|
155
|
+
- 20180525T152239Z
|
156
156
|
X-Amz-Content-Sha256:
|
157
157
|
- 4fa1f9790ab8d8b778fc048ef890ef00e82c1fd4658cd21964eff9eb5dc9426d
|
158
158
|
Authorization:
|
159
|
-
- AWS4-HMAC-SHA256 Credential=AKIAIXLDUBIDM74CC6KQ/
|
160
|
-
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=
|
159
|
+
- AWS4-HMAC-SHA256 Credential=AKIAIXLDUBIDM74CC6KQ/20180525/eu-west-1/sqs/aws4_request,
|
160
|
+
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=bb69345d3ca1d72c626bd265a9f33169e9d78e353b5a2d521b350034f12a7688
|
161
161
|
Content-Length:
|
162
162
|
- '221'
|
163
163
|
Accept:
|
@@ -170,7 +170,7 @@ http_interactions:
|
|
170
170
|
Server:
|
171
171
|
- Server
|
172
172
|
Date:
|
173
|
-
-
|
173
|
+
- Fri, 25 May 2018 15:22:39 GMT
|
174
174
|
Content-Type:
|
175
175
|
- text/xml
|
176
176
|
Content-Length:
|
@@ -178,10 +178,10 @@ http_interactions:
|
|
178
178
|
Connection:
|
179
179
|
- keep-alive
|
180
180
|
X-Amzn-Requestid:
|
181
|
-
-
|
181
|
+
- a8320120-9f20-5778-899e-52a2b35f378d
|
182
182
|
body:
|
183
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>
|
184
|
+
string: <?xml version="1.0"?><GetQueueAttributesResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><GetQueueAttributesResult><Attribute><Name>ApproximateNumberOfMessages</Name><Value>3</Value></Attribute><Attribute><Name>ApproximateNumberOfMessagesNotVisible</Name><Value>0</Value></Attribute></GetQueueAttributesResult><ResponseMetadata><RequestId>a8320120-9f20-5778-899e-52a2b35f378d</RequestId></ResponseMetadata></GetQueueAttributesResponse>
|
185
185
|
http_version:
|
186
|
-
recorded_at:
|
186
|
+
recorded_at: Fri, 25 May 2018 15:22:39 GMT
|
187
187
|
recorded_with: VCR 3.0.3
|