bolognese 1.8.12 → 1.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build.yml +37 -0
  3. data/.github/workflows/changelog.yml +36 -0
  4. data/.github/workflows/release.yml +47 -0
  5. data/CHANGELOG.md +1716 -0
  6. data/Gemfile.lock +63 -59
  7. data/README.md +1 -1
  8. data/bolognese.gemspec +1 -1
  9. data/lib/bolognese/author_utils.rb +6 -5
  10. data/lib/bolognese/datacite_utils.rb +76 -9
  11. data/lib/bolognese/metadata.rb +10 -5
  12. data/lib/bolognese/metadata_utils.rb +3 -2
  13. data/lib/bolognese/readers/bibtex_reader.rb +5 -4
  14. data/lib/bolognese/readers/citeproc_reader.rb +1 -1
  15. data/lib/bolognese/readers/crossref_reader.rb +4 -5
  16. data/lib/bolognese/readers/datacite_reader.rb +57 -11
  17. data/lib/bolognese/readers/ris_reader.rb +3 -3
  18. data/lib/bolognese/utils.rb +163 -46
  19. data/lib/bolognese/version.rb +1 -1
  20. data/lib/bolognese/writers/bibtex_writer.rb +1 -1
  21. data/resources/kernel-4.4/include/datacite-contributorType-v4.xsd +35 -0
  22. data/resources/kernel-4.4/include/datacite-dateType-v4.xsd +25 -0
  23. data/resources/kernel-4.4/include/datacite-descriptionType-v4.xsd +19 -0
  24. data/resources/kernel-4.4/include/datacite-funderIdentifierType-v4.xsd +16 -0
  25. data/resources/kernel-4.4/include/datacite-nameType-v4.xsd +10 -0
  26. data/resources/kernel-4.4/include/datacite-numberType-v4.xsd +12 -0
  27. data/resources/kernel-4.4/include/datacite-relatedIdentifierType-v4.xsd +34 -0
  28. data/resources/kernel-4.4/include/datacite-relationType-v4.xsd +51 -0
  29. data/resources/kernel-4.4/include/datacite-resourceType-v4.xsd +43 -0
  30. data/resources/kernel-4.4/include/datacite-titleType-v4.xsd +14 -0
  31. data/resources/kernel-4.4/include/xml.xsd +286 -0
  32. data/resources/kernel-4.4/metadata.xsd +707 -0
  33. data/resources/kernel-4/include/datacite-contributorType-v4.xsd +21 -21
  34. data/resources/kernel-4/include/datacite-dateType-v4.xsd +11 -11
  35. data/resources/kernel-4/include/datacite-descriptionType-v4.xsd +6 -6
  36. data/resources/kernel-4/include/datacite-funderIdentifierType-v4.xsd +5 -5
  37. data/resources/kernel-4/include/datacite-nameType-v4.xsd +2 -2
  38. data/resources/kernel-4/include/datacite-numberType-v4.xsd +12 -0
  39. data/resources/kernel-4/include/datacite-relatedIdentifierType-v4.xsd +19 -19
  40. data/resources/kernel-4/include/datacite-relationType-v4.xsd +36 -34
  41. data/resources/kernel-4/include/datacite-resourceType-v4.xsd +32 -17
  42. data/resources/kernel-4/include/datacite-titleType-v4.xsd +4 -4
  43. data/resources/kernel-4/metadata.xsd +297 -105
  44. data/spec/fixtures/datacite-example-dissertation-v4.4.xml +56 -0
  45. data/spec/fixtures/datacite-example-full-v4.4.xml +114 -0
  46. data/spec/fixtures/datacite-example-relateditems.xml +61 -0
  47. data/spec/fixtures/datacite-example-xs-string.xml +28 -0
  48. data/spec/fixtures/datacite-geolocationpolygons-multiple.xml +56 -0
  49. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/article_id_as_page_number.yml +100 -0
  50. data/spec/metadata_spec.rb +1 -1
  51. data/spec/readers/bibtex_reader_spec.rb +2 -2
  52. data/spec/readers/crossref_reader_spec.rb +56 -38
  53. data/spec/readers/datacite_json_reader_spec.rb +1 -1
  54. data/spec/readers/datacite_reader_spec.rb +255 -4
  55. data/spec/readers/ris_reader_spec.rb +3 -3
  56. data/spec/writers/bibtex_writer_spec.rb +1 -1
  57. data/spec/writers/citation_writer_spec.rb +2 -2
  58. data/spec/writers/crosscite_writer_spec.rb +3 -3
  59. data/spec/writers/csv_writer_spec.rb +4 -4
  60. data/spec/writers/datacite_json_writer_spec.rb +3 -3
  61. data/spec/writers/datacite_writer_spec.rb +5 -5
  62. data/spec/writers/ris_writer_spec.rb +3 -2
  63. data/spec/writers/schema_org_writer_spec.rb +4 -4
  64. metadata +30 -8
  65. data/.travis.yml +0 -35
