commonmeta-ruby 3.8.3 → 3.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f92c91c3ea4495bb052b4c316d146566a9bf0c784e2edf55134f4ebef50156a9
4
- data.tar.gz: 6b70e63796e13193ae0782775700498588bd289ad086e266e05b0eba90bc29a3
3
+ metadata.gz: cc0c7f6508a3b1d909c7726fa761c35f8fa213112bebded5779f75b200dbbac7
4
+ data.tar.gz: 1030041c2ec0ea94c01e3f079cb6aa3ce8a5b5aebd3c270a71341bf4e87396fe
5
5
  SHA512:
6
- metadata.gz: d526121e057c30beec3568834cb972e6f870f1d681f1a37d223aa4b79a5bfb5943a79bbd699c50512ae0ad6c90313e392f4e1b1fc1e07f4181015228dfcacb3a
7
- data.tar.gz: a7646d597a54a2e8e5f02af0650eccb80695d2e6706e346b756fbbd591bcdb1bf13e530c2ffbd8a55d39bae7dbf173a9c1f8f8489546bcf01dd6a6b99994d15f
6
+ metadata.gz: a5446caf7d8cb8a32cf8fe4dbddbd11bade0cd68d577d80302c291540d61564b4268b51d846e406486b4ec26a1ae4682326fb79edf5d66de115f91ea845c5db0
7
+ data.tar.gz: 622d33b224c37ea1a131aad8efeef29ef9a80c4d536012fee61ca982b58dfca784a2edfaeed5d889f5a93b52d6d13da978d89e49000f50120cb8b9d71aa776a3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- commonmeta-ruby (3.8.3)
4
+ commonmeta-ruby (3.9.0)
5
5
  activesupport (>= 4.2.5, < 8.0)
6
6
  addressable (~> 2.8.1, < 2.8.2)
7
7
  base32-url (>= 0.7.0, < 1)
@@ -132,17 +132,18 @@ GEM
132
132
  crass (~> 1.0.2)
133
133
  nokogiri (>= 1.12.0)
134
134
  matrix (0.4.2)
135
- minitest (5.20.0)
135
+ minitest (5.21.1)
136
136
  multi_json (1.15.0)
137
137
  mutex_m (0.2.0)
138
- namae (1.1.1)
138
+ namae (1.2.0)
139
+ racc (~> 1.7)
139
140
  nokogiri (1.16.0-arm64-darwin)
140
141
  racc (~> 1.4)
141
142
  oj (3.16.3)
142
143
  bigdecimal (>= 3.0)
143
144
  optimist (3.1.0)
144
145
  parallel (1.24.0)
145
- parser (3.3.0.2)
146
+ parser (3.3.0.3)
146
147
  ast (~> 2.4.1)
147
148
  racc
148
149
  postrank-uri (1.1)
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2017 - 2021 DataCite, 2021 Front Matter
3
+ Copyright (c) 2017 - 2021 DataCite, 2021 - 2024 Front Matter
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -10,6 +10,7 @@ require_relative 'readers/bibtex_reader'
10
10
  require_relative 'readers/cff_reader'
11
11
  require_relative 'readers/csl_reader'
12
12
  require_relative 'readers/codemeta_reader'
13
+ require_relative 'readers/commonmeta_reader'
13
14
  require_relative 'readers/crossref_reader'
14
15
  require_relative 'readers/crossref_xml_reader'
15
16
  require_relative 'readers/datacite_reader'
@@ -44,6 +45,7 @@ module Commonmeta
44
45
  include Commonmeta::Readers::BibtexReader
45
46
  include Commonmeta::Readers::CffReader
46
47
  include Commonmeta::Readers::CodemetaReader
48
+ include Commonmeta::Readers::CommonmetaReader
47
49
  include Commonmeta::Readers::CrossrefReader
48
50
  include Commonmeta::Readers::CrossrefXmlReader
