cirneco 0.9.12 → 0.9.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +124 -49
- data/cirneco.gemspec +5 -4
- data/lib/cirneco/api.rb +8 -8
- data/lib/cirneco/base.rb +2 -2
- data/lib/cirneco/cli.rb +1 -1
- data/lib/cirneco/utils.rb +48 -95
- data/lib/cirneco/version.rb +1 -1
- data/lib/cirneco/work.rb +8 -203
- data/spec/api_spec.rb +16 -28
- data/spec/doi_spec.rb +9 -11
- data/spec/fixtures/cool-dois-minted/index.html +189 -234
- data/spec/fixtures/cool-dois-minted.html.md +1 -1
- data/spec/fixtures/cool-dois.html.md +2 -2
- data/spec/fixtures/index-minted.html +1 -1
- data/spec/fixtures/index.html +50 -1
- data/spec/fixtures/index.html.erb +2 -2
- data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/get/should_get_all_dois_by_prefix.yml +20 -18
- data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/jats/should_generate_jats_for_all_urls.yml +38 -0
- data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_hide_for_all_urls.yml +20 -20
- data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_hide_for_url.yml +19 -17
- data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_hide_metadata_for_work.yml +19 -17
- data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_mint_and_hide_for_all_urls.yml +204 -108
- data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_mint_and_hide_for_url.yml +72 -64
- data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_mint_for_all_urls.yml +17 -291
- data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_post_metadata_for_work.yml +47 -82
- data/spec/fixtures/vcr_cassettes/Cirneco_Doi/MDS_DOI_API/get/should_get_all_dois.yml +22 -18
- data/spec/fixtures/vcr_cassettes/Cirneco_Doi/MDS_DOI_API/get/should_get_doi.yml +19 -17
- data/spec/fixtures/vcr_cassettes/Cirneco_Doi/MDS_DOI_API/put/should_put_doi.yml +20 -18
- data/spec/fixtures/vcr_cassettes/Cirneco_Doi/jats/writes_jats_for_list_of_urls.yml +38 -0
- data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/hides_a_doi.yml +19 -17
- data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/hides_dois_for_list_of_urls.yml +81 -0
- data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/mints_and_hides_a_doi.yml +72 -64
- data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/mints_and_hides_dois_for_list_of_urls.yml +204 -108
- data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/mints_dois_for_list_of_urls.yml +17 -291
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/DOI_API/get/should_get_all_dois.yml +140 -18
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/DOI_API/get/should_get_doi.yml +137 -17
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/DOI_API/get/should_get_doi_not_found.yml +134 -16
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/DOI_API/get/username_missing.yml +121 -0
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/DOI_API/put/should_put_doi.yml +138 -18
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/Media_API/get/should_get_media.yml +135 -17
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/Media_API/post/should_post_media.yml +137 -17
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/Metadata_API/delete/should_delete_metadata.yml +137 -17
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/Metadata_API/get/should_get_metadata.yml +170 -27
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/Metadata_API/post/should_post_metadata.yml +173 -28
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/media/includes_media.yml +121 -0
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/schema/BlogPosting.yml +121 -0
- data/spec/spec_helper.rb +1 -1
- data/spec/utils_spec.rb +28 -41
- data/spec/work_spec.rb +33 -43
- metadata +43 -19
- data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_mint_for_url.yml +0 -174
- data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/mints_a_doi.yml +0 -174
@@ -2,19 +2,19 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://mds
|
5
|
+
uri: https://mds.test.datacite.org/metadata
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: |
|
9
9
|
<?xml version="1.0" encoding="UTF-8"?>
|
10
10
|
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://datacite.org/schema/kernel-4" xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4/metadata.xsd">
|
11
|
-
<identifier identifierType="DOI">10.
|
11
|
+
<identifier identifierType="DOI">10.5438/0000-03VC</identifier>
|
12
12
|
<creators>
|
13
13
|
<creator>
|
14
14
|
<creatorName>Fenner, Martin</creatorName>
|
15
15
|
<givenName>Martin</givenName>
|
16
16
|
<familyName>Fenner</familyName>
|
17
|
-
<nameIdentifier schemeURI="http://orcid.org/" nameIdentifierScheme="ORCID">0000-0003-1419-2405</nameIdentifier>
|
17
|
+
<nameIdentifier schemeURI="http://orcid.org/" nameIdentifierScheme="ORCID">http://orcid.org/0000-0003-1419-2405</nameIdentifier>
|
18
18
|
</creator>
|
19
19
|
</creators>
|
20
20
|
<titles>
|
@@ -24,10 +24,11 @@ http_interactions:
|
|
24
24
|
<publicationYear>2016</publicationYear>
|
25
25
|
<resourceType resourceTypeGeneral="Text">BlogPosting</resourceType>
|
26
26
|
<alternateIdentifiers>
|
27
|
-
<alternateIdentifier alternateIdentifierType="
|
27
|
+
<alternateIdentifier alternateIdentifierType=""/>
|
28
28
|
</alternateIdentifiers>
|
29
29
|
<subjects>
|
30
30
|
<subject>doi</subject>
|
31
|
+
<subject>featured</subject>
|
31
32
|
</subjects>
|
32
33
|
<dates>
|
33
34
|
<date dateType="Created">2016-12-15</date>
|
@@ -35,11 +36,14 @@ http_interactions:
|
|
35
36
|
<date dateType="Updated">2016-12-15</date>
|
36
37
|
</dates>
|
37
38
|
<relatedIdentifiers>
|
38
|
-
<relatedIdentifier relatedIdentifierType="URL" relationType="References">https://www.w3.org/Provider/Style/URI</relatedIdentifier>
|
39
|
-
<relatedIdentifier relatedIdentifierType="DOI" relationType="References">10.1371/JOURNAL.PONE.0115253</relatedIdentifier>
|
40
39
|
<relatedIdentifier relatedIdentifierType="URL" relationType="IsPartOf">https://blog.datacite.org/</relatedIdentifier>
|
40
|
+
<relatedIdentifier relatedIdentifierType="URL" relationType="References">https://www.w3.org/Provider/Style/URI</relatedIdentifier>
|
41
|
+
<relatedIdentifier relatedIdentifierType="DOI" relationType="References">https://doi.org/10.1371/journal.pone.0115253</relatedIdentifier>
|
41
42
|
</relatedIdentifiers>
|
42
43
|
<version>1.0</version>
|
44
|
+
<rightsList>
|
45
|
+
<rights rightsURI="https://creativecommons.org/licenses/by/4.0/"/>
|
46
|
+
</rightsList>
|
43
47
|
<descriptions>
|
44
48
|
<description descriptionType="Abstract">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...</description>
|
45
49
|
</descriptions>
|
@@ -56,40 +60,42 @@ http_interactions:
|
|
56
60
|
response:
|
57
61
|
status:
|
58
62
|
code: 201
|
59
|
-
message:
|
63
|
+
message: Created
|
60
64
|
headers:
|
61
|
-
|
62
|
-
-
|
63
|
-
|
64
|
-
-
|
65
|
+
Access-Control-Allow-Methods:
|
66
|
+
- GET, POST, OPTIONS
|
67
|
+
Access-Control-Allow-Origin:
|
68
|
+
- "*"
|
69
|
+
Cache-Control:
|
70
|
+
- no-cache, no-store
|
65
71
|
Content-Type:
|
66
72
|
- text/html;charset=UTF-8
|
67
|
-
|
68
|
-
-
|
69
|
-
Pragma:
|
70
|
-
- no-cache
|
73
|
+
Date:
|
74
|
+
- Sat, 22 Jul 2017 07:18:31 GMT
|
71
75
|
Expires:
|
72
76
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
73
|
-
Cache-Control:
|
74
|
-
- no-cache, no-store
|
75
77
|
Location:
|
76
|
-
- http://mds
|
77
|
-
|
78
|
-
-
|
79
|
-
|
80
|
-
-
|
78
|
+
- http://mds.test.datacite.org/metadata/10.5438/0000-03VC
|
79
|
+
Pragma:
|
80
|
+
- no-cache
|
81
|
+
Server:
|
82
|
+
- openresty/1.11.2.2
|
83
|
+
Content-Length:
|
84
|
+
- '22'
|
85
|
+
Connection:
|
86
|
+
- keep-alive
|
81
87
|
body:
|
82
88
|
encoding: UTF-8
|
83
|
-
string: OK (10.
|
89
|
+
string: OK (10.5438/0000-03VC)
|
84
90
|
http_version:
|
85
|
-
recorded_at:
|
91
|
+
recorded_at: Sat, 22 Jul 2017 07:18:30 GMT
|
86
92
|
- request:
|
87
93
|
method: put
|
88
|
-
uri: https://mds
|
94
|
+
uri: https://mds.test.datacite.org/doi/10.5438/0000-03VC
|
89
95
|
body:
|
90
96
|
encoding: UTF-8
|
91
97
|
string: |-
|
92
|
-
doi=10.
|
98
|
+
doi=10.5438/0000-03VC
|
93
99
|
url=https://blog.datacite.org/cool-dois/
|
94
100
|
headers:
|
95
101
|
User-Agent:
|
@@ -103,42 +109,42 @@ http_interactions:
|
|
103
109
|
response:
|
104
110
|
status:
|
105
111
|
code: 201
|
106
|
-
message:
|
112
|
+
message: Created
|
107
113
|
headers:
|
108
|
-
|
109
|
-
-
|
110
|
-
|
111
|
-
-
|
114
|
+
Access-Control-Allow-Methods:
|
115
|
+
- GET, POST, OPTIONS
|
116
|
+
Access-Control-Allow-Origin:
|
117
|
+
- "*"
|
118
|
+
Cache-Control:
|
119
|
+
- no-cache, no-store
|
112
120
|
Content-Type:
|
113
121
|
- text/html;charset=UTF-8
|
114
|
-
|
115
|
-
-
|
116
|
-
Pragma:
|
117
|
-
- no-cache
|
122
|
+
Date:
|
123
|
+
- Sat, 22 Jul 2017 07:18:32 GMT
|
118
124
|
Expires:
|
119
125
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
120
|
-
|
121
|
-
- no-cache
|
122
|
-
|
123
|
-
-
|
124
|
-
|
125
|
-
-
|
126
|
+
Pragma:
|
127
|
+
- no-cache
|
128
|
+
Server:
|
129
|
+
- openresty/1.11.2.2
|
130
|
+
Content-Length:
|
131
|
+
- '2'
|
132
|
+
Connection:
|
133
|
+
- keep-alive
|
126
134
|
body:
|
127
135
|
encoding: UTF-8
|
128
136
|
string: OK
|
129
137
|
http_version:
|
130
|
-
recorded_at:
|
138
|
+
recorded_at: Sat, 22 Jul 2017 07:18:31 GMT
|
131
139
|
- request:
|
132
|
-
method:
|
133
|
-
uri: https://mds
|
140
|
+
method: delete
|
141
|
+
uri: https://mds.test.datacite.org/metadata/10.5438/0000-03VC
|
134
142
|
body:
|
135
|
-
encoding:
|
136
|
-
string:
|
143
|
+
encoding: US-ASCII
|
144
|
+
string: ''
|
137
145
|
headers:
|
138
146
|
User-Agent:
|
139
147
|
- Maremma - https://github.com/datacite/maremma
|
140
|
-
Content-Type:
|
141
|
-
- text/plain;charset=UTF-8
|
142
148
|
Accept:
|
143
149
|
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
144
150
|
Authorization:
|
@@ -146,29 +152,31 @@ http_interactions:
|
|
146
152
|
response:
|
147
153
|
status:
|
148
154
|
code: 200
|
149
|
-
message:
|
155
|
+
message: OK
|
150
156
|
headers:
|
151
|
-
|
152
|
-
-
|
153
|
-
|
154
|
-
-
|
157
|
+
Access-Control-Allow-Methods:
|
158
|
+
- GET, POST, OPTIONS
|
159
|
+
Access-Control-Allow-Origin:
|
160
|
+
- "*"
|
161
|
+
Cache-Control:
|
162
|
+
- no-cache, no-store
|
155
163
|
Content-Type:
|
156
164
|
- text/html;charset=UTF-8
|
157
|
-
|
158
|
-
-
|
159
|
-
Pragma:
|
160
|
-
- no-cache
|
165
|
+
Date:
|
166
|
+
- Sat, 22 Jul 2017 07:18:32 GMT
|
161
167
|
Expires:
|
162
168
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
163
|
-
|
164
|
-
- no-cache
|
165
|
-
|
166
|
-
-
|
167
|
-
|
168
|
-
-
|
169
|
+
Pragma:
|
170
|
+
- no-cache
|
171
|
+
Server:
|
172
|
+
- openresty/1.11.2.2
|
173
|
+
Content-Length:
|
174
|
+
- '2'
|
175
|
+
Connection:
|
176
|
+
- keep-alive
|
169
177
|
body:
|
170
178
|
encoding: UTF-8
|
171
179
|
string: OK
|
172
180
|
http_version:
|
173
|
-
recorded_at:
|
181
|
+
recorded_at: Sat, 22 Jul 2017 07:18:31 GMT
|
174
182
|
recorded_with: VCR 3.0.3
|