@@ -29,14 +29,14 @@ describe Bolognese::Metadata, vcr: true do
29
29
  it "Crossref DOI" do
30
30
  expect(subject.valid?).to be true
31
31
  expect(subject.id).to eq("https://doi.org/10.7554/elife.01567")
32
- expect(subject.types).to eq("citeproc"=>"misc", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
32
+ expect(subject.types).to eq("citeproc"=>"misc", "resourceTypeGeneral"=>"JournalArticle", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
33
33
  expect(subject.url).to eq("http://elifesciences.org/lookup/doi/10.7554/eLife.01567")
34
34
  expect(subject.creators.length).to eq(5)
35
35
  expect(subject.creators.first).to eq("nameType"=>"Personal",
36
36
  "name"=>"Sankar, Martial",
37
37
  "givenName"=>"Martial",
38
38
  "familyName"=>"Sankar",
39
- "nameIdentifiers" => [],
39
+ "nameIdentifiers" => [],
40
40
  "affiliation" => [])
41
41
  expect(subject.titles).to eq([{"title"=>"Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth"}])
42
42
  expect(subject.descriptions.first["description"]).to start_with("Among various advantages, their small size makes model organisms preferred subjects of investigation.")
@@ -53,7 +53,7 @@ describe Bolognese::Metadata, vcr: true do
53
53
  expect(subject.valid?).to be false
54
54
  expect(subject.state).to eq("not_found")
55
55
  expect(subject.id).to eq("https://doi.org/10.7554/elife.01567")
56
- expect(subject.types).to eq("citeproc"=>"misc", "resourceTypeGeneral"=>"Text", "ris"=>"THES", "schemaOrg"=>"Thesis")
56
+ expect(subject.types).to eq("citeproc"=>"misc", "resourceTypeGeneral"=>"Dissertation", "ris"=>"THES", "schemaOrg"=>"Thesis")
57
57
  expect(subject.creators).to eq([{"nameType"=>"Personal", "name"=>"Toparlar, Y.", "givenName"=>"Y.", "familyName"=>"Toparlar", "nameIdentifiers" => [], "affiliation" => []}])
58
58
  expect(subject.titles).to eq([{"title"=>"A multiscale analysis of the urban heat island effect"}])
59
59
  expect(subject.descriptions.first["description"]).to start_with("Designing the climates of cities")
@@ -56,7 +56,7 @@ describe Bolognese::Metadata, vcr: true do
56
56
  expect(bibtex[:bibtex_key]).to eq("https://doi.org/10.3204/desy-2014-01645")
57
57
  expect(bibtex[:doi]).to eq("10.3204/desy-2014-01645")
58
58
  expect(bibtex[:title]).to eq("Dynamics of colloids in molecular glass forming liquids studied via X-ray photon correlation spectroscopy")
59
- expect(bibtex[:pages]).to eq("2014-")
59
+ expect(bibtex[:pages]).to eq("2014")
60
60
  expect(bibtex[:year]).to eq("2014")
61
61
  end
62
62
 
@@ -9,7 +9,7 @@ describe Bolognese::Metadata, vcr: true do
9
9
  subject = Bolognese::Metadata.new(input: input, from: "crossref")
10
10
  expect(subject.style).to eq("apa")
11
11
  expect(subject.locale).to eq("en-US")
12
- expect(subject.citation).to eq("Sankar, M., Nieminen, K., Ragni, L., Xenarios, I., &amp; Hardtke, C. S. (2014). Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth. <i>ELife</i>, <i>3</i>. https://doi.org/10.7554/elife.01567")
12
+ expect(subject.citation).to eq("Sankar, M., Nieminen, K., Ragni, L., Xenarios, I., &amp; Hardtke, C. S. (2014). Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth. <i>ELife</i>, <i>3</i>, e01567. https://doi.org/10.7554/elife.01567")
13
13
  end
14
14
 
15
15
  it "Journal article vancouver style" do
@@ -17,7 +17,7 @@ describe Bolognese::Metadata, vcr: true do
17
17
  subject = Bolognese::Metadata.new(input: input, from: "crossref", style: "vancouver", locale: "en-US")
18
18
  expect(subject.style).to eq("vancouver")
19
19
  expect(subject.locale).to eq("en-US")
20
- expect(subject.citation).to eq("Sankar M, Nieminen K, Ragni L, Xenarios I, Hardtke CS. Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth. eLife [Internet]. 2014Feb11;3. Available from: https://elifesciences.org/articles/01567")
20
+ expect(subject.citation).to eq("Sankar M, Nieminen K, Ragni L, Xenarios I, Hardtke CS. Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth. eLife [Internet]. 2014Feb11;3:e01567. Available from: https://elifesciences.org/articles/01567")
21
21
  end
22
22
 
23
23
  it "Dataset" do
@@ -9,7 +9,7 @@ describe Bolognese::Metadata, vcr: true do
9
9
  subject = Bolognese::Metadata.new(input: input, from: "crossref")
10
10
  crosscite = JSON.parse(subject.crosscite)
11
11
  expect(crosscite.fetch("url")).to eq("https://elifesciences.org/articles/01567")
12
- expect(crosscite.fetch("types")).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
12
+ expect(crosscite.fetch("types")).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"JournalArticle", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
13
13
  expect(crosscite.fetch("titles")).to eq([{"title"=>"Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth"}])
14
14
  expect(crosscite.fetch("related_identifiers").length).to eq(27)
15
15
  expect(crosscite.fetch("related_identifiers").first).to eq("relatedIdentifier"=>"2050-084X", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
@@ -25,7 +25,7 @@ describe Bolognese::Metadata, vcr: true do
25
25
  input = "https://doi.org/10.1155/2012/291294"
26
26
  subject = Bolognese::Metadata.new(input: input, from: "crossref")
27
27
  crosscite = JSON.parse(subject.crosscite)
28
- expect(crosscite.fetch("types")).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
28
+ expect(crosscite.fetch("types")).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"JournalArticle", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
29
29
  expect(crosscite.fetch("creators").count).to eq(7)
30
30
  expect(crosscite.fetch("creators")[2]).to eq("nameType"=>"Personal", "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0003-2043-4925", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], "name"=>"Hernandez, Beatriz", "givenName"=>"Beatriz", "familyName"=>"Hernandez", "affiliation" => [{"name"=>"War Related Illness and Injury Study Center (WRIISC) and Mental Illness Research Education and Clinical Center (MIRECC), Department of Veterans Affairs, Palo Alto, CA 94304, USA"}, {"name"=>"Department of Psychiatry and Behavioral Sciences, Stanford University School of Medicine, Stanford, CA 94304, USA"}])
31
31
  end
@@ -41,7 +41,7 @@ describe Bolognese::Metadata, vcr: true do
41
41
  input = fixture_path + "crossref.bib"
42
42
  subject = Bolognese::Metadata.new(input: input, from: "bibtex")
43
43
  crosscite = JSON.parse(subject.crosscite)
44
- expect(crosscite.fetch("types")).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceTypeGeneral"=>"Text", "resourceType"=>"JournalArticle", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
44
+ expect(crosscite.fetch("types")).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceTypeGeneral"=>"JournalArticle", "resourceType"=>"JournalArticle", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
45
45
  expect(crosscite.fetch("titles")).to eq([{"title"=>"Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth"}])
46
46
  expect(crosscite.dig("descriptions", 0, "description")).to start_with("Among various advantages, their small size makes model organisms preferred subjects of investigation.")
47
47
  expect(crosscite.fetch("creators").count).to eq(5)
@@ -8,12 +8,12 @@ describe Bolognese::Metadata, vcr: true do
8
8
  input = "10.7554/eLife.01567"
9
9
  subject = Bolognese::Metadata.new(input: input, from: "crossref")
10
10
  csv = (subject.csv).parse_csv
11
-
11
+
12
12
  expect(csv[0]).to eq("10.7554/elife.01567")
13
13
  expect(csv[1]).to eq("https://elifesciences.org/articles/01567")
14
14
  expect(csv[2]).to eq("2018-08-23")
15
15
  expect(csv[3]).to eq("findable")
16
- expect(csv[4]).to eq("Text")
16
+ expect(csv[4]).to eq("JournalArticle")
17
17
  expect(csv[5]).to eq("JournalArticle")
18
18
  expect(csv[6]).to eq("Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth")
19
19
  expect(csv[7]).to eq("Sankar, Martial and Nieminen, Kaisa and Ragni, Laura and Xenarios, Ioannis and Hardtke, Christian S")
@@ -30,7 +30,7 @@ describe Bolognese::Metadata, vcr: true do
30
30
  expect(csv[1]).to eq("http://www.hindawi.com/journals/pm/2012/291294/")
31
31
  expect(csv[2]).to eq("2016-08-02")
32
32
  expect(csv[3]).to eq("findable")
33
- expect(csv[4]).to eq("Text")
33
+ expect(csv[4]).to eq("JournalArticle")
34
34
  expect(csv[5]).to eq("JournalArticle")
35
35
  expect(csv[6]).to eq("Delineating a Retesting Zone Using Receiver Operating Characteristic Analysis on Serial QuantiFERON Tuberculosis Test Results in US Healthcare Workers")
36
36
  expect(csv[7]).to eq("Thanassi, Wendy and Noda, Art and Hernandez, Beatriz and Newell, Jeffery and Terpeluk, Paul and Marder, David and Yesavage, Jerome A.")
@@ -73,7 +73,7 @@ describe Bolognese::Metadata, vcr: true do
73
73
  expect(csv[8]).to eq("NASA Physical Oceanography DAAC")
74
74
  expect(csv[9]).to eq("2012")
75
75
  end
76
-
76
+
77
77
  it "maremma" do
78
78
  input = "https://github.com/datacite/maremma"
79
79
  subject = Bolognese::Metadata.new(input: input, from: "codemeta")
@@ -9,7 +9,7 @@ describe Bolognese::Metadata, vcr: true do
9
9
  subject = Bolognese::Metadata.new(input: input, from: "crossref")
10
10
  datacite = JSON.parse(subject.datacite_json)
11
11
  expect(datacite.fetch("url")).to eq("https://elifesciences.org/articles/01567")
12
- expect(datacite.fetch("types")).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
12
+ expect(datacite.fetch("types")).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"JournalArticle", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
13
13
  expect(datacite.fetch("titles")).to eq([{"title"=>"Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth"}])
14
14
  expect(datacite.fetch("relatedIdentifiers").length).to eq(27)
15
15
  expect(datacite.fetch("relatedIdentifiers").first).to eq("relatedIdentifier"=>"2050-084X", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
@@ -25,7 +25,7 @@ describe Bolognese::Metadata, vcr: true do
25
25
  subject = Bolognese::Metadata.new(input: input, from: "crossref")
26
26
  datacite = JSON.parse(subject.datacite_json)
27
27
  expect(datacite.fetch("url")).to eq("http://www.hindawi.com/journals/pm/2012/291294/")
28
- expect(datacite.fetch("types")).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
28
+ expect(datacite.fetch("types")).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"JournalArticle", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
29
29
  expect(datacite.fetch("creators").length).to eq(7)
30
30
  expect(datacite.fetch("creators").first).to eq("nameType"=>"Personal", "name"=>"Thanassi, Wendy", "givenName"=>"Wendy", "familyName"=>"Thanassi", "affiliation" => [{"name"=>"Department of Medicine, Veterans Affairs Palo Alto Health Care System, 3801 Miranda Avenue MC-, Palo Alto, CA 94304-1207, USA"}, {"name"=>"Occupational Health Strategic Health Care Group, Office of Public Health, Veterans Health Administration, Washington, DC 20006, USA"}, {"name"=>"Division of Emergency Medicine, Stanford University School of Medicine, Stanford, CA 94304, USA"}, {"name"=>"War Related Illness and Injury Study Center (WRIISC) and Mental Illness Research Education and Clinical Center (MIRECC), Department of Veterans Affairs, Palo Alto, CA 94304, USA"}])
31
31
  end
@@ -34,7 +34,7 @@ describe Bolognese::Metadata, vcr: true do
34
34
  input = fixture_path + "crossref.bib"
35
35
  subject = Bolognese::Metadata.new(input: input, from: "bibtex")
36
36
  datacite = JSON.parse(subject.datacite_json)
37
- expect(datacite.fetch("types")).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
37
+ expect(datacite.fetch("types")).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"JournalArticle", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
38
38
  expect(datacite.fetch("titles")).to eq([{"title"=>"Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth"}])
39
39
  expect(datacite.dig("descriptions", 0, "description")).to start_with("Among various advantages, their small size makes model organisms preferred subjects of investigation.")
40
40
  expect(datacite.fetch("creators").length).to eq(5)
@@ -9,7 +9,7 @@ describe Bolognese::Metadata, vcr: true do
9
9
  subject = Bolognese::Metadata.new(input: input, from: "crossref")
10
10
  expect(subject.valid?).to be true
11
11
  datacite = Maremma.from_xml(subject.datacite).fetch("resource", {})
12
- expect(datacite.dig("resourceType", "resourceTypeGeneral")).to eq("Text")
12
+ expect(datacite.dig("resourceType", "resourceTypeGeneral")).to eq("JournalArticle")
13
13
  expect(datacite.dig("titles", "title")).to eq("Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth")
14
14
  expect(datacite.dig("relatedIdentifiers", "relatedIdentifier").length).to eq(27)
15
15
  expect(datacite.dig("relatedIdentifiers", "relatedIdentifier").first).to eq("relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "__content__"=>"2050-084X", "resourceTypeGeneral"=>"Collection")
@@ -24,7 +24,7 @@ describe Bolognese::Metadata, vcr: true do
24
24
  subject = Bolognese::Metadata.new(input: input, from: "crossref")
25
25
  expect(subject.valid?).to be true
26
26
  datacite = Maremma.from_xml(subject.datacite).fetch("resource", {})
27
- expect(datacite.dig("resourceType", "resourceTypeGeneral")).to eq("Text")
27
+ expect(datacite.dig("resourceType", "resourceTypeGeneral")).to eq("JournalArticle")
28
28
  expect(datacite.dig("creators", "creator").count).to eq(7)
29
29
  expect(datacite.dig("creators", "creator")[2]).to eq("creatorName" => {"__content__"=>"Hernandez, Beatriz", "nameType"=>"Personal"},
30
30
  "familyName" => "Hernandez",
@@ -46,7 +46,7 @@ describe Bolognese::Metadata, vcr: true do
46
46
  subject = Bolognese::Metadata.new(input: input, from: "bibtex")
47
47
  expect(subject.valid?).to be true
48
48
  datacite = Maremma.from_xml(subject.datacite).fetch("resource", {})
49
- expect(datacite.dig("resourceType", "resourceTypeGeneral")).to eq("Text")
49
+ expect(datacite.dig("resourceType", "resourceTypeGeneral")).to eq("JournalArticle")
50
50
  expect(datacite.dig("titles", "title")).to eq("Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth")
51
51
  expect(datacite.dig("descriptions", "description").first).to eq("__content__"=>"eLife, 3", "descriptionType"=>"SeriesInformation")
52
52
  expect(datacite.dig("descriptions", "description", 1, "__content__")).to start_with("Among various advantages, their small size makes model organisms preferred subjects of investigation.")
@@ -316,7 +316,7 @@ describe Bolognese::Metadata, vcr: true do
316
316
  subject.descriptions = { "description" => "This is an abstract." }
317
317
  expect(subject.valid?).to be true
318
318
  datacite = Maremma.from_xml(subject.datacite).fetch("resource", {})
319
- expect(datacite.dig("descriptions", "description")).to eq( [{"__content__"=>"eLife, 3", "descriptionType"=>"SeriesInformation"}, {"__content__"=>"This is an abstract.", "descriptionType"=>"Abstract"}])
319
+ expect(datacite.dig("descriptions", "description")).to eq([{"__content__"=>"eLife, 3, e01567", "descriptionType"=>"SeriesInformation"}, {"__content__"=>"This is an abstract.", "descriptionType"=>"Abstract"}])
320
320
  end
321
321
 
322
322
  it "change description no input" do
@@ -341,7 +341,7 @@ describe Bolognese::Metadata, vcr: true do
341
341
  expect(datacite.dig("identifier", "__content__")).to eq("10.4124/05f6c379-dd68-4cdb-880d-33d3e9576d52/1")
342
342
  expect(datacite.dig("resourceType", "resourceTypeGeneral")).to eq("Dataset")
343
343
  expect(datacite.dig("titles", "title")).to eq("Data from: Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth")
344
-
344
+
345
345
  end
346
346
 
347
347
  it "change license" do
@@ -19,8 +19,9 @@ describe Bolognese::Metadata, vcr: true do
19
19
  expect(ris[11]).to eq("PY - 2014")
20
20
  expect(ris[12]).to eq("PB - eLife Sciences Publications, Ltd")
21
21
  expect(ris[13]).to eq("VL - 3")
22
- expect(ris[14]).to eq("SN - 2050-084X")
23
- expect(ris[15]).to eq("ER - ")
22
+ expect(ris[14]).to eq("SP - e01567")
23
+ expect(ris[15]).to eq("SN - 2050-084X")
24
+ expect(ris[16]).to eq("ER - ")
24
25
  end
25
26
 
26
27
  it "with pages" do
@@ -11,7 +11,7 @@ describe Bolognese::Metadata, vcr: true do
11
11
  expect(json["@id"]).to eq("https://doi.org/10.7554/elife.01567")
12
12
  expect(json["@type"]).to eq("ScholarlyArticle")
13
13
  expect(json["isPartOf"]).to eq("@type"=>"Periodical", "issn"=>"2050-084X")
14
- expect(json["periodical"]).to eq("@type"=>"Journal", "identifier"=>"2050-084X", "identifierType"=>"ISSN", "name"=>"eLife", "volume"=>"3")
14
+ expect(json["periodical"]).to eq("@type"=>"Journal", "firstPage" => "e01567", "identifier"=>"2050-084X", "identifierType"=>"ISSN", "name"=>"eLife", "volume"=>"3")
15
15
  expect(json["citation"].length).to eq(26)
16
16
  expect(json["citation"].first).to eq("@id"=>"https://doi.org/10.1038/nature02100", "@type"=>"CreativeWork")
17
17
  expect(json["funder"]).to eq([{"name"=>"SystemsX", "@type"=>"Organization"},
@@ -145,7 +145,7 @@ describe Bolognese::Metadata, vcr: true do
145
145
  it "author is organization" do
146
146
  input = fixture_path + 'gtex.xml'
147
147
  url = "https://ors.datacite.org/doi:/10.25491/9hx8-ke93"
148
- content_url = "https://storage.googleapis.com/gtex_analysis_v7/single_tissue_eqtl_data/GTEx_Analysis_v7_eQTL_expression_matrices.tar.gz"
148
+ content_url = "https://storage.googleapis.com/gtex_analysis_v7/single_tissue_eqtl_data/GTEx_Analysis_v7_eQTL_expression_matrices.tar.gz"
149
149
  subject = Bolognese::Metadata.new(input: input, url: url, content_url: content_url, from: "datacite")
150
150
  json = JSON.parse(subject.schema_org)
151
151
  expect(json["@id"]).to eq("https://doi.org/10.25491/9hx8-ke93")
@@ -281,8 +281,8 @@ describe Bolognese::Metadata, vcr: true do
281
281
  expect(json["name"]).to eq("Meteo measurements at the Sand Motor")
282
282
  expect(json["author"]).to eq("@type"=>"Person", "familyName"=>"Den Heijer", "givenName"=>"C", "name"=>"C Den Heijer")
283
283
  expect(json["includedInDataCatalog"]).to be_nil
284
- expect(json["spatialCoverage"].dig("geo", "polygon").length).to eq(34)
285
- expect(json["spatialCoverage"].dig("geo", "polygon").first).to eq(["4.1738852605822", "52.03913926329928"])
284
+ expect(json["spatialCoverage"].dig("geo", "polygon")[0].length).to eq(34)
285
+ expect(json["spatialCoverage"].dig("geo", "polygon")[0].first).to eq(["4.1738852605822", "52.03913926329928"])
286
286
  end
287
287
 
288
288
  it "from schema_org gtex" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bolognese
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.12
4
+ version: 1.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-12 00:00:00.000000000 Z
11
+ date: 2021-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: maremma
@@ -520,16 +520,16 @@ dependencies:
520
520
  name: simplecov
521
521
  requirement: !ruby/object:Gem::Requirement
522
522
  requirements:
523
- - - "~>"
523
+ - - '='
524
524
  - !ruby/object:Gem::Version
525
- version: '0.1'
525
+ version: 0.17.1
526
526
  type: :development
527
527
  prerelease: false
528
528
  version_requirements: !ruby/object:Gem::Requirement
529
529
  requirements:
530
- - - "~>"
530
+ - - '='
531
531
  - !ruby/object:Gem::Version
532
- version: '0.1'
532
+ version: 0.17.1
533
533
  - !ruby/object:Gem::Dependency
534
534
  name: hashdiff
535
535
  requirement: !ruby/object:Gem::Requirement
@@ -559,9 +559,12 @@ extensions: []
559
559
  extra_rdoc_files:
560
560
  - README.md
561
561
  files:
562
+ - ".github/workflows/build.yml"
563
+ - ".github/workflows/changelog.yml"
564
+ - ".github/workflows/release.yml"
562
565
  - ".gitignore"
563
566
  - ".rubocop.yml"
564
- - ".travis.yml"
567
+ - CHANGELOG.md
565
568
  - CITATION
566
569
  - Gemfile
567
570
  - Gemfile.lock
@@ -711,11 +714,24 @@ files:
711
714
  - resources/kernel-4.3/include/datacite-titleType-v4.xsd
712
715
  - resources/kernel-4.3/include/xml.xsd
713
716
  - resources/kernel-4.3/metadata.xsd
717
+ - resources/kernel-4.4/include/datacite-contributorType-v4.xsd
718
+ - resources/kernel-4.4/include/datacite-dateType-v4.xsd
719
+ - resources/kernel-4.4/include/datacite-descriptionType-v4.xsd
720
+ - resources/kernel-4.4/include/datacite-funderIdentifierType-v4.xsd
721
+ - resources/kernel-4.4/include/datacite-nameType-v4.xsd
722
+ - resources/kernel-4.4/include/datacite-numberType-v4.xsd
723
+ - resources/kernel-4.4/include/datacite-relatedIdentifierType-v4.xsd
724
+ - resources/kernel-4.4/include/datacite-relationType-v4.xsd
725
+ - resources/kernel-4.4/include/datacite-resourceType-v4.xsd
726
+ - resources/kernel-4.4/include/datacite-titleType-v4.xsd
727
+ - resources/kernel-4.4/include/xml.xsd
728
+ - resources/kernel-4.4/metadata.xsd
714
729
  - resources/kernel-4/include/datacite-contributorType-v4.xsd
715
730
  - resources/kernel-4/include/datacite-dateType-v4.xsd
716
731
  - resources/kernel-4/include/datacite-descriptionType-v4.xsd
717
732
  - resources/kernel-4/include/datacite-funderIdentifierType-v4.xsd
718
733
  - resources/kernel-4/include/datacite-nameType-v4.xsd
734
+ - resources/kernel-4/include/datacite-numberType-v4.xsd
719
735
  - resources/kernel-4/include/datacite-relatedIdentifierType-v4.xsd
720
736
  - resources/kernel-4/include/datacite-relationType-v4.xsd
721
737
  - resources/kernel-4/include/datacite-resourceType-v4.xsd
@@ -752,13 +768,18 @@ files:
752
768
  - spec/fixtures/datacite-example-complicated-v3.0.xml
753
769
  - spec/fixtures/datacite-example-complicated-v4.0.xml
754
770
  - spec/fixtures/datacite-example-complicated-v4.1.xml
771
+ - spec/fixtures/datacite-example-dissertation-v4.4.xml
755
772
  - spec/fixtures/datacite-example-escaped-text.xml
773
+ - spec/fixtures/datacite-example-full-v4.4.xml
756
774
  - spec/fixtures/datacite-example-geolocation-2.xml
757
775
  - spec/fixtures/datacite-example-geolocation.xml
758
776
  - spec/fixtures/datacite-example-polygon-v4.1.xml
777
+ - spec/fixtures/datacite-example-relateditems.xml
778
+ - spec/fixtures/datacite-example-xs-string.xml
759
779
  - spec/fixtures/datacite-formats-with-xs.xml
760
780
  - spec/fixtures/datacite-funderIdentifier.xml
761
781
  - spec/fixtures/datacite-geolocation-empty.xml
782
+ - spec/fixtures/datacite-geolocationpolygons-multiple.xml
762
783
  - spec/fixtures/datacite-metadata-sample-complicated-v2.2.xml
763
784
  - spec/fixtures/datacite-multiple-language.xml
764
785
  - spec/fixtures/datacite-multiple-rights.xml
@@ -899,6 +920,7 @@ files:
899
920
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/affiliation_is_space.yml
900
921
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/another_book.yml
901
922
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/another_book_chapter.yml
923
+ - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/article_id_as_page_number.yml
902
924
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/author_literal.yml
903
925
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book.yml
904
926
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book_chapter.yml
@@ -1252,7 +1274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1252
1274
  - !ruby/object:Gem::Version
1253
1275
  version: '0'
1254
1276
  requirements: []
1255
- rubygems_version: 3.0.8
1277
+ rubygems_version: 3.0.3
1256
1278
  signing_key:
1257
1279
  specification_version: 4
1258
1280
  summary: Ruby client library for conversion of DOI Metadata
data/.travis.yml DELETED
@@ -1,35 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.6.5
4
-
5
- addons:
6
- apt:
7
- packages:
8
- - language-pack-de
9
- code_climate:
10
- repo_token: $CODECLIMATE_REPO_TOKEN
11
-
12
- install:
13
- - travis_retry bundle install
14
-
15
- before_script:
16
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
17
- - chmod +x ./cc-test-reporter
18
- - ./cc-test-reporter before-build
19
-
20
- script:
21
- - bundle exec rspec spec
22
- after_script:
23
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
24
-
25
- notifications:
26
- email: false
27
-
28
- deploy:
29
- provider: rubygems
30
- api_key:
31
- secure: jNV7zS0e1cSV+oVCqRyolo16QHJFgba7vnFnbG1Nb4Xk3p/hQnE/WTvV0up7jXE9HVKDmMTPPVUfdtvyE/xsTlWNpjIaQ5NdAz+wf4fTkwN8in8AHvxL0V1Zj202cgn6Ikoy2Zwkg4eZTxo1PJ6niyyfMHd/XpaW7zRd7BBN3901DeR0qCsYTJaFF8cO5d/CeKBn0aCHv7vzqRvm+NsEgVmfNCgjQAvMfDZChrlYzUZlOpcmh01u2z0vZyRmsidmAehLRF6GcZpoL8CVBbyzHr6EVjOrI2XVikwj17j4hPLcEzB/gGyK6OUX4JuiSxdRYxAPApZY96SUbFFrfIDusHv1csgwznAlEF4VgerpHq8C5B+CylXHjreT17b5U2QBsr79z401a6m6aC+RM/RDu2lW1p93f/fAK/znBO3DyodlvmVYGN16PuA7g7pa8LYKwtZGSQmTlbAycwcbKHgvbdKmxYAFTOE6CWeginLM7bvOmF6IHcNGzBHK1I8xES0y1XQHFKYl4nT3cMEsA6aRRRQCIQwbr6FE8gyPZrs5P/W9vPM9p6cryXFaSJWbGbounr6lqQgtCmfDdqXPxAszTbcBu/yBukxeM3KvRVrsbtuIanuHn1ppvA31M4bUGTP9CfwKojE9bdo6m7nfHTpjNy7eqOPuUH33cQhIPMCvpZ4=
32
- gem: bolognese
33
- on:
34
- tags: true
35
- repo: datacite/bolognese