commonmeta-ruby 3.3.9 → 3.3.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/commonmeta/cli.rb +2 -2
- data/lib/commonmeta/readers/json_feed_reader.rb +14 -9
- 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/readers/json_feed_reader_spec.rb +28 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8e7c60967025a09cb657d4fca3b6a2a75729d41567ae0fbe6eabae72a149d6b
|
4
|
+
data.tar.gz: c182b27c23b4ad623e0fbb9893f02e9d0a29eae30195e235f04c87018af0a3d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be7fd107870ad39838906c7abb0554267db3121c126cf7f7f913a39c3957ba80db3230aac745adb5aa109058324ffd1994796482d2e9e7ef7d10c79486826626
|
7
|
+
data.tar.gz: a662fb919e4c920485cf2766268f5e173a4758d14ff4164d77653c3a8b301eec46f8d53aeeb780d7f9553c663e505f120a04d8b607f0b63fb7f00be6e8552121
|
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.11)
|
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)
|
@@ -191,7 +191,7 @@ GEM
|
|
191
191
|
rspec-xsd (0.1.0)
|
192
192
|
nokogiri (~> 1.6)
|
193
193
|
rspec (~> 3)
|
194
|
-
rubocop (1.
|
194
|
+
rubocop (1.54.1)
|
195
195
|
json (~> 2.3)
|
196
196
|
language_server-protocol (>= 3.17.0)
|
197
197
|
parallel (~> 1.10)
|
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"
|
@@ -84,10 +84,15 @@ module Commonmeta
|
|
84
84
|
def get_references(meta)
|
85
85
|
# check that references resolve
|
86
86
|
Array.wrap(meta["references"]).reduce([]) do |sum, reference|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
87
|
+
begin
|
88
|
+
if reference["doi"] && validate_doi(reference["doi"])
|
89
|
+
sum << reference if [200, 301, 302].include? HTTP.head(reference["doi"]).status
|
90
|
+
elsif reference["url"] && validate_url(reference["url"]) == "URL"
|
91
|
+
sum << reference if [200, 301, 302].include? HTTP.head(reference["url"]).status
|
92
|
+
end
|
93
|
+
rescue => error
|
94
|
+
puts "Error: #{error.message}"
|
95
|
+
puts "Error: #{reference}"
|
91
96
|
end
|
92
97
|
|
93
98
|
sum
|
@@ -105,10 +110,10 @@ module Commonmeta
|
|
105
110
|
posts.map { |post| post["uuid"] }.first
|
106
111
|
end
|
107
112
|
|
108
|
-
def get_json_feed_not_indexed
|
109
|
-
# get JSON Feed items not indexed in Crossref since
|
113
|
+
def get_json_feed_not_indexed
|
114
|
+
# get JSON Feed items not indexed in Crossref since they have been last updated
|
110
115
|
|
111
|
-
url = json_feed_not_indexed_url
|
116
|
+
url = json_feed_not_indexed_url
|
112
117
|
response = HTTP.get(url)
|
113
118
|
return { "string" => nil, "state" => "not_found" } unless response.status.success?
|
114
119
|
|
@@ -135,7 +140,7 @@ module Commonmeta
|
|
135
140
|
return nil unless response.status.success?
|
136
141
|
|
137
142
|
post = JSON.parse(response.body.to_s)
|
138
|
-
post.to_h.dig(
|
143
|
+
post.to_h.dig("prefix")
|
139
144
|
end
|
140
145
|
|
141
146
|
def get_doi_prefix_by_json_feed_item_uuid(uuid)
|
@@ -146,7 +151,7 @@ module Commonmeta
|
|
146
151
|
return nil unless response.status.success?
|
147
152
|
|
148
153
|
post = JSON.parse(response.body.to_s)
|
149
|
-
post.to_h.dig(
|
154
|
+
post.to_h.dig("blog", "prefix")
|
150
155
|
end
|
151
156
|
end
|
152
157
|
end
|
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
|
@@ -348,6 +348,32 @@ describe Commonmeta::Metadata, vcr: true do
|
|
348
348
|
expect(subject.references).to be_nil
|
349
349
|
end
|
350
350
|
|
351
|
+
it "wordpress post with many references" do
|
352
|
+
input = "https://rogue-scholar.org/api/posts/f3dc29da-0481-4f3b-8110-4c07260fca67"
|
353
|
+
subject = described_class.new(input: input)
|
354
|
+
expect(subject.valid?).to be true
|
355
|
+
expect(subject.id).to eq("https://flavoursofopen.science/grundlagen-fur-die-entwicklung-einer-open-scholarship-strategie")
|
356
|
+
expect(subject.url).to eq("https://flavoursofopen.science/grundlagen-fur-die-entwicklung-einer-open-scholarship-strategie")
|
357
|
+
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "f3dc29da-0481-4f3b-8110-4c07260fca67", "alternateIdentifierType" => "UUID" }])
|
358
|
+
expect(subject.type).to eq("Article")
|
359
|
+
expect(subject.creators.length).to eq(1)
|
360
|
+
expect(subject.creators.first).to eq("familyName"=>"Steiner", "givenName"=>"Tobias", "id"=>"https://orcid.org/0000-0002-3158-3136", "type"=>"Person")
|
361
|
+
expect(subject.titles).to eq([{ "title" => "Grundlagen für die Entwicklung einer Open Scholarship-Strategie" }])
|
362
|
+
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
363
|
+
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
364
|
+
expect(subject.date).to eq("published"=>"2019-01-31", "updated"=>"2023-06-19")
|
365
|
+
expect(subject.descriptions.first["description"]).to start_with("Versionshistorie Version 1.0 — 16. Oktober 2017 – Erste Version des Dokuments")
|
366
|
+
expect(subject.publisher).to eq("name" => "Flavours of Open")
|
367
|
+
expect(subject.subjects).to eq([{ "subject" => "Humanities" },
|
368
|
+
{ "schemeUri" => "http://www.oecd.org/science/inno/38235147.pdf",
|
369
|
+
"subject" => "FOS: Humanities",
|
370
|
+
"subjectScheme" => "Fields of Science and Technology (FOS)" }])
|
371
|
+
expect(subject.language).to eq("de")
|
372
|
+
expect(subject.container).to eq("identifier" => "https://flavoursofopen.science", "identifierType" => "URL", "title" => "Flavours of Open", "type" => "Periodical")
|
373
|
+
expect(subject.references.length).to eq(55)
|
374
|
+
expect(subject.references.first).to eq("key" => "ref1", "url" => "http://oerstrategy.org/home/read-the-doc")
|
375
|
+
end
|
376
|
+
|
351
377
|
it "substack post with broken reference" do
|
352
378
|
input = "https://rogue-scholar.org/api/posts/2b105b29-acbc-4eae-9ff1-368803f36a4d"
|
353
379
|
subject = described_class.new(input: input)
|
@@ -382,8 +408,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
382
408
|
end
|
383
409
|
|
384
410
|
it "not indexed posts" do
|
385
|
-
response = subject.get_json_feed_not_indexed
|
386
|
-
expect(response).to eq("
|
411
|
+
response = subject.get_json_feed_not_indexed
|
412
|
+
expect(response).to eq("b1038a3f-c5aa-4a68-97cb-5c68b27942f7")
|
387
413
|
end
|
388
414
|
|
389
415
|
it "by blog_id" do
|
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.11
|
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-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|