bolognese 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/bolognese/datacite_utils.rb +23 -23
  4. data/lib/bolognese/metadata.rb +5 -1
  5. data/lib/bolognese/metadata_utils.rb +10 -14
  6. data/lib/bolognese/readers/bibtex_reader.rb +9 -9
  7. data/lib/bolognese/readers/citeproc_reader.rb +12 -12
  8. data/lib/bolognese/readers/codemeta_reader.rb +12 -12
  9. data/lib/bolognese/readers/crossref_reader.rb +27 -29
  10. data/lib/bolognese/readers/datacite_json_reader.rb +19 -28
  11. data/lib/bolognese/readers/datacite_reader.rb +37 -37
  12. data/lib/bolognese/readers/ris_reader.rb +9 -9
  13. data/lib/bolognese/readers/schema_org_reader.rb +37 -32
  14. data/lib/bolognese/utils.rb +31 -34
  15. data/lib/bolognese/version.rb +1 -1
  16. data/lib/bolognese/writers/codemeta_writer.rb +1 -1
  17. data/lib/bolognese/writers/crosscite_writer.rb +1 -1
  18. data/lib/bolognese/writers/datacite_json_writer.rb +10 -10
  19. data/lib/bolognese/writers/jats_writer.rb +1 -1
  20. data/lib/bolognese/writers/ris_writer.rb +1 -1
  21. data/lib/bolognese/writers/schema_org_writer.rb +6 -6
  22. data/spec/datacite_utils_spec.rb +1 -1
  23. data/spec/fixtures/crosscite.json +8 -8
  24. data/spec/fixtures/datacite.json +22 -22
  25. data/spec/readers/bibtex_reader_spec.rb +6 -6
  26. data/spec/readers/citeproc_reader_spec.rb +2 -2
  27. data/spec/readers/codemeta_reader_spec.rb +8 -8
  28. data/spec/readers/crosscite_reader_spec.rb +4 -4
  29. data/spec/readers/crossref_reader_spec.rb +56 -59
  30. data/spec/readers/datacite_json_reader_spec.rb +7 -7
  31. data/spec/readers/datacite_reader_spec.rb +193 -194
  32. data/spec/readers/ris_reader_spec.rb +5 -5
  33. data/spec/readers/schema_org_reader_spec.rb +31 -32
  34. data/spec/utils_spec.rb +4 -4
  35. data/spec/writers/crosscite_writer_spec.rb +10 -13
  36. data/spec/writers/datacite_json_writer_spec.rb +9 -9
  37. data/spec/writers/datacite_writer_spec.rb +24 -26
  38. data/spec/writers/schema_org_writer_spec.rb +2 -2
  39. metadata +2 -2
@@ -1,3 +1,3 @@
1
1
  module Bolognese
2
- VERSION = "1.0.7"
2
+ VERSION = "1.0.8"
3
3
  end
@@ -8,7 +8,7 @@ module Bolognese
8
8
 
9
9
  hsh = {
10
10
  "@context" => id.present? ? "https://raw.githubusercontent.com/codemeta/codemeta/master/codemeta.jsonld" : nil,
11
- "@type" => types["type"],
11
+ "@type" => types["schemaOrg"],
12
12
  "@id" => identifier,
13
13
  "identifier" => identifier,
14
14
  "codeRepository" => url,
@@ -34,7 +34,7 @@ module Bolognese
34
34
  "schema_version" => schema_version,
35
35
  "provider_id" => provider_id,
36
36
  "client_id" => client_id,
37
- "provider" => service_provider,
37
+ "source" => source,
38
38
  "state" => state
39
39
  }.compact
40
40
  JSON.pretty_generate hsh.presence
@@ -16,21 +16,21 @@ module Bolognese
16
16
  "subjects" => to_datacite_json(subjects),
17
17
  "contributor" => contributor,
18
18
  "dates" => to_datacite_json(dates),
19
- "publication-year" => publication_year,
19
+ "publicationYear" => publication_year,
20
20
  "language" => language,
21
- "alternate-identifiers" => to_datacite_json(alternate_identifiers),
22
- "related-identifiers" => to_datacite_json(related_identifiers),
21
+ "alternateIdentifiers" => to_datacite_json(alternate_identifiers),
22
+ "relatedIdentifiers" => to_datacite_json(related_identifiers),
23
23
  "sizes" => sizes,
24
24
  "formats" => formats,
25
25
  "version" => version,
26
- "rights-list" => to_datacite_json(rights_list),
26
+ "rightsList" => to_datacite_json(rights_list),
27
27
  "descriptions" => to_datacite_json(descriptions),
28
- "geo-locations" => to_datacite_json(geo_locations),
29
- "funding-references" => to_datacite_json(funding_references),
30
- "schema-version" => schema_version,
31
- "provider-id" => provider_id,
32
- "client-id" => client_id,
33
- "provider" => service_provider
28
+ "geoLocations" => to_datacite_json(geo_locations),
29
+ "fundingReferences" => to_datacite_json(funding_references),
30
+ "schemaVersion" => schema_version,
31
+ "providerId" => provider_id,
32
+ "clientIsd" => client_id,
33
+ "source" => source
34
34
  }.compact
35
35
  JSON.pretty_generate hsh.presence
36
36
  end
@@ -125,7 +125,7 @@ module Bolognese
125
125
  end
126
126
 
127
127
  def publication_type
128
- { 'publication-type' => Bolognese::Utils::CR_TO_JATS_TRANSLATIONS[types["resource_type"]] || Bolognese::Utils::SO_TO_JATS_TRANSLATIONS[types["type"]] }.compact
128
+ { 'publication-type' => Bolognese::Utils::CR_TO_JATS_TRANSLATIONS[types["resourceType"]] || Bolognese::Utils::SO_TO_JATS_TRANSLATIONS[types["schemaOrg"]] }.compact
129
129
  end
130
130
  end
131
131
  end
@@ -20,7 +20,7 @@ module Bolognese
20
20
  "IS" => issue,
21
21
  "SP" => first_page,
22
22
  "EP" => last_page,
23
- "SN" => Array.wrap(related_identifiers).find { |ri| ri["relation_type"] == "IsPartOf" }.to_h.fetch("related_identifier", nil),
23
+ "SN" => Array.wrap(related_identifiers).find { |ri| ri["relationType"] == "IsPartOf" }.to_h.fetch("relatedIdentifier", nil),
24
24
  "ER" => ""
25
25
  }.compact.map { |k, v| v.is_a?(Array) ? v.map { |vi| "#{k} - #{vi}" }.join("\r\n") : "#{k} - #{v}" }.join("\r\n")
26
26
  end
@@ -5,16 +5,16 @@ module Bolognese
5
5
  module SchemaOrgWriter
