commonmeta-ruby 3.6.1 → 3.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +12 -13
- data/lib/commonmeta/crossref_utils.rb +11 -0
- data/lib/commonmeta/metadata.rb +5 -1
- data/lib/commonmeta/readers/json_feed_reader.rb +14 -0
- data/lib/commonmeta/schema_utils.rb +1 -1
- data/lib/commonmeta/version.rb +1 -1
- data/resources/{commonmeta_v0.10.3.json → commonmeta_v0.10.4.json} +11 -2
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/archived_wordpress_post.yml +87 -15
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_feed_item_from_rogue_scholar_with_archived_content.yml +123 -0
- data/spec/readers/json_feed_reader_spec.rb +2 -1
- data/spec/writers/crossref_xml_writer_spec.rb +39 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e60c424c5990d121493b7cdc7db9d0b2b9a7697044c0278d5e8c3be16157d62b
|
4
|
+
data.tar.gz: cd24f41eff23c37f380ec8818301bec32839bcf332711701b135bdb41e0dfe30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa0286bb0aceb0619a97bc43a7ffca61b7d6400b46e64e435f98ec7e83645a3eee7ef8fb3a2c76770a75ac43c8a5f7d6187c8101c1f279fc58e3ffa4649105be
|
7
|
+
data.tar.gz: e6720fa86ee5f18bf71f83ea076f2bf7103b2617a36eecb9216b92840ae0d4966b25c8fb10cafb9ad335f648f2c0d632bc800afd785e08584bde643db37ddfb9
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
commonmeta-ruby (3.
|
4
|
+
commonmeta-ruby (3.7.1)
|
5
5
|
activesupport (>= 4.2.5, < 8.0)
|
6
6
|
addressable (~> 2.8.1, < 2.8.2)
|
7
7
|
base32-url (>= 0.7.0, < 1)
|
@@ -27,7 +27,7 @@ PATH
|
|
27
27
|
GEM
|
28
28
|
remote: https://rubygems.org/
|
29
29
|
specs:
|
30
|
-
activesupport (7.1.
|
30
|
+
activesupport (7.1.1)
|
31
31
|
base64
|
32
32
|
bigdecimal
|
33
33
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
@@ -128,7 +128,7 @@ GEM
|
|
128
128
|
ffi-compiler (~> 1.0)
|
129
129
|
rake (~> 13.0)
|
130
130
|
logutils (0.6.1)
|
131
|
-
loofah (2.21.
|
131
|
+
loofah (2.21.4)
|
132
132
|
crass (~> 1.0.2)
|
133
133
|
nokogiri (>= 1.12.0)
|
134
134
|
matrix (0.4.2)
|
@@ -151,12 +151,12 @@ GEM
|
|
151
151
|
props (1.2.0)
|
152
152
|
iniparser (>= 0.1.0)
|
153
153
|
public_suffix (4.0.7)
|
154
|
-
racc (1.7.
|
154
|
+
racc (1.7.3)
|
155
155
|
rack (3.0.8)
|
156
156
|
rack-test (2.1.0)
|
157
157
|
rack (>= 1.3)
|
158
158
|
rainbow (3.1.1)
|
159
|
-
rake (13.0
|
159
|
+
rake (13.1.0)
|
160
160
|
rdf (3.3.1)
|
161
161
|
bcp47_spec (~> 0.2)
|
162
162
|
link_header (~> 0.0, >= 0.0.8)
|
@@ -171,7 +171,7 @@ GEM
|
|
171
171
|
rdf-xsd (3.3.0)
|
172
172
|
rdf (~> 3.3)
|
173
173
|
rexml (~> 3.2)
|
174
|
-
regexp_parser (2.8.
|
174
|
+
regexp_parser (2.8.2)
|
175
175
|
rexml (3.2.6)
|
176
176
|
rspec (3.12.0)
|
177
177
|
rspec-core (~> 3.12.0)
|
@@ -189,19 +189,18 @@ GEM
|
|
189
189
|
rspec-xsd (0.1.0)
|
190
190
|
nokogiri (~> 1.6)
|
191
191
|
rspec (~> 3)
|
192
|
-
rubocop (1.
|
193
|
-
base64 (~> 0.1.1)
|
192
|
+
rubocop (1.57.2)
|
194
193
|
json (~> 2.3)
|
195
194
|
language_server-protocol (>= 3.17.0)
|
196
195
|
parallel (~> 1.10)
|
197
|
-
parser (>= 3.2.2.
|
196
|
+
parser (>= 3.2.2.4)
|
198
197
|
rainbow (>= 2.2.2, < 4.0)
|
199
198
|
regexp_parser (>= 1.8, < 3.0)
|
200
199
|
rexml (>= 3.2.5, < 4.0)
|
201
200
|
rubocop-ast (>= 1.28.1, < 2.0)
|
202
201
|
ruby-progressbar (~> 1.7)
|
203
202
|
unicode-display_width (>= 2.4.0, < 3.0)
|
204
|
-
rubocop-ast (1.
|
203
|
+
rubocop-ast (1.30.0)
|
205
204
|
parser (>= 3.2.1.0)
|
206
205
|
rubocop-capybara (2.19.0)
|
207
206
|
rubocop (~> 1.41)
|
@@ -212,8 +211,8 @@ GEM
|
|
212
211
|
rubocop-ast (>= 0.4.0)
|
213
212
|
rubocop-rake (0.6.0)
|
214
213
|
rubocop (~> 1.0)
|
215
|
-
rubocop-rspec (2.
|
216
|
-
rubocop (~> 1.
|
214
|
+
rubocop-rspec (2.25.0)
|
215
|
+
rubocop (~> 1.40)
|
217
216
|
rubocop-capybara (~> 2.17)
|
218
217
|
rubocop-factory_bot (~> 2.22)
|
219
218
|
ruby-progressbar (1.13.0)
|
@@ -236,7 +235,7 @@ GEM
|
|
236
235
|
logutils (>= 0.6.1)
|
237
236
|
props (>= 1.1.2)
|
238
237
|
rubyzip (>= 1.0.0)
|
239
|
-
thor (1.
|
238
|
+
thor (1.3.0)
|
240
239
|
tzinfo (2.0.6)
|
241
240
|
concurrent-ruby (~> 1.0)
|
242
241
|
unf (0.1.4)
|
@@ -65,6 +65,7 @@ module Commonmeta
|
|
65
65
|
insert_funding_references(xml)
|
66
66
|
insert_crossref_access_indicators(xml)
|
67
67
|
insert_crossref_relations(xml)
|
68
|
+
insert_archive_locations(xml)
|
68
69
|
insert_doi_data(xml)
|
69
70
|
insert_citation_list(xml)
|
70
71
|
end
|
@@ -327,6 +328,16 @@ module Commonmeta
|
|
327
328
|
end
|
328
329
|
end
|
329
330
|
|
331
|
+
def insert_archive_locations(xml)
|
332
|
+
return xml if archive_locations.blank?
|
333
|
+
|
334
|
+
xml.archive_locations do
|
335
|
+
archive_locations.each do |archive_location|
|
336
|
+
xml.archive("name" => archive_location)
|
337
|
+
end
|
338
|
+
end
|
339
|
+
end
|
340
|
+
|
330
341
|
def insert_doi_data(xml)
|
331
342
|
return xml if doi_from_url(id).blank? || url.blank?
|
332
343
|
|
data/lib/commonmeta/metadata.rb
CHANGED
@@ -10,7 +10,7 @@ module Commonmeta
|
|
10
10
|
:email, :registrant
|
11
11
|
attr_reader :doc, :page_start, :page_end
|
12
12
|
attr_writer :id, :provider_id, :client_id, :doi, :alternate_identifiers, :contributors,
|
13
|
-
:titles, :publisher, :license, :date, :volume, :url, :version, :subjects, :descriptions, :language, :sizes, :formats, :schema_version, :meta, :container, :provider, :format, :funding_references, :state, :geo_locations, :type, :additional_type, :files, :references, :related_identifiers, :related_items, :style, :locale
|
13
|
+
:titles, :publisher, :license, :date, :volume, :url, :version, :subjects, :descriptions, :language, :sizes, :formats, :schema_version, :meta, :container, :provider, :format, :funding_references, :state, :geo_locations, :type, :additional_type, :files, :references, :related_identifiers, :related_items, :style, :locale, :archive_locations
|
14
14
|
|
15
15
|
def initialize(options = {})
|
16
16
|
options.symbolize_keys!
|
@@ -253,5 +253,9 @@ module Commonmeta
|
|
253
253
|
def contributors
|
254
254
|
@contributors ||= meta.fetch('contributors', nil)
|
255
255
|
end
|
256
|
+
|
257
|
+
def archive_locations
|
258
|
+
@archive_locations ||= meta.fetch('archive_locations', nil)
|
259
|
+
end
|
256
260
|
end
|
257
261
|
end
|
@@ -69,6 +69,19 @@ module Commonmeta
|
|
69
69
|
funding_references = get_funding_references(meta)
|
70
70
|
related_identifiers = get_related_identifiers(meta)
|
71
71
|
alternate_identifiers = [{ "alternateIdentifier" => meta["id"], "alternateIdentifierType" => "UUID" }]
|
72
|
+
|
73
|
+
archive_url = meta.fetch("archive_url", nil)
|
74
|
+
|
75
|
+
if archive_url
|
76
|
+
host = URI.parse(archive_url).host
|
77
|
+
if ["web.archive.org", "wayback.archive-it.org"].include?(host)
|
78
|
+
archive_locations = ["Internet Archive"]
|
79
|
+
else
|
80
|
+
archive_locations = nil
|
81
|
+
end
|
82
|
+
else
|
83
|
+
archive_locations = nil
|
84
|
+
end
|
72
85
|
|
73
86
|
{ "id" => id,
|
74
87
|
"type" => type,
|
@@ -86,6 +99,7 @@ module Commonmeta
|
|
86
99
|
"funding_references" => funding_references.presence,
|
87
100
|
"related_identifiers" => related_identifiers.presence,
|
88
101
|
"alternate_identifiers" => alternate_identifiers,
|
102
|
+
"archive_locations" => archive_locations,
|
89
103
|
"state" => state }.compact.merge(read_options)
|
90
104
|
end
|
91
105
|
|
@@ -5,7 +5,7 @@ require "pathname"
|
|
5
5
|
|
6
6
|
module Commonmeta
|
7
7
|
module SchemaUtils
|
8
|
-
COMMONMETA = File.read(File.expand_path("../../resources/commonmeta_v0.10.
|
8
|
+
COMMONMETA = File.read(File.expand_path("../../resources/commonmeta_v0.10.4.json",
|
9
9
|
__dir__))
|
10
10
|
|
11
11
|
def json_schema_errors
|
data/lib/commonmeta/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
3
|
-
"$id": "https://commonmeta.org/commonmeta_v0.10.
|
4
|
-
"title": "Commonmeta v0.10.
|
3
|
+
"$id": "https://commonmeta.org/commonmeta_v0.10.4.json",
|
4
|
+
"title": "Commonmeta v0.10.4",
|
5
5
|
"description": "JSON representation of the Commonmeta schema.",
|
6
6
|
"additionalProperties": false,
|
7
7
|
"definitions": {
|
@@ -516,6 +516,15 @@
|
|
516
516
|
"description": "The state of the resource.",
|
517
517
|
"type": "string",
|
518
518
|
"enum": ["findable", "not_found"]
|
519
|
+
},
|
520
|
+
"archive_locations": {
|
521
|
+
"description": "The location where content is archived.",
|
522
|
+
"type": "array",
|
523
|
+
"items": {
|
524
|
+
"type": "string",
|
525
|
+
"enum": ["CLOCKSS", "LOCKSS", "Portico", "KB", "Internet Archive", "DWT"]
|
526
|
+
},
|
527
|
+
"uniqueItems": true
|
519
528
|
}
|
520
529
|
},
|
521
530
|
"required": [
|
@@ -21,31 +21,103 @@ http_interactions:
|
|
21
21
|
Content-Type:
|
22
22
|
- application/json
|
23
23
|
Content-Length:
|
24
|
-
- '
|
24
|
+
- '7862'
|
25
|
+
Ratelimit-Limit:
|
26
|
+
- '15'
|
27
|
+
Ratelimit-Remaining:
|
28
|
+
- '14'
|
29
|
+
Ratelimit-Reset:
|
30
|
+
- '3'
|
25
31
|
Date:
|
26
|
-
-
|
32
|
+
- Sat, 04 Nov 2023 15:12:52 GMT
|
27
33
|
Server:
|
28
|
-
- Fly/
|
34
|
+
- Fly/7328d5b5 (2023-10-27)
|
29
35
|
Via:
|
30
36
|
- 1.1 fly.io
|
31
37
|
Fly-Request-Id:
|
32
|
-
-
|
38
|
+
- 01HEDE9R2T7K7FBRF7D93MN1JN-fra
|
33
39
|
body:
|
34
40
|
encoding: UTF-8
|
35
|
-
string: '{"archive_url":"https://
|
36
|
-
Stocker","url":"https://orcid.org/0000-0001-5492-3212"}],"blog":{"api":
|
41
|
+
string: '{"archive_url":"https://wayback.archive-it.org/22143/20231103191454/https://project-thor.eu/2016/08/10/orcid-integration-in-pangaea","authors":[{"name":"Markus
|
42
|
+
Stocker","url":"https://orcid.org/0000-0001-5492-3212"}],"blog":{"api":true,"archive_prefix":"https://wayback.archive-it.org/22143/20231103191454/","authors":null,"backlog":0,"canonical_url":null,"category":"computerAndInformationSciences","created_at":1695254400,"current_feed_url":null,"description":"Technical
|
37
43
|
and Human infrastructure for Open Research.","favicon":null,"feed_format":"application/atom+xml","feed_url":"https://project-thor.eu/feed/atom/","filter":null,"funding":{"award_number":"654039","award_uri":"https://doi.org/10.3030/654039","funder_id":"https://doi.org/10.13039/501100007601","funder_name":"European
|
38
|
-
Union\u2019s Horizon 2020 research and innovation programme"},"generator":"WordPress.com","home_page_url":"https://project-thor.eu","id":"cg9zq26","issn":null,"language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","
|
39
|
-
THOR","use_api":
|
40
|
-
THOR","blog_slug":"thor","
|
41
|
-
is the first in a series of posts
|
44
|
+
Union\u2019s Horizon 2020 research and innovation programme"},"generator":"WordPress.com","generator_raw":"WordPress.com","home_page_url":"https://project-thor.eu","id":"cg9zq26","indexed":false,"issn":null,"language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","plan":"Team","prefix":"10.59350","relative_url":null,"secure":true,"slug":"thor","status":"archived","title":"Project
|
45
|
+
THOR","updated_at":1511522178,"use_api":true,"use_mastodon":false,"user_id":"dead81b3-8a8b-45c9-85fe-f01bb3948c77","version":"https://jsonfeed.org/version/1.1"},"blog_name":"Project
|
46
|
+
THOR","blog_slug":"thor","content_html":"<p><span style=\"font-weight:400;\">This
|
47
|
+
is the first in a <a href=\"http://wp.me/p5O69U-aF\">series of posts</a></span><span
|
48
|
+
style=\"font-weight:400;\">\u00a0describing how THOR partners have recently
|
49
|
+
integrated <a href=\"http://orcid.org/\">ORCID</a> in their disciplinary data
|
50
|
+
repositories. This post describes ORCID integration in <a href=\"https://www.pangaea.de/\">PANGAEA</a>,
|
51
|
+
the Data Publisher for Earth & Environmental Science.</span></p>\n<p><span
|
52
|
+
style=\"font-weight:400;\">PANGAEA is rolling out a new version of its website.
|
53
|
+
Developers and designers are currently ironing out a few remaining open issues.
|
54
|
+
The release is expected for autumn 2016. Among major improvements in search,
|
55
|
+
design, and usability, a key new feature is the integration of ORCID.</span></p>\n<p><span
|
56
|
+
style=\"font-weight:400;\">The new feature enables existing PANGAEA users
|
57
|
+
to connect their PANGAEA profile with their ORCID iD, as demonstrated in the
|
58
|
+
video below.\u00a0</span></p>\n<p style=\"text-align:center;\"><span class=\"embed-youtube\"
|
59
|
+
style=\"text-align:center; display: block;\"><iframe class=\"youtube-player\"
|
60
|
+
width=\"640\" height=\"360\" src=\"https://www.youtube.com/embed/Eg81xbbgzI0?version=3&rel=1&showsearch=0&showinfo=1&iv_load_policy=1&fs=1&hl=en&autohide=2&wmode=transparent\"
|
61
|
+
allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin
|
62
|
+
allow-popups allow-presentation allow-popups-to-escape-sandbox\"></iframe></span></p>\n<p><span
|
63
|
+
style=\"font-weight:400;\">With this connection, PANGAEA obtains the </span><i><span
|
64
|
+
style=\"font-weight:400;\">validated</span></i><span style=\"font-weight:400;\">
|
65
|
+
ORCID iD of its users from ORCID. By connecting their ORCID iD, users can
|
66
|
+
also choose to sign in to PANGAEA using ORCID, as an alternative to signing
|
67
|
+
in using PANGAEA user credentials. This can be handy when a user is already
|
68
|
+
signed in to ORCID, or it is quicker to recall ORCID credentials.</span></p>\n<p><span
|
69
|
+
style=\"font-weight:400;\">Obtaining the validated ORCID iDs of its users
|
70
|
+
is significant for PANGAEA as, contrary to a researcher\u2019s name, the iD
|
71
|
+
is unambiguous: two researchers with the same name can be distinguished by
|
72
|
+
their respective iDs. The iD is also persistent through possible changes in
|
73
|
+
a person\u2019s name: the same researcher may change marital status, or their
|
74
|
+
name may appear in different permutations, at times appear with full name,
|
75
|
+
initials for first name, and with or without middle name (initial). Furthermore,
|
76
|
+
the iD is actionable and can be used to discover information about the researcher.</span></p>\n<p><span
|
77
|
+
style=\"font-weight:400;\">For researchers, the greatest advantage of connecting
|
78
|
+
their ORCID iD to their PANGAEA profile is that PANGAEA can then record the
|
79
|
+
relationships between dataset publication DOIs and contributor ORCID iDs.
|
80
|
+
This information is then shared with the global network of PID infrastructures,
|
81
|
+
and researchers benefit from automated updates to their ORCID Record for data
|
82
|
+
published at PANGAEA, gaining unambiguous attribution for published datasets
|
83
|
+
and benefiting from greater credit for sharing data early.</span></p>\n<p><span
|
84
|
+
style=\"font-weight:400;\">Let\u2019s take a look at how the ORCID integration
|
85
|
+
in PANGAEA is making a difference to <a href=\"https://www.marum.de/en/Alice_Lefebvre.html\">Dr
|
86
|
+
Alice Lefebvre</a>, <a href=\"https://www.marum.de/en/GLOMAR.html\">GLOMAR</a>
|
87
|
+
Associate Scientist at the <a href=\"https://www.marum.de/en/index.html\">MARUM</a>
|
88
|
+
Center for Marine Environmental Sciences of the <a href=\"http://www.uni-bremen.de/en.html\">University
|
89
|
+
of Bremen</a>. </span></p>\n<p><span style=\"font-weight:400;\">Alice has
|
90
|
+
recently joined ORCID and decided to claim the 14 data publications deposited
|
91
|
+
at PANGAEA that she has authored. As a consequence, Alice gains a more complete
|
92
|
+
<a href=\"http://orcid.org/0000-0002-9234-8279\">ORCID Record</a>, one that
|
93
|
+
does not just include her journal article publications but also her authorship
|
94
|
+
in data publications </span><span style=\"font-weight:400;\">\u2212</span><span
|
95
|
+
style=\"font-weight:400;\"> a record that better reflects her true contribution
|
96
|
+
to the scientific record. Alice was also surprised to learn about <a href=\"http://datacite.org\">DataCite</a>
|
97
|
+
and the <a href=\"http://search.datacite.org/contributors/0000-0002-9234-8279\">overview</a>
|
98
|
+
DataCite provides about her contributions. </span></p>\n<p><span style=\"font-weight:400;\">The
|
99
|
+
upcoming release of the PANGAEA website automates the sharing of information
|
100
|
+
with the global network of PID infrastructures. Authors of datasets published
|
101
|
+
at PANGAEA who have connected their ORCID iD, like Alice, will benefit from
|
102
|
+
a workflow that ensures information appears automatically and accurately on
|
103
|
+
their ORCID Record.</span></p>\n<p><span style=\"font-weight:400;\">This shows
|
104
|
+
how far the integration between disciplinary repositories and the global network
|
105
|
+
of PID infrastructures has come over the past years, and how the persistent
|
106
|
+
identification of contributors and research artefacts together with infrastructures
|
107
|
+
that aggregate, process, and share information about persistently identified
|
108
|
+
resources are driving and shaping 21st-century attribution, credit, communication,
|
109
|
+
and measurement of scholarly activity.</span></p>\n<p><b>Want to Know More?<br
|
110
|
+
/>\n</b><span style=\"font-weight:400;\">Readers interested in performing
|
111
|
+
an ORCID integration in their own disciplinary repository can find more information
|
112
|
+
in our recent report, ‘<a href=\"http://doi.org/10.5281/zenodo.58971\">Demonstration
|
113
|
+
of Services to Integrate ORCIDs into Data Records and Database Systems</a>‘</span><span
|
114
|
+
style=\"font-weight:400;\">. </span></p>\n","doi":"https://doi.org/10.59350/faeph-x4x84","guid":"http://project-thor.eu/?p=664","id":"570c8129-e867-49e6-8517-bd783627e76e","image":null,"indexed_at":1695449798,"language":"en","published_at":1470819639,"reference":[],"relationships":[],"summary":"This
|
115
|
+
is the first in a series of posts describing how THOR partners have recently
|
42
116
|
integrated ORCID in their disciplinary data repositories. This post describes
|
43
117
|
ORCID integration in PANGAEA, the Data Publisher for Earth & Environmental
|
44
|
-
Science.
|
45
|
-
|
46
|
-
is expected for autumn 2016.","tags":["Uncategorized","ORCID","Persistent
|
47
|
-
Identifier"],"title":"ORCID Integration Series: PANGAEA","updated_at":1470819639,"url":"https://project-thor.eu/2016/08/10/orcid-integration-in-pangaea"}
|
118
|
+
Science. PANGAEA is rolling out a new version of its website.","tags":["Uncategorized"],"title":"ORCID
|
119
|
+
Integration Series: PANGAEA","updated_at":1470818410,"url":"https://project-thor.eu/2016/08/10/orcid-integration-in-pangaea"}
|
48
120
|
|
49
121
|
'
|
50
|
-
recorded_at:
|
122
|
+
recorded_at: Sat, 04 Nov 2023 15:12:52 GMT
|
51
123
|
recorded_with: VCR 6.2.0
|
@@ -0,0 +1,123 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.rogue-scholar.org/posts/570c8129-e867-49e6-8517-bd783627e76e
|
6
|
+
body:
|
7
|
+
encoding: ASCII-8BIT
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Connection:
|
11
|
+
- close
|
12
|
+
Host:
|
13
|
+
- api.rogue-scholar.org
|
14
|
+
User-Agent:
|
15
|
+
- http.rb/5.1.1
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Content-Type:
|
22
|
+
- application/json
|
23
|
+
Content-Length:
|
24
|
+
- '7862'
|
25
|
+
Ratelimit-Limit:
|
26
|
+
- '15'
|
27
|
+
Ratelimit-Remaining:
|
28
|
+
- '14'
|
29
|
+
Ratelimit-Reset:
|
30
|
+
- '3'
|
31
|
+
Date:
|
32
|
+
- Sat, 04 Nov 2023 15:30:00 GMT
|
33
|
+
Server:
|
34
|
+
- Fly/7328d5b5 (2023-10-27)
|
35
|
+
Via:
|
36
|
+
- 1.1 fly.io
|
37
|
+
Fly-Request-Id:
|
38
|
+
- 01HEDF93TFCEYGFQ8ADFYBSTFW-fra
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: '{"archive_url":"https://wayback.archive-it.org/22143/20231103191454/https://project-thor.eu/2016/08/10/orcid-integration-in-pangaea","authors":[{"name":"Markus
|
42
|
+
Stocker","url":"https://orcid.org/0000-0001-5492-3212"}],"blog":{"api":true,"archive_prefix":"https://wayback.archive-it.org/22143/20231103191454/","authors":null,"backlog":0,"canonical_url":null,"category":"computerAndInformationSciences","created_at":1695254400,"current_feed_url":null,"description":"Technical
|
43
|
+
and Human infrastructure for Open Research.","favicon":null,"feed_format":"application/atom+xml","feed_url":"https://project-thor.eu/feed/atom/","filter":null,"funding":{"award_number":"654039","award_uri":"https://doi.org/10.3030/654039","funder_id":"https://doi.org/10.13039/501100007601","funder_name":"European
|
44
|
+
Union\u2019s Horizon 2020 research and innovation programme"},"generator":"WordPress.com","generator_raw":"WordPress.com","home_page_url":"https://project-thor.eu","id":"cg9zq26","indexed":false,"issn":null,"language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","plan":"Team","prefix":"10.59350","relative_url":null,"secure":true,"slug":"thor","status":"archived","title":"Project
|
45
|
+
THOR","updated_at":1511522178,"use_api":true,"use_mastodon":false,"user_id":"dead81b3-8a8b-45c9-85fe-f01bb3948c77","version":"https://jsonfeed.org/version/1.1"},"blog_name":"Project
|
46
|
+
THOR","blog_slug":"thor","content_html":"<p><span style=\"font-weight:400;\">This
|
47
|
+
is the first in a <a href=\"http://wp.me/p5O69U-aF\">series of posts</a></span><span
|
48
|
+
style=\"font-weight:400;\">\u00a0describing how THOR partners have recently
|
49
|
+
integrated <a href=\"http://orcid.org/\">ORCID</a> in their disciplinary data
|
50
|
+
repositories. This post describes ORCID integration in <a href=\"https://www.pangaea.de/\">PANGAEA</a>,
|
51
|
+
the Data Publisher for Earth & Environmental Science.</span></p>\n<p><span
|
52
|
+
style=\"font-weight:400;\">PANGAEA is rolling out a new version of its website.
|
53
|
+
Developers and designers are currently ironing out a few remaining open issues.
|
54
|
+
The release is expected for autumn 2016. Among major improvements in search,
|
55
|
+
design, and usability, a key new feature is the integration of ORCID.</span></p>\n<p><span
|
56
|
+
style=\"font-weight:400;\">The new feature enables existing PANGAEA users
|
57
|
+
to connect their PANGAEA profile with their ORCID iD, as demonstrated in the
|
58
|
+
video below.\u00a0</span></p>\n<p style=\"text-align:center;\"><span class=\"embed-youtube\"
|
59
|
+
style=\"text-align:center; display: block;\"><iframe class=\"youtube-player\"
|
60
|
+
width=\"640\" height=\"360\" src=\"https://www.youtube.com/embed/Eg81xbbgzI0?version=3&rel=1&showsearch=0&showinfo=1&iv_load_policy=1&fs=1&hl=en&autohide=2&wmode=transparent\"
|
61
|
+
allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin
|
62
|
+
allow-popups allow-presentation allow-popups-to-escape-sandbox\"></iframe></span></p>\n<p><span
|
63
|
+
style=\"font-weight:400;\">With this connection, PANGAEA obtains the </span><i><span
|
64
|
+
style=\"font-weight:400;\">validated</span></i><span style=\"font-weight:400;\">
|
65
|
+
ORCID iD of its users from ORCID. By connecting their ORCID iD, users can
|
66
|
+
also choose to sign in to PANGAEA using ORCID, as an alternative to signing
|
67
|
+
in using PANGAEA user credentials. This can be handy when a user is already
|
68
|
+
signed in to ORCID, or it is quicker to recall ORCID credentials.</span></p>\n<p><span
|
69
|
+
style=\"font-weight:400;\">Obtaining the validated ORCID iDs of its users
|
70
|
+
is significant for PANGAEA as, contrary to a researcher\u2019s name, the iD
|
71
|
+
is unambiguous: two researchers with the same name can be distinguished by
|
72
|
+
their respective iDs. The iD is also persistent through possible changes in
|
73
|
+
a person\u2019s name: the same researcher may change marital status, or their
|
74
|
+
name may appear in different permutations, at times appear with full name,
|
75
|
+
initials for first name, and with or without middle name (initial). Furthermore,
|
76
|
+
the iD is actionable and can be used to discover information about the researcher.</span></p>\n<p><span
|
77
|
+
style=\"font-weight:400;\">For researchers, the greatest advantage of connecting
|
78
|
+
their ORCID iD to their PANGAEA profile is that PANGAEA can then record the
|
79
|
+
relationships between dataset publication DOIs and contributor ORCID iDs.
|
80
|
+
This information is then shared with the global network of PID infrastructures,
|
81
|
+
and researchers benefit from automated updates to their ORCID Record for data
|
82
|
+
published at PANGAEA, gaining unambiguous attribution for published datasets
|
83
|
+
and benefiting from greater credit for sharing data early.</span></p>\n<p><span
|
84
|
+
style=\"font-weight:400;\">Let\u2019s take a look at how the ORCID integration
|
85
|
+
in PANGAEA is making a difference to <a href=\"https://www.marum.de/en/Alice_Lefebvre.html\">Dr
|
86
|
+
Alice Lefebvre</a>, <a href=\"https://www.marum.de/en/GLOMAR.html\">GLOMAR</a>
|
87
|
+
Associate Scientist at the <a href=\"https://www.marum.de/en/index.html\">MARUM</a>
|
88
|
+
Center for Marine Environmental Sciences of the <a href=\"http://www.uni-bremen.de/en.html\">University
|
89
|
+
of Bremen</a>. </span></p>\n<p><span style=\"font-weight:400;\">Alice has
|
90
|
+
recently joined ORCID and decided to claim the 14 data publications deposited
|
91
|
+
at PANGAEA that she has authored. As a consequence, Alice gains a more complete
|
92
|
+
<a href=\"http://orcid.org/0000-0002-9234-8279\">ORCID Record</a>, one that
|
93
|
+
does not just include her journal article publications but also her authorship
|
94
|
+
in data publications </span><span style=\"font-weight:400;\">\u2212</span><span
|
95
|
+
style=\"font-weight:400;\"> a record that better reflects her true contribution
|
96
|
+
to the scientific record. Alice was also surprised to learn about <a href=\"http://datacite.org\">DataCite</a>
|
97
|
+
and the <a href=\"http://search.datacite.org/contributors/0000-0002-9234-8279\">overview</a>
|
98
|
+
DataCite provides about her contributions. </span></p>\n<p><span style=\"font-weight:400;\">The
|
99
|
+
upcoming release of the PANGAEA website automates the sharing of information
|
100
|
+
with the global network of PID infrastructures. Authors of datasets published
|
101
|
+
at PANGAEA who have connected their ORCID iD, like Alice, will benefit from
|
102
|
+
a workflow that ensures information appears automatically and accurately on
|
103
|
+
their ORCID Record.</span></p>\n<p><span style=\"font-weight:400;\">This shows
|
104
|
+
how far the integration between disciplinary repositories and the global network
|
105
|
+
of PID infrastructures has come over the past years, and how the persistent
|
106
|
+
identification of contributors and research artefacts together with infrastructures
|
107
|
+
that aggregate, process, and share information about persistently identified
|
108
|
+
resources are driving and shaping 21st-century attribution, credit, communication,
|
109
|
+
and measurement of scholarly activity.</span></p>\n<p><b>Want to Know More?<br
|
110
|
+
/>\n</b><span style=\"font-weight:400;\">Readers interested in performing
|
111
|
+
an ORCID integration in their own disciplinary repository can find more information
|
112
|
+
in our recent report, ‘<a href=\"http://doi.org/10.5281/zenodo.58971\">Demonstration
|
113
|
+
of Services to Integrate ORCIDs into Data Records and Database Systems</a>‘</span><span
|
114
|
+
style=\"font-weight:400;\">. </span></p>\n","doi":"https://doi.org/10.59350/faeph-x4x84","guid":"http://project-thor.eu/?p=664","id":"570c8129-e867-49e6-8517-bd783627e76e","image":null,"indexed_at":1695449798,"language":"en","published_at":1470819639,"reference":[],"relationships":[],"summary":"This
|
115
|
+
is the first in a series of posts describing how THOR partners have recently
|
116
|
+
integrated ORCID in their disciplinary data repositories. This post describes
|
117
|
+
ORCID integration in PANGAEA, the Data Publisher for Earth & Environmental
|
118
|
+
Science. PANGAEA is rolling out a new version of its website.","tags":["Uncategorized"],"title":"ORCID
|
119
|
+
Integration Series: PANGAEA","updated_at":1470818410,"url":"https://project-thor.eu/2016/08/10/orcid-integration-in-pangaea"}
|
120
|
+
|
121
|
+
'
|
122
|
+
recorded_at: Sat, 04 Nov 2023 15:30:00 GMT
|
123
|
+
recorded_with: VCR 6.2.0
|
@@ -233,7 +233,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
233
233
|
subject = described_class.new(input: input)
|
234
234
|
# expect(subject.valid?).to be true
|
235
235
|
expect(subject.id).to eq("https://doi.org/10.59350/faeph-x4x84")
|
236
|
-
expect(subject.url).to eq("https://
|
236
|
+
expect(subject.url).to eq("https://wayback.archive-it.org/22143/20231103191454/https://project-thor.eu/2016/08/10/orcid-integration-in-pangaea")
|
237
237
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "570c8129-e867-49e6-8517-bd783627e76e", "alternateIdentifierType" => "UUID" }])
|
238
238
|
expect(subject.type).to eq("Article")
|
239
239
|
expect(subject.contributors.length).to eq(1)
|
@@ -255,6 +255,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
255
255
|
expect(subject.language).to eq("en")
|
256
256
|
expect(subject.funding_references).to eq([{ "awardNumber" => "654039", "funderIdentifier" => "https://doi.org/10.13039/501100007601", "funderIdentifierType"=>"Crossref Funder ID", "funderName" => "European Union’s Horizon 2020 research and innovation programme" }])
|
257
257
|
expect(subject.container).to eq("identifier" => "https://project-thor.eu", "identifierType" => "URL", "title" => "Project THOR", "type" => "Periodical")
|
258
|
+
expect(subject.archive_locations).to eq(["Internet Archive"])
|
258
259
|
end
|
259
260
|
|
260
261
|
it "wordpress post with references" do
|
@@ -323,6 +323,45 @@ describe Commonmeta::Metadata, vcr: true do
|
|
323
323
|
expect(crossref_xml.dig("group_title")).to eq("Social sciences")
|
324
324
|
end
|
325
325
|
|
326
|
+
it "json_feed_item from rogue scholar with archived content" do
|
327
|
+
input = "https://api.rogue-scholar.org/posts/570c8129-e867-49e6-8517-bd783627e76e"
|
328
|
+
subject = described_class.new(input: input)
|
329
|
+
# expect(subject.valid?).to be true
|
330
|
+
expect(subject.id).to eq("https://doi.org/10.59350/faeph-x4x84")
|
331
|
+
expect(subject.url).to eq("https://wayback.archive-it.org/22143/20231103191454/https://project-thor.eu/2016/08/10/orcid-integration-in-pangaea")
|
332
|
+
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "570c8129-e867-49e6-8517-bd783627e76e", "alternateIdentifierType" => "UUID" }])
|
333
|
+
expect(subject.type).to eq("Article")
|
334
|
+
expect(subject.contributors.length).to eq(1)
|
335
|
+
expect(subject.contributors.first).to eq("contributorRoles" => ["Author"],
|
336
|
+
"type" => "Person",
|
337
|
+
"familyName" => "Stocker",
|
338
|
+
"givenName" => "Markus",
|
339
|
+
"id" => "https://orcid.org/0000-0001-5492-3212")
|
340
|
+
expect(subject.titles).to eq([{ "title" => "ORCID Integration Series: PANGAEA" }])
|
341
|
+
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
342
|
+
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
343
|
+
expect(subject.date).to eq("published" => "2016-08-10", "updated" => "2016-08-10")
|
344
|
+
expect(subject.descriptions.first["description"]).to start_with("This is the first in a series of posts describing how THOR partners")
|
345
|
+
expect(subject.publisher).to eq("name" => "Project THOR")
|
346
|
+
expect(subject.subjects).to eq([{ "subject" => "Computer and information sciences" },
|
347
|
+
{ "schemeUri" => "http://www.oecd.org/science/inno/38235147.pdf",
|
348
|
+
"subject" => "FOS: Computer and information sciences",
|
349
|
+
"subjectScheme" => "Fields of Science and Technology (FOS)" }])
|
350
|
+
expect(subject.language).to eq("en")
|
351
|
+
expect(subject.funding_references).to eq([{ "awardNumber" => "654039", "funderIdentifier" => "https://doi.org/10.13039/501100007601", "funderIdentifierType"=>"Crossref Funder ID", "funderName" => "European Union’s Horizon 2020 research and innovation programme" }])
|
352
|
+
expect(subject.container).to eq("identifier" => "https://project-thor.eu", "identifierType" => "URL", "title" => "Project THOR", "type" => "Periodical")
|
353
|
+
expect(subject.archive_locations).to eq(["Internet Archive"])
|
354
|
+
# puts subject.crossref_xml
|
355
|
+
crossref_xml = Hash.from_xml(subject.crossref_xml).dig("doi_batch", "body", "posted_content")
|
356
|
+
expect(Array.wrap(crossref_xml.dig("contributors", "person_name")).length).to eq(1)
|
357
|
+
expect(Array.wrap(crossref_xml.dig("contributors",
|
358
|
+
"person_name")).first).to eq("ORCID"=>"https://orcid.org/0000-0001-5492-3212", "contributor_role"=>"author", "given_name"=>"Markus", "sequence"=>"first", "surname"=>"Stocker")
|
359
|
+
expect(crossref_xml.dig("titles",
|
360
|
+
"title")).to eq("ORCID Integration Series: PANGAEA")
|
361
|
+
expect(crossref_xml.dig("item_number")).to eq("__content__" => "570c8129e86749e68517bd783627e76e", "item_number_type" => "uuid")
|
362
|
+
expect(crossref_xml.dig("group_title")).to eq("Computer and information sciences")
|
363
|
+
end
|
364
|
+
|
326
365
|
it "json_feed_item from rogue scholar with relations" do
|
327
366
|
input = "https://api.rogue-scholar.org/posts/8a4de443-3347-4b82-b57d-e3c82b6485fc"
|
328
367
|
subject = described_class.new(input: input, doi: "10.53731/r79v4e1-97aq74v-ag578")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: commonmeta-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Fenner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -657,7 +657,7 @@ files:
|
|
657
657
|
- lib/commonmeta/xml_converter.rb
|
658
658
|
- resources/2008/09/xsd.xsl
|
659
659
|
- resources/cff.json
|
660
|
-
- resources/commonmeta_v0.10.
|
660
|
+
- resources/commonmeta_v0.10.4.json
|
661
661
|
- resources/crossref/AccessIndicators.xsd
|
662
662
|
- resources/crossref/JATS-journalpublishing1-3d2-mathml3-elements.xsd
|
663
663
|
- resources/crossref/JATS-journalpublishing1-3d2-mathml3.xsd
|
@@ -930,6 +930,7 @@ files:
|
|
930
930
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/journal_article_from_datacite.yml
|
931
931
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/journal_article_plos.yml
|
932
932
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_feed_item_from_rogue_scholar_with_anonymous_author.yml
|
933
|
+
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_feed_item_from_rogue_scholar_with_archived_content.yml
|
933
934
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_feed_item_from_rogue_scholar_with_doi.yml
|
934
935
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_feed_item_from_rogue_scholar_with_organizational_author.yml
|
935
936
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_feed_item_from_rogue_scholar_with_relations.yml
|