bolognese 1.9.11 → 1.9.14

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: 849fb87ec530a7e1ec773da483f9c1c02e77f121452631484df813c29c3e15c1
4
- data.tar.gz: 4bae2258180b888f2c730222b997b66ad9824019bddaddd99dbee4980539eb1c
3
+ metadata.gz: 6ba10d4692952a5c5c4032f160b97fbbdaaf4bfe29bb687a34295bf419ffa8bb
4
+ data.tar.gz: 485add29ad628c4ac8ecdf019c42037db3edfa6f7222e5750691b3fe6d6591bf
5
5
  SHA512:
6
- metadata.gz: '00679fba333bc077b0c4f9562b017eccdd07e365f340d4f1c90da0e34049ad89a87d299fa0193a224282cdb594aa5113ab13e0f54aa794f195f33352487811e5'
7
- data.tar.gz: f088ff9511beff4b6eb4f654923af62d4b3b47be8253314a05218b5e5453798b266035927d7350049deb5d5c85673fc79886c9faeb6dd9a540697711adc14b18
6
+ metadata.gz: 410a666e4784f93feed5053e7c187e1022e2d68d38004cf28e210962a1d21a432ed472bc049b256daf117180fb77f5dcb3c1730f1c43babb322935ce0be17647
7
+ data.tar.gz: 550841a2e9ed10210b083702f2a25b0ef5fa968753a39b76d00fa3f63b1817366e52001e19c14fdfeb7a6e46ce5c3df628c42d1f9906aac9227762ea5417363f
@@ -0,0 +1,21 @@
1
+ name: Pull Request - Run Tests
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - master
7
+ jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v2
12
+ - name: Set up Ruby 2.6
13
+ uses: actions/setup-ruby@v1
14
+ with:
15
+ ruby-version: 2.6.x
16
+
17
+ - name: Install and test
18
+ run: |
19
+ gem install bundler
20
+ bundle install
21
+ bundle exec rspec
data/CHANGELOG.md CHANGED
@@ -1,6 +1,28 @@
1
1
  # Changelog
2
2
 
