bolognese 1.10.0 → 1.11.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: 532586fba70709be6c7581b595a2c0d72ad1000c9c54b951ad5e4758715e81c1
4
- data.tar.gz: 3029c21ac460e41479459df642e3d501b1195e6cc8a0e26d6a4ba5bba91ce13f
3
+ metadata.gz: f87808df4f12983e33877e77b31bc8aee2e1fe6f0a7e888da3d7b67ce19ab87e
4
+ data.tar.gz: 5143917378eacceff49c3d0d6e5b71f634237d025a7dad867db79ae34ed737f5
5
5
  SHA512:
6
- metadata.gz: 3893a351e49ad8e8acb0ef5265fb3acdc149e67a99174de0d0855d594e7d9c16f09baeda4d9b1aba7235aef661135e7d1bd1ac401df81601c99217e155153395
7
- data.tar.gz: f6225b13dae84dcc897fa1dda7aadb266e667f8bf6a3a2da2e3f6ad134f314f17c3c6613ef8c2dec54091d9f4b4f055023bdb00ace39baf018b1654820cf7eff
6
+ metadata.gz: 351c69b0b3b528bdbe5c89ec27a6f503e461c5acfb9060894d6822045193eb8a93cbc51fd952da023e5fb7cf9a52e0b710d03c92fd27ece9fb95062da0feaf6f
7
+ data.tar.gz: bf72537500650c6a963ea792af54d7d1ac18410e0160e6dd9088bdd9033fe2049a871367d76bf7f892fba03c20b2b9df75e744efaf03cd973305d3b75fff1d87
data/CHANGELOG.md CHANGED
@@ -7,6 +7,7 @@
7
7
  **Merged pull requests:**
8
8
 