49
51
  include Commonmeta::Readers::CslReader
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Commonmeta
4
+ module Readers
5
+ module CommonmetaReader
6
+ def read_commonmeta(string: nil, **options)
7
+ if string.present?
8
+ errors = jsonlint(string)
9
+ return { "errors" => errors } if errors.present?
10
+ end
11
+
12
+ read_options = ActiveSupport::HashWithIndifferentAccess.new(options.except(:doi, :id, :url,
13
+ :sandbox, :validate, :ra))
14
+ meta = string.present? ? JSON.parse(string) : {}
15
+ meta["schema_version"] = "https://commonmeta.org/commonmeta_v0.10.5.json"
16
+ meta.compact.merge(read_options)
17
+ end
18
+ end
19
+ end
20
+ end
@@ -5,7 +5,7 @@ require "pathname"
5
5
 
6
6
  module Commonmeta
7
7
  module SchemaUtils
8
- COMMONMETA = File.read(File.expand_path("../../resources/commonmeta_v0.10.4.json",
8
+ COMMONMETA = File.read(File.expand_path("../../resources/commonmeta_v0.10.5.json",
9
9
  __dir__))
10
10
 
11
11
  def json_schema_errors
@@ -497,7 +497,9 @@ module Commonmeta
497
497
  def find_from_format_by_string(string)
498
498
  begin # try to parse as JSON
499
499
  hsh = MultiJson.load(string).to_h
500
- if hsh.dig("@context") && URI.parse(hsh.dig("@context")).host == "schema.org"
500
+ if hsh.dig("schema_version").to_s.start_with?("https://commonmeta.org")
501
+ return "commonmeta"
502
+ elsif hsh.dig("@context") && URI.parse(hsh.dig("@context")).host == "schema.org"
501
503
  return "schema_org"
502
504
  elsif hsh.dig("schemaVersion").to_s.start_with?("http://datacite.org/schema/kernel")
503
505
  return "datacite"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Commonmeta
4
- VERSION = '3.8.3'
4
+ VERSION = '3.9.0'
5
5
  end
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://commonmeta.org/commonmeta_v0.10.4.json",
4
- "title": "Commonmeta v0.10.4",
3
+ "$id": "https://commonmeta.org/commonmeta_v0.10.5.json",
4
+ "title": "Commonmeta v0.10.5",
5
5
  "description": "JSON representation of the Commonmeta schema.",
6
6
  "additionalProperties": false,
7
7
  "definitions": {
@@ -508,6 +508,7 @@
508
508
  "description": "The schema version of the resource.",
509
509
  "type": "string",
510
510
  "enum": [
511
+ "https://commonmeta.org/commonmeta_v0.10.5.json",
511
512
  "http://datacite.org/schema/kernel-3",
512
513
  "http://datacite.org/schema/kernel-4"
513
514
  ]
@@ -0,0 +1,411 @@
1
+ {
2
+ "id": "https://doi.org/10.7554/elife.01567",
3
+ "type": "JournalArticle",
4
+ "url": "https://elifesciences.org/articles/01567",
5
+ "titles": [
6
+ {
7
+ "title": "Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth"
8
+ }
9
+ ],
10
+ "contributors": [
11
+ {
12
+ "type": "Person",
13
+ "contributorRoles": ["Author"],
14
+ "givenName": "Martial",
15
+ "familyName": "Sankar",
16
+ "affiliation": [
17
+ {
18
+ "name": "Department of Plant Molecular Biology, University of Lausanne, Lausanne, Switzerland"
19
+ }
20
+ ]
21
+ },
22
+ {
23
+ "type": "Person",
24
+ "contributorRoles": ["Author"],
25
+ "givenName": "Kaisa",
26
+ "familyName": "Nieminen",
27
+ "affiliation": [
28
+ {
29
+ "name": "Department of Plant Molecular Biology, University of Lausanne, Lausanne, Switzerland"
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "type": "Person",
35
+ "contributorRoles": ["Author"],
36
+ "givenName": "Laura",
37
+ "familyName": "Ragni",
38
+ "affiliation": [
39
+ {
40
+ "name": "Department of Plant Molecular Biology, University of Lausanne, Lausanne, Switzerland"
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "type": "Person",
46
+ "contributorRoles": ["Author"],
47
+ "givenName": "Ioannis",
48
+ "familyName": "Xenarios",
49
+ "affiliation": [
50
+ {
51
+ "name": "Vital-IT, Swiss Institute of Bioinformatics, Lausanne, Switzerland"
52
+ }
53
+ ]
54
+ },
55
+ {
56
+ "type": "Person",
57
+ "contributorRoles": ["Author"],
58
+ "givenName": "Christian S",
59
+ "familyName": "Hardtke",
60
+ "affiliation": [
61
+ {
62
+ "name": "Department of Plant Molecular Biology, University of Lausanne, Lausanne, Switzerland"
63
+ }
64
+ ]
65
+ }
66
+ ],
67
+ "container": {
68
+ "type": "Journal",
69
+ "title": "eLife",
70
+ "identifier": "2050-084X",
71
+ "identifierType": "ISSN",
72
+ "volume": "3"
73
+ },
74
+ "publisher": {
75
+ "id": "https://api.crossref.org/members/4374",
76
+ "name": "eLife Sciences Publications, Ltd"
77
+ },
78
+ "references": [
79
+ {
80
+ "key": "bib1",
81
+ "doi": "https://doi.org/10.1038/nature02100",
82
+ "contributor": "Bonke",
83
+ "title": "APL regulates vascular tissue identity in Arabidopsis",
84
+ "publicationYear": "2003",
85
+ "volume": "426",
86
+ "firstPage": "181",
87
+ "containerTitle": "Nature"
88
+ },
89
+ {
90
+ "key": "bib2",
91
+ "doi": "https://doi.org/10.1534/genetics.109.104976",
92
+ "contributor": "Brenner",
93
+ "title": "In the beginning was the worm",
94
+ "publicationYear": "2009",
95
+ "volume": "182",
96
+ "firstPage": "413",
97
+ "containerTitle": "Genetics"
98
+ },
99
+ {
100
+ "key": "bib3",
101
+ "doi": "https://doi.org/10.1034/j.1399-3054.2002.1140413.x",
102
+ "contributor": "Chaffey",
103
+ "title": "Secondary xylem development in Arabidopsis: a model for wood formation",
104
+ "publicationYear": "2002",
105
+ "volume": "114",
106
+ "firstPage": "594",
107
+ "containerTitle": "Physiologia Plantarum"
108
+ },
109
+ {
110
+ "key": "bib4",
111
+ "doi": "https://doi.org/10.1162/089976601750399335",
112
+ "contributor": "Chang",
113
+ "title": "Training nu-support vector classifiers: theory and algorithms",
114
+ "publicationYear": "2001",
115
+ "volume": "13",
116
+ "firstPage": "2119",
117
+ "containerTitle": "Neural computation"
118
+ },
119
+ {
120
+ "key": "bib5",
121
+ "doi": "https://doi.org/10.1007/bf00994018",
122
+ "contributor": "Cortes",
123
+ "title": "Support-vector Networks",
124
+ "publicationYear": "1995",
125
+ "volume": "20",
126
+ "firstPage": "273",
127
+ "containerTitle": "Machine Learning"
128
+ },
129
+ {
130
+ "key": "bib6",
131
+ "doi": "https://doi.org/10.1242/dev.119.1.71",
132
+ "contributor": "Dolan",
133
+ "title": "Cellular organisation of the Arabidopsis thaliana root",
134
+ "publicationYear": "1993",
135
+ "volume": "119",
136
+ "firstPage": "71",
137
+ "containerTitle": "Development"
138
+ },
139
+ {
140
+ "key": "bib7",
141
+ "doi": "https://doi.org/10.1016/j.semcdb.2009.09.009",
142
+ "contributor": "Elo",
143
+ "title": "Stem cell function during plant vascular development",
144
+ "publicationYear": "2009",
145
+ "volume": "20",
146
+ "firstPage": "1097",
147
+ "containerTitle": "Seminars in Cell & Developmental Biology"
148
+ },
149
+ {
150
+ "key": "bib8",
151
+ "doi": "https://doi.org/10.1242/dev.091314",
152
+ "contributor": "Etchells",
153
+ "title": "WOX4 and WOX14 act downstream of the PXY receptor kinase to regulate plant vascular proliferation independently of any role in vascular organisation",
154
+ "publicationYear": "2013",
155
+ "volume": "140",
156
+ "firstPage": "2224",
157
+ "containerTitle": "Development"
158
+ },
159
+ {
160
+ "key": "bib9",
161
+ "doi": "https://doi.org/10.1371/journal.pgen.1002997",
162
+ "contributor": "Etchells",
163
+ "title": "Plant vascular cell division is maintained by an interaction between PXY and ethylene signalling",
164
+ "publicationYear": "2012",
165
+ "volume": "8",
166
+ "firstPage": "e1002997",
167
+ "containerTitle": "PLOS Genetics"
168
+ },
169
+ {
170
+ "key": "bib10",
171
+ "doi": "https://doi.org/10.1038/msb.2010.25",
172
+ "contributor": "Fuchs",
173
+ "title": "Clustering phenotype populations by genome-wide RNAi and multiparametric imaging",
174
+ "publicationYear": "2010",
175
+ "volume": "6",
176
+ "firstPage": "370",
177
+ "containerTitle": "Molecular Systems Biology"
178
+ },
179
+ {
180
+ "key": "bib11",
181
+ "doi": "https://doi.org/10.1016/j.biosystems.2012.07.004",
182
+ "contributor": "Granqvist",
183
+ "title": "BaSAR-A tool in R for frequency detection",
184
+ "publicationYear": "2012",
185
+ "volume": "110",
186
+ "firstPage": "60",
187
+ "containerTitle": "Bio Systems"
188
+ },
189
+ {
190
+ "key": "bib12",
191
+ "doi": "https://doi.org/10.1016/j.pbi.2005.11.013",
192
+ "contributor": "Groover",
193
+ "title": "Developmental mechanisms regulating secondary growth in woody plants",
194
+ "publicationYear": "2006",
195
+ "volume": "9",
196
+ "firstPage": "55",
197
+ "containerTitle": "Current Opinion in Plant Biology"
198
+ },
199
+ {
200
+ "key": "bib13",
201
+ "doi": "https://doi.org/10.1105/tpc.110.076083",
202
+ "contributor": "Hirakawa",
203
+ "title": "TDIF peptide signaling regulates vascular stem cell proliferation via the WOX4 homeobox gene in Arabidopsis",
204
+ "publicationYear": "2010",
205
+ "volume": "22",
206
+ "firstPage": "2618",
207
+ "containerTitle": "Plant Cell"
208
+ },
209
+ {
210
+ "key": "bib14",
211
+ "doi": "https://doi.org/10.1073/pnas.0808444105",
212
+ "contributor": "Hirakawa",
213
+ "title": "Non-cell-autonomous control of vascular stem cell fate by a CLE peptide/receptor system",
214
+ "publicationYear": "2008",
215
+ "volume": "105",
216
+ "firstPage": "15208",
217
+ "containerTitle": "Proceedings of the National Academy of Sciences of the United States of America"
218
+ },
219
+ {
220
+ "key": "bib15",
221
+ "doi": "https://doi.org/10.1016/0092-8674(89)90900-8",
222
+ "contributor": "Meyerowitz",
223
+ "title": "Arabidopsis, a useful weed",
224
+ "publicationYear": "1989",
225
+ "volume": "56",
226
+ "firstPage": "263",
227
+ "containerTitle": "Cell"
228
+ },
229
+ {
230
+ "key": "bib16",
231
+ "doi": "https://doi.org/10.1126/science.1066609",
232
+ "contributor": "Meyerowitz",
233
+ "title": "Plants compared to animals: the broadest comparative study of development",
234
+ "publicationYear": "2002",
235
+ "volume": "295",
236
+ "firstPage": "1482",
237
+ "containerTitle": "Science"
238
+ },
239
+ {
240
+ "key": "bib17",
241
+ "doi": "https://doi.org/10.1104/pp.104.040212",
242
+ "contributor": "Nieminen",
243
+ "title": "A weed for wood? Arabidopsis as a genetic model for xylem development",
244
+ "publicationYear": "2004",
245
+ "volume": "135",
246
+ "firstPage": "653",
247
+ "containerTitle": "Plant Physiol"
248
+ },
249
+ {
250
+ "key": "bib18",
251
+ "doi": "https://doi.org/10.1038/nbt1206-1565",
252
+ "contributor": "Noble",
253
+ "title": "What is a support vector machine?",
254
+ "publicationYear": "2006",
255
+ "volume": "24",
256
+ "firstPage": "1565",
257
+ "containerTitle": "Nature Biotechnology"
258
+ },
259
+ {
260
+ "key": "bib19",
261
+ "doi": "https://doi.org/10.1073/pnas.77.3.1516",
262
+ "contributor": "Olson",
263
+ "title": "Classification of cultured mammalian cells by shape analysis and pattern recognition",
264
+ "publicationYear": "1980",
265
+ "volume": "77",
266
+ "firstPage": "1516",
267
+ "containerTitle": "Proceedings of the National Academy of Sciences of the United States of America"
268
+ },
269
+ {
270
+ "key": "bib20",
271
+ "doi": "https://doi.org/10.1093/bioinformatics/btq046",
272
+ "contributor": "Pau",
273
+ "title": "EBImage–an R package for image processing with applications to cellular phenotypes",
274
+ "publicationYear": "2010",
275
+ "volume": "26",
276
+ "firstPage": "979",
277
+ "containerTitle": "Bioinformatics"
278
+ },
279
+ {
280
+ "key": "bib21",
281
+ "doi": "https://doi.org/10.1105/tpc.111.084020",
282
+ "contributor": "Ragni",
283
+ "title": "Mobile gibberellin directly stimulates Arabidopsis hypocotyl xylem expansion",
284
+ "publicationYear": "2011",
285
+ "volume": "23",
286
+ "firstPage": "1322",
287
+ "containerTitle": "Plant Cell"
288
+ },
289
+ {
290
+ "key": "bib22",
291
+ "doi": "https://doi.org/10.5061/dryad.b835k",
292
+ "contributor": "Sankar",
293
+ "title": "Data from: Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth",
294
+ "publicationYear": "2014",
295
+ "containerTitle": "Dryad Digital Repository"
296
+ },
297
+ {
298
+ "key": "bib23",
299
+ "doi": "https://doi.org/10.1016/j.cub.2008.02.070",
300
+ "contributor": "Sibout",
301
+ "title": "Flowering as a condition for xylem expansion in Arabidopsis hypocotyl and root",
302
+ "publicationYear": "2008",
303
+ "volume": "18",
304
+ "firstPage": "458",
305
+ "containerTitle": "Current Biology"
306
+ },
307
+ {
308
+ "key": "bib24",
309
+ "doi": "https://doi.org/10.1111/j.1469-8137.2010.03236.x",
310
+ "contributor": "Spicer",
311
+ "title": "Evolution of development of vascular cambia and secondary growth",
312
+ "publicationYear": "2010",
313
+ "volume": "186",
314
+ "firstPage": "577",
315
+ "containerTitle": "The New Phytologist"
316
+ },
317
+ {
318
+ "key": "bib25",
319
+ "doi": "https://doi.org/10.1007/s00138-011-0345-9",
320
+ "contributor": "Theriault",
321
+ "title": "Cell morphology classification and clutter mitigation in phase-contrast microscopy images using machine learning",
322
+ "publicationYear": "2012",
323
+ "volume": "23",
324
+ "firstPage": "659",
325
+ "containerTitle": "Machine Vision and Applications"
326
+ },
327
+ {
328
+ "key": "bib26",
329
+ "doi": "https://doi.org/10.1016/j.cell.2012.02.048",
330
+ "contributor": "Uyttewaal",
331
+ "title": "Mechanical stress acts via katanin to amplify differences in growth rate between adjacent cells in Arabidopsis",
332
+ "publicationYear": "2012",
333
+ "volume": "149",
334
+ "firstPage": "439",
335
+ "containerTitle": "Cell"
336
+ },
337
+ {
338
+ "key": "bib27",
339
+ "doi": "https://doi.org/10.1038/ncb2764",
340
+ "contributor": "Yin",
341
+ "title": "A screen for morphological complexity identifies regulators of switch-like transitions between discrete cell shapes",
342
+ "publicationYear": "2013",
343
+ "volume": "15",
344
+ "firstPage": "860",
345
+ "containerTitle": "Nature Cell Biology"
346
+ }
347
+ ],
348
+ "date": {
349
+ "published": "2014-02-11",
350
+ "updated": "2022-03-26"
351
+ },
352
+ "descriptions": [
353
+ {
354
+ "description": "Among various advantages, their small size makes model organisms preferred subjects of investigation. Yet, even in model systems detailed analysis of numerous developmental processes at cellular level is severely hampered by their scale. For instance, secondary growth of Arabidopsis hypocotyls creates a radial pattern of highly specialized tissues that comprises several thousand cells starting from a few dozen. This dynamic process is difficult to follow because of its scale and because it can only be investigated invasively, precluding comprehensive understanding of the cell proliferation, differentiation, and patterning events involved. To overcome such limitation, we established an automated quantitative histology approach. We acquired hypocotyl cross-sections from tiled high-resolution images and extracted their information content using custom high-throughput image processing and segmentation. Coupled with automated cell type recognition through machine learning, we could establish a cellular resolution atlas that reveals vascular morphodynamics during secondary growth, for example equidistant phloem pole formation.",
355
+ "descriptionType": "Abstract"
356
+ }
357
+ ],
358
+ "license": {
359
+ "id": "CC-BY-3.0",
360
+ "url": "https://creativecommons.org/licenses/by/3.0/legalcode"
361
+ },
362
+ "alternate_identifiers": [],
363
+ "funding_references": [
364
+ {
365
+ "funderName": "SystemsX"
366
+ },
367
+ {
368
+ "funderName": "EMBO longterm post-doctoral fellowships"
369
+ },
370
+ {
371
+ "funderName": "Marie Heim-Voegtlin"
372
+ },
373
+ {
374
+ "funderName": "University of Lausanne",
375
+ "funderIdentifier": "https://doi.org/10.13039/501100006390",
376
+ "funderIdentifierType": "Crossref Funder ID"
377
+ },
378
+ {
379
+ "funderName": "SystemsX"
380
+ },
381
+ {
382
+ "funderName": "EMBO",
383
+ "funderIdentifier": "https://doi.org/10.13039/501100003043",
384
+ "funderIdentifierType": "Crossref Funder ID"
385
+ },
386
+ {
387
+ "funderName": "Swiss National Science Foundation",
388
+ "funderIdentifier": "https://doi.org/10.13039/501100001711",
389
+ "funderIdentifierType": "Crossref Funder ID"
390
+ },
391
+ {
392
+ "funderName": "University of Lausanne",
393
+ "funderIdentifier": "https://doi.org/10.13039/501100006390",
394
+ "funderIdentifierType": "Crossref Funder ID"
395
+ }
396
+ ],
397
+ "files": [
398
+ {
399
+ "url": "https://cdn.elifesciences.org/articles/01567/elife-01567-v1.pdf",
400
+ "mimeType": "application/pdf"
401
+ },
402
+ {
403
+ "url": "https://cdn.elifesciences.org/articles/01567/elife-01567-v1.xml",
404
+ "mimeType": "application/xml"
405
+ }
406
+ ],
407
+ "subjects": [],
408
+ "provider": "Crossref",
409
+ "schema_version": "https://commonmeta.org/commonmeta_v0.10.5.json",
410
+ "state": "findable"
411
+ }
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Commonmeta::Metadata, vcr: true do
6
+ subject { described_class.new(input: input) }
7
+
8
+ let(:input) { "#{fixture_path}commonmeta.json" }
9
+
10
+ context 'read commonmeta metadata' do
11
+ it "default" do
12
+ expect(subject.valid?).to be true
13
+ expect(subject.schema_version).to eq("https://commonmeta.org/commonmeta_v0.10.5.json")
14
+ expect(subject.id).to eq("https://doi.org/10.7554/elife.01567")
15
+ expect(subject.type).to eq("JournalArticle")
16
+ expect(subject.url).to eq("https://elifesciences.org/articles/01567")
17
+ expect(subject.contributors.length).to eq(5)
18
+ expect(subject.contributors.first).to eq("type" => "Person", "contributorRoles" => ["Author"],
19
+ "givenName" => "Martial", "familyName" => "Sankar", "affiliation" => [{ "name" => "Department of Plant Molecular Biology, University of Lausanne, Lausanne, Switzerland" }])
20
+ expect(subject.license).to eq("id" => "CC-BY-3.0",
21
+ "url" => "https://creativecommons.org/licenses/by/3.0/legalcode")
22
+ expect(subject.titles).to eq([{ "title" => "Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth" }])
23
+ expect(subject.date).to eq("published" => "2014-02-11", "updated" => "2022-03-26")
24
+ expect(subject.publisher).to eq("id" => "https://api.crossref.org/members/4374",
25
+ "name" => "eLife Sciences Publications, Ltd")
26
+ expect(subject.container).to eq("identifier" => "2050-084X",
27
+ "identifierType" => "ISSN", "title" => "eLife", "type" => "Journal", "volume" => "3")
28
+ expect(subject.references.length).to eq(27)
29
+ expect(subject.references.last).to eq("containerTitle" => "Nature Cell Biology",
30
+ "contributor" => "Yin",
31
+ "doi" => "https://doi.org/10.1038/ncb2764",
32
+ "firstPage" => "860",
33
+ "key" => "bib27",
34
+ "publicationYear" => "2013",
35
+ "title" => "A screen for morphological complexity identifies regulators of switch-like transitions between discrete cell shapes",
36
+ "volume" => "15")
37
+ expect(subject.funding_references).to eq([{ "funderName" => "SystemsX" },
38
+ { "funderName" => "EMBO longterm post-doctoral fellowships" },
39
+ { "funderName" => "Marie Heim-Voegtlin" },
40
+ { "funderIdentifier" => "https://doi.org/10.13039/501100006390",
41
+ "funderIdentifierType" => "Crossref Funder ID",
42
+ "funderName" => "University of Lausanne" },
43
+ { "funderName" => "SystemsX" },
44
+ { "funderIdentifier" => "https://doi.org/10.13039/501100003043",
45
+ "funderIdentifierType" => "Crossref Funder ID",
46
+ "funderName" => "EMBO" },
47
+ { "funderIdentifier" => "https://doi.org/10.13039/501100001711",
48
+ "funderIdentifierType" => "Crossref Funder ID",
49
+ "funderName" => "Swiss National Science Foundation" },
50
+ { "funderIdentifier" => "https://doi.org/10.13039/501100006390",
51
+ "funderIdentifierType" => "Crossref Funder ID",
52
+ "funderName" => "University of Lausanne" }])
53
+ expect(subject.provider).to eq("Crossref")
54
+ end
55
+ end
56
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commonmeta-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.3
4
+ version: 3.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-10 00:00:00.000000000 Z
11
+ date: 2024-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -663,6 +663,7 @@ files:
663
663
  - lib/commonmeta/readers/bibtex_reader.rb
664
664
  - lib/commonmeta/readers/cff_reader.rb
665
665
  - lib/commonmeta/readers/codemeta_reader.rb
666
+ - lib/commonmeta/readers/commonmeta_reader.rb
666
667
  - lib/commonmeta/readers/crossref_reader.rb
667
668
  - lib/commonmeta/readers/crossref_xml_reader.rb
668
669
  - lib/commonmeta/readers/csl_reader.rb
@@ -693,7 +694,7 @@ files:
693
694
  - lib/commonmeta/xml_converter.rb
694
695
  - resources/2008/09/xsd.xsl
695
696
  - resources/cff.json
696
- - resources/commonmeta_v0.10.4.json
697
+ - resources/commonmeta_v0.10.5.json
697
698
  - resources/crossref/AccessIndicators.xsd
698
699
  - resources/crossref/JATS-journalpublishing1-3d2-mathml3-elements.xsd
699
700
  - resources/crossref/JATS-journalpublishing1-3d2-mathml3.xsd
@@ -763,6 +764,7 @@ files:
763
764
  - spec/fixtures/citeproc.json
764
765
  - spec/fixtures/codemeta.json
765
766
  - spec/fixtures/codemeta_v2.json
767
+ - spec/fixtures/commonmeta.json
766
768
  - spec/fixtures/crosscite.json
767
769
  - spec/fixtures/crossref.bib
768
770
  - spec/fixtures/crossref.json
@@ -1045,6 +1047,7 @@ files:
1045
1047
  - spec/readers/bibtex_reader_spec.rb
1046
1048
  - spec/readers/cff_reader_spec.rb
1047
1049
  - spec/readers/codemeta_reader_spec.rb
1050
+ - spec/readers/commonmeta_reader_spec.rb
1048
1051
  - spec/readers/crossref_reader_spec.rb
1049
1052
  - spec/readers/crossref_xml_reader_spec.rb
1050
1053
  - spec/readers/csl_reader_spec.rb