6
6
  def schema_hsh
7
7
  { "@context" => identifier.present? ? "http://schema.org" : nil,
8
- "@type" => types["type"],
8
+ "@type" => types["schemaOrg"],
9
9
  "@id" => identifier,
10
10
  "identifier" => to_schema_org_identifier(identifier, alternate_identifiers: alternate_identifiers),
11
11
  "url" => url,
12
- "additionalType" => types["resource_type"],
12
+ "additionalType" => types["resourceType"],
13
13
  "name" => parse_attributes(titles, content: "title", first: true),
14
14
  "author" => to_schema_org(creator),
15
15
  "editor" => to_schema_org(contributor),
16
16
  "description" => parse_attributes(descriptions, content: "description", first: true),
17
- "license" => Array.wrap(rights_list).map { |l| l["rights_uri"] }.compact.unwrap,
17
+ "license" => Array.wrap(rights_list).map { |l| l["rightsUri"] }.compact.unwrap,
18
18
  "version" => version,
19
19
  "keywords" => subjects.present? ? Array.wrap(subjects).map { |k| parse_attributes(k, content: "subject", first: true) }.join(", ") : nil,
20
20
  "inLanguage" => language,
@@ -35,11 +35,11 @@ module Bolognese
35
35
  "@reverse" => reverse.presence,
36
36
  "contentUrl" => Array.wrap(content_url).unwrap,
37
37
  "schemaVersion" => schema_version,
38
- "periodical" => (types["type"] != "Dataset") && periodical ? to_schema_org(periodical) : nil,
39
- "includedInDataCatalog" => (types["type"] == "Dataset") && periodical ? to_schema_org(periodical) : nil,
38
+ "periodical" => (types["schemaOrg"] != "Dataset") && periodical ? to_schema_org(periodical) : nil,
39
+ "includedInDataCatalog" => (types["schemaOrg"] == "Dataset") && periodical ? to_schema_org(periodical) : nil,
40
40
  "publisher" => publisher.present? ? { "@type" => "Organization", "name" => publisher } : nil,
41
41
  "funder" => to_schema_org_funder(funding_references),
42
- "provider" => service_provider.present? ? { "@type" => "Organization", "name" => service_provider } : nil
42
+ "provider" => source.present? ? { "@type" => "Organization", "name" => source } : nil
43
43
  }.compact.presence
44
44
  end
45
45
 
@@ -117,7 +117,7 @@ describe Bolognese::Metadata, vcr: true do
117
117
  context "insert_related_identifiers" do
118
118
  it "related_identifier" do
119
119
  expect(subject.related_identifiers.length).to eq(6)
120
- expect(subject.related_identifiers.first).to eq("related_identifier"=>"10.5061/dryad.8515/1", "related_identifier_type"=>"DOI", "relation_type"=>"HasPart")
120
+ expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"10.5061/dryad.8515/1", "relatedIdentifierType"=>"DOI", "relationType"=>"HasPart")
121
121
  end
122
122
 
123
123
  it "insert" do
@@ -2,9 +2,9 @@
2
2
  "id": "https://doi.org/10.5281/zenodo.48440",
3
3
  "doi": "10.5281/zenodo.48440",
4
4
  "types":{
5
- "type": "SoftwareSourceCode",
6
- "resource_type_general": "Software",
7
- "resource_type": "Software",
5
+ "resourceTypeGeneral": "Software",
6
+ "resourceType": "Software",
7
+ "schemaOrg": "SoftwareSourceCode",
8
8
  "citeproc": "other",
9
9
  "bibtex": "misc",
10
10
  "ris": "COMP"
@@ -32,23 +32,23 @@
32
32
  ],
33
33
  "dates": {
34
34
  "date": "2016-03-27",
35
- "date-type": "Issued"
35
+ "dateType": "Issued"
36
36
  },
37
37
  "publication_year": "2016",
38
38
  "alternate_identifiers": [{
39
- "alternative_identifier_type": "URL",
40
- "alternative_identifier": "http://zenodo.org/record/48440"
39
+ "alternativeIdentifierType": "URL",
40
+ "alternativeIdentifier": "http://zenodo.org/record/48440"
41
41
  }],
42
42
  "rights_list": [{
43
43
  "rights": "Open Access"
44
44
  },
45
45
  {
46
- "rights_uri": "https://creativecommons.org/licenses/by-nc-sa/4.0",
46
+ "rightsUri": "https://creativecommons.org/licenses/by-nc-sa/4.0",
47
47
  "rights": "Creative Commons Attribution-NonCommercial-ShareAlike"
48
48
  }
49
49
  ],
50
50
  "descriptions": [{
51
- "description_type": "Abstract",
51
+ "descriptionType": "Abstract",
52
52
  "description": "This tools are used to analyse the data produced by the Crosssover Experiment I designed to test Choice Architecture techniques as UI interventions in a SEEk4Science data catalogue. It contains:\n\n- Data structures for the experimental data.<br>\n- Visualisation functions<br>\n- Analysis functions\n\n## Installation\n\n- R<br>\n- python<br>\n- ipython 4\n\nClone and use.\n\n## Usage\n\n<br>\n```python<br>\nsource('parallel_plot.r')<br>\nwith(z, parallelset(trt,response, freq=count, alpha=0.2))<br>\n```\n\n<br>\n## Contributing\n\n1. Fork it!<br>\n2. Create your feature branch: `git checkout -b my-new-feature`<br>\n3. Commit your changes: `git commit -am 'Add some feature'`<br>\n4. Push to the branch: `git push origin my-new-feature`<br>\n5. Submit a pull request :D\n\n<br>\n## License\n\nThis work supports my PhD Thesis at University of Manchester."
53
53
  }],
54
54
  "schema_version": "http://datacite.org/schema/kernel-4",
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "id": "https://doi.org/10.5438/4k3m-nyvg",
3
3
  "types": {
4
- "type": "ScholarlyArticle",
5
- "resource-type-general": "Text",
6
- "resource-type": "BlogPosting",
4
+ "resourceTypeGeneral": "Text",
5
+ "resourceType": "BlogPosting",
6
+ "schemaOrg": "ScholarlyArticle",
7
7
  "citeproc": "article-journal",
8
8
  "bibtex": "article",
9
9
  "ris": "RPRT"
@@ -20,7 +20,7 @@
20
20
  "title": "Eating your own Dog Food"
21
21
  }],
22
22
  "publisher": "DataCite",