9
9
  - Add DFG-to-FOS mappings utility function [\#147](https://github.com/datacite/bolognese/pull/147) ([jrhoads](https://github.com/jrhoads))
10
+ - Test against multiple versions of ruby \(2.6, 2.7, 3.0, and 3.1\) [\#141](https://github.com/datacite/bolognese/pull/141) ([jrhoads](https://github.com/jrhoads))
10
11
 
11
12
  ## [1.9.18](https://github.com/datacite/bolognese/tree/1.9.18) (2022-10-11)
12
13
 
@@ -64,6 +65,7 @@
64
65
  **Merged pull requests:**
65
66
 
66
67
  - update nokogiri to latest, including updating maremma [\#130](https://github.com/datacite/bolognese/pull/130) ([orangewolf](https://github.com/orangewolf))
68
+ - mapping for DFG-to-OECD [\#125](https://github.com/datacite/bolognese/pull/125) ([kjgarza](https://github.com/kjgarza))
67
69
 
68
70
  ## [1.9.12](https://github.com/datacite/bolognese/tree/1.9.12) (2021-08-19)
69
71
 
@@ -79,7 +81,6 @@
79
81
 
80
82
  **Merged pull requests:**
81
83
 
82
- - Test against multiple versions of ruby \(2.6, 2.7, 3.0, and 3.1\) [\#141](https://github.com/datacite/bolognese/pull/141) ([jrhoads](https://github.com/jrhoads))
83
84
  - Allow Orcid URLs to have been issued from the sandbox [\#121](https://github.com/datacite/bolognese/pull/121) ([prdanelli](https://github.com/prdanelli))
84
85
 
85
86
  ## [1.9.10](https://github.com/datacite/bolognese/tree/1.9.10) (2021-07-20)
@@ -115,7 +116,6 @@
115
116
 
116
117
  **Merged pull requests:**
117
118
 
118
- - mapping for DFG-to-OECD [\#125](https://github.com/datacite/bolognese/pull/125) ([kjgarza](https://github.com/kjgarza))
119
119
  - Fix missing affiliation identifier [\#117](https://github.com/datacite/bolognese/pull/117) ([richardhallett](https://github.com/richardhallett))
120
120
  - Add support for book title and additional metadata when reading Crossref Book Chapter DOI [\#115](https://github.com/datacite/bolognese/pull/115) ([prdanelli](https://github.com/prdanelli))
121
121
  - Valid Funder DOIs are being rejected for not starting with a 5 [\#114](https://github.com/datacite/bolognese/pull/114) ([prdanelli](https://github.com/prdanelli))
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (1.10.0)
4
+ bolognese (1.11.0)
5
5
  activesupport (>= 4.2.5)
6
6
  benchmark_methods (~> 0.7)
7
7
  bibtex-ruby (>= 5.1.0)
@@ -11,7 +11,6 @@ PATH
11
11
  concurrent-ruby (~> 1.1, >= 1.1.5)
12
12
  csl-styles (~> 1.0, >= 1.0.1.10)
13
13
  edtf (~> 3.0, >= 3.0.4)
14
- faraday (~> 0.17.3)
15
14
  gender_detector (~> 0.1.2)
16
15
  iso8601 (~> 0.9.1)
17
16
  json-ld-preloaded (~> 3.1, >= 3.1.3)
@@ -36,8 +35,8 @@ GEM
36
35
  minitest (>= 5.1)
37
36
  tzinfo (~> 2.0)
38
37
  zeitwerk (~> 2.3)
39
- addressable (2.8.0)
40
- public_suffix (>= 2.0.2, < 5.0)
38
+ addressable (2.8.1)
39
+ public_suffix (>= 2.0.2, < 6.0)
41
40
  amazing_print (1.4.0)
42
41
  benchmark_methods (0.7)
43
42
  bibtex-ruby (6.0.0)
@@ -70,12 +69,22 @@ GEM
70
69
  edtf (3.1.0)
71
70
  activesupport (>= 3.0, < 8.0)
72
71
  excon (0.71.1)
73
- faraday (0.17.5)
74
- multipart-post (>= 1.2, < 3)
72
+ faraday (2.6.0)
73
+ faraday-net_http (>= 2.0, < 3.1)
74
+ ruby2_keywords (>= 0.0.4)
75
75
  faraday-encoding (0.0.5)
76
76
  faraday
77
- faraday_middleware (0.14.0)
78
- faraday (>= 0.7.4, < 1.0)
77
+ faraday-excon (2.1.0)
78
+ excon (>= 0.27.4)
79
+ faraday (~> 2.0)
80
+ faraday-follow_redirects (0.3.0)
81
+ faraday (>= 1, < 3)
82
+ faraday-gzip (0.1.0)
83
+ faraday (>= 1.0)
84
+ zlib (~> 2.1)
85
+ faraday-multipart (1.0.4)
86
+ multipart-post (~> 2)
87
+ faraday-net_http (3.0.1)
79
88
  gender_detector (0.1.2)
80
89
  unicode_utils (>= 1.3.0)
81
90
  haml (5.2.2)
@@ -106,15 +115,18 @@ GEM
106
115
  loofah (2.19.0)
107
116
  crass (~> 1.0.2)
108
117
  nokogiri (>= 1.5.9)
109
- maremma (4.9.8)
118
+ maremma (4.9.9)
110
119
  activesupport (>= 4.2.5)
111
120
  addressable (>= 2.3.6)
112
121
  builder (~> 3.2, >= 3.2.2)
113
122
  excon (~> 0.71.0)
114
- faraday (~> 0.17.3)
115
- faraday-encoding (~> 0.0.4)
116
- faraday_middleware (~> 0.14.0)
117
- nokogiri (>= 1.11.2, < 1.14.0)
123
+ faraday (>= 2.0)
124
+ faraday-encoding (~> 0.0.5)
125
+ faraday-excon (~> 2.1.0)
126
+ faraday-follow_redirects (~> 0.3.0)
127
+ faraday-gzip (~> 0.1.0)
128
+ faraday-multipart (~> 1.0.4)
129
+ nokogiri (>= 1.13.1, < 1.14.0)
118
130
  oj (>= 2.8.3)
119
131
  oj_mimic_json (~> 1.0, >= 1.0.1)
120
132
  matrix (0.4.2)
@@ -123,7 +135,7 @@ GEM
123
135
  multi_json (1.15.0)
124
136
  multipart-post (2.2.3)
125
137
  namae (1.1.1)
126
- nokogiri (1.13.6)
138
+ nokogiri (1.13.9)
127
139
  mini_portile2 (~> 2.8.0)
128
140
  racc (~> 1.4)
129
141
  oj (3.13.21)
@@ -135,7 +147,7 @@ GEM
135
147
  public_suffix (>= 2.0.0, < 2.1)
136
148
  public_suffix (2.0.5)
137
149
  racc (1.6.0)
138
- rack (2.2.3.1)
150
+ rack (2.2.4)
139
151
  rack-test (0.8.3)
140
152
  rack (>= 1.0, < 3)
141
153
  rake (12.3.3)
@@ -170,24 +182,25 @@ GEM
170
182
  rspec-mocks (~> 3.11.0)
171
183
  rspec-core (3.11.0)
172
184
  rspec-support (~> 3.11.0)
173
- rspec-expectations (3.11.0)
185
+ rspec-expectations (3.11.1)
174
186
  diff-lcs (>= 1.2.0, < 2.0)
175
187
  rspec-support (~> 3.11.0)
176
188
  rspec-mocks (3.11.1)
177
189
  diff-lcs (>= 1.2.0, < 2.0)
178
190
  rspec-support (~> 3.11.0)
179
- rspec-support (3.11.0)
191
+ rspec-support (3.11.1)
180
192
  rspec-xsd (0.1.0)
181
193
  nokogiri (~> 1.6)
182
194
  rspec (~> 3)
195
+ ruby2_keywords (0.0.5)
183
196
  scanf (1.0.0)
184
197
  simplecov (0.17.1)
185
198
  docile (~> 1.1)
186
199
  json (>= 1.8, < 3)
187
200
  simplecov-html (~> 0.10.0)
188
201
  simplecov-html (0.10.2)
189
- sxp (1.2.2)
190
- matrix
202
+ sxp (1.2.3)
203
+ matrix (~> 0.4)
191
204
  rdf (~> 3.2)
192
205
  temple (0.8.2)
193
206
  thor (1.2.1)
@@ -197,11 +210,12 @@ GEM
197
210
  unicode-types (1.8.0)
198
211
  unicode_utils (1.4.0)
199
212
  vcr (3.0.3)
200
- webmock (3.14.0)
213
+ webmock (3.18.1)
201
214
  addressable (>= 2.8.0)
202
215
  crack (>= 0.3.2)
203
216
  hashdiff (>= 0.4.0, < 2.0.0)
204
217
  zeitwerk (2.6.1)
218
+ zlib (2.1.1)
205
219
 
206
220
  PLATFORMS
207
221
  ruby
data/bolognese.gemspec CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
 
18
18
  # Declare dependencies here, rather than in the Gemfile
19
19
  s.add_dependency 'maremma', '>= 4.9.4', '< 5'
20
- s.add_dependency 'faraday', '~> 0.17.3'
20
+ #s.add_dependency 'faraday', '~> 0.17.3'
21
21
  s.add_dependency 'nokogiri', '>= 1.13.2', '< 1.14'
22
22
  s.add_dependency 'loofah', '~> 2.0', '>= 2.0.3'
23
23
  s.add_dependency 'builder', '~> 3.2', '>= 3.2.2'
@@ -230,14 +230,14 @@ module Bolognese
230
230
  "creators" => get_authors(Array.wrap(ri.dig("creators", "creator"))),
231
231
  "titles" => get_titles(ri),
232
232
  "publicationYear" => ri["publicationYear"],
233
- "volume" => ri["volume"],
234
- "issue" => ri["issue"],
233
+ "volume" => parse_attributes(ri["volume"]),
234
+ "issue" => parse_attributes(ri["issue"]),
235
235
  "number" => number,
236
236
  "numberType" => numberType,
237
- "firstPage" => ri["firstPage"],
238
- "lastPage" => ri["lastPage"],
239
- "publisher" => ri["publisher"],
240
- "edition" => ri["edition"],
237
+ "firstPage" => parse_attributes(ri["firstPage"]),
238
+ "lastPage" => parse_attributes(ri["lastPage"]),
239
+ "publisher" => parse_attributes(ri["publisher"]),
240
+ "edition" => parse_attributes(ri["edition"]),
241
241
  "contributors" => get_authors(Array.wrap(ri.dig("contributors", "contributor"))),
242
242
  }.compact
243
243
  end
@@ -1,3 +1,3 @@
1
1
  module Bolognese
2
- VERSION = "1.10.0"
2
+ VERSION = "1.11.0"
3
3
  end
@@ -0,0 +1,61 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
+ xmlns="http://datacite.org/schema/kernel-4" xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.4/metadata.xsd">
4
+ <identifier identifierType="DOI">10.5072/example-full</identifier>
5
+ <creators>
6
+ <creator>
7
+ <creatorName nameType="Personal">Hallett, Richard</creatorName>
8
+ <givenName>Richard</givenName>
9
+ <familyName>Hallett</familyName>
10
+ </creator>
11
+ </creators>
12
+ <titles>
13
+ <title xml:lang="en-US">Example for related items</title>
14
+ </titles>
15
+ <publisher xml:lang="en">DataCite</publisher>
16
+ <publicationYear>2021</publicationYear>
17
+ <dates>
18
+ <date dateType="Updated" dateInformation="Updated with 4.4 properties">2021-01-26</date>
19
+ </dates>
20
+ <language>en-US</language>
21
+ <resourceType resourceTypeGeneral="Software">XML</resourceType>
22
+ <version>1</version>
23
+ <descriptions>
24
+ <description xml:lang="en-US" descriptionType="Abstract">A test example for related items</description>
25
+ </descriptions>
26
+ <relatedItems>
27
+ <relatedItem relationType="IsPublishedIn" relatedItemType="Journal">
28
+ <relatedItemIdentifier
29
+ relatedItemIdentifierType="DOI"
30
+ relatedMetadataScheme="citeproc+json"
31
+ schemeURI="https://github.com/citation-style-language/schema/raw/master/csl-data.json"
32
+ schemeType="URL">10.5072/john-smiths-1234</relatedItemIdentifier>
33
+ <creators>
34
+ <creator>
35
+ <creatorName nameType="Personal">Smith, John</creatorName>
36
+ <givenName>John</givenName>
37
+ <familyName>Smith</familyName>
38
+ </creator>
39
+ </creators>
40
+ <titles>
41
+ <title>Understanding the fictional John Smith</title>
42
+ <title titleType="Subtitle">A detailed look</title>
43
+ </titles>
44
+ <publicationYear>1776</publicationYear>
45
+ <volume xml:lang="en">776</volume>
46
+ <issue xml:lang="en">1</issue>
47
+ <number numberType="Chapter">1</number>
48
+ <firstPage xml:lang="en">50</firstPage>
49
+ <lastPage xml:lang="en">60</lastPage>
50
+ <publisher xml:lang="en">Example Inc</publisher>
51
+ <edition xml:lang="en">1</edition>
52
+ <contributors>
53
+ <contributor contributorType="ProjectLeader">
54
+ <contributorName>Richard, Hallett</contributorName>
55
+ <givenName>Richard</givenName>
56
+ <familyName>Hallett</familyName>
57
+ </contributor>
58
+ </contributors>
59
+ </relatedItem>
60
+ </relatedItems>
61
+ </resource>
@@ -1555,6 +1555,49 @@ describe Bolognese::Metadata, vcr: true do
1555
1555
  )
1556
1556
  end
1557
1557
 
1558
+ it "Schema 4.4 related items from string with attributes" do
1559
+ input = fixture_path + "datacite-example-relateditems-with-attributes.xml"
1560
+ subject = Bolognese::Metadata.new(input: input)
1561
+ expect(subject.valid?).to be true
1562
+
1563
+ expect(subject.related_items.last).to eq(
1564
+ {
1565
+ "relatedItemType"=>"Journal",
1566
+ "relationType"=>"IsPublishedIn",
1567
+ "relatedItemIdentifier"=>
1568
+ {
1569
+ "relatedItemIdentifier"=>"10.5072/john-smiths-1234",
1570
+ "relatedItemIdentifierType"=>"DOI",
1571
+ "relatedMetadataScheme"=>"citeproc+json",
1572
+ "schemeURI"=>"https://github.com/citation-style-language/schema/raw/master/csl-data.json",
1573
+ "schemeType"=>"URL"
1574
+ },
1575
+ "creators" =>
1576
+ [
1577
+ {"nameType"=>"Personal", "name"=>"Smith, John", "givenName"=>"John", "familyName"=>"Smith"}
1578
+ ],
1579
+ "titles"=>
1580
+ [
1581
+ {"title"=>"Understanding the fictional John Smith"},
1582
+ {"title"=>"A detailed look", "titleType"=>"Subtitle"}
1583
+ ],
1584
+ "volume"=>"776",
1585
+ "issue"=>"1",
1586
+ "number"=>"1",
1587
+ "numberType"=>"Chapter",
1588
+ "firstPage"=>"50",
1589
+ "lastPage"=>"60",
1590
+ "publisher"=>"Example Inc",
1591
+ "publicationYear"=>"1776",
1592
+ "edition"=>"1",
1593
+ "contributors"=>
1594
+ [
1595
+ {"name"=>"Hallett, Richard", "givenName"=>"Richard", "familyName"=>"Hallett", "contributorType"=>"ProjectLeader"}
1596
+ ]
1597
+ }
1598
+ )
1599
+ end
1600
+
1558
1601
  it "Schema 4.4 dissertation from string" do
1559
1602
  input = fixture_path + "datacite-example-dissertation-v4.4.xml"
1560
1603
  subject = Bolognese::Metadata.new(input: input)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bolognese
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.11.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: 2022-10-14 00:00:00.000000000 Z
11
+ date: 2022-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: maremma
@@ -30,20 +30,6 @@ dependencies:
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '5'
33
- - !ruby/object:Gem::Dependency
34
- name: faraday
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: 0.17.3
40
- type: :runtime
41
- prerelease: false
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: 0.17.3
47
33
  - !ruby/object:Gem::Dependency
48
34
  name: nokogiri
49
35
  requirement: !ruby/object:Gem::Requirement
@@ -785,6 +771,7 @@ files:
785
771
  - spec/fixtures/datacite-example-geolocation.xml
786
772
  - spec/fixtures/datacite-example-nameIdentifier-with-schemeURI.xml
787
773
  - spec/fixtures/datacite-example-polygon-v4.1.xml
774
+ - spec/fixtures/datacite-example-relateditems-with-attributes.xml
788
775
  - spec/fixtures/datacite-example-relateditems.xml
789
776
  - spec/fixtures/datacite-example-xs-string.xml
790
777
  - spec/fixtures/datacite-formats-with-xs.xml