cirneco 0.9.13 → 0.9.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/cirneco/data_center.rb +5 -0
- data/lib/cirneco/doi.rb +6 -1
- data/lib/cirneco/file_utils.rb +368 -0
- data/lib/cirneco/media.rb +3 -1
- data/lib/cirneco/metadata.rb +2 -0
- data/lib/cirneco/utils.rb +5 -379
- data/lib/cirneco/version.rb +1 -1
- data/lib/cirneco/work.rb +2 -0
- data/spec/api_spec.rb +3 -3
- data/spec/doi_spec.rb +7 -7
- data/spec/file_utils_spec.rb +203 -0
- data/spec/fixtures/cool-dois-minted/index.html +1 -1
- data/spec/fixtures/cool-dois-minted.html.md +1 -1
- data/spec/fixtures/cool-dois.html.md +1 -1
- data/spec/fixtures/index-minted.html +1 -1
- data/spec/fixtures/index.html +2 -2
- data/spec/fixtures/index.html.erb +1 -1
- data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/jats/should_generate_jats_for_all_urls.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_hide_for_all_urls.yml +3 -44
- data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_mint_and_hide_for_all_urls.yml +4 -374
- data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_mint_for_all_urls.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Cirneco_Doi/jats/writes_jats_for_list_of_urls.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/hides_dois_for_list_of_urls.yml +4 -47
- data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/mints_and_hides_dois_for_list_of_urls.yml +4 -374
- data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/mints_dois_for_list_of_urls.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/DOI_API/get/should_get_all_dois.yml +16 -577
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/DOI_API/get/should_get_doi.yml +15 -58
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/DOI_API/get/should_get_doi_not_found.yml +16 -57
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/DOI_API/get/username_missing.yml +16 -16
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/DOI_API/put/should_put_doi.yml +16 -63
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/Media_API/get/should_get_media.yml +16 -61
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/Media_API/post/should_post_media.yml +17 -62
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/Metadata_API/delete/should_delete_metadata.yml +17 -60
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/Metadata_API/get/should_get_metadata.yml +17 -104
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/Metadata_API/post/should_post_metadata.yml +17 -108
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/media/includes_media.yml +17 -17
- data/spec/fixtures/vcr_cassettes/Cirneco_Work/schema/BlogPosting.yml +15 -15
- data/spec/utils_spec.rb +9 -186
- data/spec/work_spec.rb +1 -1
- metadata +4 -12
- data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/get/should_get_all_dois_by_prefix.yml +0 -562
- data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_hide_for_url.yml +0 -46
- data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_hide_metadata_for_work.yml +0 -46
- data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_mint_and_hide_for_url.yml +0 -182
- data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/mint_and_hide_DOIs/should_post_metadata_for_work.yml +0 -139
- data/spec/fixtures/vcr_cassettes/Cirneco_Doi/MDS_DOI_API/get/should_get_all_dois.yml +0 -564
- data/spec/fixtures/vcr_cassettes/Cirneco_Doi/MDS_DOI_API/get/should_get_doi.yml +0 -46
- data/spec/fixtures/vcr_cassettes/Cirneco_Doi/MDS_DOI_API/put/should_put_doi.yml +0 -50
- data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/hides_a_doi.yml +0 -46
- data/spec/fixtures/vcr_cassettes/Cirneco_Doi/mint_and_hide_DOIs/mints_and_hides_a_doi.yml +0 -182
@@ -1,182 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://mds.test.datacite.org/metadata
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: |
|
9
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
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.5438/0000-03VC</identifier>
|
12
|
-
<creators>
|
13
|
-
<creator>
|
14
|
-
<creatorName>Fenner, Martin</creatorName>
|
15
|
-
<givenName>Martin</givenName>
|
16
|
-
<familyName>Fenner</familyName>
|
17
|
-
<nameIdentifier schemeURI="http://orcid.org/" nameIdentifierScheme="ORCID">http://orcid.org/0000-0003-1419-2405</nameIdentifier>
|
18
|
-
</creator>
|
19
|
-
</creators>
|
20
|
-
<titles>
|
21
|
-
<title>Cool DOI's</title>
|
22
|
-
</titles>
|
23
|
-
<publisher>DataCite</publisher>
|
24
|
-
<publicationYear>2016</publicationYear>
|
25
|
-
<resourceType resourceTypeGeneral="Text">BlogPosting</resourceType>
|
26
|
-
<alternateIdentifiers>
|
27
|
-
<alternateIdentifier alternateIdentifierType=""/>
|
28
|
-
</alternateIdentifiers>
|
29
|
-
<subjects>
|
30
|
-
<subject>doi</subject>
|
31
|
-
<subject>featured</subject>
|
32
|
-
</subjects>
|
33
|
-
<dates>
|
34
|
-
<date dateType="Created">2016-12-15</date>
|
35
|
-
<date dateType="Issued">2016-12-15</date>
|
36
|
-
<date dateType="Updated">2016-12-15</date>
|
37
|
-
</dates>
|
38
|
-
<relatedIdentifiers>
|
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>
|
42
|
-
</relatedIdentifiers>
|
43
|
-
<version>1.0</version>
|
44
|
-
<rightsList>
|
45
|
-
<rights rightsURI="https://creativecommons.org/licenses/by/4.0/"/>
|
46
|
-
</rightsList>
|
47
|
-
<descriptions>
|
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>
|
49
|
-
</descriptions>
|
50
|
-
</resource>
|
51
|
-
headers:
|
52
|
-
User-Agent:
|
53
|
-
- Maremma - https://github.com/datacite/maremma
|
54
|
-
Content-Type:
|
55
|
-
- application/xml;charset=UTF-8
|
56
|
-
Accept:
|
57
|
-
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
58
|
-
Authorization:
|
59
|
-
- Basic <MDS_TOKEN>
|
60
|
-
response:
|
61
|
-
status:
|
62
|
-
code: 201
|
63
|
-
message: Created
|
64
|
-
headers:
|
65
|
-
Access-Control-Allow-Methods:
|
66
|
-
- GET, POST, OPTIONS
|
67
|
-
Access-Control-Allow-Origin:
|
68
|
-
- "*"
|
69
|
-
Cache-Control:
|
70
|
-
- no-cache, no-store
|
71
|
-
Content-Type:
|
72
|
-
- text/html;charset=UTF-8
|
73
|
-
Date:
|
74
|
-
- Sat, 22 Jul 2017 07:17:34 GMT
|
75
|
-
Expires:
|
76
|
-
- Thu, 01 Jan 1970 00:00:00 GMT
|
77
|
-
Location:
|
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
|
87
|
-
body:
|
88
|
-
encoding: UTF-8
|
89
|
-
string: OK (10.5438/0000-03VC)
|
90
|
-
http_version:
|
91
|
-
recorded_at: Sat, 22 Jul 2017 07:17:33 GMT
|
92
|
-
- request:
|
93
|
-
method: put
|
94
|
-
uri: https://mds.test.datacite.org/doi/10.5438/0000-03VC
|
95
|
-
body:
|
96
|
-
encoding: UTF-8
|
97
|
-
string: |-
|
98
|
-
doi=10.5438/0000-03VC
|
99
|
-
url=https://blog.datacite.org/cool-dois/
|
100
|
-
headers:
|
101
|
-
User-Agent:
|
102
|
-
- Maremma - https://github.com/datacite/maremma
|
103
|
-
Content-Type:
|
104
|
-
- text/plain;charset=UTF-8
|
105
|
-
Accept:
|
106
|
-
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
107
|
-
Authorization:
|
108
|
-
- Basic <MDS_TOKEN>
|
109
|
-
response:
|
110
|
-
status:
|
111
|
-
code: 201
|
112
|
-
message: Created
|
113
|
-
headers:
|
114
|
-
Access-Control-Allow-Methods:
|
115
|
-
- GET, POST, OPTIONS
|
116
|
-
Access-Control-Allow-Origin:
|
117
|
-
- "*"
|
118
|
-
Cache-Control:
|
119
|
-
- no-cache, no-store
|
120
|
-
Content-Type:
|
121
|
-
- text/html;charset=UTF-8
|
122
|
-
Date:
|
123
|
-
- Sat, 22 Jul 2017 07:17:34 GMT
|
124
|
-
Expires:
|
125
|
-
- Thu, 01 Jan 1970 00:00:00 GMT
|
126
|
-
Pragma:
|
127
|
-
- no-cache
|
128
|
-
Server:
|
129
|
-
- openresty/1.11.2.2
|
130
|
-
Content-Length:
|
131
|
-
- '2'
|
132
|
-
Connection:
|
133
|
-
- keep-alive
|
134
|
-
body:
|
135
|
-
encoding: UTF-8
|
136
|
-
string: OK
|
137
|
-
http_version:
|
138
|
-
recorded_at: Sat, 22 Jul 2017 07:17:33 GMT
|
139
|
-
- request:
|
140
|
-
method: delete
|
141
|
-
uri: https://mds.test.datacite.org/metadata/10.5438/0000-03VC
|
142
|
-
body:
|
143
|
-
encoding: US-ASCII
|
144
|
-
string: ''
|
145
|
-
headers:
|
146
|
-
User-Agent:
|
147
|
-
- Maremma - https://github.com/datacite/maremma
|
148
|
-
Accept:
|
149
|
-
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
150
|
-
Authorization:
|
151
|
-
- Basic <MDS_TOKEN>
|
152
|
-
response:
|
153
|
-
status:
|
154
|
-
code: 200
|
155
|
-
message: OK
|
156
|
-
headers:
|
157
|
-
Access-Control-Allow-Methods:
|
158
|
-
- GET, POST, OPTIONS
|
159
|
-
Access-Control-Allow-Origin:
|
160
|
-
- "*"
|
161
|
-
Cache-Control:
|
162
|
-
- no-cache, no-store
|
163
|
-
Content-Type:
|
164
|
-
- text/html;charset=UTF-8
|
165
|
-
Date:
|
166
|
-
- Sat, 22 Jul 2017 07:17:35 GMT
|
167
|
-
Expires:
|
168
|
-
- Thu, 01 Jan 1970 00:00:00 GMT
|
169
|
-
Pragma:
|
170
|
-
- no-cache
|
171
|
-
Server:
|
172
|
-
- openresty/1.11.2.2
|
173
|
-
Content-Length:
|
174
|
-
- '2'
|
175
|
-
Connection:
|
176
|
-
- keep-alive
|
177
|
-
body:
|
178
|
-
encoding: UTF-8
|
179
|
-
string: OK
|
180
|
-
http_version:
|
181
|
-
recorded_at: Sat, 22 Jul 2017 07:17:33 GMT
|
182
|
-
recorded_with: VCR 3.0.3
|
@@ -1,139 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://mds.test.datacite.org/metadata
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: |
|
9
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
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.5438/0000-03VC</identifier>
|
12
|
-
<creators>
|
13
|
-
<creator>
|
14
|
-
<creatorName>Fenner, Martin</creatorName>
|
15
|
-
<givenName>Martin</givenName>
|
16
|
-
<familyName>Fenner</familyName>
|
17
|
-
<nameIdentifier schemeURI="http://orcid.org/" nameIdentifierScheme="ORCID">http://orcid.org/0000-0003-1419-2405</nameIdentifier>
|
18
|
-
</creator>
|
19
|
-
</creators>
|
20
|
-
<titles>
|
21
|
-
<title>Cool DOI's</title>
|
22
|
-
</titles>
|
23
|
-
<publisher>DataCite</publisher>
|
24
|
-
<publicationYear>2016</publicationYear>
|
25
|
-
<resourceType resourceTypeGeneral="Text">BlogPosting</resourceType>
|
26
|
-
<alternateIdentifiers>
|
27
|
-
<alternateIdentifier alternateIdentifierType=""/>
|
28
|
-
</alternateIdentifiers>
|
29
|
-
<subjects>
|
30
|
-
<subject>doi</subject>
|
31
|
-
<subject>featured</subject>
|
32
|
-
</subjects>
|
33
|
-
<dates>
|
34
|
-
<date dateType="Created">2016-12-15</date>
|
35
|
-
<date dateType="Issued">2016-12-15</date>
|
36
|
-
<date dateType="Updated">2016-12-15</date>
|
37
|
-
</dates>
|
38
|
-
<relatedIdentifiers>
|
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>
|
42
|
-
</relatedIdentifiers>
|
43
|
-
<version>1.0</version>
|
44
|
-
<rightsList>
|
45
|
-
<rights rightsURI="https://creativecommons.org/licenses/by/4.0/"/>
|
46
|
-
</rightsList>
|
47
|
-
<descriptions>
|
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>
|
49
|
-
</descriptions>
|
50
|
-
</resource>
|
51
|
-
headers:
|
52
|
-
User-Agent:
|
53
|
-
- Maremma - https://github.com/datacite/maremma
|
54
|
-
Content-Type:
|
55
|
-
- application/xml;charset=UTF-8
|
56
|
-
Accept:
|
57
|
-
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
58
|
-
Authorization:
|
59
|
-
- Basic <MDS_TOKEN>
|
60
|
-
response:
|
61
|
-
status:
|
62
|
-
code: 201
|
63
|
-
message: Created
|
64
|
-
headers:
|
65
|
-
Access-Control-Allow-Methods:
|
66
|
-
- GET, POST, OPTIONS
|
67
|
-
Access-Control-Allow-Origin:
|
68
|
-
- "*"
|
69
|
-
Cache-Control:
|
70
|
-
- no-cache, no-store
|
71
|
-
Content-Type:
|
72
|
-
- text/html;charset=UTF-8
|
73
|
-
Date:
|
74
|
-
- Sat, 22 Jul 2017 07:04:39 GMT
|
75
|
-
Expires:
|
76
|
-
- Thu, 01 Jan 1970 00:00:00 GMT
|
77
|
-
Location:
|
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
|
87
|
-
body:
|
88
|
-
encoding: UTF-8
|
89
|
-
string: OK (10.5438/0000-03VC)
|
90
|
-
http_version:
|
91
|
-
recorded_at: Sat, 22 Jul 2017 07:04:38 GMT
|
92
|
-
- request:
|
93
|
-
method: put
|
94
|
-
uri: https://mds.test.datacite.org/doi/10.5438/0000-03VC
|
95
|
-
body:
|
96
|
-
encoding: UTF-8
|
97
|
-
string: |-
|
98
|
-
doi=10.5438/0000-03VC
|
99
|
-
url=https://blog.datacite.org/cool-dois/
|
100
|
-
headers:
|
101
|
-
User-Agent:
|
102
|
-
- Maremma - https://github.com/datacite/maremma
|
103
|
-
Content-Type:
|
104
|
-
- text/plain;charset=UTF-8
|
105
|
-
Accept:
|
106
|
-
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
107
|
-
Authorization:
|
108
|
-
- Basic <MDS_TOKEN>
|
109
|
-
response:
|
110
|
-
status:
|
111
|
-
code: 201
|
112
|
-
message: Created
|
113
|
-
headers:
|
114
|
-
Access-Control-Allow-Methods:
|
115
|
-
- GET, POST, OPTIONS
|
116
|
-
Access-Control-Allow-Origin:
|
117
|
-
- "*"
|
118
|
-
Cache-Control:
|
119
|
-
- no-cache, no-store
|
120
|
-
Content-Type:
|
121
|
-
- text/html;charset=UTF-8
|
122
|
-
Date:
|
123
|
-
- Sat, 22 Jul 2017 07:04:39 GMT
|
124
|
-
Expires:
|
125
|
-
- Thu, 01 Jan 1970 00:00:00 GMT
|
126
|
-
Pragma:
|
127
|
-
- no-cache
|
128
|
-
Server:
|
129
|
-
- openresty/1.11.2.2
|
130
|
-
Content-Length:
|
131
|
-
- '2'
|
132
|
-
Connection:
|
133
|
-
- keep-alive
|
134
|
-
body:
|
135
|
-
encoding: UTF-8
|
136
|
-
string: OK
|
137
|
-
http_version:
|
138
|
-
recorded_at: Sat, 22 Jul 2017 07:04:38 GMT
|
139
|
-
recorded_with: VCR 3.0.3
|