commonmeta-ruby 3.8.1 → 3.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae080d03483347a1467f664fa167e5e2103315cbccd60713743dbe73e9499824
4
- data.tar.gz: 991d47e1e3bfa424b4660e921d9ab035f960c8e28c96ffbf4e30ab931d3eff46
3
+ metadata.gz: 120ed85370f97abfff70ce77e682f54a469f04ce9be3b1397a4ca63223b8426e
4
+ data.tar.gz: da3395f12d5a81781ea465b6ca4879f3f70239667f3d203d8fefecaff2bc8c2e
5
5
  SHA512:
6
- metadata.gz: 675c0176e21eb08f844c7c95ced271a88a5eb870f9f962b1edf9a4d29b064812d951416b5fd5bf00089e4cfbf10ad6d6d67794241251b7a86e2ac4247397aae0
7
- data.tar.gz: ab0ab117a6c0dc7103d23b84e4fadd8f6f99b6193553fc0435a174c20656c241a4c6d79b70933c0d3644bff959995dde35ed16ca2609b8d4f88b2e643baeb3be
6
+ metadata.gz: 9d8c606c1907765e252874253118e35165dfc0c7368c86c04927ee51ab8b1b5d417f08cc8fd8a8e2126e3a13175b06c344b94c4e8b35c2b99fb705ffe7c94657
7
+ data.tar.gz: c98f22a9d7f77dccc71500d91c42206332e320bf17cac6a4d994ecccee9232f490bdd2c0369e4c5100a17807a8d96890d59461515edc1b4b9772c09242515e93
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- commonmeta-ruby (3.8.1)
4
+ commonmeta-ruby (3.8.2)
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)
@@ -348,8 +348,10 @@ module Commonmeta
348
348
  xml.collection("property" => "text-mining") do
349
349
  xml.item do
350
350
  xml.resource(url, "mime_type" => "text/html")
351
- if is_rogue_scholar_doi?(doi)
352
- Array.wrap(files).each do |file|
351
+ end
352
+ if is_rogue_scholar_doi?(doi)
353
+ Array.wrap(files).each do |file|
354
+ xml.item do
353
355
  # Crossref schema currently doesn't support text/markdown
354
356
  file["mimeType"] = "text/plain" if file["mimeType"] == "text/markdown"
355
357
  xml.resource(file["url"], "mime_type" => file["mimeType"])
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Commonmeta
4
- VERSION = '3.8.1'
4
+ VERSION = '3.8.2'
5
5
  end
@@ -232,9 +232,8 @@ describe Commonmeta::Metadata, vcr: true do
232
232
  "title")).to eq("Attempts at automating journal subject classification")
233
233
  expect(crossref_xml.dig("item_number")).to eq("__content__" => "5d14ffacb9ac4e20bdc0d9248df4e80d", "item_number_type" => "uuid")
234
234
  expect(crossref_xml.dig("group_title")).to eq("Humanities")
235
- expect(crossref_xml.dig("doi_data", "collection", "item", "resource").length).to eq(4)
236
- expect(crossref_xml.dig("doi_data", "collection", "item", "resource", 2)).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.54900/n6dnt-xpq48.pdf", "mime_type" => "application/pdf")
237
-
235
+ expect(crossref_xml.dig("doi_data", "collection", "item").length).to eq(4)
236
+ expect(crossref_xml.dig("doi_data", "collection", "item", 2, "resource")).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.54900/n6dnt-xpq48.pdf", "mime_type" => "application/pdf")
238
237
  end
239
238
 
240
239
  it "json_feed_item with references" do
@@ -267,8 +266,8 @@ describe Commonmeta::Metadata, vcr: true do
267
266
  expect(crossref_xml.dig("citation_list", "citation").last).to eq("article_title" => "The Research Software Alliance (ReSA) and the community landscape", "cYear" => "2020", "doi" => "10.5281/zenodo.3699950", "key" => "ref11")
268
267
  expect(crossref_xml.dig("item_number")).to eq("__content__" => "954f81380ecd409087c5cef1297f1470", "item_number_type" => "uuid")
269
268
  expect(crossref_xml.dig("group_title")).to eq("Humanities")
270
- expect(crossref_xml.dig("doi_data", "collection", "item", "resource").length).to eq(4)
271
- expect(crossref_xml.dig("doi_data", "collection", "item", "resource", 2)).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.54900/zwm7q-vet94.pdf", "mime_type" => "application/pdf")
269
+ expect(crossref_xml.dig("doi_data", "collection", "item").length).to eq(4)
270
+ expect(crossref_xml.dig("doi_data", "collection", "item", 2, "resource")).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.54900/zwm7q-vet94.pdf", "mime_type" => "application/pdf")
272
271
  end
273
272
 
274
273
  it "json_feed_item from rogue scholar with doi" do
@@ -298,8 +297,8 @@ describe Commonmeta::Metadata, vcr: true do
298
297
  "title")).to eq("EU-Mitgliedstaaten betonen die Rolle von wissenschaftsgeleiteten Open-Access-Modellen jenseits von APCs")
299
298
  expect(crossref_xml.dig("item_number")).to eq("__content__" => "1c57855813244493b8af84c49eabc52f", "item_number_type" => "uuid")
300
299
  expect(crossref_xml.dig("group_title")).to eq("Social sciences")
301
- expect(crossref_xml.dig("doi_data", "collection", "item", "resource").length).to eq(4)
302
- expect(crossref_xml.dig("doi_data", "collection", "item", "resource", 2)).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.59350/9ry27-7cz42.pdf", "mime_type" => "application/pdf")
300
+ expect(crossref_xml.dig("doi_data", "collection", "item").length).to eq(4)
301
+ expect(crossref_xml.dig("doi_data", "collection", "item", 2, "resource")).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.59350/9ry27-7cz42.pdf", "mime_type" => "application/pdf")
303
302
  end