23
- "publication-year": "2016",
23
+ "publicationYear": "2016",
24
24
  "subjects": [
25
25
  {
26
26
  "subject": "datacite"
@@ -34,46 +34,46 @@
34
34
  ],
35
35
  "dates": [
36
36
  {
37
- "date-type": "Created",
37
+ "dateType": "Created",
38
38
  "date": "2016-12-20"
39
39
  },
40
40
  {
41
- "date-type": "Issued",
41
+ "dateType": "Issued",
42
42
  "date": "2016-12-20"
43
43
  },
44
44
  {
45
- "date-type": "Updated",
45
+ "dateType": "Updated",
46
46
  "date": "2016-12-20"
47
47
  }
48
48
  ],
49
- "alternate-identifiers": [
49
+ "alternateIdentifiers": [
50
50
  {
51
- "alternate-identifier-type": "Local accession number",
52
- "alternate-identifier": "MS-49-3632-5083"
51
+ "alternateIdentifierType": "Local accession number",
52
+ "alternateIdentifier": "MS-49-3632-5083"
53
53
  }
54
54
  ],
55
- "related-identifiers": [
55
+ "relatedIdentifiers": [
56
56
  {
57
- "related-identifier": "10.5438/0000-00ss",
58
- "related-identifier-type": "DOI",
59
- "relation-type": "IsPartOf"
57
+ "relatedIdentifier": "10.5438/0000-00ss",
58
+ "relatedIdentifierType": "DOI",
59
+ "relationType": "IsPartOf"
60
60
  },
61
61
  {
62
- "related-identifier": "10.5438/0012",
63
- "related-identifier-type": "DOI",
64
- "relation-type": "References"
62
+ "relatedIdentifier": "10.5438/0012",
63
+ "relatedIdentifierType": "DOI",
64
+ "relationType": "References"
65
65
  },
66
66
  {
67
- "related-identifier": "10.5438/55e5-t5c0",
68
- "related-identifier-type": "DOI",
69
- "relation-type": "References"
67
+ "relatedIdentifier": "10.5438/55e5-t5c0",
68
+ "relatedIdentifierType": "DOI",
69
+ "relationType": "References"
70
70
  }
71
71
  ],
72
72
  "version": "1.0",
73
73
  "descriptions": [{
74
- "description-type": "Abstract",
74
+ "descriptionType": "Abstract",
75
75
  "description": "Eating your own dog food is a slang term to describe that an organization should itself use the products and services it provides. For DataCite this means that we should use DOIs with appropriate metadata and strategies for long-term preservation for..."
76
76
  }],
77
- "schema-version": "http://datacite.org/schema/kernel-4",
77
+ "schemaVersion": "http://datacite.org/schema/kernel-4",
78
78
  "provider": "DataCite"
79
79
  }
@@ -29,16 +29,16 @@ describe Bolognese::Metadata, vcr: true do
29
29
  it "Crossref DOI" do
30
30
  expect(subject.valid?).to be true
31
31
  expect(subject.identifier).to eq("https://doi.org/10.7554/elife.01567")
32
- expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resource_type"=>"JournalArticle", "resource_type_general"=>"Text", "ris"=>"JOUR", "type"=>"ScholarlyArticle")
32
+ expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceTypeGeneral"=>"Text", "resource_type"=>"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.creator.length).to eq(5)
35
35
  expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Martial Sankar", "givenName"=>"Martial", "familyName"=>"Sankar")
36
36
  expect(subject.titles).to eq([{"title"=>"Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth"}])
37
37
  expect(subject.descriptions.first["description"]).to start_with("Among various advantages, their small size makes model organisms preferred subjects of investigation.")
38
- expect(subject.rights_list.first["rights_uri"]).to eq("http://creativecommons.org/licenses/by/3.0/")
39
- expect(subject.dates).to eq([{"date"=>"2014", "date_type"=>"Issued"}])
38
+ expect(subject.rights_list.first["rightsUri"]).to eq("http://creativecommons.org/licenses/by/3.0/")
39
+ expect(subject.dates).to eq([{"date"=>"2014", "dateType"=>"Issued"}])
40
40
  expect(subject.publication_year).to eq("2014")
41
- expect(subject.related_identifiers).to eq([{"related_identifier"=>"2050-084X", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"eLife", "type"=>"Periodical"}])
41
+ expect(subject.related_identifiers).to eq([{"relatedIdentifier"=>"2050-084X", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "title"=>"eLife", "type"=>"Periodical"}])
42
42
  end
43
43
 
44
44
  it "DOI does not exist" do
@@ -48,11 +48,11 @@ describe Bolognese::Metadata, vcr: true do
48
48
  expect(subject.valid?).to be false
49
49
  expect(subject.state).to eq("not_found")
50
50
  expect(subject.identifier).to eq("https://doi.org/10.7554/elife.01567")
51
- expect(subject.types).to eq("bibtex"=>"phdthesis", "citeproc"=>"thesis", "resource_type"=>"Dissertation", "resource_type_general"=>"Text", "ris"=>"THES", "type"=>"Thesis")
51
+ expect(subject.types).to eq("bibtex"=>"phdthesis", "citeproc"=>"thesis", "resourceTypeGeneral"=>"Text", "resource_type"=>"Dissertation", "ris"=>"THES", "schemaOrg"=>"Thesis")
52
52
  expect(subject.creator).to eq([{"type"=>"Person", "name"=>"Y. Toparlar", "givenName"=>"Y.", "familyName"=>"Toparlar"}])
53
53
  expect(subject.titles).to eq([{"title"=>"A multiscale analysis of the urban heat island effect: from city averaged temperatures to the energy demand of individual buildings"}])
54
54
  expect(subject.descriptions.first["description"]).to start_with("Designing the climates of cities")
55
- expect(subject.dates).to eq([{"date"=>"2018", "date_type"=>"Issued"}])
55
+ expect(subject.dates).to eq([{"date"=>"2018", "dateType"=>"Issued"}])
56
56
  expect(subject.publication_year).to eq("2018")
57
57
  end
58
58
  end
@@ -18,11 +18,11 @@ describe Bolognese::Metadata, vcr: true do
18
18
  expect(subject.valid?).to be true
19
19
  expect(subject.identifier).to eq("https://doi.org/10.5438/4k3m-nyvg")
20
20
  expect(subject.url).to eq("https://blog.datacite.org/eating-your-own-dog-food")
21
- expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"post-weblog", "resource_type_general"=>"Text", "ris"=>"GEN", "type"=>"BlogPosting")
21
+ expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"post-weblog", "resourceTypeGeneral"=>"Text", "ris"=>"GEN", "schemaOrg"=>"BlogPosting")
22
22
  expect(subject.creator).to eq([{"familyName"=>"Fenner", "givenName"=>"Martin", "name"=>"Martin Fenner", "type"=>"Person"}])
23
23
  expect(subject.titles).to eq([{"title"=>"Eating your own Dog Food"}])