3
- ## [1.9.11](https://github.com/datacite/bolognese/tree/1.9.11) (2021-08-04)
3
+ ## [1.9.13](https://github.com/datacite/bolognese/tree/1.9.13) (2022-01-06)
4
+
5
+ [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.12...1.9.13)
6
+
7
+ **Fixed bugs:**
8
+
9
+ - Schema 4 RelatedItems does not allow relatedItem without relatedItemIdentifier [\#118](https://github.com/datacite/bolognese/issues/118)
10
+
11
+ **Closed issues:**
12
+
13
+ - How to use "bolognese help \[COMMAND\]"? [\#129](https://github.com/datacite/bolognese/issues/129)
14
+ - Move nokogiri dependency up to dependency \>= 1.12.5 [\#127](https://github.com/datacite/bolognese/issues/127)
15
+
16
+ **Merged pull requests:**
17
+
18
+ - update nokogiri to latest, including updating maremma [\#130](https://github.com/datacite/bolognese/pull/130) ([orangewolf](https://github.com/orangewolf))
19
+ - mapping for DFG-to-OECD [\#125](https://github.com/datacite/bolognese/pull/125) ([kjgarza](https://github.com/kjgarza))
20
+
21
+ ## [1.9.12](https://github.com/datacite/bolognese/tree/1.9.12) (2021-08-19)
22
+
23
+ [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.11...1.9.12)
24
+
25
+ ## [1.9.11](https://github.com/datacite/bolognese/tree/1.9.11) (2021-08-17)
4
26
 
5
27
  [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.10...1.9.11)
6
28
 
@@ -65,10 +87,6 @@
65
87
 
66
88
  - Singular geoLocationPolygons are wrapped in additional array [\#110](https://github.com/datacite/bolognese/issues/110)
67
89
 
68
- **Merged pull requests:**
69
-
70
- - Support returning single geoLocationPolygon [\#111](https://github.com/datacite/bolognese/pull/111) ([richardhallett](https://github.com/richardhallett))
71
-
72
90
  ## [1.9.3](https://github.com/datacite/bolognese/tree/1.9.3) (2021-03-26)
73
91
 
74
92
  [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.2...1.9.3)
@@ -169,6 +187,7 @@
169
187
 
170
188
  **Merged pull requests:**
171
189
 
190
+ - Support returning single geoLocationPolygon [\#111](https://github.com/datacite/bolognese/pull/111) ([richardhallett](https://github.com/richardhallett))
172
191
  - Allow some pre-1.0 versions of thor [\#102](https://github.com/datacite/bolognese/pull/102) ([cjcolvar](https://github.com/cjcolvar))
173
192
 
174
193
  ## [1.8.5](https://github.com/datacite/bolognese/tree/1.8.5) (2020-07-30)
@@ -291,7 +310,6 @@
291
310
 
292
311
  - Map Fields of Research classification to OECD Fields of Science [\#93](https://github.com/datacite/bolognese/pull/93) ([mfenner](https://github.com/mfenner))
293
312
  - Don't try and normalise "Other" funder types. [\#91](https://github.com/datacite/bolognese/pull/91) ([richardhallett](https://github.com/richardhallett))
294
- - fixes missing version attribute when data comes from datacite\_json [\#85](https://github.com/datacite/bolognese/pull/85) ([kjgarza](https://github.com/kjgarza))
295
313
 
296
314
  ## [1.6](https://github.com/datacite/bolognese/tree/1.6) (2020-05-16)
297
315
 
@@ -427,6 +445,7 @@
427
445
 
428
446
  **Merged pull requests:**
429
447
 
448
+ - fixes missing version attribute when data comes from datacite\_json [\#85](https://github.com/datacite/bolognese/pull/85) ([kjgarza](https://github.com/kjgarza))
430
449
  - Bump rack from 2.0.7 to 2.0.8 [\#79](https://github.com/datacite/bolognese/pull/79) ([dependabot[bot]](https://github.com/apps/dependabot))
431
450
 
432
451
  ## [v.1.4.1](https://github.com/datacite/bolognese/tree/v.1.4.1) (2019-12-15)
@@ -1353,6 +1372,10 @@
1353
1372
 
1354
1373
  [Full Changelog](https://github.com/datacite/bolognese/compare/v.0.9.64...v.0.9.65)
1355
1374
 
1375
+ **Closed issues:**
1376
+
1377
+ - inconsistent name parsing in JSON-LD conversion [\#16](https://github.com/datacite/bolognese/issues/16)
1378
+
1356
1379
  **Merged pull requests:**
1357
1380
 
1358
1381
  - \[\#28\] Removing multi author support from parsing single author fields. [\#19](https://github.com/datacite/bolognese/pull/19) ([richardhallett](https://github.com/richardhallett))
@@ -1531,7 +1554,6 @@
1531
1554
 
1532
1555
  **Closed issues:**
1533
1556
 
1534
- - inconsistent name parsing in JSON-LD conversion [\#16](https://github.com/datacite/bolognese/issues/16)
1535
1557
  - Fix error handling alternate names in ris writer [\#14](https://github.com/datacite/bolognese/issues/14)
1536
1558
  - Error displaying container-title [\#13](https://github.com/datacite/bolognese/issues/13)
1537
1559
  - Error parsing funding information [\#12](https://github.com/datacite/bolognese/issues/12)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (1.9.11)
4
+ bolognese (1.9.14)
5
5
  activesupport (>= 4.2.5)
6
6
  benchmark_methods (~> 0.7)
7
7
  bibtex-ruby (>= 5.1.0)
@@ -19,7 +19,7 @@ PATH
19
19
  loofah (~> 2.0, >= 2.0.3)
20
20
  maremma (>= 4.9.4, < 5)
21
21
  namae (~> 1.0)
22
- nokogiri (~> 1.11.2)
22
+ nokogiri (>= 1.13.2, < 1.14)
23
23
  oj (~> 3.10)
24
24
  oj_mimic_json (~> 1.0, >= 1.0.1)
25
25
  postrank-uri (~> 1.0, >= 1.0.18)
@@ -30,7 +30,7 @@ PATH
30
30
  GEM
31
31
  remote: https://rubygems.org/
32
32
  specs:
33
- activesupport (6.1.4)
33
+ activesupport (6.1.6)
34
34
  concurrent-ruby (~> 1.0, >= 1.0.2)
35
35
  i18n (>= 1.6, < 2)
36
36
  minitest (>= 5.1)
@@ -38,7 +38,7 @@ GEM
38
38
  zeitwerk (~> 2.3)
39
39
  addressable (2.8.0)
40
40
  public_suffix (>= 2.0.2, < 5.0)
41
- amazing_print (1.3.0)
41
+ amazing_print (1.4.0)
42
42
  benchmark_methods (0.7)
43
43
  bibtex-ruby (6.0.0)
44
44
  latex-decode (~> 0.0)
@@ -49,7 +49,7 @@ GEM
49
49
  citeproc (~> 1.0, >= 1.0.9)
50
50
  csl (~> 1.6)
51
51
  colorize (0.8.1)
52
- concurrent-ruby (1.1.9)
52
+ concurrent-ruby (1.1.10)
53
53
  crack (0.4.5)
54
54
  rexml
55
55
  crass (1.0.6)
@@ -58,19 +58,19 @@ GEM
58
58
  rexml
59
59
  csl-styles (1.0.1.11)
60
60
  csl (~> 1.0)
61
- diff-lcs (1.4.4)
61
+ diff-lcs (1.5.0)
62
62
  docile (1.4.0)
63
- ebnf (2.1.3)
64
- amazing_print (~> 1.2)
63
+ ebnf (2.3.1)
64
+ amazing_print (~> 1.4)
65
65
  htmlentities (~> 4.3)
66
- rdf (~> 3.1)
66
+ rdf (~> 3.2)
67
67
  scanf (~> 1.0)
68
- sxp (~> 1.1)
69
- unicode-types (~> 1.6)
70
- edtf (3.0.6)
71
- activesupport (>= 3.0, < 7.0)
68
+ sxp (~> 1.2)
69
+ unicode-types (~> 1.7)
70
+ edtf (3.0.8)
71
+ activesupport (>= 3.0, < 8.0)
72
72
  excon (0.71.1)
73
- faraday (0.17.4)
73
+ faraday (0.17.5)
74
74
  multipart-post (>= 1.2, < 3)
75
75
  faraday-encoding (0.0.5)
76
76
  faraday
@@ -81,34 +81,32 @@ GEM
81
81
  haml (5.2.2)
82
82
  temple (>= 0.8.0)
83
83
  tilt
84
- hamster (3.0.0)
85
- concurrent-ruby (~> 1.0)
86
84
  hashdiff (1.0.1)
87
85
  htmlentities (4.3.4)
88
- i18n (1.8.10)
86
+ i18n (1.10.0)
89
87
  concurrent-ruby (~> 1.0)
90
88
  iso8601 (0.9.1)
91
- json (2.5.1)
92
- json-canonicalization (0.2.1)
93
- json-ld (3.1.9)
89
+ json (2.6.2)
90
+ json-canonicalization (0.3.0)
91
+ json-ld (3.2.1)
94
92
  htmlentities (~> 4.3)
95
- json-canonicalization (~> 0.2)
93
+ json-canonicalization (~> 0.3)
96
94
  link_header (~> 0.0, >= 0.0.8)
97
- multi_json (~> 1.14)
98
- rack (~> 2.0)
99
- rdf (~> 3.1)
100
- json-ld-preloaded (3.1.6)
101
- json-ld (~> 3.1)
102
- rdf (~> 3.1)
95
+ multi_json (~> 1.15)
96
+ rack (~> 2.2)
97
+ rdf (~> 3.2)
98
+ json-ld-preloaded (3.2.0)
99
+ json-ld (~> 3.2)
100
+ rdf (~> 3.2)
103
101
  jsonlint (0.3.0)
104
102
  oj (~> 3)
105
103
  optimist (~> 3)
106
104
  latex-decode (0.3.2)
107
105
  link_header (0.0.8)
108
- loofah (2.12.0)
106
+ loofah (2.18.0)
109
107
  crass (~> 1.0.2)
110
108
  nokogiri (>= 1.5.9)
111
- maremma (4.9.5)
109
+ maremma (4.9.8)
112
110
  activesupport (>= 4.2.5)
113
111
  addressable (>= 2.3.6)
114
112
  builder (~> 3.2, >= 3.2.2)
@@ -116,18 +114,19 @@ GEM
116
114
  faraday (~> 0.17.3)
117
115
  faraday-encoding (~> 0.0.4)
118
116
  faraday_middleware (~> 0.14.0)
119
- nokogiri (~> 1.11.2)
117
+ nokogiri (>= 1.11.2, < 1.14.0)
120
118
  oj (>= 2.8.3)
121
119
  oj_mimic_json (~> 1.0, >= 1.0.1)
122
- mini_portile2 (2.5.3)
123
- minitest (5.14.4)
120
+ matrix (0.4.2)
121
+ mini_portile2 (2.8.0)
122
+ minitest (5.15.0)
124
123
  multi_json (1.15.0)
125
124
  multipart-post (2.1.1)
126
125
  namae (1.1.1)
127
- nokogiri (1.11.7)
128
- mini_portile2 (~> 2.5.0)
126
+ nokogiri (1.13.6)
127
+ mini_portile2 (~> 2.8.0)
129
128
  racc (~> 1.4)
130
- oj (3.13.2)
129
+ oj (3.13.13)
131
130
  oj_mimic_json (1.0.1)
132
131
  optimist (3.0.1)
133
132
  postrank-uri (1.0.24)
@@ -135,50 +134,49 @@ GEM
135
134
  nokogiri (>= 1.8.0)
136
135
  public_suffix (>= 2.0.0, < 2.1)
137
136
  public_suffix (2.0.5)
138
- racc (1.5.2)
137
+ racc (1.6.0)
139
138
  rack (2.2.3)
140
139
  rack-test (0.8.3)
141
140
  rack (>= 1.0, < 3)
142
141
  rake (12.3.3)
143
- rdf (3.1.15)
144
- hamster (~> 3.0)
142
+ rdf (3.2.7)
145
143
  link_header (~> 0.0, >= 0.0.8)
146
- rdf-aggregate-repo (3.1.0)
147
- rdf (~> 3.1)
148
- rdf-rdfa (3.1.3)
144
+ rdf-aggregate-repo (3.2.0)
145
+ rdf (~> 3.2)
146
+ rdf-rdfa (3.2.0)
149
147
  haml (~> 5.2)
150
148
  htmlentities (~> 4.3)
151
- rdf (~> 3.1, >= 3.1.13)
152
- rdf-aggregate-repo (~> 3.1)
153
- rdf-vocab (~> 3.1, >= 3.1.11)
154
- rdf-xsd (~> 3.1)
155
- rdf-rdfxml (3.1.1)
149
+ rdf (~> 3.2)
150
+ rdf-aggregate-repo (~> 3.2)
151
+ rdf-vocab (~> 3.2)
152
+ rdf-xsd (~> 3.2)
153
+ rdf-rdfxml (3.2.0)
156
154
  htmlentities (~> 4.3)
157
- rdf (~> 3.1)
158
- rdf-rdfa (~> 3.1)
159
- rdf-xsd (~> 3.1)
160
- rdf-turtle (3.1.3)
161
- ebnf (~> 2.1)
162
- rdf (~> 3.1, >= 3.1.8)
163
- rdf-vocab (3.1.14)
164
- rdf (~> 3.1, >= 3.1.12)
165
- rdf-xsd (3.1.1)
166
- rdf (~> 3.1)
155
+ rdf (~> 3.2)
156
+ rdf-rdfa (~> 3.2)
157
+ rdf-xsd (~> 3.2)
158
+ rdf-turtle (3.2.0)
159
+ ebnf (~> 2.3)
160
+ rdf (~> 3.2)
161
+ rdf-vocab (3.2.1)
162
+ rdf (~> 3.2, >= 3.2.4)
163
+ rdf-xsd (3.2.1)
164
+ rdf (~> 3.2)
167
165
  rexml (~> 3.2)
168
166
  rexml (3.2.5)
169
- rspec (3.10.0)
170
- rspec-core (~> 3.10.0)
171
- rspec-expectations (~> 3.10.0)
172
- rspec-mocks (~> 3.10.0)
173
- rspec-core (3.10.1)
174
- rspec-support (~> 3.10.0)
175
- rspec-expectations (3.10.1)
167
+ rspec (3.11.0)
168
+ rspec-core (~> 3.11.0)
169
+ rspec-expectations (~> 3.11.0)
170
+ rspec-mocks (~> 3.11.0)
171
+ rspec-core (3.11.0)
172
+ rspec-support (~> 3.11.0)
173
+ rspec-expectations (3.11.0)
176
174
  diff-lcs (>= 1.2.0, < 2.0)
177
- rspec-support (~> 3.10.0)
178
- rspec-mocks (3.10.2)
175
+ rspec-support (~> 3.11.0)
176
+ rspec-mocks (3.11.1)
179
177
  diff-lcs (>= 1.2.0, < 2.0)
180
- rspec-support (~> 3.10.0)
181
- rspec-support (3.10.2)
178
+ rspec-support (~> 3.11.0)
179
+ rspec-support (3.11.0)
182
180
  rspec-xsd (0.1.0)
183
181
  nokogiri (~> 1.6)
184
182
  rspec (~> 3)
@@ -188,21 +186,22 @@ GEM
188
186
  json (>= 1.8, < 3)
189
187
  simplecov-html (~> 0.10.0)
190
188
  simplecov-html (0.10.2)
191
- sxp (1.1.0)
192
- rdf (~> 3.1)
189
+ sxp (1.2.2)
190
+ matrix
191
+ rdf (~> 3.2)
193
192
  temple (0.8.2)
194
- thor (1.1.0)
193
+ thor (1.2.1)
195
194
  tilt (2.0.10)
196
195
  tzinfo (2.0.4)
197
196
  concurrent-ruby (~> 1.0)
198
- unicode-types (1.6.0)
197
+ unicode-types (1.7.0)
199
198
  unicode_utils (1.4.0)
200
199
  vcr (3.0.3)
201
- webmock (3.13.0)
202
- addressable (>= 2.3.6)
200
+ webmock (3.14.0)
201
+ addressable (>= 2.8.0)
203
202
  crack (>= 0.3.2)
204
203
  hashdiff (>= 0.4.0, < 2.0.0)
205
- zeitwerk (2.4.2)
204
+ zeitwerk (2.5.4)
206
205
 
207
206
  PLATFORMS
208
207
  ruby
@@ -220,4 +219,4 @@ DEPENDENCIES
220
219
  webmock (~> 3.0, >= 3.0.1)
221
220
 
222
221
  BUNDLED WITH
223
- 2.2.25
222
+ 2.3.14
data/bolognese.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
  # Declare dependencies here, rather than in the Gemfile
19
19
  s.add_dependency 'maremma', '>= 4.9.4', '< 5'
20
20
  s.add_dependency 'faraday', '~> 0.17.3'
21
- s.add_dependency 'nokogiri', '~> 1.11.2'
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'
24
24
  s.add_dependency 'activesupport', '>= 4.2.5'
@@ -188,20 +188,24 @@ module Bolognese
188
188
  end
189
189
 
190
190
  related_items = Array.wrap(meta.dig("relatedItems", "relatedItem")).map do |ri|
191
+
191
192
  rii = ri["relatedItemIdentifier"]
192
- if rii["relatedItemIdentifierType"] == "DOI"
193
- rid = validate_doi(rii["__content__"].to_s.downcase)
194
- else
195
- rid = rii["__content__"]
196
- end
193
+ relatedItemIdentifier = nil
194
+ if rii
195
+ if rii["relatedItemIdentifierType"] == "DOI"
196
+ rid = validate_doi(rii["__content__"].to_s.downcase)
197
+ else
198
+ rid = rii["__content__"]
199
+ end
197
200
 
198
- relatedItemIdentifier = {
199
- "relatedItemIdentifier" => rid,
200
- "relatedItemIdentifierType" => rii["relatedItemIdentifierType"],
201
- "relatedMetadataScheme" => rii["relatedMetadataScheme"],
202
- "schemeURI" => rii["schemeURI"],
203
- "schemeType" => rii["schemeType"]
204
- }.compact
201
+ relatedItemIdentifier = {
202
+ "relatedItemIdentifier" => rid,
203
+ "relatedItemIdentifierType" => rii["relatedItemIdentifierType"],
204
+ "relatedMetadataScheme" => rii["relatedMetadataScheme"],
205
+ "schemeURI" => rii["schemeURI"],
206
+ "schemeType" => rii["schemeType"]
207
+ }.compact
208
+ end
205
209
 
206
210
  number = ri["number"]
207
211
  if number.is_a?(String)
@@ -212,7 +216,7 @@ module Bolognese
212
216
  numberType = ri.dig("number", "numberType")
213
217
  end
214
218
 
215
- {
219
+ a = {
216
220
  "relationType" => ri["relationType"],
217
221
  "relatedItemType" => ri["relatedItemType"],
218
222
  "relatedItemIdentifier" => relatedItemIdentifier,
@@ -1,3 +1,3 @@
1
1
  module Bolognese
2
- VERSION = "1.9.11"
2
+ VERSION = "1.9.14"
3
3
  end