304
303
 
305
304
  it "json_feed_item from rogue scholar with organizational author" do
@@ -328,8 +327,8 @@ describe Commonmeta::Metadata, vcr: true do
328
327
  "title")).to eq("KU Leuven supports ResearchEquals")
329
328
  expect(crossref_xml.dig("item_number")).to eq("__content__" => "5561f8e42ff14186a8d58dacb3afe414", "item_number_type" => "uuid")
330
329
  expect(crossref_xml.dig("group_title")).to eq("Social sciences")
331
- expect(crossref_xml.dig("doi_data", "collection", "item", "resource").length).to eq(4)
332
- expect(crossref_xml.dig("doi_data", "collection", "item", "resource", 2)).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.59350/9ry27-7cz42.pdf", "mime_type" => "application/pdf")
330
+ expect(crossref_xml.dig("doi_data", "collection", "item").length).to eq(4)
331
+ expect(crossref_xml.dig("doi_data", "collection", "item", 2, "resource")).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.59350/9ry27-7cz42.pdf", "mime_type" => "application/pdf")
333
332
  end
334
333
 
335
334
  it "json_feed_item from rogue scholar with archived content" do
@@ -369,8 +368,8 @@ describe Commonmeta::Metadata, vcr: true do
369
368
  "title")).to eq("ORCID Integration Series: PANGAEA")
370
369
  expect(crossref_xml.dig("item_number")).to eq("__content__" => "570c8129e86749e68517bd783627e76e", "item_number_type" => "uuid")
371
370
  expect(crossref_xml.dig("group_title")).to eq("Computer and information sciences")
372
- expect(crossref_xml.dig("doi_data", "collection", "item", "resource").length).to eq(4)
373
- expect(crossref_xml.dig("doi_data", "collection", "item", "resource", 2)).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.59350/faeph-x4x84.pdf", "mime_type" => "application/pdf")
371
+ expect(crossref_xml.dig("doi_data", "collection", "item").length).to eq(4)
372
+ expect(crossref_xml.dig("doi_data", "collection", "item", 2, "resource")).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.59350/faeph-x4x84.pdf", "mime_type" => "application/pdf")
374
373
  end
375
374
 
376
375
  it "json_feed_item from rogue scholar with relations" do
@@ -408,8 +407,8 @@ describe Commonmeta::Metadata, vcr: true do
408
407
  "title")).to eq("Differences between ORCID and DataCite Metadata")
409
408
  expect(crossref_xml.dig("item_number")).to eq("__content__" => "8a4de44333474b82b57de3c82b6485fc", "item_number_type" => "uuid")
410
409
  expect(crossref_xml.dig("group_title")).to eq("Computer and information sciences")
411
- expect(crossref_xml.dig("doi_data", "collection", "item", "resource").length).to eq(4)
412
- expect(crossref_xml.dig("doi_data", "collection", "item", "resource", 2)).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.53731/r79v4e1-97aq74v-ag578.pdf", "mime_type" => "application/pdf")
410
+ expect(crossref_xml.dig("doi_data", "collection", "item").length).to eq(4)
411
+ expect(crossref_xml.dig("doi_data", "collection", "item", 2, "resource")).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.53731/r79v4e1-97aq74v-ag578.pdf", "mime_type" => "application/pdf")
413
412
  end
414
413
 
415
414
  it "json_feed_item from rogue scholar with relations and funding" do
@@ -446,8 +445,8 @@ describe Commonmeta::Metadata, vcr: true do
446
445
  "title")).to eq("Tracking the Growth of the PID Graph")
447
446
  expect(crossref_xml.dig("item_number")).to eq("__content__" => "e58dc9c8b8704db28896238b3246c551", "item_number_type" => "uuid")
448
447
  expect(crossref_xml.dig("group_title")).to eq("Computer and information sciences")
449
- expect(crossref_xml.dig("doi_data", "collection", "item", "resource").length).to eq(4)
450
- expect(crossref_xml.dig("doi_data", "collection", "item", "resource", 2)).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.53731/r79s4nh-97aq74v-ag4t1.pdf", "mime_type" => "application/pdf")
448
+ expect(crossref_xml.dig("doi_data", "collection", "item").length).to eq(4)
449
+ expect(crossref_xml.dig("doi_data", "collection", "item", 2, "resource")).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.53731/r79s4nh-97aq74v-ag4t1.pdf", "mime_type" => "application/pdf")
451
450
  end
452
451
 
453
452
  it "json_feed_item from rogue scholar with anonymous author" do
@@ -481,8 +480,8 @@ describe Commonmeta::Metadata, vcr: true do
481
480
  "title")).to eq("Welcome to the Lab")
482
481
  expect(crossref_xml.dig("item_number")).to eq("__content__" => "a163e3405b3c47369ab08c54fdff6a3c", "item_number_type" => "uuid")
483
482
  expect(crossref_xml.dig("group_title")).to eq("Computer and information sciences")
484
- expect(crossref_xml.dig("doi_data", "collection", "item", "resource").length).to eq(4)
485
- expect(crossref_xml.dig("doi_data", "collection", "item", "resource", 2)).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.59350/9ry27-7cz42.pdf", "mime_type" => "application/pdf")
483
+ expect(crossref_xml.dig("doi_data", "collection", "item").length).to eq(4)
484
+ expect(crossref_xml.dig("doi_data", "collection", "item", 2, "resource")).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.59350/9ry27-7cz42.pdf", "mime_type" => "application/pdf")
486
485
  end
487
486
  end
488
487
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commonmeta-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.1
4
+ version: 3.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner