cirneco 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/lib/cirneco/utils.rb +29 -6
  4. data/lib/cirneco/version.rb +1 -1
  5. data/lib/cirneco/work.rb +1 -2
  6. data/spec/fixtures/cool-dois/index.html +2 -2
  7. data/spec/fixtures/cool-dois-minted/index.html +2 -2
  8. data/spec/fixtures/cool-dois-missing-metadata/index.html +1 -1
  9. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_hide_for_all_urls.yml +5 -5
  10. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_hide_for_url.yml +2 -2
  11. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_hide_metadata_for_work.yml +2 -2
  12. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_mint_and_hide_for_all_urls.yml +52 -8
  13. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_mint_and_hide_for_url.yml +48 -4
  14. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_mint_for_all_urls.yml +52 -8
  15. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_mint_for_url.yml +48 -4
  16. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_post_metadata_for_work.yml +48 -4
  17. data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/hides_a_doi.yml +2 -2
  18. data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/mints_a_doi.yml +48 -4
  19. data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/mints_and_hides_a_doi.yml +48 -4
  20. data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/mints_and_hides_dois_for_list_of_urls.yml +52 -8
  21. data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/mints_dois_for_list_of_urls.yml +52 -8
  22. data/spec/utils_spec.rb +1 -1
  23. data/spec/work_spec.rb +9 -2
  24. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cb83e2ba847c15f6b7f779ea62d20a983042852a
4
- data.tar.gz: 4c963c5d5cff08b57d147eb264f8273e8478a9ac
3
+ metadata.gz: 89239807e74798c6a3ca673c4cbced208ea25667
4
+ data.tar.gz: 3900aa91452714e72d0e7a86968092225b80f534
5
5
  SHA512:
6
- metadata.gz: 00596a6374fd39f60a0bc37a1963059289dad2e1b147d01aaee046c34525f289527a47de8274e47f917a496ca07c396ce7da147c4f786fa223db510520dbaa4c
7
- data.tar.gz: c20f46389d2523ef2c6079e997e04b228a4dcba679e9d474c9657718d7921f844e373150a0e2b06a48635757c4063e32dd70b675a084c4a90a30e574a5d35729
6
+ metadata.gz: f8177522d6ffeacbb9872f20ce2f1d5dfd198c2176c7689cf2cf05073df7f0435379bc4d2260b76e29b626dbfd760931dd694fb459bedf39ad600205eb29d3a5
7
+ data.tar.gz: 95415e4c5353333015fc498435bd360b6f9ec56b639cb1f06664a0a63d6ae3fac0dfacbab6c539895ffee6b6051081466736ccbc5d331fdc722ae1357104a27c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cirneco (0.9.1)
4
+ cirneco (0.9.2)
5
5
  activesupport (~> 4.2, >= 4.2.5)
6
6
  base32-crockford-checksum (~> 0.2.2)
7
7
  bergamasco (~> 0.3)
@@ -122,4 +122,4 @@ DEPENDENCIES
122
122
  webmock (~> 1.22, >= 1.22.3)
123
123
 
124
124
  BUNDLED WITH
125
- 1.13.6
125
+ 1.12.5
data/lib/cirneco/utils.rb CHANGED
@@ -109,7 +109,7 @@ module Cirneco
109
109
  return "DOI #{metadata["doi"]} not changed for #{filename}" if metadata["doi"] && metadata["date_issued"]
110
110
 
111
111
  response = post_metadata_for_work(metadata, options)
112
- return "Errors for DOI #{metadata["doi"]}: #{response.body['errors'].first['title']}\n" if response.body['errors']
112
+ return "Errors for DOI #{metadata["doi"]}: #{response.body['errors'].first['title']}\n" if response.body['errors'].present?
113
113
 
114
114
  new_metadata = Bergamasco::Markdown.update_file(source_path, "doi" => metadata["doi"], "published" => true)
115
115
  "DOI #{new_metadata["doi"]} minted for #{filename}"
@@ -123,7 +123,7 @@ module Cirneco
123
123
  return "DOI #{metadata["doi"]} not changed for #{filename}" if metadata["doi"] && metadata["date_issued"]
124
124
 
125
125
  response = post_metadata_for_work(metadata, options)
126
- return "Errors for DOI #{metadata["doi"]}: #{response.body['errors'].first['title']}\n" if response.body['errors']
126
+ return "Errors for DOI #{metadata["doi"]}: #{response.body['errors'].first['title']}\n" if response.body['errors'].present?
127
127
 
128
128
  new_metadata = Bergamasco::Markdown.update_file(source_path, "doi" => metadata["doi"], "published" => false)
129
129
  "DOI #{new_metadata["doi"]} minted and hidden for #{filename}"
@@ -139,7 +139,7 @@ module Cirneco
139
139
  return "DOI #{metadata["doi"]} not active for #{filename}" unless metadata["date_issued"]
140
140
 
141
141
  response = hide_metadata_for_work(metadata, options)
142
- return "Errors for DOI #{metadata["doi"]}: #{response.body['errors'].first['title']}\n" if response.body['errors']
142
+ return "Errors for DOI #{metadata["doi"]}: #{response.body['errors'].first['title']}\n" if response.body['errors'].present?
143
143
 
144
144
  new_metadata = Bergamasco::Markdown.update_file(source_path, "published" => false)
145
145
  "DOI #{metadata["doi"]} hidden for #{filename}"
@@ -231,13 +231,15 @@ module Cirneco
231
231
  metadata["subjects"] = Array(metadata["keywords"].split(", ")).select { |k| k != "featured" }
232
232
  end
233
233
 
234
+ metadata["media"] = format_media(metadata)
235
+
234
236
  metadata["date_created"] = metadata["dateCreated"]
235
237
  metadata["date_issued"] = metadata["datePublished"]
236
238
  metadata["date_updated"] = metadata["dateModified"]
237
239
 
238
240
  metadata = metadata.extract!(*%w(doi alternate_identifier url creators title
239
241
  publisher publication_year resource_type descriptions version rights_list
240
- subjects date_issued date_created date_updated related_identifiers))
242
+ subjects date_issued date_created date_updated related_identifiers media))
241
243
  end
242
244
 
243
245
  def post_metadata_for_work(metadata, options={})
@@ -250,7 +252,14 @@ module Cirneco
250
252
  response = work.post_metadata(work.data, options)
251
253
  return response unless response.status == 201
252
254
 
253
- work.put_doi(metadata["doi"], options.merge(url: metadata["url"]))
255
+ response = work.put_doi(metadata["doi"], options.merge(url: metadata["url"]))
256
+ return response unless response.status == 201
257
+
258
+ if work.media.present?
259
+ work.post_media(metadata["doi"], options.merge(media: work.media))
260
+ else
261
+ response
262
+ end
254
263
  end
255
264
 
256
265
  def post_and_hide_metadata_for_work(metadata, options={})
@@ -266,7 +275,14 @@ module Cirneco
266
275
  response = work.put_doi(metadata["doi"], options.merge(url: metadata["url"]))
267
276
  return response unless response.status == 201
268
277
 
269
- work.delete_metadata(metadata["doi"], options)
278
+ response = work.delete_metadata(metadata["doi"], options)
279
+ return response unless response.status == 201
280
+
281
+ if work.media.present?
282
+ work.post_media(metadata["doi"], options.merge(media: work.media))
283
+ else
284
+ response
285
+ end
270
286
  end
271
287
 
272
288
  def hide_metadata_for_work(metadata, options={})
@@ -402,6 +418,13 @@ module Cirneco
402
418
  end.select { |t| t[:related_identifier_type].present? }
403
419
  end
404
420
 
421
+ def format_media(metadata)
422
+ [metadata["encoding"]].compact.map do |m|
423
+ { mime_type: m["fileFormat"],
424
+ url: m["@id"] }
425
+ end
426
+ end
427
+
405
428
  def filepath_from_url(url, options={})
406
429
  if doi_from_url(url)
407
430
  response = Maremma.head(url, limit: 0)
@@ -1,3 +1,3 @@
1
1
  module Cirneco
2
- VERSION = "0.9.1"
2
+ VERSION = "0.9.2"
3
3
  end
data/lib/cirneco/work.rb CHANGED
@@ -31,8 +31,7 @@ module Cirneco
31
31
  @contributors = metadata.fetch("contributors", nil)
32
32
  @alternate_identifier = metadata.fetch("alternate_identifier", nil)
33
33
  @related_identifiers = metadata.fetch("related_identifiers", nil)
34
-
35
- @media = options.fetch(:media, nil)
34
+ @media = metadata.fetch("media", nil)
36
35
 
37
36
  @username = options.fetch(:username, nil)
38
37
  @password = options.fetch(:password, nil)
@@ -74,8 +74,8 @@
74
74
  "image": "https://blog.datacite.org/images/2016/12/cool-dois.png",
75
75
  "encoding": {
76
76
  "@type": "MediaObject",
77
- "@id": "https://raw.githubusercontent.com/datacite/blog/master/source/posts/cool-dois.html.md",
78
- "fileFormat": "text/markdown"
77
+ "@id": "https://blog.datacite.org/cool-dois/cool-dois.xml",
78
+ "fileFormat": "application/xml"
79
79
  },