24
24
  expect(subject.descriptions.first["description"]).to start_with("Eating your own dog food")
25
- expect(subject.dates).to eq([{"date"=>"2016-12-20", "date_type"=>"Issued"}])
25
+ expect(subject.dates).to eq([{"date"=>"2016-12-20", "dateType"=>"Issued"}])
26
26
  expect(subject.publication_year).to eq("2016")
27
27
  end
28
28
  end
@@ -20,12 +20,12 @@ describe Bolognese::Metadata, vcr: true do
20
20
  expect(subject.valid?).to be true
21
21
  expect(subject.identifier).to eq("https://doi.org/10.5438/qeg0-3gm3")
22
22
  expect(subject.url).to eq("https://github.com/datacite/maremma")
23
- expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resource_type_general"=>"Software", "ris"=>"COMP", "type"=>"SoftwareSourceCode")
23
+ expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceTypeGeneral"=>"Software", "ris"=>"COMP", "schemaOrg"=>"SoftwareSourceCode")
24
24
  expect(subject.creator).to eq([{"type"=>"Person", "id"=>"http://orcid.org/0000-0003-0077-4738", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner"}])
25
25
  expect(subject.titles).to eq([{"title"=>"Maremma: a Ruby library for simplified network calls"}])
26
26
  expect(subject.descriptions.first["description"]).to start_with("Ruby utility library for network requests")
27
27
  expect(subject.subjects).to eq([{"subject"=>"faraday"}, {"subject"=>"excon"}, {"subject"=>"net/http"}])
28
- expect(subject.dates).to eq([{"date"=>"2017-02-24", "date_type"=>"Issued"}, {"date"=>"2015-11-28", "date_type"=>"Created"}, {"date"=>"2017-02-24", "date_type"=>"Updated"}])
28
+ expect(subject.dates).to eq([{"date"=>"2017-02-24", "dateType"=>"Issued"}, {"date"=>"2015-11-28", "dateType"=>"Created"}, {"date"=>"2017-02-24", "dateType"=>"Updated"}])
29
29
  expect(subject.publication_year).to eq("2017")
30
30
  expect(subject.publisher).to eq("DataCite")
31
31
  end
@@ -35,7 +35,7 @@ describe Bolognese::Metadata, vcr: true do
35
35
  subject = Bolognese::Metadata.new(input: input)
36
36
  expect(subject.identifier).to eq("https://doi.org/10.5063/f1m61h5x")
37
37
  expect(subject.url).to eq("https://github.com/DataONEorg/rdataone")
38
- expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resource_type_general"=>"Software", "ris"=>"COMP", "type"=>"SoftwareSourceCode")
38
+ expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceTypeGeneral"=>"Software", "ris"=>"COMP", "schemaOrg"=>"SoftwareSourceCode")
39
39
  expect(subject.creator).to eq( [{"type"=>"Person",
40
40
  "id"=>"http://orcid.org/0000-0003-0077-4738",
41
41
  "name"=>"Matt Jones",
@@ -51,7 +51,7 @@ describe Bolognese::Metadata, vcr: true do
51
51
  expect(subject.descriptions.first["description"]).to start_with("Provides read and write access to data and metadata")
52
52
  expect(subject.subjects).to eq([{"subject"=>"data sharing"}, {"subject"=>"data repository"}, {"subject"=>"DataONE"}])
53
53
  expect(subject.version).to eq("2.0.0")
54
- expect(subject.dates).to eq([{"date"=>"2016-05-27", "date_type"=>"Issued"}, {"date"=>"2016-05-27", "date_type"=>"Created"}, {"date"=>"2016-05-27", "date_type"=>"Updated"}])
54
+ expect(subject.dates).to eq([{"date"=>"2016-05-27", "dateType"=>"Issued"}, {"date"=>"2016-05-27", "dateType"=>"Created"}, {"date"=>"2016-05-27", "dateType"=>"Updated"}])
55
55
  expect(subject.publication_year).to eq("2016")
56
56
  expect(subject.publisher).to eq("https://cran.r-project.org")
57
57
  end
@@ -62,12 +62,12 @@ describe Bolognese::Metadata, vcr: true do
62
62
  expect(subject.valid?).to be true
63
63
  expect(subject.identifier).to eq("https://doi.org/10.5438/qeg0-3gm3")
64
64
  expect(subject.url).to eq("https://github.com/datacite/maremma")
65
- expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resource_type_general"=>"Software", "ris"=>"COMP", "type"=>"SoftwareSourceCode")
65
+ expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceTypeGeneral"=>"Software", "ris"=>"COMP", "schemaOrg"=>"SoftwareSourceCode")
66
66
  expect(subject.creator).to eq([{"type"=>"Person", "id"=>"http://orcid.org/0000-0003-0077-4738", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner"}])
67
67
  expect(subject.titles).to eq([{"title"=>"Maremma: a Ruby library for simplified network calls"}])
68
68
  expect(subject.descriptions.first["description"]).to start_with("Simplifies network calls")
69
69
  expect(subject.subjects).to eq([{"subject"=>"faraday"}, {"subject"=>"excon"}, {"subject"=>"net/http"}])
70
- expect(subject.dates).to eq([{"date"=>"2017-02-24", "date_type"=>"Issued"}, {"date"=>"2015-11-28", "date_type"=>"Created"}, {"date"=>"2017-02-24", "date_type"=>"Updated"}])
70
+ expect(subject.dates).to eq([{"date"=>"2017-02-24", "dateType"=>"Issued"}, {"date"=>"2015-11-28", "dateType"=>"Created"}, {"date"=>"2017-02-24", "dateType"=>"Updated"}])
71
71
  expect(subject.publication_year).to eq("2017")
72
72
  expect(subject.publisher).to eq("DataCite")
73
73
  end
@@ -78,13 +78,13 @@ describe Bolognese::Metadata, vcr: true do
78
78
  expect(subject.valid?).to be true
79
79
  expect(subject.identifier).to eq("https://doi.org/10.5438/wr0x-e194")
80
80
  expect(subject.url).to eq("https://github.com/datacite/metadata-reports")
81
- expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resource_type_general"=>"Software", "ris"=>"COMP", "type"=>"SoftwareSourceCode")
81
+ expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceTypeGeneral"=>"Software", "ris"=>"COMP", "schemaOrg"=>"SoftwareSourceCode")
82
82
  expect(subject.creator.size).to eq(4)
83
83
  expect(subject.creator.last).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0001-8135-3489", "name"=>"Lars Holm Nielsen", "givenName"=>"Lars Holm", "familyName"=>"Nielsen")
84
84
  expect(subject.titles).to eq([{"title"=>"DOI Registrations for Software"}])
85
85
  expect(subject.descriptions.first["description"]).to start_with("Analysis of DataCite DOIs registered for software")
86
86
  expect(subject.subjects).to eq([{"subject"=>"doi"}, {"subject"=>"software"}, {"subject"=>"codemeta"}])
87
- expect(subject.dates).to eq([{"date"=>"2018-05-17", "date_type"=>"Issued"}, {"date"=>"2018-03-09", "date_type"=>"Created"}, {"date"=>"2018-05-17", "date_type"=>"Updated"}])
87
+ expect(subject.dates).to eq([{"date"=>"2018-05-17", "dateType"=>"Issued"}, {"date"=>"2018-03-09", "dateType"=>"Created"}, {"date"=>"2018-05-17", "dateType"=>"Updated"}])
88
88
  expect(subject.publication_year).to eq("2018")
89
89
  expect(subject.publisher).to eq("DataCite")
90
90
  end
@@ -17,11 +17,11 @@ describe Bolognese::Metadata, vcr: true do
17
17
  it "SoftwareSourceCode" do
18
18
  expect(subject.valid?).to be true
19
19
  expect(subject.identifier).to eq("https://doi.org/10.5281/zenodo.48440")
20
- expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"other", "resource_type"=>"Software", "resource_type_general"=>"Software", "ris"=>"COMP", "type"=>"SoftwareSourceCode")
20
+ expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"other", "resourceType"=>"Software", "resourceTypeGeneral"=>"Software", "ris"=>"COMP", "schemaOrg"=>"SoftwareSourceCode")
21
21
  expect(subject.creator).to eq([{"type"=>"Person", "familyName" => "Garza", "givenName" => "Kristian", "name" => "Kristian Garza"}])
22
22
  expect(subject.titles).to eq([{"title"=>"Analysis Tools for Crossover Experiment of UI using Choice Architecture"}])
23
23
  expect(subject.descriptions.first["description"]).to start_with("This tools are used to analyse the data produced by the Crosssover Experiment")
24
- expect(subject.dates).to eq("date"=>"2016-03-27", "date-type"=>"Issued")
24
+ expect(subject.dates).to eq("date"=>"2016-03-27", "dateType"=>"Issued")
25
25
  expect(subject.publication_year).to eq("2016")
26
26
  end
27
27
 
@@ -30,11 +30,11 @@ describe Bolognese::Metadata, vcr: true do
30
30
  subject = Bolognese::Metadata.new(input: input)
31
31
  expect(subject.valid?).to be true
32
32
  expect(subject.identifier).to eq("https://doi.org/10.5281/zenodo.48440")
33
- expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"other", "resource_type"=>"Software", "resource_type_general"=>"Software", "ris"=>"COMP", "type"=>"SoftwareSourceCode")
33
+ expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"other", "resourceType"=>"Software", "resourceTypeGeneral"=>"Software", "ris"=>"COMP", "schemaOrg"=>"SoftwareSourceCode")
34
34
  expect(subject.creator).to eq([{"type"=>"Person", "familyName" => "Garza", "givenName" => "Kristian", "name" => "Kristian Garza"}])
35
35
  expect(subject.titles).to eq([{"title"=>"Analysis Tools for Crossover Experiment of UI using Choice Architecture"}])
36
36
  expect(subject.descriptions.first["description"]).to start_with("This tools are used to analyse the data produced by the Crosssover Experiment")
37
- expect(subject.dates).to eq("date"=>"2016-03-27", "date-type"=>"Issued")
37
+ expect(subject.dates).to eq("date"=>"2016-03-27", "dateType"=>"Issued")
38
38
  expect(subject.publication_year).to eq("2016")
39
39
  end
40
40
  end
@@ -19,32 +19,29 @@ describe Bolognese::Metadata, vcr: true do
19
19
  it "DOI with data citation" do
20
20
  expect(subject.valid?).to be true
21
21
  expect(subject.identifier).to eq("https://doi.org/10.7554/elife.01567")
22
- expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resource_type"=>"JournalArticle", "resource_type_general"=>"Text", "ris"=>"JOUR", "type"=>"ScholarlyArticle")
22
+ expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
23
23
  expect(subject.url).to eq("https://elifesciences.org/articles/01567")
24
24
  expect(subject.creator.length).to eq(5)
25
25
  expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Martial Sankar", "givenName"=>"Martial", "familyName"=>"Sankar")
26
- expect(subject.rights_list).to eq([{"rights_uri"=>"http://creativecommons.org/licenses/by/3.0"}])
26
+ expect(subject.rights_list).to eq([{"rightsUri"=>"http://creativecommons.org/licenses/by/3.0"}])
27
27
  expect(subject.titles).to eq([{"title"=>"Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth"}])
28
- expect(subject.dates).to eq([{"date"=>"2014-02-11", "date_type"=>"Issued"}, {"date"=>"2018-08-23T13:41:49Z", "date_type"=>"Updated"}])
28
+ expect(subject.dates).to eq([{"date"=>"2014-02-11", "dateType"=>"Issued"}, {"date"=>"2018-08-23T13:41:49Z", "dateType"=>"Updated"}])
29
29
  expect(subject.publication_year).to eq("2014")
30
30
  expect(subject.periodical).to eq("issn"=>"2050-084X", "title"=>"eLife", "type"=>"Periodical")
31
31
  expect(subject.related_identifiers.length).to eq(27)
32
- expect(subject.related_identifiers.first).to eq("related_identifier"=>"2050-084X", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"eLife", "type"=>"Periodical")
33
- expect(subject.related_identifiers.last).to eq("related_identifier" => "10.1038/ncb2764",
34
- "related_identifier_type" => "DOI",
35
- "relation_type" => "References",
36
- "title" => "A screen for morphological complexity identifies regulators of switch-like transitions between discrete cell shapes")
37
- expect(subject.funding_references).to eq([{"funder_name"=>"SystemsX"},
38
- {"funder_identifier"=>"https://doi.org/10.13039/501100003043",
39
- "funder_identifier_type"=>"Crossref Funder ID",
40
- "funder_name"=>"EMBO"},
41
- {"funder_identifier"=>"https://doi.org/10.13039/501100001711",
42
- "funder_identifier_type"=>"Crossref Funder ID",
43
- "funder_name"=>"Swiss National Science Foundation"},
44
- {"funder_identifier"=>"https://doi.org/10.13039/501100006390",
45
- "funder_identifier_type"=>"Crossref Funder ID",
46
- "funder_name"=>"University of Lausanne"}])
47
- expect(subject.service_provider).to eq("Crossref")
32
+ expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"2050-084X", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
33
+ expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.1038/ncb2764", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
34
+ expect(subject.funding_references).to eq([{"funderName"=>"SystemsX"},
35
+ {"funderIdentifier"=>"https://doi.org/10.13039/501100003043",
36
+ "funderIdentifierType"=>"Crossref Funder ID",
37
+ "funderName"=>"EMBO"},
38
+ {"funderIdentifier"=>"https://doi.org/10.13039/501100001711",
39
+ "funderIdentifierType"=>"Crossref Funder ID",
40
+ "funderName"=>"Swiss National Science Foundation"},
41
+ {"funderIdentifier"=>"https://doi.org/10.13039/501100006390",
42
+ "funderIdentifierType"=>"Crossref Funder ID",
43
+ "funderName"=>"University of Lausanne"}])
44
+ expect(subject.source).to eq("Crossref")
48
45
  end
49
46
 
50
47
  it "journal article" do
@@ -53,20 +50,20 @@ describe Bolognese::Metadata, vcr: true do
53
50
  expect(subject.valid?).to be true
54
51
  expect(subject.identifier).to eq(input)
55
52
  expect(subject.url).to eq("http://dx.plos.org/10.1371/journal.pone.0000030")
56
- expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resource_type"=>"JournalArticle", "resource_type_general"=>"Text", "ris"=>"JOUR", "type"=>"ScholarlyArticle")
53
+ expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
57
54
  expect(subject.creator.length).to eq(5)
58
55
  expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Markus Ralser", "givenName"=>"Markus", "familyName"=>"Ralser")
59
56
  expect(subject.contributor).to eq("contributorType"=>"Editor", "familyName"=>"Janbon", "givenName"=>"Guilhem", "name"=>"Guilhem Janbon", "type"=>"Person")
60
57
  expect(subject.titles).to eq([{"title"=>"Triose Phosphate Isomerase Deficiency Is Caused by Altered Dimerization–Not Catalytic Inactivity–of the Mutant Enzymes"}])
61
- expect(subject.rights_list).to eq([{"rights_uri"=>"http://creativecommons.org/licenses/by/4.0"}])
62
- expect(subject.dates).to eq([{"date"=>"2006-12-20", "date_type"=>"Issued"}, {"date"=>"2017-06-17T12:26:15Z", "date_type"=>"Updated"}])
58
+ expect(subject.rights_list).to eq([{"rightsUri"=>"http://creativecommons.org/licenses/by/4.0"}])
59
+ expect(subject.dates).to eq([{"date"=>"2006-12-20", "dateType"=>"Issued"}, {"date"=>"2017-06-17T12:26:15Z", "dateType"=>"Updated"}])
63
60
  expect(subject.publication_year).to eq("2006")
64
61
  expect(subject.first_page).to eq("e30")
65
62
  expect(subject.related_identifiers.length).to eq(62)
66
- expect(subject.related_identifiers.first).to eq("related_identifier"=>"1932-6203", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"PLoS ONE", "type"=>"Periodical")
67
- expect(subject.related_identifiers.last).to eq("related_identifier"=>"10.1056/nejm199109123251104", "relation_type"=>"References", "related_identifier_type"=>"DOI", "title"=>"Efficacy of statewide neonatal screening for cystic fibrosis by assay of trypsinogen concentrations.")
63
+ expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"1932-6203", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
64
+ expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.1056/nejm199109123251104", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
68
65
  expect(subject.periodical).to eq("issn"=>"1932-6203", "title"=>"PLoS ONE", "type"=>"Periodical")
69
- expect(subject.service_provider).to eq("Crossref")
66
+ expect(subject.source).to eq("Crossref")
70
67
  end
71
68
 
72
69
  it "posted_content" do
@@ -75,16 +72,16 @@ describe Bolognese::Metadata, vcr: true do
75
72
  expect(subject.valid?).to be true
76
73
  expect(subject.identifier).to eq(input)
77
74
  expect(subject.url).to eq("http://biorxiv.org/lookup/doi/10.1101/097196")
78
- expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resource_type"=>"PostedContent", "resource_type_general"=>"Text", "ris"=>"JOUR", "type"=>"ScholarlyArticle")
75
+ expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"PostedContent", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
79
76
  expect(subject.creator.count).to eq(11)
80
77
  expect(subject.creator.last).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0003-4060-7360", "name"=>"Timothy Clark", "givenName"=>"Timothy", "familyName"=>"Clark")
81
78
  expect(subject.titles).to eq([{"title"=>"A Data Citation Roadmap for Scholarly Data Repositories"}])
82
- expect(subject.alternate_identifiers).to eq("alternate_identifier"=>"biorxiv;097196v2", "alternate_identifier_type"=>"Publisher ID")
79
+ expect(subject.alternate_identifiers).to eq("alternateIdentifier"=>"biorxiv;097196v2", "alternateIdentifierType"=>"Publisher ID")
83
80
  expect(subject.descriptions.first["description"]).to start_with("This article presents a practical roadmap")
84
- expect(subject.dates).to eq([{"date"=>"2017-10-09", "date_type"=>"Issued"}, {"date"=>"2017-10-10T05:10:49Z", "date_type"=>"Updated"}])
81
+ expect(subject.dates).to eq([{"date"=>"2017-10-09", "dateType"=>"Issued"}, {"date"=>"2017-10-10T05:10:49Z", "dateType"=>"Updated"}])
85
82
  expect(subject.publication_year).to eq("2017")
86
83
  expect(subject.publisher).to eq("bioRxiv")
87
- expect(subject.service_provider).to eq("Crossref")
84
+ expect(subject.source).to eq("Crossref")
88
85
  end
89
86
 
90
87
  it "DOI with SICI DOI" do
@@ -93,19 +90,19 @@ describe Bolognese::Metadata, vcr: true do
93
90
  expect(subject.valid?).to be true
94
91
  expect(subject.identifier).to eq("https://doi.org/10.1890/0012-9658(2006)87%5B2832:tiopma%5D2.0.co;2")
95
92
  expect(subject.url).to eq("http://doi.wiley.com/10.1890/0012-9658(2006)87[2832:TIOPMA]2.0.CO;2")
96
- expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resource_type"=>"JournalArticle", "resource_type_general"=>"Text", "ris"=>"JOUR", "type"=>"ScholarlyArticle")
93
+ expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
97
94
  expect(subject.creator).to eq([{"type"=>"Person", "name"=>"A. Fenton", "givenName"=>"A.", "familyName"=>"Fenton"}, {"type"=>"Person", "name"=>"S. A. Rands", "givenName"=>"S. A.", "familyName"=>"Rands"}])
98
- expect(subject.rights_list).to eq([{"rights_uri"=>"http://doi.wiley.com/10.1002/tdm_license_1.1"}])
95
+ expect(subject.rights_list).to eq([{"rightsUri"=>"http://doi.wiley.com/10.1002/tdm_license_1.1"}])
99
96
  expect(subject.titles).to eq([{"title"=>"THE IMPACT OF PARASITE MANIPULATION AND PREDATOR FORAGING BEHAVIOR ON PREDATOR–PREY COMMUNITIES"}])
100
- expect(subject.dates).to eq([{"date"=>"2006-11", "date_type"=>"Issued"}, {"date"=>"2018-08-02T21:20:01Z", "date_type"=>"Updated"}])
97
+ expect(subject.dates).to eq([{"date"=>"2006-11", "dateType"=>"Issued"}, {"date"=>"2018-08-02T21:20:01Z", "dateType"=>"Updated"}])
101
98
  expect(subject.publication_year).to eq("2006")
102
99
  expect(subject.first_page).to eq("2832")
103
100
  expect(subject.last_page).to eq("2841")
104
101
  expect(subject.related_identifiers.length).to eq(34)
105
- expect(subject.related_identifiers.first).to eq("related_identifier"=>"0012-9658", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"Ecology", "type"=>"Periodical")
106
- expect(subject.related_identifiers.last).to eq("related_identifier"=>"10.1098/rspb.2002.2213", "related_identifier_type"=>"DOI", "relation_type"=>"References")
102
+ expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"0012-9658", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
103
+ expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.1098/rspb.2002.2213", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
107
104
  expect(subject.periodical).to eq("issn"=>"0012-9658", "title"=>"Ecology", "type"=>"Periodical")
108
- expect(subject.service_provider).to eq("Crossref")
105
+ expect(subject.source).to eq("Crossref")
109
106
  end
110
107
 
111
108
  it "DOI with ORCID ID" do
@@ -114,20 +111,20 @@ describe Bolognese::Metadata, vcr: true do
114
111
  expect(subject.valid?).to be true
115
112
  expect(subject.identifier).to eq("https://doi.org/10.1155/2012/291294")
116
113
  expect(subject.url).to eq("http://www.hindawi.com/journals/pm/2012/291294/")
117
- expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resource_type"=>"JournalArticle", "resource_type_general"=>"Text", "ris"=>"JOUR", "type"=>"ScholarlyArticle")
114
+ expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
118
115
  expect(subject.creator.length).to eq(7)
119
116
  expect(subject.creator[2]).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0003-2043-4925", "name"=>"Beatriz Hernandez", "givenName"=>"Beatriz", "familyName"=>"Hernandez")
120
- expect(subject.rights_list).to eq([{"rights_uri"=>"http://creativecommons.org/licenses/by/3.0"}])
117
+ expect(subject.rights_list).to eq([{"rightsUri"=>"http://creativecommons.org/licenses/by/3.0"}])
121
118
  expect(subject.titles).to eq([{"title"=>"Delineating a Retesting Zone Using Receiver Operating Characteristic Analysis on Serial QuantiFERON Tuberculosis Test Results in US Healthcare Workers"}])
122
- expect(subject.dates).to eq([{"date"=>"2012", "date_type"=>"Issued"}, {"date"=>"2016-08-02T18:42:41Z", "date_type"=>"Updated"}])
119
+ expect(subject.dates).to eq([{"date"=>"2012", "dateType"=>"Issued"}, {"date"=>"2016-08-02T18:42:41Z", "dateType"=>"Updated"}])
123
120
  expect(subject.publication_year).to eq("2012")
124
121
  expect(subject.first_page).to eq("1")
125
122
  expect(subject.last_page).to eq("7")
126
123
  expect(subject.related_identifiers.length).to eq(18)
127
- expect(subject.related_identifiers.first).to eq("related_identifier"=>"2090-1836", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"Pulmonary Medicine", "type"=>"Periodical")
128
- expect(subject.related_identifiers.last).to eq("related_identifier"=>"10.1378/chest.12-0045", "related_identifier_type"=>"DOI", "relation_type"=>"References")
124
+ expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"2090-1836", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
125
+ expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.1378/chest.12-0045", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
129
126
  expect(subject.periodical).to eq("issn"=>"2090-1836", "title"=>"Pulmonary Medicine", "type"=>"Periodical")
130
- expect(subject.service_provider).to eq("Crossref")
127
+ expect(subject.source).to eq("Crossref")
131
128
  end
132
129
 
133
130
  it "date in future" do
@@ -136,15 +133,15 @@ describe Bolognese::Metadata, vcr: true do
136
133
  expect(subject.valid?).to be true
137
134
  expect(subject.identifier).to eq(input)
138
135
  expect(subject.url).to eq("http://linkinghub.elsevier.com/retrieve/pii/S0014299915002332")
139
- expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resource_type"=>"JournalArticle", "resource_type_general"=>"Text", "ris"=>"JOUR", "type"=>"ScholarlyArticle")
136
+ expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
140
137
  expect(subject.creator.length).to eq(10)
141
138
  expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Sarah E. Beck", "givenName"=>"Sarah E.", "familyName"=>"Beck")
142
139
  expect(subject.titles).to eq([{"title"=>"Paving the path to HIV neurotherapy: Predicting SIV CNS disease"}])
143
- expect(subject.dates).to eq([{"date"=>"2015-07", "date_type"=>"Issued"}, {"date"=>"2017-06-23T08:44:48Z", "date_type"=>"Updated"}])
140
+ expect(subject.dates).to eq([{"date"=>"2015-07", "dateType"=>"Issued"}, {"date"=>"2017-06-23T08:44:48Z", "dateType"=>"Updated"}])
144
141
  expect(subject.publication_year).to eq("2015")
145
- expect(subject.related_identifiers).to eq([{"related_identifier"=>"00142999", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"European Journal of Pharmacology", "type"=>"Periodical"}])
142
+ expect(subject.related_identifiers).to eq([{"relatedIdentifier"=>"00142999", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection"}])
146
143
  expect(subject.periodical).to eq("issn"=>"00142999", "title"=>"European Journal of Pharmacology", "type"=>"Periodical")
147
- expect(subject.service_provider).to eq("Crossref")
144
+ expect(subject.source).to eq("Crossref")
148
145
  end
149
146
 
150
147
  it "dataset" do
@@ -153,15 +150,15 @@ describe Bolognese::Metadata, vcr: true do
153
150
  expect(subject.valid?).to be true
154
151
  expect(subject.identifier).to eq("https://doi.org/10.2210/pdb4hhb/pdb")
155
152
  expect(subject.url).to eq("ftp://ftp.wwpdb.org/pub/pdb/data/structures/divided/pdb/hh/pdb4hhb.ent.gz")
156
- expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resource_type"=>"SaComponent", "resource_type_general"=>"Text", "ris"=>"JOUR", "type"=>"ScholarlyArticle")
153
+ expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceType"=>"SaComponent", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
157
154
  expect(subject.creator.length).to eq(2)
158
155
  expect(subject.creator.first).to eq("type"=>"Person", "name"=>"G. Fermi", "givenName"=>"G.", "familyName"=>"Fermi")
159
156
  expect(subject.titles).to eq([{"title"=>"THE CRYSTAL STRUCTURE OF HUMAN DEOXYHAEMOGLOBIN AT 1.74 ANGSTROMS RESOLUTION"}])
160
- expect(subject.descriptions).to eq([{"description"=>"x-ray diffraction structure", "description_type"=>"Other"}])
161
- expect(subject.dates).to eq([{"date"=>"1984-07-17", "date_type"=>"Issued"}, {"date"=>"2014-05-27T16:45:59Z", "date_type"=>"Updated"}])
157
+ expect(subject.descriptions).to eq([{"description"=>"x-ray diffraction structure", "descriptionType"=>"Other"}])
158
+ expect(subject.dates).to eq([{"date"=>"1984-07-17", "dateType"=>"Issued"}, {"date"=>"2014-05-27T16:45:59Z", "dateType"=>"Updated"}])
162
159
  expect(subject.publication_year).to eq("1984")
163
160
  expect(subject.publisher).to eq("(:unav)")
164
- expect(subject.service_provider).to eq("Crossref")
161
+ expect(subject.source).to eq("Crossref")
165
162
  end
166
163
 
167
164
  it "book chapter" do
@@ -170,14 +167,14 @@ describe Bolognese::Metadata, vcr: true do
170
167
  expect(subject.valid?).to be true
171
168
  expect(subject.identifier).to eq("https://doi.org/10.1007/978-3-662-46370-3_13")
172
169
  expect(subject.url).to eq("http://link.springer.com/10.1007/978-3-662-46370-3_13")
173
- expect(subject.types).to eq("bibtex"=>"inbook", "citeproc"=>"chapter", "resource_type"=>"BookChapter", "resource_type_general"=>"Text", "ris"=>"CHAP", "type"=>"Chapter")
170
+ expect(subject.types).to eq("bibtex"=>"inbook", "citeproc"=>"chapter", "resourceType"=>"BookChapter", "resourceTypeGeneral"=>"Text", "ris"=>"CHAP", "schemaOrg"=>"Chapter")
174
171
  expect(subject.creator.length).to eq(2)
175
172
  expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Ronald L. Diercks", "givenName"=>"Ronald L.", "familyName"=>"Diercks")
176
173
  expect(subject.titles).to eq([{"title"=>"Clinical Symptoms and Physical Examinations"}])
177
- expect(subject.dates).to eq([{"date"=>"2015", "date_type"=>"Issued"}, {"date"=>"2015-04-14T02:31:13Z", "date_type"=>"Updated"}])
174
+ expect(subject.dates).to eq([{"date"=>"2015", "dateType"=>"Issued"}, {"date"=>"2015-04-14T02:31:13Z", "dateType"=>"Updated"}])
178
175
  expect(subject.publication_year).to eq("2015")
179
176
  expect(subject.publisher).to eq("Springer Berlin Heidelberg")
180
- expect(subject.service_provider).to eq("Crossref")
177
+ expect(subject.source).to eq("Crossref")
181
178
  end
182
179
 
183
180
  it "journal article with" do
@@ -186,18 +183,18 @@ describe Bolognese::Metadata, vcr: true do
186
183
  expect(subject.valid?).to be true
187
184
  expect(subject.identifier).to eq(input)
188
185
  expect(subject.url).to eq("http://doi.wiley.com/10.1111/nph.14619")
189
- expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resource_type"=>"JournalArticle", "resource_type_general"=>"Text", "ris"=>"JOUR", "type"=>"ScholarlyArticle")
186
+ expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
190
187
  expect(subject.creator.length).to eq(3)
191
188
  expect(subject.creator.first).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0002-4156-3761", "name"=>"Nico Dissmeyer", "givenName"=>"Nico", "familyName"=>"Dissmeyer")
192
189
  expect(subject.titles).to eq([{"title"=>"Life and death of proteins after protease cleavage: protein degradation by the N-end rule pathway"}])
193
- expect(subject.rights_list).to eq([{"rights_uri"=>"http://doi.wiley.com/10.1002/tdm_license_1.1"}, {"rights_uri"=>"http://onlinelibrary.wiley.com/termsAndConditions"}])
194
- expect(subject.dates).to eq([{"date"=>"2018-05", "date_type"=>"Issued"}, {"date"=>"2018-08-07T05:52:14Z", "date_type"=>"Updated"}])
190
+ expect(subject.rights_list).to eq([{"rightsUri"=>"http://doi.wiley.com/10.1002/tdm_license_1.1"}, {"rightsUri"=>"http://onlinelibrary.wiley.com/termsAndConditions"}])
191
+ expect(subject.dates).to eq([{"date"=>"2018-05", "dateType"=>"Issued"}, {"date"=>"2018-08-07T05:52:14Z", "dateType"=>"Updated"}])
195
192
  expect(subject.publication_year).to eq("2018")
196
193
  expect(subject.related_identifiers.length).to eq(49)
197
- expect(subject.related_identifiers.first).to eq("related_identifier"=>"0028646X", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"New Phytologist", "type"=>"Periodical")
198
- expect(subject.related_identifiers.last).to eq("related_identifier"=>"10.1002/pmic.201400530", "relation_type"=>"References", "related_identifier_type"=>"DOI", "title"=>"Quantitative proteomics analysis of the Arg/N-end rule pathway of targeted degradation in Arabidopsis roots")
194
+ expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"0028646X", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
195
+ expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.1002/pmic.201400530", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
199
196
  expect(subject.periodical).to eq("issn"=>"0028646X", "title"=>"New Phytologist", "type"=>"Periodical")
200
- expect(subject.service_provider).to eq("Crossref")
197
+ expect(subject.source).to eq("Crossref")
201
198
  end
202
199
 
203
200
  it "not found error" do
@@ -206,7 +203,7 @@ describe Bolognese::Metadata, vcr: true do
206
203
  expect(subject.valid?).to be false
207
204
  expect(subject.identifier).to eq("https://doi.org/10.7554/elife.01567x")
208
205
  expect(subject.doi).to eq("10.7554/elife.01567x")
209
- expect(subject.service_provider).to eq("Crossref")
206
+ expect(subject.source).to eq("Crossref")
210
207
  expect(subject.state).to eq("not_found")
211
208
  end
212
209
  end