bolognese 1.9.9 → 1.9.13

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: fbe9e35e7353f028ff77b7265ebf35db75b6ca6827fd5e64fcbfc42c0ca04b0a
4
- data.tar.gz: 734492dd88ddc4511a34c885a05431e31500fe422ed4bc642f06296177a9d824
3
+ metadata.gz: 3122914f3eae3e799d6a1ab5d1159330306509ba20082a1144d339f43096184c
4
+ data.tar.gz: c8a2661a9e670e3346cfc11ca5405eb0733fafa491b55ed0dc30b19e354e7337
5
5
  SHA512:
6
- metadata.gz: c72d97cc6f095710a6861188b5f6e6761813c67fbb3d7fa2ebd09586a427954d78997b4f9d1565b255a42646e48c0ead0a2f68319b38b79752924ce12774e852
7
- data.tar.gz: 0d890b5b6572161d1596ad8641261e3d9d754613a18d66bf7b0406013b3d93308247fe8790022c3964295165cca51593314ec4b35e9ae4cdeb638330a035ea78
6
+ metadata.gz: 2867c9246ac0d4756c4b636539ab35f69f9f8e73c7e3477644859b8e00c2edaba461c809d13081b6643272491f8c5a2bfd0af93da9aab9f21f3bcad5b17298f1
7
+ data.tar.gz: 2cf4cc866eb0a162dc19fbec2b46f512b6821d383a920458b15e35bb4ac81dbb46f301f76e1656a61e833bb01a71d48e7eb5ac153ca931e47067bf71e9164315
@@ -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,5 +1,47 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased](https://github.com/datacite/bolognese/tree/HEAD)
4
+
5
+ [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.12...HEAD)
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)
26
+
27
+ [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.10...1.9.11)
28
+
29
+ **Closed issues:**
30
+
31
+ - Sandbox Orcid URLs are not allowed. [\#120](https://github.com/datacite/bolognese/issues/120)
32
+
33
+ **Merged pull requests:**
34
+
35
+ - Allow Orcid URLs to have been issued from the sandbox [\#121](https://github.com/datacite/bolognese/pull/121) ([prdanelli](https://github.com/prdanelli))
36
+
37
+ ## [1.9.10](https://github.com/datacite/bolognese/tree/1.9.10) (2021-07-20)
38
+
39
+ [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.9...1.9.10)
40
+
41
+ ## [1.9.9](https://github.com/datacite/bolognese/tree/1.9.9) (2021-06-09)
42
+
43
+ [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.8...1.9.9)
44
+
3
45
  ## [1.9.8](https://github.com/datacite/bolognese/tree/1.9.8) (2021-06-08)
4
46
 
5
47
  [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.7...1.9.8)
@@ -291,6 +333,7 @@
291
333
  **Merged pull requests:**
292
334
 
293
335
  - Sizes and formats [\#88](https://github.com/datacite/bolognese/pull/88) ([mfenner](https://github.com/mfenner))
336
+ - bump version [\#75](https://github.com/datacite/bolognese/pull/75) ([kjgarza](https://github.com/kjgarza))
294
337
 
295
338
  ## [1.5.19](https://github.com/datacite/bolognese/tree/1.5.19) (2020-04-30)
296
339
 
@@ -464,10 +507,6 @@
464
507
 
465
508
  [Full Changelog](https://github.com/datacite/bolognese/compare/v.1.3.14...v.1.3.16)
466
509
 
467
- **Merged pull requests:**
468
-
469
- - bump version [\#75](https://github.com/datacite/bolognese/pull/75) ([kjgarza](https://github.com/kjgarza))
470
-
471
510
  ## [v.1.3.14](https://github.com/datacite/bolognese/tree/v.1.3.14) (2019-08-27)
472
511
 
473
512
  [Full Changelog](https://github.com/datacite/bolognese/compare/v.1.3.13...v.1.3.14)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (1.9.9)
4
+ bolognese (1.9.13)
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.12.0)
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,44 +30,45 @@ PATH
30
30
  GEM
31
31
  remote: https://rubygems.org/
32
32
  specs:
33
- activesupport (6.1.3.2)
33
+ activesupport (6.1.4.4)
34
34
  concurrent-ruby (~> 1.0, >= 1.0.2)
35
35
  i18n (>= 1.6, < 2)
36
36
  minitest (>= 5.1)
37
37
  tzinfo (~> 2.0)
38
38
  zeitwerk (~> 2.3)
39
- addressable (2.7.0)
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)
45
45
  builder (3.2.4)
46
46
  citeproc (1.0.10)
47
47
  namae (~> 1.0)
48
- citeproc-ruby (1.1.13)
48
+ citeproc-ruby (1.1.14)
49
49
  citeproc (~> 1.0, >= 1.0.9)
50
- csl (~> 1.5)
50
+ csl (~> 1.6)
51
51
  colorize (0.8.1)
52
52
  concurrent-ruby (1.1.9)
53
53
  crack (0.4.5)
54
54
  rexml
55
55
  crass (1.0.6)
56
- csl (1.5.2)
56
+ csl (1.6.0)
57
57
  namae (~> 1.0)
58
+ rexml
58
59
  csl-styles (1.0.1.11)
59
60
  csl (~> 1.0)
60
61
  diff-lcs (1.4.4)
61
62
  docile (1.4.0)
62
- ebnf (2.1.3)
63
- amazing_print (~> 1.2)
63
+ ebnf (2.3.0)
64
+ amazing_print (~> 1.4)
64
65
  htmlentities (~> 4.3)
65
- rdf (~> 3.1)
66
+ rdf (~> 3.2)
66
67
  scanf (~> 1.0)
67
- sxp (~> 1.1)
68
- unicode-types (~> 1.6)
69
- edtf (3.0.6)
70
- activesupport (>= 3.0, < 7.0)
68
+ sxp (~> 1.2)
69
+ unicode-types (~> 1.7)
70
+ edtf (3.0.7)
71
+ activesupport (>= 3.0, < 8.0)
71
72
  excon (0.71.1)
72
73
  faraday (0.17.4)
73
74
  multipart-post (>= 1.2, < 3)
@@ -77,37 +78,35 @@ GEM
77
78
  faraday (>= 0.7.4, < 1.0)
78
79
  gender_detector (0.1.2)
79
80
  unicode_utils (>= 1.3.0)
80
- haml (5.2.1)
81
+ haml (5.2.2)
81
82
  temple (>= 0.8.0)
82
83
  tilt
83
- hamster (3.0.0)
84
- concurrent-ruby (~> 1.0)
85
84
  hashdiff (1.0.1)
86
85
  htmlentities (4.3.4)
87
- i18n (1.8.10)
86
+ i18n (1.8.11)
88
87
  concurrent-ruby (~> 1.0)
89
88
  iso8601 (0.9.1)
90
89
  json (2.5.1)
91
- json-canonicalization (0.2.1)
92
- json-ld (3.1.9)
90
+ json-canonicalization (0.3.0)
91
+ json-ld (3.2.0)
93
92
  htmlentities (~> 4.3)
94
- json-canonicalization (~> 0.2)
93
+ json-canonicalization (~> 0.3)
95
94
  link_header (~> 0.0, >= 0.0.8)
96
- multi_json (~> 1.14)
97
- rack (~> 2.0)
98
- rdf (~> 3.1)
99
- json-ld-preloaded (3.1.5)
100
- json-ld (~> 3.1)
101
- 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)
102
101
  jsonlint (0.3.0)
103
102
  oj (~> 3)
104
103
  optimist (~> 3)
105
104
  latex-decode (0.3.2)
106
105
  link_header (0.0.8)
107
- loofah (2.10.0)
106
+ loofah (2.13.0)
108
107
  crass (~> 1.0.2)
109
108
  nokogiri (>= 1.5.9)
110
- maremma (4.9.4)
109
+ maremma (4.9.7)
111
110
  activesupport (>= 4.2.5)
112
111
  addressable (>= 2.3.6)
113
112
  builder (~> 3.2, >= 3.2.2)
@@ -115,18 +114,19 @@ GEM
115
114
  faraday (~> 0.17.3)
116
115
  faraday-encoding (~> 0.0.4)
117
116
  faraday_middleware (~> 0.14.0)
118
- nokogiri (~> 1.11.2)
117
+ nokogiri (>= 1.11.2, < 1.13.0)
119
118
  oj (>= 2.8.3)
120
119
  oj_mimic_json (~> 1.0, >= 1.0.1)
121
- mini_portile2 (2.5.3)
122
- minitest (5.14.4)
120
+ matrix (0.4.2)
121
+ mini_portile2 (2.6.1)
122
+ minitest (5.15.0)
123
123
  multi_json (1.15.0)
124
124
  multipart-post (2.1.1)
125
125
  namae (1.1.1)
126
- nokogiri (1.11.7)
127
- mini_portile2 (~> 2.5.0)
126
+ nokogiri (1.12.5)
127
+ mini_portile2 (~> 2.6.1)
128
128
  racc (~> 1.4)
129
- oj (3.11.5)
129
+ oj (3.13.11)
130
130
  oj_mimic_json (1.0.1)
131
131
  optimist (3.0.1)
132
132
  postrank-uri (1.0.24)
@@ -134,35 +134,34 @@ GEM
134
134
  nokogiri (>= 1.8.0)
135
135
  public_suffix (>= 2.0.0, < 2.1)
136
136
  public_suffix (2.0.5)
137
- racc (1.5.2)
137
+ racc (1.6.0)
138
138
  rack (2.2.3)
139
139
  rack-test (0.8.3)
140
140
  rack (>= 1.0, < 3)
141
141
  rake (12.3.3)
142
- rdf (3.1.14)
143
- hamster (~> 3.0)
142
+ rdf (3.2.2)
144
143
  link_header (~> 0.0, >= 0.0.8)
145
- rdf-aggregate-repo (3.1.0)
146
- rdf (~> 3.1)
147
- rdf-rdfa (3.1.3)
144
+ rdf-aggregate-repo (3.2.0)
145
+ rdf (~> 3.2)
146
+ rdf-rdfa (3.2.0)
148
147
  haml (~> 5.2)
149
148
  htmlentities (~> 4.3)
150
- rdf (~> 3.1, >= 3.1.13)
151
- rdf-aggregate-repo (~> 3.1)
152
- rdf-vocab (~> 3.1, >= 3.1.11)
153
- rdf-xsd (~> 3.1)
154
- 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)
155
154
  htmlentities (~> 4.3)
156
- rdf (~> 3.1)
157
- rdf-rdfa (~> 3.1)
158
- rdf-xsd (~> 3.1)
159
- rdf-turtle (3.1.3)
160
- ebnf (~> 2.1)
161
- rdf (~> 3.1, >= 3.1.8)
162
- rdf-vocab (3.1.13)
163
- rdf (~> 3.1, >= 3.1.12)
164
- rdf-xsd (3.1.1)
165
- 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.0)
162
+ rdf (~> 3.2)
163
+ rdf-xsd (3.2.0)
164
+ rdf (~> 3.2)
166
165
  rexml (~> 3.2)
167
166
  rexml (3.2.5)
168
167
  rspec (3.10.0)
@@ -187,21 +186,22 @@ GEM
187
186
  json (>= 1.8, < 3)
188
187
  simplecov-html (~> 0.10.0)
189
188
  simplecov-html (0.10.2)
190
- sxp (1.1.0)
191
- rdf (~> 3.1)
189
+ sxp (1.2.0)
190
+ matrix
191
+ rdf (~> 3.2)
192
192
  temple (0.8.2)
193
- thor (1.1.0)
193
+ thor (1.2.1)
194
194
  tilt (2.0.10)
195
195
  tzinfo (2.0.4)
196
196
  concurrent-ruby (~> 1.0)
197
- unicode-types (1.6.0)
197
+ unicode-types (1.7.0)
198
198
  unicode_utils (1.4.0)
199
199
  vcr (3.0.3)
200
200
  webmock (3.13.0)
201
201
  addressable (>= 2.3.6)
202
202
  crack (>= 0.3.2)
203
203
  hashdiff (>= 0.4.0, < 2.0.0)
204
- zeitwerk (2.4.2)
204
+ zeitwerk (2.5.3)
205
205
 
206
206
  PLATFORMS
207
207
  ruby
@@ -219,4 +219,4 @@ DEPENDENCIES
219
219
  webmock (~> 3.0, >= 3.0.1)
220
220
 
221
221
  BUNDLED WITH
222
- 2.2.19
222
+ 2.3.4
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.12.0'
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,
@@ -386,8 +386,8 @@ module Bolognese
386
386
  "BookChapter" => "CHAP",
387
387
  "Collection" => nil,
388
388
  "ComputationalNotebook" => "COMP",
389
- "ConferencePaper" => nil,
390
- "ConferenceProceeding" => nil,
389
+ "ConferencePaper" => "CPAPER",
390
+ "ConferenceProceeding" => "CONF",
391
391
  "DataPaper" => nil,
392
392
  "Dataset" => "DATA",
393
393
  "Dissertation" => "THES",
@@ -574,7 +574,7 @@ module Bolognese
574
574
  end
575
575
 
576
576
  def validate_orcid(orcid)
577
- orcid = Array(/\A(?:(http|https):\/\/(www\.)?orcid\.org\/)?(\d{4}[[:space:]-]\d{4}[[:space:]-]\d{4}[[:space:]-]\d{3}[0-9X]+)\z/.match(orcid)).last
577
+ orcid = Array(/\A(?:(?:http|https):\/\/(?:(?:www|sandbox)?\.)?orcid\.org\/)?(\d{4}[[:space:]-]\d{4}[[:space:]-]\d{4}[[:space:]-]\d{3}[0-9X]+)\z/.match(orcid)).last
578
578
  orcid.gsub(/[[:space:]]/, "-") if orcid.present?
579
579
  end
580
580
 
@@ -1,3 +1,3 @@
1
1
  module Bolognese
2
- VERSION = "1.9.9"
2
+ VERSION = "1.9.13"
3
3
  end