80
80
  "isPartOf": {
81
81
  "@type": "Blog",
@@ -74,8 +74,8 @@
74
74
  "image": "https://blog.datacite.org/images/2016/12/cool-dois.png",
75
75
  "encoding": {
76
76
  "@type": "MediaObject",
77
- "@id": "https://raw.githubusercontent.com/datacite/blog/master/source/posts/cool-dois.html.md",
78
- "fileFormat": "text/markdown"
77
+ "@id": "https://blog.datacite.org/cool-dois/0000-03WD.xml",
78
+ "fileFormat": "application/xml"
79
79
  },
80
80
  "isPartOf": {
81
81
  "@type": "Blog",
@@ -44,7 +44,7 @@
44
44
  <link href="/images/favicon.ico" rel="icon" type="image/ico" />
45
45
 
46
46
  <script type="application/ld+json">
47
- {"@context":"http://schema.org","@type":"BlogPosting","@id":"https://blog.datacite.org/cool-dois/", "alternateName":"MS-55-5135-1980","url":"https://blog.datacite.org/cool-dois/","author":[{"@type":"Person","@id":"http://orcid.org/0000-0003-1419-2405","givenName":"Martin","familyName":"Fenner","name":"Martin Fenner"}],"publisher":{"@type":"Organization","name":"DataCite"},"dateCreated":"2016-12-15","datePublished":"2016-12-15","dateModified":"2016-12-15","keywords":"doi, featured","version":"1.0","description":"In 1998 Tim Berners-Lee coined the term cool URIs (1998), that is URIs that don’t change. We know that URLs referenced in the scholarly literature are often not cool, leading to link rot (Klein et al., 2014) and making it hard or impossible to find...","license":"https://creativecommons.org/licenses/by/4.0/","image":"https://blog.datacite.org/images/2016/12/cool-dois.png","encoding":{"@type":"MediaObject","@id":"https://raw.githubusercontent.com/datacite/blog/master/source/posts/cool-dois.html.md","fileFormat":"text/markdown"},"isPartOf":{"@type":"Blog","@id":"https://blog.datacite.org","name":"DataCite Blog"},"citation":[{"@type":"CreativeWork","@id":"https://www.w3.org/Provider/Style/URI"},{"@type":"CreativeWork","@id":"https://doi.org/10.1371/journal.pone.0115253"}]}
47
+ {"@context":"http://schema.org","@type":"BlogPosting","@id":"https://blog.datacite.org/cool-dois/", "alternateName":"MS-55-5135-1980","url":"https://blog.datacite.org/cool-dois/","author":[{"@type":"Person","@id":"http://orcid.org/0000-0003-1419-2405","givenName":"Martin","familyName":"Fenner","name":"Martin Fenner"}],"publisher":{"@type":"Organization","name":"DataCite"},"dateCreated":"2016-12-15","datePublished":"2016-12-15","dateModified":"2016-12-15","keywords":"doi, featured","version":"1.0","description":"In 1998 Tim Berners-Lee coined the term cool URIs (1998), that is URIs that don’t change. We know that URLs referenced in the scholarly literature are often not cool, leading to link rot (Klein et al., 2014) and making it hard or impossible to find...","license":"https://creativecommons.org/licenses/by/4.0/","image":"https://blog.datacite.org/images/2016/12/cool-dois.png","encoding":{"@type":"MediaObject","@id":"https://blog.datacite.org/cool-dois/cool-dois.xml","fileFormat":"application/xml"},"isPartOf":{"@type":"Blog","@id":"https://blog.datacite.org","name":"DataCite Blog"},"citation":[{"@type":"CreativeWork","@id":"https://www.w3.org/Provider/Style/URI"},{"@type":"CreativeWork","@id":"https://doi.org/10.1371/journal.pone.0115253"}]}
48
48
  </script>
49
49
  </head>
50
50
  <body>
@@ -23,18 +23,18 @@ http_interactions:
23
23
  Location:
24
24
  - https://blog.datacite.org/cool-dois/
25
25
  Expires:
26
- - Mon, 02 Jan 2017 09:38:08 GMT
26
+ - Mon, 02 Jan 2017 21:39:42 GMT
27
27
  Content-Type:
28
28
  - text/html;charset=utf-8
29
29
  Content-Length:
30
30
  - '157'
31
31
  Date:
32
- - Mon, 02 Jan 2017 09:36:56 GMT
32
+ - Mon, 02 Jan 2017 21:21:31 GMT
33
33
  body:
34
34
  encoding: UTF-8
35
35
  string: ''
36
36
  http_version:
37
- recorded_at: Mon, 02 Jan 2017 09:36:57 GMT
37
+ recorded_at: Mon, 02 Jan 2017 21:21:32 GMT
38
38
  - request:
39
39
  method: delete
40
40
  uri: https://mds-sandbox.datacite.org/metadata/10.5072/0000-NW90
@@ -56,7 +56,7 @@ http_interactions:
56
56
  Server:
57
57
  - openresty/1.11.2.1
58
58
  Date:
59
- - Mon, 02 Jan 2017 09:36:57 GMT
59
+ - Mon, 02 Jan 2017 21:21:33 GMT
60
60
  Content-Length:
61
61
  - '17'
62
62
  Connection:
@@ -75,5 +75,5 @@ http_interactions:
75
75
  encoding: UTF-8
76
76
  string: DOI doesn't exist
77
77
  http_version:
78
- recorded_at: Mon, 02 Jan 2017 09:36:57 GMT
78
+ recorded_at: Mon, 02 Jan 2017 21:21:33 GMT
79
79
  recorded_with: VCR 3.0.3
@@ -21,7 +21,7 @@ http_interactions:
21
21
  Server:
22
22
  - openresty/1.11.2.1
23
23
  Date:
24
- - Mon, 02 Jan 2017 09:16:14 GMT
24
+ - Mon, 02 Jan 2017 21:21:20 GMT
25
25
  Content-Type:
26
26
  - text/html;charset=UTF-8
27
27
  Connection:
@@ -40,5 +40,5 @@ http_interactions:
40
40
  encoding: UTF-8
41
41
  string: OK
42
42
  http_version:
43
- recorded_at: Mon, 02 Jan 2017 09:16:14 GMT
43
+ recorded_at: Mon, 02 Jan 2017 21:21:20 GMT
44
44
  recorded_with: VCR 3.0.3
@@ -21,7 +21,7 @@ http_interactions:
21
21
  Server:
22
22
  - openresty/1.11.2.1
23
23
  Date:
24
- - Mon, 02 Jan 2017 09:16:28 GMT
24
+ - Mon, 02 Jan 2017 21:21:37 GMT
25
25
  Content-Type:
26
26
  - text/html;charset=UTF-8
27
27
  Connection:
@@ -40,5 +40,5 @@ http_interactions:
40
40
  encoding: UTF-8
41
41
  string: OK
42
42
  http_version:
43
- recorded_at: Mon, 02 Jan 2017 09:16:28 GMT
43
+ recorded_at: Mon, 02 Jan 2017 21:21:37 GMT
44
44
  recorded_with: VCR 3.0.3
@@ -37,6 +37,7 @@ http_interactions:
37
37
  <relatedIdentifiers>
38
38
  <relatedIdentifier relatedIdentifierType="URL" relationType="References">https://www.w3.org/Provider/Style/URI</relatedIdentifier>
39
39
  <relatedIdentifier relatedIdentifierType="DOI" relationType="References">10.1371/JOURNAL.PONE.0115253</relatedIdentifier>
40
+ <relatedIdentifier relatedIdentifierType="URL" relationType="IsPartOf">https://blog.datacite.org/</relatedIdentifier>
40
41
  </relatedIdentifiers>
41
42
  <version>1.0</version>
42
43
  <descriptions>
@@ -60,7 +61,7 @@ http_interactions:
60
61
  Server:
61
62
  - openresty/1.11.2.1
62
63
  Date:
63
- - Mon, 02 Jan 2017 09:36:58 GMT
64
+ - Mon, 02 Jan 2017 21:21:34 GMT
64
65
  Content-Type:
65
66
  - text/html;charset=UTF-8
66
67
  Connection:
@@ -81,7 +82,7 @@ http_interactions:
81
82
  encoding: UTF-8
82
83
  string: OK (10.5072/0000-03VC)
83
84
  http_version:
84
- recorded_at: Mon, 02 Jan 2017 09:36:58 GMT
85
+ recorded_at: Mon, 02 Jan 2017 21:21:34 GMT
85
86
  - request:
86
87
  method: put
87
88
  uri: https://mds-sandbox.datacite.org/doi/10.5072/0000-03VC
@@ -107,7 +108,7 @@ http_interactions:
107
108
  Server:
108
109
  - openresty/1.11.2.1
109
110
  Date:
110
- - Mon, 02 Jan 2017 09:36:58 GMT
111
+ - Mon, 02 Jan 2017 21:21:34 GMT
111
112
  Content-Type:
112
113
  - text/html;charset=UTF-8
113
114
  Connection:
@@ -126,7 +127,50 @@ http_interactions:
126
127
  encoding: UTF-8
127
128
  string: OK
128
129
  http_version:
129
- recorded_at: Mon, 02 Jan 2017 09:36:58 GMT
130
+ recorded_at: Mon, 02 Jan 2017 21:21:34 GMT
131
+ - request:
132
+ method: post
133
+ uri: https://mds-sandbox.datacite.org/media/10.5072/0000-03VC
134
+ body:
135
+ encoding: UTF-8
136
+ string: application/xml=https://blog.datacite.org/cool-dois/cool-dois.xml
137
+ headers:
138
+ User-Agent:
139
+ - Maremma - https://github.com/datacite/maremma
140
+ Content-Type:
141
+ - text/plain;charset=UTF-8
142
+ Accept:
143
+ - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
144
+ Authorization:
145
+ - Basic <MDS_TOKEN>
146
+ response:
147
+ status:
148
+ code: 200
149
+ message: ''
150
+ headers:
151
+ Server:
152
+ - openresty/1.11.2.1
153
+ Date:
154
+ - Mon, 02 Jan 2017 21:21:35 GMT
155
+ Content-Type:
156
+ - text/html;charset=UTF-8
157
+ Connection:
158
+ - keep-alive
159
+ Pragma:
160
+ - no-cache
161
+ Expires:
162
+ - Thu, 01 Jan 1970 00:00:00 GMT
163
+ Cache-Control:
164
+ - no-cache, no-store
165
+ Access-Control-Allow-Origin:
166
+ - "*"
167
+ Access-Control-Allow-Methods:
168
+ - GET, POST, OPTIONS
169
+ body:
170
+ encoding: UTF-8
171
+ string: OK
172
+ http_version:
173
+ recorded_at: Mon, 02 Jan 2017 21:21:35 GMT
130
174
  - request:
131
175
  method: post
132
176
  uri: https://mds-sandbox.datacite.org/metadata
@@ -198,7 +242,7 @@ http_interactions:
198
242
  Server:
199
243
  - openresty/1.11.2.1
200
244
  Date:
201
- - Mon, 02 Jan 2017 09:36:58 GMT
245
+ - Mon, 02 Jan 2017 21:21:35 GMT
202
246
  Content-Type:
203
247
  - text/html;charset=UTF-8
204
248
  Connection:
@@ -219,7 +263,7 @@ http_interactions:
219
263
  encoding: UTF-8
220
264
  string: OK (10.5072/0000-00SS)
221
265
  http_version:
222
- recorded_at: Mon, 02 Jan 2017 09:36:58 GMT
266
+ recorded_at: Mon, 02 Jan 2017 21:21:35 GMT
223
267
  - request:
224
268
  method: put
225
269
  uri: https://mds-sandbox.datacite.org/doi/10.5072/0000-00SS
@@ -245,7 +289,7 @@ http_interactions:
245
289
  Server:
246
290
  - openresty/1.11.2.1
247
291
  Date:
248
- - Mon, 02 Jan 2017 09:36:59 GMT
292
+ - Mon, 02 Jan 2017 21:21:36 GMT
249
293
  Content-Type:
250
294
  - text/html;charset=UTF-8
251
295
  Connection:
@@ -264,5 +308,5 @@ http_interactions:
264
308
  encoding: UTF-8
265
309
  string: OK
266
310
  http_version:
267
- recorded_at: Mon, 02 Jan 2017 09:36:59 GMT
311
+ recorded_at: Mon, 02 Jan 2017 21:21:36 GMT
268
312
  recorded_with: VCR 3.0.3
@@ -37,6 +37,7 @@ http_interactions:
37
37
  <relatedIdentifiers>
38
38
  <relatedIdentifier relatedIdentifierType="URL" relationType="References">https://www.w3.org/Provider/Style/URI</relatedIdentifier>
39
39
  <relatedIdentifier relatedIdentifierType="DOI" relationType="References">10.1371/JOURNAL.PONE.0115253</relatedIdentifier>
40
+ <relatedIdentifier relatedIdentifierType="URL" relationType="IsPartOf">https://blog.datacite.org/</relatedIdentifier>
40
41
  </relatedIdentifiers>
41
42
  <version>1.0</version>
42
43
  <descriptions>
@@ -60,7 +61,7 @@ http_interactions:
60
61
  Server:
61
62
  - openresty/1.11.2.1
62
63
  Date:
63
- - Mon, 02 Jan 2017 11:18:15 GMT
64
+ - Mon, 02 Jan 2017 21:21:20 GMT
64
65
  Content-Type:
65
66
  - text/html;charset=UTF-8
66
67
  Connection:
@@ -81,7 +82,7 @@ http_interactions:
81
82
  encoding: UTF-8
82
83
  string: OK (10.5072/0000-03VC)
83
84
  http_version:
84
- recorded_at: Mon, 02 Jan 2017 11:18:15 GMT
85
+ recorded_at: Mon, 02 Jan 2017 21:21:20 GMT
85
86
  - request:
86
87
  method: put
87
88
  uri: https://mds-sandbox.datacite.org/doi/10.5072/0000-03VC
@@ -107,7 +108,7 @@ http_interactions:
107
108
  Server:
108
109
  - openresty/1.11.2.1
109
110
  Date:
110
- - Mon, 02 Jan 2017 11:18:15 GMT
111
+ - Mon, 02 Jan 2017 21:21:21 GMT
111
112
  Content-Type:
112
113
  - text/html;charset=UTF-8
113
114
  Connection:
@@ -126,5 +127,48 @@ http_interactions:
126
127
  encoding: UTF-8
127
128
  string: OK
128
129
  http_version:
129
- recorded_at: Mon, 02 Jan 2017 11:18:15 GMT
130
+ recorded_at: Mon, 02 Jan 2017 21:21:21 GMT
131
+ - request:
132
+ method: post
133
+ uri: https://mds-sandbox.datacite.org/media/10.5072/0000-03VC
134
+ body:
135
+ encoding: UTF-8
136
+ string: application/xml=https://blog.datacite.org/cool-dois/cool-dois.xml
137
+ headers:
138
+ User-Agent:
139
+ - Maremma - https://github.com/datacite/maremma
140
+ Content-Type:
141
+ - text/plain;charset=UTF-8
142
+ Accept:
143
+ - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
144
+ Authorization:
145
+ - Basic <MDS_TOKEN>
146
+ response:
147
+ status:
148
+ code: 200
149
+ message: ''
150
+ headers:
151
+ Server:
152
+ - openresty/1.11.2.1
153
+ Date:
154
+ - Mon, 02 Jan 2017 21:21:21 GMT
155
+ Content-Type:
156
+ - text/html;charset=UTF-8
157
+ Connection:
158
+ - keep-alive
159
+ Pragma:
160
+ - no-cache
161
+ Expires:
162
+ - Thu, 01 Jan 1970 00:00:00 GMT
163
+ Cache-Control:
164
+ - no-cache, no-store
165
+ Access-Control-Allow-Origin:
166
+ - "*"
167
+ Access-Control-Allow-Methods:
168
+ - GET, POST, OPTIONS
169
+ body:
170
+ encoding: UTF-8
171
+ string: OK
172
+ http_version:
173
+ recorded_at: Mon, 02 Jan 2017 21:21:21 GMT
130
174
  recorded_with: VCR 3.0.3
@@ -37,6 +37,7 @@ http_interactions:
37
37
  <relatedIdentifiers>
38
38
  <relatedIdentifier relatedIdentifierType="URL" relationType="References">https://www.w3.org/Provider/Style/URI</relatedIdentifier>
39
39
  <relatedIdentifier relatedIdentifierType="DOI" relationType="References">10.1371/JOURNAL.PONE.0115253</relatedIdentifier>
40
+ <relatedIdentifier relatedIdentifierType="URL" relationType="IsPartOf">https://blog.datacite.org/</relatedIdentifier>
40
41
  </relatedIdentifiers>
41
42
  <version>1.0</version>
42
43
  <descriptions>
@@ -60,7 +61,7 @@ http_interactions:
60
61
  Server:
61
62
  - openresty/1.11.2.1
62
63
  Date:
63
- - Mon, 02 Jan 2017 09:36:47 GMT
64
+ - Mon, 02 Jan 2017 21:21:21 GMT
64
65
  Content-Type:
65
66
  - text/html;charset=UTF-8
66
67
  Connection:
@@ -81,7 +82,7 @@ http_interactions:
81
82
  encoding: UTF-8
82
83
  string: OK (10.5072/0000-03VC)
83
84
  http_version:
84
- recorded_at: Mon, 02 Jan 2017 09:36:47 GMT
85
+ recorded_at: Mon, 02 Jan 2017 21:21:21 GMT
85
86
  - request:
86
87
  method: put
87
88
  uri: https://mds-sandbox.datacite.org/doi/10.5072/0000-03VC
@@ -107,7 +108,7 @@ http_interactions:
107
108
  Server:
108
109
  - openresty/1.11.2.1
109
110
  Date:
110
- - Mon, 02 Jan 2017 09:36:47 GMT
111
+ - Mon, 02 Jan 2017 21:21:22 GMT
111
112
  Content-Type:
112
113
  - text/html;charset=UTF-8
113
114
  Connection:
@@ -126,7 +127,50 @@ http_interactions:
126
127
  encoding: UTF-8
127
128
  string: OK
128
129
  http_version:
129
- recorded_at: Mon, 02 Jan 2017 09:36:48 GMT
130
+ recorded_at: Mon, 02 Jan 2017 21:21:22 GMT
131
+ - request:
132
+ method: post
133
+ uri: https://mds-sandbox.datacite.org/media/10.5072/0000-03VC
134
+ body:
135
+ encoding: UTF-8
136
+ string: application/xml=https://blog.datacite.org/cool-dois/cool-dois.xml
137
+ headers:
138
+ User-Agent:
139
+ - Maremma - https://github.com/datacite/maremma
140
+ Content-Type:
141
+ - text/plain;charset=UTF-8
142
+ Accept:
143
+ - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
144
+ Authorization:
145
+ - Basic <MDS_TOKEN>
146
+ response:
147
+ status:
148
+ code: 200
149
+ message: ''
150
+ headers:
151
+ Server:
152
+ - openresty/1.11.2.1
153
+ Date:
154
+ - Mon, 02 Jan 2017 21:21:22 GMT
155
+ Content-Type:
156
+ - text/html;charset=UTF-8
157
+ Connection:
158
+ - keep-alive
159
+ Pragma:
160
+ - no-cache
161
+ Expires:
162
+ - Thu, 01 Jan 1970 00:00:00 GMT
163
+ Cache-Control:
164
+ - no-cache, no-store
165
+ Access-Control-Allow-Origin:
166
+ - "*"
167
+ Access-Control-Allow-Methods:
168
+ - GET, POST, OPTIONS
169
+ body:
170
+ encoding: UTF-8
171
+ string: OK
172
+ http_version:
173
+ recorded_at: Mon, 02 Jan 2017 21:21:22 GMT
130
174
  - request:
131
175
  method: post
132
176
  uri: https://mds-sandbox.datacite.org/metadata
@@ -198,7 +242,7 @@ http_interactions:
198
242
  Server:
199
243
  - openresty/1.11.2.1
200
244
  Date:
201
- - Mon, 02 Jan 2017 09:36:48 GMT
245
+ - Mon, 02 Jan 2017 21:21:23 GMT
202
246
  Content-Type:
203
247
  - text/html;charset=UTF-8
204
248
  Connection:
@@ -219,7 +263,7 @@ http_interactions:
219
263
  encoding: UTF-8
220
264
  string: OK (10.5072/0000-00SS)
221
265
  http_version:
222
- recorded_at: Mon, 02 Jan 2017 09:36:48 GMT
266
+ recorded_at: Mon, 02 Jan 2017 21:21:23 GMT
223
267
  - request:
224
268
  method: put
225
269
  uri: https://mds-sandbox.datacite.org/doi/10.5072/0000-00SS
@@ -245,7 +289,7 @@ http_interactions:
245
289
  Server:
246
290
  - openresty/1.11.2.1
247
291
  Date:
248
- - Mon, 02 Jan 2017 09:36:48 GMT
292
+ - Mon, 02 Jan 2017 21:21:23 GMT
249
293
  Content-Type:
250
294
  - text/html;charset=UTF-8
251
295
  Connection:
@@ -264,5 +308,5 @@ http_interactions:
264
308
  encoding: UTF-8
265
309
  string: OK
266
310
  http_version:
267
- recorded_at: Mon, 02 Jan 2017 09:36:48 GMT
311
+ recorded_at: Mon, 02 Jan 2017 21:21:23 GMT
268
312
  recorded_with: VCR 3.0.3
@@ -37,6 +37,7 @@ http_interactions:
37
37
  <relatedIdentifiers>
38
38
  <relatedIdentifier relatedIdentifierType="URL" relationType="References">https://www.w3.org/Provider/Style/URI</relatedIdentifier>
39
39
  <relatedIdentifier relatedIdentifierType="DOI" relationType="References">10.1371/JOURNAL.PONE.0115253</relatedIdentifier>
40
+ <relatedIdentifier relatedIdentifierType="URL" relationType="IsPartOf">https://blog.datacite.org/</relatedIdentifier>
40
41
  </relatedIdentifiers>
41
42
  <version>1.0</version>
42
43
  <descriptions>
@@ -60,7 +61,7 @@ http_interactions:
60
61
  Server:
61
62
  - openresty/1.11.2.1
62
63
  Date:
63
- - Mon, 02 Jan 2017 11:18:14 GMT
64
+ - Mon, 02 Jan 2017 21:21:19 GMT
64
65
  Content-Type:
65
66
  - text/html;charset=UTF-8
66
67
  Connection:
@@ -81,7 +82,7 @@ http_interactions:
81
82
  encoding: UTF-8
82
83
  string: OK (10.5072/0000-03VC)
83
84
  http_version:
84
- recorded_at: Mon, 02 Jan 2017 11:18:14 GMT
85
+ recorded_at: Mon, 02 Jan 2017 21:21:19 GMT
85
86
  - request:
86
87
  method: put
87
88
  uri: https://mds-sandbox.datacite.org/doi/10.5072/0000-03VC
@@ -107,7 +108,7 @@ http_interactions:
107
108
  Server:
108
109
  - openresty/1.11.2.1
109
110
  Date:
110
- - Mon, 02 Jan 2017 11:18:14 GMT
111
+ - Mon, 02 Jan 2017 21:21:19 GMT
111
112
  Content-Type:
112
113
  - text/html;charset=UTF-8
113
114
  Connection:
@@ -126,5 +127,48 @@ http_interactions:
126
127
  encoding: UTF-8
127
128
  string: OK
128
129
  http_version:
129
- recorded_at: Mon, 02 Jan 2017 11:18:14 GMT
130
+ recorded_at: Mon, 02 Jan 2017 21:21:19 GMT
131
+ - request:
132
+ method: post
133
+ uri: https://mds-sandbox.datacite.org/media/10.5072/0000-03VC
134
+ body:
135
+ encoding: UTF-8
136
+ string: application/xml=https://blog.datacite.org/cool-dois/cool-dois.xml
137
+ headers:
138
+ User-Agent:
139
+ - Maremma - https://github.com/datacite/maremma
140
+ Content-Type:
141
+ - text/plain;charset=UTF-8
142
+ Accept:
143
+ - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
144
+ Authorization:
145
+ - Basic <MDS_TOKEN>
146
+ response:
147
+ status:
148
+ code: 200
149
+ message: ''
150
+ headers:
151
+ Server:
152
+ - openresty/1.11.2.1
153
+ Date:
154
+ - Mon, 02 Jan 2017 21:21:19 GMT
155
+ Content-Type:
156
+ - text/html;charset=UTF-8
157
+ Connection:
158
+ - keep-alive
159
+ Pragma:
160
+ - no-cache
161
+ Expires:
162
+ - Thu, 01 Jan 1970 00:00:00 GMT
163
+ Cache-Control:
164
+ - no-cache, no-store
165
+ Access-Control-Allow-Origin:
166
+ - "*"
167
+ Access-Control-Allow-Methods:
168
+ - GET, POST, OPTIONS
169
+ body:
170
+ encoding: UTF-8
171
+ string: OK
172
+ http_version:
173
+ recorded_at: Mon, 02 Jan 2017 21:21:19 GMT
130
174
  recorded_with: VCR 3.0.3
@@ -37,6 +37,7 @@ http_interactions:
37
37
  <relatedIdentifiers>
38
38
  <relatedIdentifier relatedIdentifierType="URL" relationType="References">https://www.w3.org/Provider/Style/URI</relatedIdentifier>
39
39
  <relatedIdentifier relatedIdentifierType="DOI" relationType="References">10.1371/JOURNAL.PONE.0115253</relatedIdentifier>
40
+ <relatedIdentifier relatedIdentifierType="URL" relationType="IsPartOf">https://blog.datacite.org/</relatedIdentifier>
40
41
  </relatedIdentifiers>
41
42
  <version>1.0</version>
42
43
  <descriptions>
@@ -60,7 +61,7 @@ http_interactions:
60
61
  Server:
61
62
  - openresty/1.11.2.1
62
63
  Date:
63
- - Mon, 02 Jan 2017 09:16:27 GMT
64
+ - Mon, 02 Jan 2017 21:21:36 GMT
64
65
  Content-Type:
65
66
  - text/html;charset=UTF-8
66
67
  Connection:
@@ -81,7 +82,7 @@ http_interactions:
81
82
  encoding: UTF-8
82
83
  string: OK (10.5072/0000-03VC)
83
84
  http_version:
84
- recorded_at: Mon, 02 Jan 2017 09:16:27 GMT
85
+ recorded_at: Mon, 02 Jan 2017 21:21:36 GMT
85
86
  - request:
86
87
  method: put
87
88
  uri: https://mds-sandbox.datacite.org/doi/10.5072/0000-03VC
@@ -107,7 +108,7 @@ http_interactions:
107
108
  Server:
108
109
  - openresty/1.11.2.1
109
110
  Date:
110
- - Mon, 02 Jan 2017 09:16:27 GMT
111
+ - Mon, 02 Jan 2017 21:21:37 GMT
111
112
  Content-Type:
112
113
  - text/html;charset=UTF-8
113
114
  Connection:
@@ -126,5 +127,48 @@ http_interactions:
126
127
  encoding: UTF-8
127
128
  string: OK
128
129
  http_version:
129
- recorded_at: Mon, 02 Jan 2017 09:16:27 GMT
130
+ recorded_at: Mon, 02 Jan 2017 21:21:37 GMT
131
+ - request:
132
+ method: post
133
+ uri: https://mds-sandbox.datacite.org/media/10.5072/0000-03VC
134
+ body:
135
+ encoding: UTF-8
136
+ string: application/xml=https://blog.datacite.org/cool-dois/cool-dois.xml
137
+ headers:
138
+ User-Agent:
139
+ - Maremma - https://github.com/datacite/maremma
140
+ Content-Type:
141
+ - text/plain;charset=UTF-8
142
+ Accept:
143
+ - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
144
+ Authorization:
145
+ - Basic <MDS_TOKEN>
146
+ response:
147
+ status:
148
+ code: 200
149
+ message: ''
150
+ headers:
151
+ Server:
152
+ - openresty/1.11.2.1
153
+ Date:
154
+ - Mon, 02 Jan 2017 21:21:37 GMT
155
+ Content-Type:
156
+ - text/html;charset=UTF-8
157
+ Connection:
158
+ - keep-alive
159
+ Pragma:
160
+ - no-cache
161
+ Expires:
162
+ - Thu, 01 Jan 1970 00:00:00 GMT
163
+ Cache-Control:
164
+ - no-cache, no-store
165
+ Access-Control-Allow-Origin:
166
+ - "*"
167
+ Access-Control-Allow-Methods:
168
+ - GET, POST, OPTIONS
169
+ body:
170
+ encoding: UTF-8
171
+ string: OK
172
+ http_version:
173
+ recorded_at: Mon, 02 Jan 2017 21:21:37 GMT
130
174
  recorded_with: VCR 3.0.3
@@ -21,7 +21,7 @@ http_interactions:
21
21
  Server:
22
22
  - openresty/1.11.2.1
23
23
  Date:
24
- - Mon, 02 Jan 2017 11:19:24 GMT
24
+ - Mon, 02 Jan 2017 21:28:25 GMT
25
25
  Content-Type:
26
26
  - text/html;charset=UTF-8
27
27
  Connection:
@@ -40,5 +40,5 @@ http_interactions:
40
40
  encoding: UTF-8
41
41
  string: OK
42
42
  http_version:
43
- recorded_at: Mon, 02 Jan 2017 11:19:24 GMT
43
+ recorded_at: Mon, 02 Jan 2017 21:28:25 GMT
44
44
  recorded_with: VCR 3.0.3
@@ -37,6 +37,7 @@ http_interactions:
37
37
  <relatedIdentifiers>
38
38
  <relatedIdentifier relatedIdentifierType="URL" relationType="References">https://www.w3.org/Provider/Style/URI</relatedIdentifier>
39
39
  <relatedIdentifier relatedIdentifierType="DOI" relationType="References">10.1371/JOURNAL.PONE.0115253</relatedIdentifier>
40
+ <relatedIdentifier relatedIdentifierType="URL" relationType="IsPartOf">https://blog.datacite.org/</relatedIdentifier>
40
41
  </relatedIdentifiers>
41
42
  <version>1.0</version>
42
43
  <descriptions>
@@ -60,7 +61,7 @@ http_interactions:
60
61
  Server:
61
62
  - openresty/1.11.2.1
62
63
  Date:
63
- - Mon, 02 Jan 2017 11:19:23 GMT
64
+ - Mon, 02 Jan 2017 21:28:24 GMT
64
65
  Content-Type:
65
66
  - text/html;charset=UTF-8
66
67
  Connection:
@@ -81,7 +82,7 @@ http_interactions:
81
82
  encoding: UTF-8
82
83
  string: OK (10.5072/0000-03VC)
83
84
  http_version:
84
- recorded_at: Mon, 02 Jan 2017 11:19:23 GMT
85
+ recorded_at: Mon, 02 Jan 2017 21:28:24 GMT
85
86
  - request:
86
87
  method: put
87
88
  uri: https://mds-sandbox.datacite.org/doi/10.5072/0000-03VC
@@ -107,7 +108,7 @@ http_interactions:
107
108
  Server:
108
109
  - openresty/1.11.2.1
109
110
  Date:
110
- - Mon, 02 Jan 2017 11:19:23 GMT
111
+ - Mon, 02 Jan 2017 21:28:24 GMT
111
112
  Content-Type:
112
113
  - text/html;charset=UTF-8
113
114
  Connection:
@@ -126,5 +127,48 @@ http_interactions:
126
127
  encoding: UTF-8
127
128
  string: OK
128
129
  http_version:
129
- recorded_at: Mon, 02 Jan 2017 11:19:24 GMT
130
+ recorded_at: Mon, 02 Jan 2017 21:28:24 GMT
131
+ - request:
132
+ method: post
133
+ uri: https://mds-sandbox.datacite.org/media/10.5072/0000-03VC
134
+ body:
135
+ encoding: UTF-8
136
+ string: application/xml=https://blog.datacite.org/cool-dois/cool-dois.xml
137
+ headers:
138
+ User-Agent:
139
+ - Maremma - https://github.com/datacite/maremma
140
+ Content-Type:
141
+ - text/plain;charset=UTF-8
142
+ Accept:
143
+ - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
144
+ Authorization:
145
+ - Basic <MDS_TOKEN>
146
+ response:
147
+ status:
148
+ code: 200
149
+ message: ''
150
+ headers:
151
+ Server:
152
+ - openresty/1.11.2.1
153
+ Date:
154
+ - Mon, 02 Jan 2017 21:28:24 GMT
155
+ Content-Type:
156
+ - text/html;charset=UTF-8
157
+ Connection:
158
+ - keep-alive
159
+ Pragma:
160
+ - no-cache
161
+ Expires:
162
+ - Thu, 01 Jan 1970 00:00:00 GMT
163
+ Cache-Control:
164
+ - no-cache, no-store
165
+ Access-Control-Allow-Origin:
166
+ - "*"
167
+ Access-Control-Allow-Methods:
168
+ - GET, POST, OPTIONS
169
+ body:
170
+ encoding: UTF-8
171
+ string: OK
172
+ http_version:
173
+ recorded_at: Mon, 02 Jan 2017 21:28:24 GMT
130
174
  recorded_with: VCR 3.0.3
@@ -37,6 +37,7 @@ http_interactions:
37
37
  <relatedIdentifiers>
38
38
  <relatedIdentifier relatedIdentifierType="URL" relationType="References">https://www.w3.org/Provider/Style/URI</relatedIdentifier>
39
39
  <relatedIdentifier relatedIdentifierType="DOI" relationType="References">10.1371/JOURNAL.PONE.0115253</relatedIdentifier>
40
+ <relatedIdentifier relatedIdentifierType="URL" relationType="IsPartOf">https://blog.datacite.org/</relatedIdentifier>
40
41
  </relatedIdentifiers>
41
42
  <version>1.0</version>
42
43
  <descriptions>
@@ -60,7 +61,7 @@ http_interactions:
60
61
  Server:
61
62
  - openresty/1.11.2.1
62
63
  Date:
63
- - Mon, 02 Jan 2017 11:19:25 GMT
64
+ - Mon, 02 Jan 2017 21:28:25 GMT
64
65
  Content-Type:
65
66
  - text/html;charset=UTF-8
66
67
  Connection:
@@ -81,7 +82,7 @@ http_interactions:
81
82
  encoding: UTF-8
82
83
  string: OK (10.5072/0000-03VC)
83
84
  http_version:
84
- recorded_at: Mon, 02 Jan 2017 11:19:25 GMT
85
+ recorded_at: Mon, 02 Jan 2017 21:28:25 GMT
85
86
  - request:
86
87
  method: put
87
88
  uri: https://mds-sandbox.datacite.org/doi/10.5072/0000-03VC
@@ -107,7 +108,7 @@ http_interactions:
107
108
  Server:
108
109
  - openresty/1.11.2.1
109
110
  Date:
110
- - Mon, 02 Jan 2017 11:19:25 GMT
111
+ - Mon, 02 Jan 2017 21:28:25 GMT
111
112
  Content-Type:
112
113
  - text/html;charset=UTF-8
113
114
  Connection:
@@ -126,5 +127,48 @@ http_interactions:
126
127
  encoding: UTF-8
127
128
  string: OK
128
129
  http_version:
129
- recorded_at: Mon, 02 Jan 2017 11:19:26 GMT
130
+ recorded_at: Mon, 02 Jan 2017 21:28:25 GMT
131
+ - request:
132
+ method: post
133
+ uri: https://mds-sandbox.datacite.org/media/10.5072/0000-03VC
134
+ body:
135
+ encoding: UTF-8
136
+ string: application/xml=https://blog.datacite.org/cool-dois/cool-dois.xml
137
+ headers:
138
+ User-Agent:
139
+ - Maremma - https://github.com/datacite/maremma
140
+ Content-Type:
141
+ - text/plain;charset=UTF-8
142
+ Accept:
143
+ - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
144
+ Authorization:
145
+ - Basic <MDS_TOKEN>
146
+ response:
147
+ status:
148
+ code: 200
149
+ message: ''
150
+ headers:
151
+ Server:
152
+ - openresty/1.11.2.1
153
+ Date:
154
+ - Mon, 02 Jan 2017 21:28:26 GMT
155
+ Content-Type:
156
+ - text/html;charset=UTF-8
157
+ Connection:
158
+ - keep-alive
159
+ Pragma:
160
+ - no-cache
161
+ Expires:
162
+ - Thu, 01 Jan 1970 00:00:00 GMT
163
+ Cache-Control:
164
+ - no-cache, no-store
165
+ Access-Control-Allow-Origin:
166
+ - "*"
167
+ Access-Control-Allow-Methods:
168
+ - GET, POST, OPTIONS
169
+ body:
170
+ encoding: UTF-8
171
+ string: OK
172
+ http_version:
173
+ recorded_at: Mon, 02 Jan 2017 21:28:26 GMT
130
174
  recorded_with: VCR 3.0.3
@@ -37,6 +37,7 @@ http_interactions:
37
37
  <relatedIdentifiers>
38
38
  <relatedIdentifier relatedIdentifierType="URL" relationType="References">https://www.w3.org/Provider/Style/URI</relatedIdentifier>
39
39
  <relatedIdentifier relatedIdentifierType="DOI" relationType="References">10.1371/JOURNAL.PONE.0115253</relatedIdentifier>
40
+ <relatedIdentifier relatedIdentifierType="URL" relationType="IsPartOf">https://blog.datacite.org/</relatedIdentifier>
40
41
  </relatedIdentifiers>
41
42
  <version>1.0</version>
42
43
  <descriptions>
@@ -60,7 +61,7 @@ http_interactions:
60
61
  Server:
61
62
  - openresty/1.11.2.1
62
63
  Date:
63
- - Mon, 02 Jan 2017 09:43:06 GMT
64
+ - Mon, 02 Jan 2017 21:28:29 GMT
64
65
  Content-Type:
65
66
  - text/html;charset=UTF-8
66
67
  Connection:
@@ -81,7 +82,7 @@ http_interactions:
81
82
  encoding: UTF-8
82
83
  string: OK (10.5072/0000-03VC)
83
84
  http_version:
84
- recorded_at: Mon, 02 Jan 2017 09:43:06 GMT
85
+ recorded_at: Mon, 02 Jan 2017 21:28:29 GMT
85
86
  - request:
86
87
  method: put
87
88
  uri: https://mds-sandbox.datacite.org/doi/10.5072/0000-03VC
@@ -107,7 +108,7 @@ http_interactions:
107
108
  Server:
108
109
  - openresty/1.11.2.1
109
110
  Date:
110
- - Mon, 02 Jan 2017 09:43:06 GMT
111
+ - Mon, 02 Jan 2017 21:28:30 GMT
111
112
  Content-Type:
112
113
  - text/html;charset=UTF-8
113
114
  Connection:
@@ -126,7 +127,50 @@ http_interactions:
126
127
  encoding: UTF-8
127
128
  string: OK
128
129
  http_version:
129
- recorded_at: Mon, 02 Jan 2017 09:43:06 GMT
130
+ recorded_at: Mon, 02 Jan 2017 21:28:30 GMT
131
+ - request:
132
+ method: post
133
+ uri: https://mds-sandbox.datacite.org/media/10.5072/0000-03VC
134
+ body:
135
+ encoding: UTF-8
136
+ string: application/xml=https://blog.datacite.org/cool-dois/cool-dois.xml
137
+ headers:
138
+ User-Agent:
139
+ - Maremma - https://github.com/datacite/maremma
140
+ Content-Type:
141
+ - text/plain;charset=UTF-8
142
+ Accept:
143
+ - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
144
+ Authorization:
145
+ - Basic <MDS_TOKEN>
146
+ response:
147
+ status:
148
+ code: 200
149
+ message: ''
150
+ headers:
151
+ Server:
152
+ - openresty/1.11.2.1
153
+ Date:
154
+ - Mon, 02 Jan 2017 21:28:30 GMT
155
+ Content-Type:
156
+ - text/html;charset=UTF-8
157
+ Connection:
158
+ - keep-alive
159
+ Pragma:
160
+ - no-cache
161
+ Expires:
162
+ - Thu, 01 Jan 1970 00:00:00 GMT
163
+ Cache-Control:
164
+ - no-cache, no-store
165
+ Access-Control-Allow-Origin:
166
+ - "*"
167
+ Access-Control-Allow-Methods:
168
+ - GET, POST, OPTIONS
169
+ body:
170
+ encoding: UTF-8
171
+ string: OK
172
+ http_version:
173
+ recorded_at: Mon, 02 Jan 2017 21:28:31 GMT
130
174
  - request:
131
175
  method: post
132
176
  uri: https://mds-sandbox.datacite.org/metadata
@@ -198,7 +242,7 @@ http_interactions:
198
242
  Server:
199
243
  - openresty/1.11.2.1
200
244
  Date:
201
- - Mon, 02 Jan 2017 09:43:07 GMT
245
+ - Mon, 02 Jan 2017 21:28:31 GMT
202
246
  Content-Type:
203
247
  - text/html;charset=UTF-8
204
248
  Connection:
@@ -219,7 +263,7 @@ http_interactions:
219
263
  encoding: UTF-8
220
264
  string: OK (10.5072/0000-00SS)
221
265
  http_version:
222
- recorded_at: Mon, 02 Jan 2017 09:43:07 GMT
266
+ recorded_at: Mon, 02 Jan 2017 21:28:31 GMT
223
267
  - request:
224
268
  method: put
225
269
  uri: https://mds-sandbox.datacite.org/doi/10.5072/0000-00SS
@@ -245,7 +289,7 @@ http_interactions:
245
289
  Server:
246
290
  - openresty/1.11.2.1
247
291
  Date:
248
- - Mon, 02 Jan 2017 09:43:07 GMT
292
+ - Mon, 02 Jan 2017 21:28:31 GMT
249
293
  Content-Type:
250
294
  - text/html;charset=UTF-8
251
295
  Connection:
@@ -264,5 +308,5 @@ http_interactions:
264
308
  encoding: UTF-8
265
309
  string: OK
266
310
  http_version:
267
- recorded_at: Mon, 02 Jan 2017 09:43:07 GMT
311
+ recorded_at: Mon, 02 Jan 2017 21:28:31 GMT
268
312
  recorded_with: VCR 3.0.3
@@ -37,6 +37,7 @@ http_interactions:
37
37
  <relatedIdentifiers>
38
38
  <relatedIdentifier relatedIdentifierType="URL" relationType="References">https://www.w3.org/Provider/Style/URI</relatedIdentifier>
39
39
  <relatedIdentifier relatedIdentifierType="DOI" relationType="References">10.1371/JOURNAL.PONE.0115253</relatedIdentifier>
40
+ <relatedIdentifier relatedIdentifierType="URL" relationType="IsPartOf">https://blog.datacite.org/</relatedIdentifier>
40
41
  </relatedIdentifiers>
41
42
  <version>1.0</version>
42
43
  <descriptions>
@@ -60,7 +61,7 @@ http_interactions:
60
61
  Server:
61
62
  - openresty/1.11.2.1
62
63
  Date:
63
- - Mon, 02 Jan 2017 09:43:04 GMT
64
+ - Mon, 02 Jan 2017 21:28:26 GMT
64
65
  Content-Type:
65
66
  - text/html;charset=UTF-8
66
67
  Connection:
@@ -81,7 +82,7 @@ http_interactions:
81
82
  encoding: UTF-8
82
83
  string: OK (10.5072/0000-03VC)
83
84
  http_version:
84
- recorded_at: Mon, 02 Jan 2017 09:43:04 GMT
85
+ recorded_at: Mon, 02 Jan 2017 21:28:26 GMT
85
86
  - request:
86
87
  method: put
87
88
  uri: https://mds-sandbox.datacite.org/doi/10.5072/0000-03VC
@@ -107,7 +108,7 @@ http_interactions:
107
108
  Server:
108
109
  - openresty/1.11.2.1
109
110
  Date:
110
- - Mon, 02 Jan 2017 09:43:05 GMT
111
+ - Mon, 02 Jan 2017 21:28:26 GMT
111
112
  Content-Type:
112
113
  - text/html;charset=UTF-8
113
114
  Connection:
@@ -126,7 +127,50 @@ http_interactions:
126
127
  encoding: UTF-8
127
128
  string: OK
128
129
  http_version:
129
- recorded_at: Mon, 02 Jan 2017 09:43:05 GMT
130
+ recorded_at: Mon, 02 Jan 2017 21:28:27 GMT
131
+ - request:
132
+ method: post
133
+ uri: https://mds-sandbox.datacite.org/media/10.5072/0000-03VC
134
+ body:
135
+ encoding: UTF-8
136
+ string: application/xml=https://blog.datacite.org/cool-dois/cool-dois.xml
137
+ headers:
138
+ User-Agent:
139
+ - Maremma - https://github.com/datacite/maremma
140
+ Content-Type:
141
+ - text/plain;charset=UTF-8
142
+ Accept:
143
+ - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
144
+ Authorization:
145
+ - Basic <MDS_TOKEN>
146
+ response:
147
+ status:
148
+ code: 200
149
+ message: ''
150
+ headers:
151
+ Server:
152
+ - openresty/1.11.2.1
153
+ Date:
154
+ - Mon, 02 Jan 2017 21:28:27 GMT
155
+ Content-Type:
156
+ - text/html;charset=UTF-8
157
+ Connection:
158
+ - keep-alive
159
+ Pragma:
160
+ - no-cache
161
+ Expires:
162
+ - Thu, 01 Jan 1970 00:00:00 GMT
163
+ Cache-Control:
164
+ - no-cache, no-store
165
+ Access-Control-Allow-Origin:
166
+ - "*"
167
+ Access-Control-Allow-Methods:
168
+ - GET, POST, OPTIONS
169
+ body:
170
+ encoding: UTF-8
171
+ string: OK
172
+ http_version:
173
+ recorded_at: Mon, 02 Jan 2017 21:28:27 GMT
130
174
  - request:
131
175
  method: post
132
176
  uri: https://mds-sandbox.datacite.org/metadata
@@ -198,7 +242,7 @@ http_interactions:
198
242
  Server:
199
243
  - openresty/1.11.2.1
200
244
  Date:
201
- - Mon, 02 Jan 2017 09:43:05 GMT
245
+ - Mon, 02 Jan 2017 21:28:27 GMT
202
246
  Content-Type:
203
247
  - text/html;charset=UTF-8
204
248
  Connection:
@@ -219,7 +263,7 @@ http_interactions:
219
263
  encoding: UTF-8
220
264
  string: OK (10.5072/0000-00SS)
221
265
  http_version:
222
- recorded_at: Mon, 02 Jan 2017 09:43:05 GMT
266
+ recorded_at: Mon, 02 Jan 2017 21:28:28 GMT
223
267
  - request:
224
268
  method: put
225
269
  uri: https://mds-sandbox.datacite.org/doi/10.5072/0000-00SS
@@ -245,7 +289,7 @@ http_interactions:
245
289
  Server:
246
290
  - openresty/1.11.2.1
247
291
  Date:
248
- - Mon, 02 Jan 2017 09:43:05 GMT
292
+ - Mon, 02 Jan 2017 21:28:28 GMT
249
293
  Content-Type:
250
294
  - text/html;charset=UTF-8
251
295
  Connection:
@@ -264,5 +308,5 @@ http_interactions:
264
308
  encoding: UTF-8
265
309
  string: OK
266
310
  http_version:
267
- recorded_at: Mon, 02 Jan 2017 09:43:05 GMT
311
+ recorded_at: Mon, 02 Jan 2017 21:28:28 GMT
268
312
  recorded_with: VCR 3.0.3
data/spec/utils_spec.rb CHANGED
@@ -184,7 +184,7 @@ describe Cirneco::DataCenter, vcr: true, :order => :defined do
184
184
  metadata = subject.generate_metadata_for_work(filepath)
185
185
  response = subject.post_metadata_for_work(metadata, options)
186
186
  expect(response.body["data"]).to eq("OK")
187
- expect(response.status).to eq(201)
187
+ expect(response.status).to eq(200)
188
188
  end
189
189
 
190
190
  it 'should hide_metadata_for_work' do
data/spec/work_spec.rb CHANGED
@@ -11,6 +11,7 @@ describe Cirneco::Work, vcr: true do
11
11
  let(:subjects) { ["000 computer science"] }
12
12
  let(:descriptions) { [{ value: "XML example of all DataCite Metadata Schema v4.0 properties.", description_type: "Abstract" }] }
13
13
  let(:rights_list) { [{ value: "CC0 1.0 Universal", rights_uri: "http://creativecommons.org/publicdomain/zero/1.0/" }] }
14
+ let(:media) { [{ mime_type: "application/pdf", url:"http://www.datacite.org/cirneco-test.pdf" }]}
14
15
  let(:metadata) { { "doi" => doi,
15
16
  "url" => url,
16
17
  "creators" => creators,
@@ -20,8 +21,8 @@ describe Cirneco::Work, vcr: true do
20
21
  "resource_type" => resource_type,
21
22
  "subjects" => subjects,
22
23
  "descriptions" => descriptions,
23
- "rights_list" => rights_list } }
24
- let(:media) { [{ mime_type: "application/pdf", url:"http://www.datacite.org/cirneco-test.pdf" }]}
24
+ "rights_list" => rights_list,
25
+ "media" => media } }
25
26
  let(:username) { ENV['MDS_USERNAME'] }
26
27
  let(:password) { ENV['MDS_PASSWORD'] }
27
28
  let(:fixture_path) { "spec/fixtures/" }
@@ -54,4 +55,10 @@ describe Cirneco::Work, vcr: true do
54
55
  {"title"=>"Element '{http://datacite.org/schema/kernel-4}title': '' is not a valid value of the atomic type '{http://datacite.org/schema/kernel-4}nonemptycontentStringType'."}])
55
56
  end
56
57
  end
58
+
59
+ describe 'media' do
60
+ it 'includes media' do
61
+ expect(subject.media).to eq([{:mime_type=>"application/pdf", :url=>"http://www.datacite.org/cirneco-test.pdf"}])
62
+ end
63
+ end
57
64
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cirneco
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner