commonmeta-ruby 3.3.8 → 3.3.10
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 +7 -5
- data/lib/commonmeta/author_utils.rb +4 -2
- data/lib/commonmeta/cli.rb +2 -2
- data/lib/commonmeta/readers/json_feed_reader.rb +3 -3
- data/lib/commonmeta/utils.rb +2 -2
- data/lib/commonmeta/version.rb +1 -1
- data/spec/cli_spec.rb +1 -2
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/json_feed/json_feed_not_indexed.yml +71 -1
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed/not_indexed_posts.yml +71 -1
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_with_institutional_author.yml +56 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/wordpress_post_with_tracking_code_on_url.yml +60 -0
- data/spec/readers/json_feed_reader_spec.rb +50 -2
- data/spec/readers/ris_reader_spec.rb +1 -1
- data/spec/readers/schema_org_reader_spec.rb +1 -3
- data/spec/writers/schema_org_writer_spec.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 533ba980ff639a50d0a61e345be68413bdf63467fc319685b6b64c9b466c7bf5
|
4
|
+
data.tar.gz: 3b87fd2fba942083c9962f9acf6bc5e99d54422f977d5f8b27c99cb6617bf5d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20cb1df5c515d34a2b782f48479e8f6ae271eb74ae23b685478d216034109677602f388468cd6b86944513f48b6f3e2a3544cf1d8359c46ce68369a0e20edfa0
|
7
|
+
data.tar.gz: aeedc938048a579bc6fa903a287a6f551e1e6e2e340a8809dc0e3505f0da134806f30ce2110f14394a03d3a3a82d4b9a6f8457e0dae5e51b2a49b17032279dfb
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
commonmeta-ruby (3.3.
|
4
|
+
commonmeta-ruby (3.3.10)
|
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.0.
|
30
|
+
activesupport (7.0.6)
|
31
31
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
32
32
|
i18n (>= 1.6, < 2)
|
33
33
|
minitest (>= 5.1)
|
@@ -113,6 +113,7 @@ GEM
|
|
113
113
|
oj (~> 3)
|
114
114
|
optimist (~> 3)
|
115
115
|
jwt (2.7.1)
|
116
|
+
language_server-protocol (3.17.0.3)
|
116
117
|
latex-decode (0.4.0)
|
117
118
|
link_header (0.0.8)
|
118
119
|
llhttp-ffi (0.4.0)
|
@@ -186,12 +187,13 @@ GEM
|
|
186
187
|
rspec-mocks (3.12.5)
|
187
188
|
diff-lcs (>= 1.2.0, < 2.0)
|
188
189
|
rspec-support (~> 3.12.0)
|
189
|
-
rspec-support (3.12.
|
190
|
+
rspec-support (3.12.1)
|
190
191
|
rspec-xsd (0.1.0)
|
191
192
|
nokogiri (~> 1.6)
|
192
193
|
rspec (~> 3)
|
193
|
-
rubocop (1.
|
194
|
+
rubocop (1.54.0)
|
194
195
|
json (~> 2.3)
|
196
|
+
language_server-protocol (>= 3.17.0)
|
195
197
|
parallel (~> 1.10)
|
196
198
|
parser (>= 3.2.2.3)
|
197
199
|
rainbow (>= 2.2.2, < 4.0)
|
@@ -245,7 +247,7 @@ GEM
|
|
245
247
|
unicode-display_width (2.4.2)
|
246
248
|
unicode-types (1.8.0)
|
247
249
|
uuidtools (2.2.0)
|
248
|
-
vcr (6.
|
250
|
+
vcr (6.2.0)
|
249
251
|
webmock (3.18.1)
|
250
252
|
addressable (>= 2.8.0)
|
251
253
|
crack (>= 0.3.2)
|
@@ -63,6 +63,8 @@ module Commonmeta
|
|
63
63
|
type = 'Person'
|
64
64
|
elsif type.blank? && is_personal_name?(name: name) && name.to_s.exclude?(';')
|
65
65
|
type = 'Person'
|
66
|
+
elsif type.blank? && name.present? && !is_personal_name?(name: name)
|
67
|
+
type = 'Organization'
|
66
68
|
end
|
67
69
|
|
68
70
|
# parse author contributor role
|
@@ -127,8 +129,8 @@ module Commonmeta
|
|
127
129
|
def is_personal_name?(name: nil)
|
128
130
|
return true if name_exists?(name.to_s.split.first) || name_exists?(name.to_s.split(', ').last)
|
129
131
|
|
130
|
-
# check if a name has only one word, e.g. "FamousOrganization"
|
131
|
-
return false if name.to_s.split(' ').size == 1
|
132
|
+
# check if a name has only one word, e.g. "FamousOrganization", not including commas
|
133
|
+
return false if name.to_s.split(' ').size == 1 && name.to_s.exclude?(',')
|
132
134
|
|
133
135
|
# check for suffixes, e.g. "John Smith, MD"
|
134
136
|
return true if %w[MD PhD].include? name.split(', ').last
|
data/lib/commonmeta/cli.rb
CHANGED
@@ -105,8 +105,8 @@ module Commonmeta
|
|
105
105
|
|
106
106
|
desc "", "json_feed_not_indexed"
|
107
107
|
|
108
|
-
def json_feed_not_indexed
|
109
|
-
puts get_json_feed_not_indexed
|
108
|
+
def json_feed_not_indexed
|
109
|
+
puts get_json_feed_not_indexed
|
110
110
|
end
|
111
111
|
|
112
112
|
desc "", "json_feed_by_blog"
|
@@ -105,10 +105,10 @@ module Commonmeta
|
|
105
105
|
posts.map { |post| post["uuid"] }.first
|
106
106
|
end
|
107
107
|
|
108
|
-
def get_json_feed_not_indexed
|
109
|
-
# get JSON Feed items not indexed in Crossref since
|
108
|
+
def get_json_feed_not_indexed
|
109
|
+
# get JSON Feed items not indexed in Crossref since they have been last updated
|
110
110
|
|
111
|
-
url = json_feed_not_indexed_url
|
111
|
+
url = json_feed_not_indexed_url
|
112
112
|
response = HTTP.get(url)
|
113
113
|
return { "string" => nil, "state" => "not_found" } unless response.status.success?
|
114
114
|
|
data/lib/commonmeta/utils.rb
CHANGED
@@ -1437,8 +1437,8 @@ module Commonmeta
|
|
1437
1437
|
Base32::URL.decode(id)
|
1438
1438
|
end
|
1439
1439
|
|
1440
|
-
def json_feed_not_indexed_url
|
1441
|
-
"https://rogue-scholar.org/api/posts/not_indexed
|
1440
|
+
def json_feed_not_indexed_url
|
1441
|
+
"https://rogue-scholar.org/api/posts/not_indexed"
|
1442
1442
|
end
|
1443
1443
|
|
1444
1444
|
def json_feed_unregistered_url
|
data/lib/commonmeta/version.rb
CHANGED
data/spec/cli_spec.rb
CHANGED
@@ -371,8 +371,7 @@ describe Commonmeta::CLI do
|
|
371
371
|
end
|
372
372
|
|
373
373
|
it "json_feed_not_indexed" do
|
374
|
-
|
375
|
-
expect { subject.json_feed_not_indexed input }.to output(/ab58e412-06eb-42b7-b81a-d340825b9d48/).to_stdout
|
374
|
+
expect { subject.json_feed_not_indexed }.to output(/b1038a3f-c5aa-4a68-97cb-5c68b27942f7/).to_stdout
|
376
375
|
end
|
377
376
|
|
378
377
|
it "json_feed_by_blog" do
|
@@ -2152,4 +2152,74 @@ http_interactions:
|
|
2152
2152
|
the Science","description":"Ein Blog aus dem Admin-Bereich der Wissenschaft","language":"de","favicon":null,"feed_url":"https://ulirockenbauch.blog/feed/atom/","home_page_url":"https://ulirockenbauch.blog","user_id":"8498eaf6-8c58-4b58-bc15-27eda292b1aa","created_at":"2023-05-31T07:28:16+00:00","indexed_at":"2023-04-21","feed_format":"application/atom+xml","license":"https://creativecommons.org/licenses/by/4.0/legalcode","generator":"WordPress
|
2153
2153
|
(.com)","category":"Social Sciences","prefix":"10.59350","modified_at":"2023-04-13T17:48:41+00:00","version":"https://jsonfeed.org/version/1.1","backlog":true}}]'
|
2154
2154
|
recorded_at: Fri, 16 Jun 2023 06:11:32 GMT
|
2155
|
-
|
2155
|
+
- request:
|
2156
|
+
method: get
|
2157
|
+
uri: https://rogue-scholar.org/api/posts/not_indexed
|
2158
|
+
body:
|
2159
|
+
encoding: UTF-8
|
2160
|
+
string: ''
|
2161
|
+
headers:
|
2162
|
+
Connection:
|
2163
|
+
- close
|
2164
|
+
Host:
|
2165
|
+
- rogue-scholar.org
|
2166
|
+
User-Agent:
|
2167
|
+
- http.rb/5.1.1
|
2168
|
+
response:
|
2169
|
+
status:
|
2170
|
+
code: 200
|
2171
|
+
message: OK
|
2172
|
+
headers:
|
2173
|
+
Age:
|
2174
|
+
- '0'
|
2175
|
+
Cache-Control:
|
2176
|
+
- public, max-age=0, must-revalidate
|
2177
|
+
Content-Length:
|
2178
|
+
- '4252'
|
2179
|
+
Content-Type:
|
2180
|
+
- application/json; charset=utf-8
|
2181
|
+
Date:
|
2182
|
+
- Sat, 01 Jul 2023 18:57:43 GMT
|
2183
|
+
Etag:
|
2184
|
+
- '"ll4w4ic9co3a0"'
|
2185
|
+
Server:
|
2186
|
+
- Vercel
|
2187
|
+
Strict-Transport-Security:
|
2188
|
+
- max-age=63072000
|
2189
|
+
X-Matched-Path:
|
2190
|
+
- "/api/posts/[[...params]]"
|
2191
|
+
X-Vercel-Cache:
|
2192
|
+
- MISS
|
2193
|
+
X-Vercel-Id:
|
2194
|
+
- fra1::iad1::sx58r-1688237863458-f29812df0cd7
|
2195
|
+
Connection:
|
2196
|
+
- close
|
2197
|
+
body:
|
2198
|
+
encoding: UTF-8
|
2199
|
+
string: '[{"id":"https://doi.org/10.53731/r294649-6f79289-8cw1w","uuid":"b1038a3f-c5aa-4a68-97cb-5c68b27942f7","url":"https://blog.front-matter.io/posts/re3data-org-registry-of-research-data-repositories-launched","title":"re3data.org:
|
2200
|
+
registry of research data repositories launched","summary":"Earlier this week
|
2201
|
+
re3data.org – the Registry of Research Data Repositories – officially launched.
|
2202
|
+
The registry is nicely described in a preprint also published this week.re3data.org
|
2203
|
+
offers researchers, funding organizations, libraries and publishers and overview
|
2204
|
+
of the heterogeneous research data repository landscape. Information icons
|
2205
|
+
help researchers to identify an adequate repository for the storage and reuse
|
2206
|
+
of their data.I really like re3data.org, and that is not because I personally
|
2207
|
+
know...","date_published":"2013-06-01T00:00:00+00:00","date_modified":"2023-06-29T18:04:53+00:00","date_indexed":"2023-06-28T18:13:09+00:00","authors":[{"url":"https://orcid.org/0000-0003-1419-2405","name":"Martin
|
2208
|
+
Fenner"}],"image":"https://blog.front-matter.io/content/images/2022/08/figure2.png","tags":["News"],"language":"en","references":[{"doi":"https://doi.org/10.7287/peerj.preprints.21v1","key":"ref1"},{"doi":"https://doi.org/10.2312/re3.002","key":"ref2"}],"blog_id":"f0m0e38","blog":{"id":"f0m0e38","title":"Front
|
2209
|
+
Matter","description":"The Front Matter Blog covers the intersection of science
|
2210
|
+
and technology since 2007.","language":"en","favicon":"https://blog.front-matter.io/favicon.png","feed_url":"https://blog.front-matter.io/atom-complete/","home_page_url":"https://blog.front-matter.io","user_id":"8498eaf6-8c58-4b58-bc15-27eda292b1aa","created_at":"2023-05-31T07:20:33+00:00","indexed_at":"2023-01-02","feed_format":"application/atom+xml","license":"https://creativecommons.org/licenses/by/4.0/legalcode","generator":"Ghost
|
2211
|
+
5.52","category":"Engineering and Technology","prefix":"10.53731","modified_at":"2023-06-29T18:04:53+00:00","version":"https://jsonfeed.org/version/1.1","backlog":false,"authors":null,"current_feed_url":"https://blog.front-matter.io/atom/","expired":null}},{"id":"https://doi.org/10.53731/r294649-6f79289-8cw3h","uuid":"e4e13c41-5991-41b6-811b-6271510c1b0e","url":"https://blog.front-matter.io/posts/increased-cancer-risk-following-computed-tomography-scans","title":"Increased
|
2212
|
+
cancer risk following computed tomography scans","summary":"Two papers (this
|
2213
|
+
and this) and an editorial in the latest issue of Archives of Internal Medicine
|
2214
|
+
examine the cancer risks associated with the use of computed tomography (CT)
|
2215
|
+
examinations.1Ionizing radiation increases the risk for developing cancer.
|
2216
|
+
There is direct evidence from atomic bomb survivors in Japan in 1945 and from
|
2217
|
+
nuclear accidents such as the one in Chernobyl in 1986. There are no studies
|
2218
|
+
directly demonstrating an increased cancer risk from the diagnostic use of
|
2219
|
+
X-rays (either...","date_published":"2009-12-20T00:00:00+00:00","date_modified":"2023-06-29T17:49:57+00:00","date_indexed":"2023-06-28T18:13:09+00:00","authors":[{"url":"https://orcid.org/0000-0003-1419-2405","name":"Martin
|
2220
|
+
Fenner"}],"image":"https://blog.front-matter.io/content/images/2022/08/ioi90119f2.jpg","tags":["Feature"],"language":"en","references":[{"doi":"https://doi.org/10.1001/archinternmed.2009.427","key":"ref1"},{"doi":"https://doi.org/10.1001/archinternmed.2009.440","key":"ref2"},{"doi":"https://doi.org/10.1001/archinternmed.2009.453","key":"ref3"}],"blog_id":"f0m0e38","blog":{"id":"f0m0e38","title":"Front
|
2221
|
+
Matter","description":"The Front Matter Blog covers the intersection of science
|
2222
|
+
and technology since 2007.","language":"en","favicon":"https://blog.front-matter.io/favicon.png","feed_url":"https://blog.front-matter.io/atom-complete/","home_page_url":"https://blog.front-matter.io","user_id":"8498eaf6-8c58-4b58-bc15-27eda292b1aa","created_at":"2023-05-31T07:20:33+00:00","indexed_at":"2023-01-02","feed_format":"application/atom+xml","license":"https://creativecommons.org/licenses/by/4.0/legalcode","generator":"Ghost
|
2223
|
+
5.52","category":"Engineering and Technology","prefix":"10.53731","modified_at":"2023-06-29T18:04:53+00:00","version":"https://jsonfeed.org/version/1.1","backlog":false,"authors":null,"current_feed_url":"https://blog.front-matter.io/atom/","expired":null}}]'
|
2224
|
+
recorded_at: Sat, 01 Jul 2023 18:57:43 GMT
|
2225
|
+
recorded_with: VCR 6.2.0
|
@@ -1420,4 +1420,74 @@ http_interactions:
|
|
1420
1420
|
highlights interesting science stories from around the web.\",\"language\":\"en\",\"favicon\":\"https://syldavia-gazette.org/favicon.png\",\"feed_url\":\"https://syldavia-gazette.org/atom/\",\"home_page_url\":\"https://syldavia-gazette.org\",\"user_id\":\"8498eaf6-8c58-4b58-bc15-27eda292b1aa\",\"created_at\":\"2023-05-31T16:54:04+00:00\",\"indexed_at\":\"2023-02-01\",\"feed_format\":\"application/atom+xml\",\"license\":\"https://creativecommons.org/licenses/by/4.0/legalcode\",\"generator\":\"Ghost
|
1421
1421
|
5.40\",\"category\":\"Humanities\",\"prefix\":\"10.53731\",\"modified_at\":\"2023-03-15T20:37:00+00:00\",\"version\":\"https://jsonfeed.org/version/1.1\",\"backlog\":false,\"authors\":null}}]"
|
1422
1422
|
recorded_at: Sun, 18 Jun 2023 15:23:51 GMT
|
1423
|
-
|
1423
|
+
- request:
|
1424
|
+
method: get
|
1425
|
+
uri: https://rogue-scholar.org/api/posts/not_indexed
|
1426
|
+
body:
|
1427
|
+
encoding: UTF-8
|
1428
|
+
string: ''
|
1429
|
+
headers:
|
1430
|
+
Connection:
|
1431
|
+
- close
|
1432
|
+
Host:
|
1433
|
+
- rogue-scholar.org
|
1434
|
+
User-Agent:
|
1435
|
+
- http.rb/5.1.1
|
1436
|
+
response:
|
1437
|
+
status:
|
1438
|
+
code: 200
|
1439
|
+
message: OK
|
1440
|
+
headers:
|
1441
|
+
Age:
|
1442
|
+
- '0'
|
1443
|
+
Cache-Control:
|
1444
|
+
- public, max-age=0, must-revalidate
|
1445
|
+
Content-Length:
|
1446
|
+
- '4252'
|
1447
|
+
Content-Type:
|
1448
|
+
- application/json; charset=utf-8
|
1449
|
+
Date:
|
1450
|
+
- Sat, 01 Jul 2023 18:57:39 GMT
|
1451
|
+
Etag:
|
1452
|
+
- '"ll4w4ic9co3a0"'
|
1453
|
+
Server:
|
1454
|
+
- Vercel
|
1455
|
+
Strict-Transport-Security:
|
1456
|
+
- max-age=63072000
|
1457
|
+
X-Matched-Path:
|
1458
|
+
- "/api/posts/[[...params]]"
|
1459
|
+
X-Vercel-Cache:
|
1460
|
+
- MISS
|
1461
|
+
X-Vercel-Id:
|
1462
|
+
- fra1::iad1::jjzwd-1688237856423-827b9226d892
|
1463
|
+
Connection:
|
1464
|
+
- close
|
1465
|
+
body:
|
1466
|
+
encoding: UTF-8
|
1467
|
+
string: '[{"id":"https://doi.org/10.53731/r294649-6f79289-8cw1w","uuid":"b1038a3f-c5aa-4a68-97cb-5c68b27942f7","url":"https://blog.front-matter.io/posts/re3data-org-registry-of-research-data-repositories-launched","title":"re3data.org:
|
1468
|
+
registry of research data repositories launched","summary":"Earlier this week
|
1469
|
+
re3data.org – the Registry of Research Data Repositories – officially launched.
|
1470
|
+
The registry is nicely described in a preprint also published this week.re3data.org
|
1471
|
+
offers researchers, funding organizations, libraries and publishers and overview
|
1472
|
+
of the heterogeneous research data repository landscape. Information icons
|
1473
|
+
help researchers to identify an adequate repository for the storage and reuse
|
1474
|
+
of their data.I really like re3data.org, and that is not because I personally
|
1475
|
+
know...","date_published":"2013-06-01T00:00:00+00:00","date_modified":"2023-06-29T18:04:53+00:00","date_indexed":"2023-06-28T18:13:09+00:00","authors":[{"url":"https://orcid.org/0000-0003-1419-2405","name":"Martin
|
1476
|
+
Fenner"}],"image":"https://blog.front-matter.io/content/images/2022/08/figure2.png","tags":["News"],"language":"en","references":[{"doi":"https://doi.org/10.7287/peerj.preprints.21v1","key":"ref1"},{"doi":"https://doi.org/10.2312/re3.002","key":"ref2"}],"blog_id":"f0m0e38","blog":{"id":"f0m0e38","title":"Front
|
1477
|
+
Matter","description":"The Front Matter Blog covers the intersection of science
|
1478
|
+
and technology since 2007.","language":"en","favicon":"https://blog.front-matter.io/favicon.png","feed_url":"https://blog.front-matter.io/atom-complete/","home_page_url":"https://blog.front-matter.io","user_id":"8498eaf6-8c58-4b58-bc15-27eda292b1aa","created_at":"2023-05-31T07:20:33+00:00","indexed_at":"2023-01-02","feed_format":"application/atom+xml","license":"https://creativecommons.org/licenses/by/4.0/legalcode","generator":"Ghost
|
1479
|
+
5.52","category":"Engineering and Technology","prefix":"10.53731","modified_at":"2023-06-29T18:04:53+00:00","version":"https://jsonfeed.org/version/1.1","backlog":false,"authors":null,"current_feed_url":"https://blog.front-matter.io/atom/","expired":null}},{"id":"https://doi.org/10.53731/r294649-6f79289-8cw3h","uuid":"e4e13c41-5991-41b6-811b-6271510c1b0e","url":"https://blog.front-matter.io/posts/increased-cancer-risk-following-computed-tomography-scans","title":"Increased
|
1480
|
+
cancer risk following computed tomography scans","summary":"Two papers (this
|
1481
|
+
and this) and an editorial in the latest issue of Archives of Internal Medicine
|
1482
|
+
examine the cancer risks associated with the use of computed tomography (CT)
|
1483
|
+
examinations.1Ionizing radiation increases the risk for developing cancer.
|
1484
|
+
There is direct evidence from atomic bomb survivors in Japan in 1945 and from
|
1485
|
+
nuclear accidents such as the one in Chernobyl in 1986. There are no studies
|
1486
|
+
directly demonstrating an increased cancer risk from the diagnostic use of
|
1487
|
+
X-rays (either...","date_published":"2009-12-20T00:00:00+00:00","date_modified":"2023-06-29T17:49:57+00:00","date_indexed":"2023-06-28T18:13:09+00:00","authors":[{"url":"https://orcid.org/0000-0003-1419-2405","name":"Martin
|
1488
|
+
Fenner"}],"image":"https://blog.front-matter.io/content/images/2022/08/ioi90119f2.jpg","tags":["Feature"],"language":"en","references":[{"doi":"https://doi.org/10.1001/archinternmed.2009.427","key":"ref1"},{"doi":"https://doi.org/10.1001/archinternmed.2009.440","key":"ref2"},{"doi":"https://doi.org/10.1001/archinternmed.2009.453","key":"ref3"}],"blog_id":"f0m0e38","blog":{"id":"f0m0e38","title":"Front
|
1489
|
+
Matter","description":"The Front Matter Blog covers the intersection of science
|
1490
|
+
and technology since 2007.","language":"en","favicon":"https://blog.front-matter.io/favicon.png","feed_url":"https://blog.front-matter.io/atom-complete/","home_page_url":"https://blog.front-matter.io","user_id":"8498eaf6-8c58-4b58-bc15-27eda292b1aa","created_at":"2023-05-31T07:20:33+00:00","indexed_at":"2023-01-02","feed_format":"application/atom+xml","license":"https://creativecommons.org/licenses/by/4.0/legalcode","generator":"Ghost
|
1491
|
+
5.52","category":"Engineering and Technology","prefix":"10.53731","modified_at":"2023-06-29T18:04:53+00:00","version":"https://jsonfeed.org/version/1.1","backlog":false,"authors":null,"current_feed_url":"https://blog.front-matter.io/atom/","expired":null}}]'
|
1492
|
+
recorded_at: Sat, 01 Jul 2023 18:57:39 GMT
|
1493
|
+
recorded_with: VCR 6.2.0
|
@@ -0,0 +1,56 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://rogue-scholar.org/api/posts/2b3cdd27-5123-4167-9482-3c074392e2d2
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Connection:
|
11
|
+
- close
|
12
|
+
Host:
|
13
|
+
- 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
|
+
Age:
|
22
|
+
- '0'
|
23
|
+
Cache-Control:
|
24
|
+
- public, max-age=0, must-revalidate
|
25
|
+
Content-Length:
|
26
|
+
- '1509'
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Date:
|
30
|
+
- Wed, 28 Jun 2023 07:30:24 GMT
|
31
|
+
Etag:
|
32
|
+
- '"8258swzkwh15x"'
|
33
|
+
Server:
|
34
|
+
- Vercel
|
35
|
+
Strict-Transport-Security:
|
36
|
+
- max-age=63072000
|
37
|
+
X-Matched-Path:
|
38
|
+
- "/api/posts/[slug]"
|
39
|
+
X-Vercel-Cache:
|
40
|
+
- MISS
|
41
|
+
X-Vercel-Id:
|
42
|
+
- fra1::iad1::wc777-1687937422070-9bb853322252
|
43
|
+
Connection:
|
44
|
+
- close
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: '{"id":"63cef642602205003d6f50fb","uuid":"2b3cdd27-5123-4167-9482-3c074392e2d2","url":"https://blog.oa.works/nature-features-oa-reports-work-putting-oa-policy-into-practice/","title":"Nature
|
48
|
+
features OA.Report''s work putting OA policy into practice!","summary":"After
|
49
|
+
a couple of years of working to support institutions implementing their OA
|
50
|
+
policies, we''re so proud to see OA.Report, our development partner, and one
|
51
|
+
of our collaborators featured in Nature. We appreciate Nature bringing attention
|
52
|
+
to the progress being made in more effectively implementing OA policies.","date_published":"2023-01-24T11:11:47Z","date_modified":null,"date_indexed":"2023-06-20T06:34:19.365+00:00","authors":[{"url":null,"name":"OA.Works"}],"image":"https://blog.oa.works/content/images/2023/01/nature-website-v2.png","tags":["OA.Report"],"language":"en","references":[],"blog_id":"h7bpg11","blog":{"id":"h7bpg11","title":"OA.Works
|
53
|
+
Blog","description":"OA.Works Blog","language":"en","favicon":"https://blog.oa.works/favicon.png","feed_url":"https://blog.oa.works/rss/","home_page_url":"https://blog.oa.works/","user_id":"8498eaf6-8c58-4b58-bc15-27eda292b1aa","created_at":"2023-05-31T14:11:14+00:00","indexed_at":"2023-01-04","feed_format":"application/rss+xml","license":"https://creativecommons.org/licenses/by/4.0/legalcode","generator":"Ghost
|
54
|
+
5.53","category":"Engineering and Technology","prefix":null,"modified_at":"2023-03-23T12:24:58+00:00","version":"https://jsonfeed.org/version/1.1","backlog":true,"authors":null}}'
|
55
|
+
recorded_at: Wed, 28 Jun 2023 07:30:24 GMT
|
56
|
+
recorded_with: VCR 6.1.0
|
@@ -0,0 +1,60 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://rogue-scholar.org/api/posts/5d95d90d-ff59-4c8b-b7f8-44e6b45fd593
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Connection:
|
11
|
+
- close
|
12
|
+
Host:
|
13
|
+
- 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
|
+
Age:
|
22
|
+
- '0'
|
23
|
+
Cache-Control:
|
24
|
+
- public, max-age=0, must-revalidate
|
25
|
+
Content-Length:
|
26
|
+
- '1844'
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Date:
|
30
|
+
- Wed, 28 Jun 2023 07:39:01 GMT
|
31
|
+
Etag:
|
32
|
+
- '"6emrve7vie1ew"'
|
33
|
+
Server:
|
34
|
+
- Vercel
|
35
|
+
Strict-Transport-Security:
|
36
|
+
- max-age=63072000
|
37
|
+
X-Matched-Path:
|
38
|
+
- "/api/posts/[slug]"
|
39
|
+
X-Vercel-Cache:
|
40
|
+
- MISS
|
41
|
+
X-Vercel-Id:
|
42
|
+
- fra1::iad1::q9g2k-1687937937528-5f071f224fc7
|
43
|
+
Connection:
|
44
|
+
- close
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: '{"id":"https://doi.org/10.59350/tpa8t-j6292","uuid":"5d95d90d-ff59-4c8b-b7f8-44e6b45fd593","url":"https://www.samuelmoore.org/2023/04/20/how-to-cultivate-good-closures-scaling-small-and-the-limits-of-openness","title":"How
|
48
|
+
to cultivate good closures: ‘scaling small’ and the limits of openness","summary":"Text
|
49
|
+
of a talk given to the COPIM end-of-project conference: “Scaling Small: Community-Owned
|
50
|
+
Futures for Open Access Books”, April 20th 2023 Open access publishing has
|
51
|
+
always had a difficult relationship with smoothness and scale. Openness implies
|
52
|
+
seamlessness, limitlessness or structureless-ness – or the idea that the removal
|
53
|
+
of price and permission barriers is what’s needed to allow research to reach
|
54
|
+
its full potential. The drive for seamlessness is on display in much of the
|
55
|
+
push for...","date_published":"2023-04-20T15:37:20Z","date_modified":"2023-06-19T11:01:51Z","date_indexed":"2023-06-20T06:34:19+00:00","authors":[{"url":"https://orcid.org/0000-0002-0504-2897","name":"Samuel
|
56
|
+
Moore"}],"image":null,"tags":["Open access"],"language":"en","references":null,"blog_id":"gr1by89","blog":{"id":"gr1by89","title":"Samuel
|
57
|
+
Moore","description":"publishing, technology, commons","language":"en","favicon":"https://www.samuelmoore.org/wp-content/uploads/2019/02/cropped-cropped-cropped-roAorange-icon-2-32x32.png","feed_url":"https://www.samuelmoore.org/feed/atom/","home_page_url":"https://www.samuelmoore.org/","user_id":"8498eaf6-8c58-4b58-bc15-27eda292b1aa","created_at":"2023-05-31T14:25:06+00:00","indexed_at":"2023-01-05","feed_format":"application/atom+xml","license":"https://creativecommons.org/licenses/by/4.0/legalcode","generator":"WordPress
|
58
|
+
6.2.2","category":"Social Sciences","prefix":null,"modified_at":"2023-04-20T15:37:20+00:00","version":"https://jsonfeed.org/version/1.1","backlog":true,"authors":null}}'
|
59
|
+
recorded_at: Wed, 28 Jun 2023 07:39:01 GMT
|
60
|
+
recorded_with: VCR 6.1.0
|
@@ -174,6 +174,54 @@ describe Commonmeta::Metadata, vcr: true do
|
|
174
174
|
expect(subject.references.length).to eq(3)
|
175
175
|
expect(subject.references.first).to eq("key" => "ref1", "url" => "https://sauroposeidon.files.wordpress.com/2010/04/foster-and-wedel-2014-haplocanthosaurus-from-snowmass-colorado.pdf")
|
176
176
|
end
|
177
|
+
|
178
|
+
it "wordpress post with tracking code on url" do
|
179
|
+
input = "https://rogue-scholar.org/api/posts/5d95d90d-ff59-4c8b-b7f8-44e6b45fd593"
|
180
|
+
subject = described_class.new(input: input)
|
181
|
+
puts subject.errors
|
182
|
+
# expect(subject.valid?).to be true
|
183
|
+
expect(subject.id).to eq("https://doi.org/10.59350/tpa8t-j6292")
|
184
|
+
expect(subject.url).to eq("https://www.samuelmoore.org/2023/04/20/how-to-cultivate-good-closures-scaling-small-and-the-limits-of-openness")
|
185
|
+
expect(subject.type).to eq("Article")
|
186
|
+
expect(subject.creators.length).to eq(1)
|
187
|
+
expect(subject.creators.first).to eq("familyName"=>"Moore", "givenName"=>"Samuel", "id"=>"https://orcid.org/0000-0002-0504-2897", "type"=>"Person")
|
188
|
+
expect(subject.titles).to eq([{ "title" => "How to cultivate good closures: ‘scaling small’ and the limits of openness" }])
|
189
|
+
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
190
|
+
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
191
|
+
expect(subject.date).to eq("published"=>"2023-04-20", "updated"=>"2023-06-19")
|
192
|
+
expect(subject.descriptions.first["description"]).to start_with("Text of a talk given to the COPIM end-of-project conference")
|
193
|
+
expect(subject.publisher).to eq("name" => "Samuel Moore")
|
194
|
+
expect(subject.subjects).to eq([{ "subject" => "Social sciences" },
|
195
|
+
{ "schemeUri" => "http://www.oecd.org/science/inno/38235147.pdf",
|
196
|
+
"subject" => "FOS: Social sciences",
|
197
|
+
"subjectScheme" => "Fields of Science and Technology (FOS)" }])
|
198
|
+
expect(subject.language).to eq("en")
|
199
|
+
expect(subject.container).to eq("identifier" => "https://www.samuelmoore.org/", "identifierType" => "URL", "title" => "Samuel Moore", "type" => "Periodical")
|
200
|
+
expect(subject.references).to be_nil
|
201
|
+
end
|
202
|
+
|
203
|
+
it "ghost post with institutional author" do
|
204
|
+
input = "https://rogue-scholar.org/api/posts/2b3cdd27-5123-4167-9482-3c074392e2d2"
|
205
|
+
subject = described_class.new(input: input)
|
206
|
+
expect(subject.valid?).to be true
|
207
|
+
expect(subject.id).to eq("https://blog.oa.works/nature-features-oa-reports-work-putting-oa-policy-into-practice")
|
208
|
+
expect(subject.url).to eq("https://blog.oa.works/nature-features-oa-reports-work-putting-oa-policy-into-practice")
|
209
|
+
expect(subject.type).to eq("Article")
|
210
|
+
expect(subject.creators.length).to eq(1)
|
211
|
+
expect(subject.creators.first).to eq("name"=>"OA.Works", "type"=>"Organization")
|
212
|
+
expect(subject.titles).to eq([{ "title" => "Nature features OA.Report's work putting OA policy into practice!" }])
|
213
|
+
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
214
|
+
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
215
|
+
expect(subject.date).to eq("published" => "2023-01-24")
|
216
|
+
expect(subject.descriptions.first["description"]).to start_with("After a couple of years of working to support institutions implementing their OA policies")
|
217
|
+
expect(subject.publisher).to eq("name" => "OA.Works Blog")
|
218
|
+
expect(subject.subjects).to eq([{ "subject" => "Engineering and technology" },
|
219
|
+
{ "schemeUri" => "http://www.oecd.org/science/inno/38235147.pdf",
|
220
|
+
"subject" => "FOS: Engineering and technology",
|
221
|
+
"subjectScheme" => "Fields of Science and Technology (FOS)" }])
|
222
|
+
expect(subject.language).to eq("en")
|
223
|
+
expect(subject.container).to eq("identifier" => "https://blog.oa.works/", "identifierType" => "URL", "title" => "OA.Works Blog", "type" => "Periodical")
|
224
|
+
end
|
177
225
|
|
178
226
|
it "upstream post with references" do
|
179
227
|
input = "https://rogue-scholar.org/api/posts/954f8138-0ecd-4090-87c5-cef1297f1470"
|
@@ -334,8 +382,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
334
382
|
end
|
335
383
|
|
336
384
|
it "not indexed posts" do
|
337
|
-
response = subject.get_json_feed_not_indexed
|
338
|
-
expect(response).to eq("
|
385
|
+
response = subject.get_json_feed_not_indexed
|
386
|
+
expect(response).to eq("b1038a3f-c5aa-4a68-97cb-5c68b27942f7")
|
339
387
|
end
|
340
388
|
|
341
389
|
it "by blog_id" do
|
@@ -50,7 +50,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
50
50
|
expect(subject.state).to eq('not_found')
|
51
51
|
expect(subject.id).to eq('https://doi.org/10.7554/elife.01567')
|
52
52
|
expect(subject.type).to eq('Dissertation')
|
53
|
-
expect(subject.creators).to eq([{
|
53
|
+
expect(subject.creators).to eq([{"familyName"=>"Toparlar", "givenName"=>"Y.", "type"=>"Person"}])
|
54
54
|
expect(subject.titles).to eq([{ 'title' => 'A multiscale analysis of the urban heat island effect' }])
|
55
55
|
expect(subject.descriptions.first['description']).to start_with('Designing the climates of cities')
|
56
56
|
expect(subject.date).to eq('created' => '2018-04-25', 'published' => '2018-04-25')
|
@@ -153,9 +153,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
153
153
|
expect(subject.titles).to eq([{ 'title' => 'Summary data ankylosing spondylitis GWAS' }])
|
154
154
|
expect(subject.container).to eq('identifier' => 'https://dataverse.harvard.edu',
|
155
155
|
'identifierType' => 'URL', 'title' => 'Harvard Dataverse', 'type' => 'DataRepository')
|
156
|
-
expect(subject.creators).to eq([{
|
157
|
-
'name' => 'International Genetics of Ankylosing Spondylitis Consortium (IGAS)'
|
158
|
-
}])
|
156
|
+
expect(subject.creators).to eq([{"name"=>"International Genetics of Ankylosing Spondylitis Consortium (IGAS)", "type"=>"Organization"}])
|
159
157
|
expect(subject.subjects).to eq([{ 'subject' => 'Medicine, health and life sciences' },
|
160
158
|
{ 'subject' => 'genome-wide association studies' },
|
161
159
|
{ 'subject' => 'Ankylosing spondylitis' }])
|
@@ -177,7 +177,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
177
177
|
expect(json['@id']).to eq('https://doi.org/10.23725/8na3-9s47')
|
178
178
|
expect(json['@type']).to eq('Dataset')
|
179
179
|
expect(json['name']).to eq('NWD165827.recab.cram')
|
180
|
-
expect(json['author']).to eq(
|
180
|
+
expect(json['author']).to eq("@type"=>"Organization", "name"=>"TOPMed")
|
181
181
|
expect(json['includedInDataCatalog']).to be_empty
|
182
182
|
expect(json['identifier']).to eq(
|
183
183
|
[{ '@type' => 'PropertyValue',
|
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.3.
|
4
|
+
version: 3.3.10
|
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-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -870,6 +870,7 @@ files:
|
|
870
870
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/blogger_post.yml
|
871
871
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_with_author_name_suffix.yml
|
872
872
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_with_doi.yml
|
873
|
+
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_with_institutional_author.yml
|
873
874
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_with_organizational_author.yml
|
874
875
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_without_doi.yml
|
875
876
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/jekyll_post.yml
|
@@ -879,6 +880,7 @@ files:
|
|
879
880
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/upstream_post_with_references.yml
|
880
881
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/wordpress_post.yml
|
881
882
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/wordpress_post_with_references.yml
|
883
|
+
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/wordpress_post_with_tracking_code_on_url.yml
|
882
884
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_one_author/affiliation_is_space.yml
|
883
885
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_one_author/has_familyName.yml
|
884
886
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_one_author/has_name_in_display-order_with_ORCID.yml
|