spec/readers/crossref_reader_spec.rb in bolognese-1.9.7 vs spec/readers/crossref_reader_spec.rb in bolognese-1.9.8

- old
+ new

@@ -59,11 +59,11 @@ expect(subject.url).to eq("https://dx.plos.org/10.1371/journal.pone.0000030") expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"JournalArticle", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle") expect(subject.creators.length).to eq(5) expect(subject.creators.first).to eq("nameType"=>"Personal", "name"=>"Ralser, Markus", "givenName"=>"Markus", "familyName"=>"Ralser") expect(subject.contributors).to eq([{"contributorType"=>"Editor", "familyName"=>"Janbon", "givenName"=>"Guilhem", "name"=>"Janbon, Guilhem", "nameType"=>"Personal"}]) - expect(subject.titles).to eq([{"title"=>"Triose Phosphate Isomerase Deficiency Is Caused by Altered Dimerization–Not Catalytic Inactivity–of the Mutant Enzymes"}]) + expect(subject.titles).to eq([{"title"=>"Triose Phosphate Isomerase Deficiency Is Caused by Altered Dimerization???Not Catalytic Inactivity???of the Mutant Enzymes"}]) expect(subject.rights_list).to eq([{"rights"=>"Creative Commons Attribution 4.0 International", "rightsIdentifier"=>"cc-by-4.0", "rightsIdentifierScheme"=>"SPDX", "rightsUri"=>"https://creativecommons.org/licenses/by/4.0/legalcode", "schemeUri"=>"https://spdx.org/licenses/"}]) @@ -107,14 +107,14 @@ it "journal article original language title" do input = "https://doi.org/10.7600/jspfsm.56.60" subject = Bolognese::Metadata.new(input: input) expect(subject.valid?).to be true expect(subject.id).to eq("https://doi.org/10.7600/jspfsm.56.60") - expect(subject.url).to eq("http://jlc.jst.go.jp/JST.JSTAGE/jspfsm/56.60?lang=en&from=CrossRef&type=abstract") + expect(subject.url).to eq("https://www.jstage.jst.go.jp/article/jspfsm/56/1/56_1_60/_article/-char/ja/") expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"JournalArticle", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle") expect(subject.creators).to eq([{"name"=>":(unav)", "nameType"=>"Organizational"}]) - expect(subject.titles).to eq([{"lang"=>"ja", "title"=>"自律神経・循環器応答"}]) + expect(subject.titles).to eq([{"lang"=>"ja", "title"=>"??????????????????????????????"}]) expect(subject.dates).to include({"date"=>"2007", "dateType"=>"Issued"}) expect(subject.publication_year).to eq("2007") expect(subject.publisher).to eq("The Japanese Society of Physical Fitness and Sports Medicine") expect(subject.related_identifiers.length).to eq(1) expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"1881-4751", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection") @@ -129,11 +129,11 @@ expect(subject.id).to eq("https://doi.org/10.1163/1937240x-00002096") expect(subject.url).to eq("https://academic.oup.com/jcb/article-lookup/doi/10.1163/1937240X-00002096") expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"JournalArticle", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle") expect(subject.creators.length).to eq(8) expect(subject.creators.first).to eq("familyName"=>"Mesquita-Joanes", "givenName"=>"Francesc", "name"=>"Mesquita-Joanes, Francesc", "nameType"=>"Personal") - expect(subject.titles).to eq([{"title"=>"Global distribution of Fabaeformiscandona subacuta: an exotic invasive Ostracoda on the Iberian Peninsula?"}]) + expect(subject.titles).to eq([{"title"=>"Global distribution of Fabaeformiscandona subacuta: an??exotic??invasive Ostracoda on the Iberian Peninsula?"}]) expect(subject.dates).to include({"date"=>"2012-01-01", "dateType"=>"Issued"}) expect(subject.publication_year).to eq("2012") expect(subject.publisher).to eq("Oxford University Press (OUP)") expect(subject.related_identifiers.length).to eq(44) expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"1937-240X", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection") @@ -150,11 +150,11 @@ expect(subject.url).to eq("http://link.springer.com/10.1007/978-3-642-33191-6_49") expect(subject.types).to eq("bibtex"=>"inbook", "citeproc"=>"chapter", "resourceType"=>"BookChapter", "resourceTypeGeneral"=>"BookChapter", "ris"=>"CHAP", "schemaOrg"=>"Chapter") expect(subject.creators.length).to eq(3) expect(subject.creators.first).to eq("familyName"=>"Chen", "givenName"=>"Lili", "name"=>"Chen, Lili", "nameType"=>"Personal") expect(subject.titles).to eq([{"title"=>"Human Body Orientation Estimation in Multiview Scenarios"}]) - expect(subject.dates).to eq([{"date"=>"2012", "dateType"=>"Issued"}, {"date"=>"2019-07-03T01:07:17Z", "dateType"=>"Updated"}]) + expect(subject.dates).to eq([{"date"=>"2012", "dateType"=>"Issued"}, {"date"=>"2020-11-24T03:11:32Z", "dateType"=>"Updated"}]) expect(subject.publication_year).to eq("2012") expect(subject.publisher).to eq("Springer Science and Business Media LLC") expect(subject.related_identifiers.length).to eq(7) expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"10.1007/978-3-540-24670-1_3", "relatedIdentifierType"=>"DOI", "relationType"=>"References") expect(subject.container).to eq("identifier"=>"1611-3349", "identifierType"=>"ISSN", "title"=>"Lecture Notes in Computer Science", "type"=>"Book Series") @@ -232,12 +232,12 @@ expect(subject.id).to eq("https://doi.org/10.1890/0012-9658(2006)87%255b2832:tiopma%255d2.0.co;2") expect(subject.url).to eq("http://doi.wiley.com/10.1890/0012-9658(2006)87[2832:TIOPMA]2.0.CO;2") expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"JournalArticle", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle") expect(subject.creators).to eq([{"nameType"=>"Personal", "name"=>"Fenton, A.", "givenName"=>"A.", "familyName"=>"Fenton"}, {"nameType"=>"Personal", "name"=>"Rands, S. A.", "givenName"=>"S. A.", "familyName"=>"Rands"}]) expect(subject.rights_list).to eq([{"rightsUri"=>"http://doi.wiley.com/10.1002/tdm_license_1.1"}]) - expect(subject.titles).to eq([{"title"=>"THE IMPACT OF PARASITE MANIPULATION AND PREDATOR FORAGING BEHAVIOR ON PREDATOR–PREY COMMUNITIES"}]) - expect(subject.dates).to eq([{"date"=>"2006-11", "dateType"=>"Issued"}, {"date"=>"2019-04-28T17:51:50Z", "dateType"=>"Updated"}]) + expect(subject.titles).to eq([{"title"=>"THE IMPACT OF PARASITE MANIPULATION AND PREDATOR FORAGING BEHAVIOR ON PREDATOR???PREY COMMUNITIES"}]) + expect(subject.dates).to eq([{"date"=>"2006-11", "dateType"=>"Issued"}, {"date"=>"2019-04-28T13:51:50Z", "dateType"=>"Updated"}]) expect(subject.publication_year).to eq("2006") expect(subject.publisher).to eq("Wiley") expect(subject.related_identifiers.length).to eq(35) expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"0012-9658", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection") expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.1098/rspb.2002.2213", "relatedIdentifierType"=>"DOI", "relationType"=>"References") @@ -282,11 +282,272 @@ expect(subject.creators.first).to eq("nameType"=>"Personal", "name"=>"Beck, Sarah E.", "givenName"=>"Sarah E.", "familyName"=>"Beck") expect(subject.titles).to eq([{"title"=>"Paving the path to HIV neurotherapy: Predicting SIV CNS disease"}]) expect(subject.dates).to include({"date"=>"2015-07", "dateType"=>"Issued"}) expect(subject.publication_year).to eq("2015") expect(subject.publisher).to eq("Elsevier BV") - expect(subject.related_identifiers).to eq([{"relatedIdentifier"=>"0014-2999", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection"}]) + expect(subject.related_identifiers).to eq([{"relatedIdentifier"=>"0014-2999", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection"}, + {"relatedIdentifier"=>"10.1212/01.wnl.0000287431.88658.8b", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1182/blood-2010-09-308684", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1007/s13365-015-0313-7", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1016/j.jneuroim.2006.04.017", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1086/514001", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1002/ana.410310403", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1093/infdis/jir214", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1097/qad.0b013e32836010bd", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1261/rna.036863.112", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.4103/0019-5359.107389", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.3233/jad-2008-14103", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1126/science.287.5455.959", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1097/01.qai.0000165799.59322.f5", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1002/ana.410420503", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1089/ars.2012.4834", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1111/j.1600-0404.1987.tb05458.x", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1097/00002030-198905000-00006", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1002/ana.410200304", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1186/1742-6405-2-6", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1111/j.1600-0684.1993.tb00649.x", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1186/1742-6405-7-15", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1212/wnl.0b013e318200d727", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1089/aid.2006.0292", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1126/science.3646751", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1002/ajmg.b.32071", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1186/1756-6606-6-40", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1086/344938", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1128/jvi.71.8.6055-6060.1997", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1016/j.jneuroim.2004.08.031", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1371/journal.pone.0003603", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1093/jnen/61.1.85", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1097/qad.0b013e32832c4af0", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.3389/fgene.2013.00083", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1080/13550280390194109", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1002/ana.410420504", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1001/archneur.61.11.1687", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1212/01.wnl.0000277635.05973.55", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1038/nmeth.3014", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1097/qai.0000000000000048", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1093/infdis/jit278", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1007/s13365-014-0283-1", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1097/00002030-199905280-00010", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1097/qco.0b013e32834ef586", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.4049/jimmunol.169.6.3438", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.2174/1389200024605082", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1126/science.1546323", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1016/s1474-4422(14)70137-1", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1016/j.jns.2009.06.043", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1128/jvi.77.16.9029-9040.2003", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1002/jcp.24254", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1128/jvi.76.1.292-302.2002", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1182/blood-2012-03-414706", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1016/j.jneuroim.2013.11.004", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1038/nrg3198", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1016/s0140-6736(96)10178-1", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1128/jvi.00366-11", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1007/s13365-011-0053-2", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1083/jcb.201211138", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1111/j.1600-0684.2011.00475.x", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1038/srep05915", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1096/fj.09-143503", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1542/peds.111.2.e168", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.2174/1566524013363555", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1126/science.283.5403.857", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1212/01.wnl.0000145763.68284.15", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1002/ana.410230727", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1186/1742-4690-10-95", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1128/jvi.79.2.684-695.2005", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1111/j.1600-0684.2005.00126.x", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1186/1756-8722-6-6", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1016/j.jmb.2013.12.017", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1590/s0037-86822012000600002", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1080/13550280390218715", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1111/j.1468-1331.2012.03777.x", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.3233/jad-2010-090649", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1080/13550280500516484", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1080/13550280390218751", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1189/jlb.0811394", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1007/s11481-011-9330-3", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1080/13550280802074539", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1086/650743", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1371/journal.pone.0008129", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1128/jvi.80.10.5074-5077.2006", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1186/1742-2094-10-62", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1086/323478", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1128/jvi.73.12.10480-10488.1999", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}, + {"relatedIdentifier"=>"10.1111/hiv.12134", + "relatedIdentifierType"=>"DOI", + "relationType"=>"References"}]) expect(subject.container).to eq("firstPage"=>"303", "identifier"=>"0014-2999", "identifierType"=>"ISSN", "lastPage"=>"312", "title"=>"European Journal of Pharmacology", "type"=>"Journal", "volume"=>"759") expect(subject.agency).to eq("crossref") end it "vor with url" do @@ -403,13 +664,13 @@ subject = Bolognese::Metadata.new(input: input) expect(subject.valid?).to be true expect(subject.id).to eq("https://doi.org/10.4018/978-1-4666-1891-6.ch004") expect(subject.url).to eq("http://services.igi-global.com/resolvedoi/resolve.aspx?doi=10.4018/978-1-4666-1891-6.ch004") expect(subject.types).to eq("bibtex"=>"inbook", "citeproc"=>"chapter", "resourceType"=>"BookChapter", "resourceTypeGeneral"=>"BookChapter", "ris"=>"CHAP", "schemaOrg"=>"Chapter") - expect(subject.creators).to eq([{"affiliation"=>[{"name"=>"Université de Lyon, France"}], "familyName"=>"Bichot", "givenName"=>"Charles-Edmond", "name"=>"Bichot, Charles-Edmond", "nameType"=>"Personal"}]) + expect(subject.creators).to eq([{"affiliation"=>[{"name"=>"Universit?? de Lyon, France"}], "familyName"=>"Bichot", "givenName"=>"Charles-Edmond", "name"=>"Bichot, Charles-Edmond", "nameType"=>"Personal"}]) expect(subject.titles).to eq([{"title"=>"Unsupervised and Supervised Image Segmentation Using Graph Partitioning"}]) - expect(subject.dates).to eq([{"date"=>"2012-08-08", "dateType"=>"Issued"}, {"date"=>"2019-07-02T17:17:21Z", "dateType"=>"Updated"}]) + expect(subject.dates).to eq([{"date"=>"2012-08-08", "dateType"=>"Issued"}, {"date"=>"2019-07-02T13:17:21Z", "dateType"=>"Updated"}]) expect(subject.publication_year).to eq("2012") expect(subject.publisher).to eq("IGI Global") expect(subject.agency).to eq("crossref") expect(subject.container["type"]).to eq("Book") expect(subject.container["title"]).to eq("Graph-Based Methods in Computer Vision") @@ -441,11 +702,11 @@ expect(subject.identifiers).to eq([{"identifier"=>"9781108348843", "identifierType"=>"ISBN"}]) expect(subject.url).to eq("https://www.cambridge.org/core/product/identifier/9781108348843/type/book") expect(subject.types).to eq("bibtex"=>"book", "citeproc"=>"book", "resourceType"=>"Book", "resourceTypeGeneral"=>"Book", "ris"=>"BOOK", "schemaOrg"=>"Book") expect(subject.creators).to eq([{"familyName"=>"Leung", "givenName"=>"Vincent S.", "name"=>"Leung, Vincent S.", "nameType"=>"Personal"}]) expect(subject.titles).to eq([{"title"=>"The Politics of the Past in Early China"}]) - expect(subject.dates).to eq([{"date"=>"2019-07-01", "dateType"=>"Issued"}, {"date"=>"2019-12-01T18:11:11Z", "dateType"=>"Updated"}]) + expect(subject.dates).to eq([{"date"=>"2019-07-01", "dateType"=>"Issued"}, {"date"=>"2021-01-08T19:18:57Z", "dateType"=>"Updated"}]) expect(subject.publication_year).to eq("2019") expect(subject.publisher).to eq("Cambridge University Press (CUP)") expect(subject.agency).to eq("crossref") expect(subject.date_registered).to eq("2019-07-06T10:19:22Z") end @@ -475,12 +736,12 @@ expect(subject.id).to eq("https://doi.org/10.1029/ar035") expect(subject.identifiers).to eq([{"identifier"=>"0-87590-181-6", "identifierType"=>"ISBN"}]) expect(subject.url).to eq("http://doi.wiley.com/10.1029/AR035") expect(subject.types).to eq("bibtex"=>"book", "citeproc"=>"book", "resourceType"=>"Book", "resourceTypeGeneral"=>"Book", "ris"=>"BOOK", "schemaOrg"=>"Book") expect(subject.creators).to eq([{"familyName"=>"McGinnis", "givenName"=>"Richard Frank", "name"=>"McGinnis, Richard Frank", "nameType"=>"Personal"}]) - expect(subject.titles).to eq([{"title"=>"Biogeography of Lanternfishes (Myctophidae) South of 30°S"}]) - expect(subject.dates).to eq([{"date"=>"1982", "dateType"=>"Issued"}, {"date"=>"2019-06-15T05:11:12Z", "dateType"=>"Updated"}]) + expect(subject.titles).to eq([{"title"=>"Biogeography of Lanternfishes (Myctophidae) South of 30??S"}]) + expect(subject.dates).to eq([{"date"=>"1982", "dateType"=>"Issued"}, {"date"=>"2021-02-23T21:58:36Z", "dateType"=>"Updated"}]) expect(subject.publication_year).to eq("1982") expect(subject.publisher).to eq("Wiley") expect(subject.related_identifiers.length).to eq(44) expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"10.1016/0031-0182(70)90103-3", "relatedIdentifierType"=>"DOI", "relationType"=>"References") expect(subject.container).to eq("identifier"=>"0066-4634", "identifierType"=>"ISSN", "title"=>"Antarctic Research Series", "type"=>"Book Series", "volume"=>"35") @@ -559,12 +820,12 @@ expect(subject.valid?).to be true expect(subject.id).to eq("https://doi.org/10.4000/dms.865") expect(subject.url).to eq("http://journals.openedition.org/dms/865") expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"JournalArticle", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle") expect(subject.creators).to eq([{"familyName"=>"Peraya", "givenName"=>"Daniel", "name"=>"Peraya, Daniel", "nameType"=>"Personal"}]) - expect(subject.titles).to eq([{"title"=>"Distances, absence, proximités et présences : des concepts en déplacement"}, {"title"=>"Distance(s), proximity and presence(s): evolving concepts"}]) - expect(subject.dates).to include({"date"=>"2014-12-23", "dateType"=>"Issued"}) + expect(subject.titles).to eq([{"title"=>"Distances, absence, proximit??s et pr??sences??: des concepts en d??placement"}, {"title"=>"Distance(s), proximity and presence(s): evolving concepts"}]) + expect(subject.dates).to include({"date"=>"2014-12-14", "dateType"=>"Issued"}) expect(subject.publication_year).to eq("2014") expect(subject.publisher).to eq("OpenEdition") expect(subject.agency).to eq("crossref") expect(subject.date_registered).to be_nil end @@ -616,25 +877,25 @@ expect(subject.titles).to eq([{"title"=>"Sexual conflict and correlated evolution between male persistence and female resistance traits in the seed beetle <i>Callosobruchus maculatus</i>"}]) expect(subject.dates).to include({"date"=>"2017-05-24", "dateType"=>"Issued"}) expect(subject.publication_year).to eq("2017") expect(subject.publisher).to eq("The Royal Society") expect(subject.agency).to eq("crossref") - expect(subject.date_registered).to eq("2019-07-18T04:43:12Z") + expect(subject.date_registered).to eq("2021-02-14T10:36:45Z") end it "empty given name" do input = "https://doi.org/10.1111/J.1865-1682.2010.01171.X" subject = Bolognese::Metadata.new(input: input) expect(subject.valid?).to be true expect(subject.id).to eq("https://doi.org/10.1111/j.1865-1682.2010.01171.x") expect(subject.url).to eq("http://doi.wiley.com/10.1111/j.1865-1682.2010.01171.x") expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"JournalArticle", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle") expect(subject.creators.length).to eq(5) - expect(subject.creators[3]).to eq("familyName"=>"Ehtisham-ul-Haq", "givenName"=>" ", "name"=>"Ehtisham-ul-Haq,  ", "nameType"=>"Personal") + expect(subject.creators[3]).to eq("familyName"=>"Ehtisham-ul-Haq", "givenName"=>"???", "name"=>"Ehtisham-ul-Haq, ???", "nameType"=>"Personal") expect(subject.titles).to eq([{"title"=>"Serological Evidence of Brucella abortus Prevalence in Punjab Province, Pakistan - A Cross-Sectional Study"}]) expect(subject.rights_list).to eq([{"rightsUri"=>"http://doi.wiley.com/10.1002/tdm_license_1.1"}]) - expect(subject.dates).to eq([{"date"=>"2010-12", "dateType"=>"Issued"}, {"date"=>"2019-03-05T09:22:24Z", "dateType"=>"Updated"}]) + expect(subject.dates).to eq([{"date"=>"2010-12", "dateType"=>"Issued"}, {"date"=>"2021-02-04T22:37:42Z", "dateType"=>"Updated"}]) expect(subject.publication_year).to eq("2010") expect(subject.publisher).to eq("Wiley") end it "invalid date" do @@ -650,11 +911,11 @@ "familyName" => "Ma", "givenName" => "Jun-An", "name" => "Ma, Jun-An", "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0002-3902-6799", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], "nameType" => "Personal") - expect(subject.titles).to eq([{"title"=>"Silver-Catalyzed [3+3] Annulation of Glycine Imino Esters with Seyferth–Gilbert Reagent To Access Tetrahydro-1,2,4-triazinecarboxylate Esters"}]) + expect(subject.titles).to eq([{"title"=>"Silver-Catalyzed [3+3] Annulation of Glycine Imino Esters with Seyferth???Gilbert Reagent To Access Tetrahydro-1,2,4-triazinecarboxylate Esters"}]) expect(subject.dates).to eq([{"date"=>"2020-04-08", "dateType"=>"Issued"}, {"date"=>"2020-06-16T23:13:36Z", "dateType"=>"Updated"}]) expect(subject.publication_year).to eq("2020") expect(subject.publisher).to eq("Georg Thieme Verlag KG") end @@ -703,17 +964,17 @@ expect(subject.valid?).to be true expect(subject.id).to eq("https://doi.org/10.1177/0042098011428175") expect(subject.url).to eq("http://journals.sagepub.com/doi/10.1177/0042098011428175") expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"JournalArticle", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle") expect(subject.creators.length).to eq(1) - expect(subject.creators.first).to eq("familyName"=>"Petrovici", "givenName"=>"Norbert", "name"=>"Petrovici, Norbert", "nameType"=>"Personal") + expect(subject.creators.first).to eq("affiliation"=>[{"name"=>"??"}], "familyName"=>"Petrovici", "givenName"=>"Norbert", "name"=>"Petrovici, Norbert", "nameType"=>"Personal") expect(subject.titles).to eq([{"title"=>"Workers and the City: Rethinking the Geographies of Power in Post-socialist Urbanisation"}]) expect(subject.dates).to include({"date"=>"2011-12-22", "dateType"=>"Issued"}) expect(subject.publication_year).to eq("2011") expect(subject.publisher).to eq("SAGE Publications") expect(subject.agency).to eq("crossref") - expect(subject.date_registered).to eq("2017-12-17T00:37:32Z") + expect(subject.date_registered).to eq("2021-05-16T02:02:38Z") end it "multiple issn" do input = "https://doi.org/10.1007/978-3-642-34922-5_19" subject = Bolognese::Metadata.new(input: input) @@ -759,11 +1020,11 @@ expect(subject.creators.count).to eq(6) expect(subject.creators.first).to eq("nameType" => "Personal", "familyName" => "Shao", "givenName" => "Jun", "name" => "Shao, Jun", "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0001-6130-6474", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}]) - expect(subject.titles).to eq([{"title"=>"The Atmospheric Bridge Communicated the δ&lt;sup&gt;13&lt;/sup&gt;C Declineduring the Last Deglaciation to the Global Upper Ocean"}]) + expect(subject.titles).to eq([{"title"=>"The Atmospheric Bridge Communicated the ??&lt;sup&gt;13&lt;/sup&gt;C Decline during the Last Deglaciation to the Global Upper Ocean"}]) expect(subject.id).to eq("https://doi.org/10.5194/cp-2020-95") expect(subject.identifiers).to be_empty expect(subject.descriptions.first["description"]).to start_with("Abstract. During the early last glacial termination") expect(subject.dates).to include({"date"=>"2020-07-28", "dateType"=>"Issued"}) expect(subject.publication_year).to eq("2020") @@ -804,11 +1065,11 @@ expect(subject.id).to eq("https://doi.org/10.2172/972169") expect(subject.identifiers).to eq( [{"identifier"=>"NREL/TP-6A2-47187", "identifierType"=>"report-number"}, {"identifier"=>"972169", "identifierType"=>"sequence-number"}]) expect(subject.descriptions).to be_empty expect(subject.dates).to include({"date"=>"2010-01-01", "dateType"=>"Issued"}) expect(subject.publication_year).to eq("2010") - expect(subject.publisher).to eq("Office of Scientific and Technical Information (OSTI)") + expect(subject.publisher).to eq("Office of Scientific and Technical Information (OSTI)") expect(subject.agency).to eq("crossref") end it "journal issue" do input = "https://doi.org/10.6002/ect.2015.0371" @@ -817,10 +1078,10 @@ expect(subject.id).to eq("https://doi.org/10.6002/ect.2015.0371") expect(subject.url).to eq("http://ectrx.org/forms/ectrxcontentshow.php?doi_id=10.6002/ect.2015.0371") expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceType"=>"JournalIssue", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"PublicationIssue") expect(subject.creators).to eq([{"name"=>":(unav)", "nameType"=>"Organizational"}]) expect(subject.titles).to eq([{"title"=>":(unav)"}]) - expect(subject.dates).to eq([{"date"=>"2018-10", "dateType"=>"Issued"}, {"date"=>"2018-10-03T12:09:12Z", "dateType"=>"Updated"}]) + expect(subject.dates).to eq([{"date"=>"2018-10", "dateType"=>"Issued"}, {"date"=>"2018-10-03T08:09:12Z", "dateType"=>"Updated"}]) expect(subject.publication_year).to eq("2018") expect(subject.publisher).to eq("Baskent University") expect(subject.related_identifiers.length).to eq(1) expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"2146-8427", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection") expect(subject.container).to eq("identifier"=>"2146-8427", "identifierType"=>"ISSN", "issue"=>"5", "title"=>"Experimental and Clinical Transplantation", "type"=>"Journal", "volume"=>"16")