bolognese 2.5.2 → 2.6.1
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.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/.github/workflows/release.yml +1 -1
- data/Gemfile.lock +182 -162
- data/bolognese.gemspec +29 -34
- data/lib/bolognese/author_utils.rb +0 -3
- data/lib/bolognese/citeproc_extensions.rb +48 -0
- data/lib/bolognese/metadata_utils.rb +12 -4
- data/lib/bolognese/readers/datacite_reader.rb +2 -0
- data/lib/bolognese/utils.rb +10 -4
- data/lib/bolognese/version.rb +1 -1
- data/lib/bolognese.rb +1 -4
- metadata +117 -195
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: af6403c24df2779189b8883a6ac2a649856eefc21021f2a93e5e6ebeee91592a
|
|
4
|
+
data.tar.gz: 4fab74f8c6e1044c48a3d66fb64ff90ff134cf868b881dcbfc6a91e410fb3fa8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: edb53a6a6644b9184fec632cb1b6a128d630c403499d19df8ce3e0febbac3a51d3d85d86b3f8a124a5b4fa3f3573022b0d0b633c5b9ced8a9bc416638cd7dfd4
|
|
7
|
+
data.tar.gz: a3f0b04d4ed508858ea7e7ec896f2182bdd9d7d5773e58e4e97faa8e52bd362cd0688a305b2efec9c614a51564b0927d8270b597ce976322e8650182cab5bc4a
|
data/.github/workflows/ci.yml
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,250 +1,270 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
bolognese (2.
|
|
5
|
-
activesupport (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
rdf-rdfxml (~> 3.1)
|
|
26
|
-
rdf-turtle (~> 3.1)
|
|
27
|
-
thor (>= 0.19)
|
|
4
|
+
bolognese (2.6.1)
|
|
5
|
+
activesupport (~> 8.1, >= 8.1.2)
|
|
6
|
+
bibtex-ruby (~> 6.2)
|
|
7
|
+
builder (~> 3.3)
|
|
8
|
+
citeproc-ruby (~> 2.1, >= 2.1.8)
|
|
9
|
+
concurrent-ruby (~> 1.3, >= 1.3.6)
|
|
10
|
+
csl-styles (~> 2.0, >= 2.0.2)
|
|
11
|
+
csv (~> 3.3, >= 3.3.5)
|
|
12
|
+
edtf (~> 3.2)
|
|
13
|
+
gender_detector (~> 2.1)
|
|
14
|
+
iso8601 (~> 0.13.0)
|
|
15
|
+
json-ld-preloaded (~> 3.3, >= 3.3.2)
|
|
16
|
+
jsonlint (~> 0.4.0)
|
|
17
|
+
loofah (~> 2.25)
|
|
18
|
+
maremma (~> 6.0)
|
|
19
|
+
namae (~> 1.2)
|
|
20
|
+
nokogiri (~> 1.19, >= 1.19.1)
|
|
21
|
+
oj (~> 3.16, >= 3.16.15)
|
|
22
|
+
rdf-rdfxml (~> 3.3)
|
|
23
|
+
rdf-turtle (~> 3.3, >= 3.3.1)
|
|
24
|
+
thor (~> 1.5)
|
|
28
25
|
|
|
29
26
|
GEM
|
|
30
27
|
remote: https://rubygems.org/
|
|
31
28
|
specs:
|
|
32
|
-
activesupport (
|
|
29
|
+
activesupport (8.1.2)
|
|
33
30
|
base64
|
|
34
|
-
benchmark (>= 0.3)
|
|
35
31
|
bigdecimal
|
|
36
32
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
37
33
|
connection_pool (>= 2.2.5)
|
|
38
34
|
drb
|
|
39
35
|
i18n (>= 1.6, < 2)
|
|
36
|
+
json
|
|
40
37
|
logger (>= 1.4.2)
|
|
41
38
|
minitest (>= 5.1)
|
|
42
39
|
securerandom (>= 0.3)
|
|
43
40
|
tzinfo (~> 2.0, >= 2.0.5)
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
uri (>= 0.13.1)
|
|
42
|
+
addressable (2.8.9)
|
|
43
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
46
44
|
base64 (0.3.0)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
bibtex-ruby (6.0.0)
|
|
45
|
+
bcp47_spec (0.2.1)
|
|
46
|
+
bibtex-ruby (6.2.0)
|
|
50
47
|
latex-decode (~> 0.0)
|
|
48
|
+
logger (~> 1.7)
|
|
49
|
+
racc (~> 1.7)
|
|
51
50
|
bigdecimal (3.3.1)
|
|
52
|
-
builder (3.
|
|
51
|
+
builder (3.3.0)
|
|
53
52
|
byebug (11.1.3)
|
|
54
53
|
citeproc (1.0.10)
|
|
55
54
|
namae (~> 1.0)
|
|
56
|
-
citeproc-ruby (
|
|
55
|
+
citeproc-ruby (2.1.8)
|
|
57
56
|
citeproc (~> 1.0, >= 1.0.9)
|
|
58
|
-
csl (~>
|
|
59
|
-
|
|
60
|
-
concurrent-ruby (1.3.
|
|
57
|
+
csl (~> 2.0)
|
|
58
|
+
observer (< 1.0)
|
|
59
|
+
concurrent-ruby (1.3.6)
|
|
61
60
|
connection_pool (2.5.5)
|
|
62
|
-
crack (0.
|
|
61
|
+
crack (1.0.1)
|
|
62
|
+
bigdecimal
|
|
63
63
|
rexml
|
|
64
64
|
crass (1.0.6)
|
|
65
|
-
csl (
|
|
65
|
+
csl (2.0.0)
|
|
66
66
|
namae (~> 1.0)
|
|
67
67
|
rexml
|
|
68
|
-
csl-styles (
|
|
69
|
-
csl (~>
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
csl-styles (2.0.2)
|
|
69
|
+
csl (~> 2.0)
|
|
70
|
+
csv (3.3.5)
|
|
71
|
+
date (3.5.1)
|
|
72
|
+
diff-lcs (1.6.2)
|
|
73
|
+
docile (1.4.1)
|
|
72
74
|
drb (2.2.3)
|
|
73
|
-
ebnf (2.
|
|
75
|
+
ebnf (2.6.0)
|
|
76
|
+
base64 (~> 0.2)
|
|
74
77
|
htmlentities (~> 4.3)
|
|
75
|
-
rdf (~> 3.
|
|
78
|
+
rdf (~> 3.3)
|
|
76
79
|
scanf (~> 1.0)
|
|
77
|
-
sxp (~>
|
|
80
|
+
sxp (~> 2.0)
|
|
78
81
|
unicode-types (~> 1.8)
|
|
79
|
-
edtf (3.
|
|
80
|
-
activesupport (>= 3.0, <
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
edtf (3.2.0)
|
|
83
|
+
activesupport (>= 3.0, < 9.0)
|
|
84
|
+
erb (6.0.2)
|
|
85
|
+
excon (1.4.0)
|
|
86
|
+
logger
|
|
87
|
+
faraday (2.14.1)
|
|
88
|
+
faraday-net_http (>= 2.0, < 3.5)
|
|
89
|
+
json
|
|
90
|
+
logger
|
|
91
|
+
faraday-encoding (0.0.6)
|
|
86
92
|
faraday
|
|
87
|
-
faraday-excon (2.
|
|
88
|
-
excon (>= 0.
|
|
89
|
-
faraday (
|
|
90
|
-
faraday-follow_redirects (0.
|
|
93
|
+
faraday-excon (2.4.0)
|
|
94
|
+
excon (>= 1.0.0)
|
|
95
|
+
faraday (>= 2.11.0, < 3)
|
|
96
|
+
faraday-follow_redirects (0.5.0)
|
|
91
97
|
faraday (>= 1, < 3)
|
|
92
|
-
faraday-gzip (
|
|
93
|
-
faraday (>=
|
|
94
|
-
zlib (~>
|
|
95
|
-
faraday-multipart (1.0
|
|
96
|
-
multipart-post (~> 2)
|
|
97
|
-
faraday-net_http (3.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
haml (5.2.2)
|
|
101
|
-
temple (>= 0.8.0)
|
|
102
|
-
tilt
|
|
98
|
+
faraday-gzip (3.1.0)
|
|
99
|
+
faraday (>= 2.0, < 3)
|
|
100
|
+
zlib (~> 3.0)
|
|
101
|
+
faraday-multipart (1.2.0)
|
|
102
|
+
multipart-post (~> 2.0)
|
|
103
|
+
faraday-net_http (3.4.2)
|
|
104
|
+
net-http (~> 0.5)
|
|
105
|
+
gender_detector (2.1.0)
|
|
103
106
|
hashdiff (1.0.1)
|
|
104
107
|
htmlentities (4.3.4)
|
|
105
108
|
i18n (1.14.1)
|
|
106
109
|
concurrent-ruby (~> 1.0)
|
|
107
|
-
|
|
110
|
+
io-console (0.8.2)
|
|
111
|
+
irb (1.17.0)
|
|
112
|
+
pp (>= 0.6.0)
|
|
113
|
+
prism (>= 1.3.0)
|
|
114
|
+
rdoc (>= 4.0.0)
|
|
115
|
+
reline (>= 0.4.2)
|
|
116
|
+
iso8601 (0.13.0)
|
|
108
117
|
json (2.6.2)
|
|
109
|
-
json-canonicalization (0.
|
|
110
|
-
json-ld (3.2
|
|
118
|
+
json-canonicalization (1.0.0)
|
|
119
|
+
json-ld (3.3.2)
|
|
111
120
|
htmlentities (~> 4.3)
|
|
112
|
-
json-canonicalization (~> 0
|
|
121
|
+
json-canonicalization (~> 1.0)
|
|
113
122
|
link_header (~> 0.0, >= 0.0.8)
|
|
114
123
|
multi_json (~> 1.15)
|
|
115
124
|
rack (>= 2.2, < 4)
|
|
116
|
-
rdf (~> 3.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
125
|
+
rdf (~> 3.3)
|
|
126
|
+
rexml (~> 3.2)
|
|
127
|
+
json-ld-preloaded (3.3.2)
|
|
128
|
+
json-ld (~> 3.3)
|
|
129
|
+
rdf (~> 3.3)
|
|
130
|
+
jsonlint (0.4.0)
|
|
121
131
|
oj (~> 3)
|
|
122
132
|
optimist (~> 3)
|
|
123
133
|
latex-decode (0.4.0)
|
|
124
134
|
link_header (0.0.8)
|
|
125
135
|
logger (1.7.0)
|
|
126
|
-
loofah (2.
|
|
136
|
+
loofah (2.25.0)
|
|
127
137
|
crass (~> 1.0.2)
|
|
128
138
|
nokogiri (>= 1.12.0)
|
|
129
|
-
maremma (
|
|
130
|
-
activesupport (>=
|
|
131
|
-
addressable (>= 2.
|
|
139
|
+
maremma (6.0.0)
|
|
140
|
+
activesupport (~> 8.1, >= 8.1.2)
|
|
141
|
+
addressable (~> 2.8, >= 2.8.9)
|
|
132
142
|
builder (~> 3.2, >= 3.2.2)
|
|
133
|
-
excon (~>
|
|
143
|
+
excon (~> 1.3, >= 1.3.2)
|
|
134
144
|
faraday (>= 2.0)
|
|
135
|
-
faraday-encoding (~> 0.0.
|
|
136
|
-
faraday-excon (~> 2.
|
|
137
|
-
faraday-follow_redirects (~> 0.
|
|
138
|
-
faraday-gzip (~>
|
|
139
|
-
faraday-multipart (~> 1.0
|
|
140
|
-
nokogiri (~> 1.
|
|
141
|
-
oj (>=
|
|
145
|
+
faraday-encoding (~> 0.0.6)
|
|
146
|
+
faraday-excon (~> 2.4.0)
|
|
147
|
+
faraday-follow_redirects (~> 0.5.0)
|
|
148
|
+
faraday-gzip (~> 3.1.0)
|
|
149
|
+
faraday-multipart (~> 1.2.0)
|
|
150
|
+
nokogiri (~> 1.19, >= 1.19.1)
|
|
151
|
+
oj (~> 3.16, >= 3.16.15)
|
|
142
152
|
oj_mimic_json (~> 1.0, >= 1.0.1)
|
|
143
153
|
matrix (0.4.2)
|
|
144
154
|
mini_portile2 (2.8.5)
|
|
145
|
-
minitest (
|
|
155
|
+
minitest (6.0.2)
|
|
156
|
+
drb (~> 2.0)
|
|
157
|
+
prism (~> 1.5)
|
|
146
158
|
multi_json (1.15.0)
|
|
147
|
-
multipart-post (2.
|
|
148
|
-
namae (1.
|
|
149
|
-
|
|
159
|
+
multipart-post (2.4.1)
|
|
160
|
+
namae (1.2.0)
|
|
161
|
+
racc (~> 1.7)
|
|
162
|
+
net-http (0.9.1)
|
|
163
|
+
uri (>= 0.11.1)
|
|
164
|
+
nokogiri (1.19.1)
|
|
150
165
|
mini_portile2 (~> 2.8.2)
|
|
151
166
|
racc (~> 1.4)
|
|
152
|
-
|
|
167
|
+
observer (0.1.2)
|
|
168
|
+
oj (3.16.15)
|
|
169
|
+
bigdecimal (>= 3.0)
|
|
170
|
+
ostruct (>= 0.2)
|
|
153
171
|
oj_mimic_json (1.0.1)
|
|
154
172
|
optimist (3.0.1)
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
173
|
+
ostruct (0.6.3)
|
|
174
|
+
pp (0.6.3)
|
|
175
|
+
prettyprint
|
|
176
|
+
prettyprint (0.2.0)
|
|
177
|
+
prism (1.9.0)
|
|
178
|
+
psych (5.3.1)
|
|
179
|
+
date
|
|
180
|
+
stringio
|
|
181
|
+
public_suffix (4.0.7)
|
|
182
|
+
racc (1.8.1)
|
|
161
183
|
rack (2.2.4)
|
|
162
|
-
rack-test (
|
|
163
|
-
rack (>= 1.
|
|
164
|
-
rake (
|
|
165
|
-
rdf (3.
|
|
184
|
+
rack-test (2.2.0)
|
|
185
|
+
rack (>= 1.3)
|
|
186
|
+
rake (13.3.1)
|
|
187
|
+
rdf (3.3.4)
|
|
188
|
+
bcp47_spec (~> 0.2)
|
|
189
|
+
bigdecimal (~> 3.1, >= 3.1.5)
|
|
166
190
|
link_header (~> 0.0, >= 0.0.8)
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
rdf (~> 3.2)
|
|
173
|
-
rdf-aggregate-repo (~> 3.2)
|
|
174
|
-
rdf-vocab (~> 3.2)
|
|
175
|
-
rdf-xsd (~> 3.2)
|
|
176
|
-
rdf-rdfxml (3.2.1)
|
|
177
|
-
haml (~> 5.2)
|
|
191
|
+
logger (~> 1.5)
|
|
192
|
+
ostruct (~> 0.6)
|
|
193
|
+
readline (~> 0.0)
|
|
194
|
+
rdf-rdfxml (3.3.0)
|
|
195
|
+
builder (~> 3.2, >= 3.2.4)
|
|
178
196
|
htmlentities (~> 4.3)
|
|
179
|
-
rdf (~> 3.
|
|
180
|
-
rdf-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
rdf (~> 3.2)
|
|
197
|
+
rdf (~> 3.3)
|
|
198
|
+
rdf-xsd (~> 3.3)
|
|
199
|
+
rdf-turtle (3.3.1)
|
|
200
|
+
base64 (~> 0.2)
|
|
201
|
+
bigdecimal (~> 3.1, >= 3.1.5)
|
|
202
|
+
ebnf (~> 2.5)
|
|
203
|
+
rdf (~> 3.3)
|
|
204
|
+
rdf-xsd (3.3.0)
|
|
205
|
+
rdf (~> 3.3)
|
|
189
206
|
rexml (~> 3.2)
|
|
207
|
+
rdoc (7.2.0)
|
|
208
|
+
erb
|
|
209
|
+
psych (>= 4.0.0)
|
|
210
|
+
tsort
|
|
211
|
+
readline (0.0.4)
|
|
212
|
+
reline
|
|
213
|
+
reline (0.6.3)
|
|
214
|
+
io-console (~> 0.5)
|
|
190
215
|
rexml (3.2.5)
|
|
191
|
-
rspec (3.
|
|
192
|
-
rspec-core (~> 3.
|
|
193
|
-
rspec-expectations (~> 3.
|
|
194
|
-
rspec-mocks (~> 3.
|
|
195
|
-
rspec-core (3.
|
|
196
|
-
rspec-support (~> 3.
|
|
197
|
-
rspec-expectations (3.
|
|
216
|
+
rspec (3.13.2)
|
|
217
|
+
rspec-core (~> 3.13.0)
|
|
218
|
+
rspec-expectations (~> 3.13.0)
|
|
219
|
+
rspec-mocks (~> 3.13.0)
|
|
220
|
+
rspec-core (3.13.6)
|
|
221
|
+
rspec-support (~> 3.13.0)
|
|
222
|
+
rspec-expectations (3.13.5)
|
|
198
223
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
199
|
-
rspec-support (~> 3.
|
|
200
|
-
rspec-mocks (3.
|
|
224
|
+
rspec-support (~> 3.13.0)
|
|
225
|
+
rspec-mocks (3.13.8)
|
|
201
226
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
202
|
-
rspec-support (~> 3.
|
|
203
|
-
rspec-support (3.
|
|
204
|
-
rspec-xsd (0.1.0)
|
|
205
|
-
nokogiri (~> 1.6)
|
|
206
|
-
rspec (~> 3)
|
|
207
|
-
ruby2_keywords (0.0.5)
|
|
227
|
+
rspec-support (~> 3.13.0)
|
|
228
|
+
rspec-support (3.13.7)
|
|
208
229
|
scanf (1.0.0)
|
|
209
230
|
securerandom (0.4.1)
|
|
210
|
-
simplecov (0.
|
|
231
|
+
simplecov (0.22.0)
|
|
211
232
|
docile (~> 1.1)
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
simplecov-html (0.
|
|
215
|
-
|
|
233
|
+
simplecov-html (~> 0.11)
|
|
234
|
+
simplecov_json_formatter (~> 0.1)
|
|
235
|
+
simplecov-html (0.13.2)
|
|
236
|
+
simplecov_json_formatter (0.1.4)
|
|
237
|
+
stringio (3.2.0)
|
|
238
|
+
sxp (2.0.0)
|
|
216
239
|
matrix (~> 0.4)
|
|
217
|
-
rdf (~> 3.
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
tilt (2.2.0)
|
|
240
|
+
rdf (~> 3.3)
|
|
241
|
+
thor (1.5.0)
|
|
242
|
+
tsort (0.2.0)
|
|
221
243
|
tzinfo (2.0.6)
|
|
222
244
|
concurrent-ruby (~> 1.0)
|
|
223
245
|
unicode-types (1.8.0)
|
|
224
|
-
|
|
225
|
-
vcr (
|
|
226
|
-
webmock (3.
|
|
246
|
+
uri (1.1.1)
|
|
247
|
+
vcr (6.4.0)
|
|
248
|
+
webmock (3.26.1)
|
|
227
249
|
addressable (>= 2.8.0)
|
|
228
250
|
crack (>= 0.3.2)
|
|
229
251
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
230
|
-
zlib (2.
|
|
252
|
+
zlib (3.2.2)
|
|
231
253
|
|
|
232
254
|
PLATFORMS
|
|
233
255
|
ruby
|
|
234
256
|
|
|
235
257
|
DEPENDENCIES
|
|
236
258
|
bolognese!
|
|
237
|
-
bundler (>=
|
|
259
|
+
bundler (>= 2.0)
|
|
238
260
|
byebug
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
vcr (~> 3.0, >= 3.0.3)
|
|
247
|
-
webmock (~> 3.0, >= 3.0.1)
|
|
261
|
+
irb
|
|
262
|
+
rack-test (~> 2.2)
|
|
263
|
+
rake (~> 13.3, >= 13.3.1)
|
|
264
|
+
rspec (~> 3.13, >= 3.13.2)
|
|
265
|
+
simplecov (= 0.22.0)
|
|
266
|
+
vcr (~> 6.4)
|
|
267
|
+
webmock (~> 3.26, >= 3.26.1)
|
|
248
268
|
|
|
249
269
|
BUNDLED WITH
|
|
250
270
|
2.5.5
|
data/bolognese.gemspec
CHANGED
|
@@ -13,43 +13,38 @@ Gem::Specification.new do |s|
|
|
|
13
13
|
s.version = Bolognese::VERSION
|
|
14
14
|
s.extra_rdoc_files = ["README.md"]
|
|
15
15
|
s.license = 'MIT'
|
|
16
|
-
s.required_ruby_version = ['>= 3.
|
|
16
|
+
s.required_ruby_version = ['>= 3.2', '< 4.1']
|
|
17
17
|
|
|
18
18
|
# Declare dependencies here, rather than in the Gemfile
|
|
19
|
-
s.add_dependency 'maremma', '~>
|
|
20
|
-
s.add_dependency 'nokogiri', '~> 1.
|
|
21
|
-
s.add_dependency 'loofah', '~> 2.
|
|
22
|
-
s.add_dependency 'builder', '~> 3.
|
|
23
|
-
s.add_dependency 'activesupport',
|
|
24
|
-
s.add_dependency 'bibtex-ruby', '
|
|
25
|
-
s.add_dependency 'thor', '
|
|
26
|
-
s.add_dependency '
|
|
27
|
-
s.add_dependency '
|
|
28
|
-
s.add_dependency '
|
|
29
|
-
s.add_dependency '
|
|
30
|
-
s.add_dependency '
|
|
31
|
-
s.add_dependency '
|
|
32
|
-
s.add_dependency '
|
|
33
|
-
s.add_dependency '
|
|
34
|
-
s.add_dependency '
|
|
35
|
-
s.add_dependency '
|
|
36
|
-
s.add_dependency
|
|
37
|
-
s.add_dependency '
|
|
38
|
-
s.add_dependency '
|
|
39
|
-
s.
|
|
40
|
-
s.
|
|
41
|
-
s.
|
|
42
|
-
s.add_development_dependency '
|
|
43
|
-
s.add_development_dependency '
|
|
44
|
-
s.add_development_dependency '
|
|
45
|
-
s.add_development_dependency '
|
|
46
|
-
s.add_development_dependency '
|
|
47
|
-
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.3'
|
|
48
|
-
s.add_development_dependency 'webmock', '~> 3.0', '>= 3.0.1'
|
|
49
|
-
s.add_development_dependency 'simplecov', '0.17.1'
|
|
50
|
-
s.add_development_dependency 'hashdiff', ['>= 1.0.0.beta1', '< 2.0.0']
|
|
19
|
+
s.add_dependency 'maremma', '~> 6.0'
|
|
20
|
+
s.add_dependency 'nokogiri', '~> 1.19', '>= 1.19.1'
|
|
21
|
+
s.add_dependency 'loofah', '~> 2.25'
|
|
22
|
+
s.add_dependency 'builder', '~> 3.3'
|
|
23
|
+
s.add_dependency 'activesupport', "~> 8.1", ">= 8.1.2"
|
|
24
|
+
s.add_dependency 'bibtex-ruby', '~> 6.2'
|
|
25
|
+
s.add_dependency 'thor', '~> 1.5'
|
|
26
|
+
s.add_dependency 'namae', '~> 1.2'
|
|
27
|
+
s.add_dependency 'edtf', '~> 3.2'
|
|
28
|
+
s.add_dependency 'citeproc-ruby', '~> 2.1', '>= 2.1.8'
|
|
29
|
+
s.add_dependency 'csl-styles', '~> 2.0', '>= 2.0.2'
|
|
30
|
+
s.add_dependency 'iso8601', '~> 0.13.0'
|
|
31
|
+
s.add_dependency 'json-ld-preloaded', '~> 3.3', '>= 3.3.2'
|
|
32
|
+
s.add_dependency 'jsonlint', '~> 0.4.0'
|
|
33
|
+
s.add_dependency 'oj', '~> 3.16', '>= 3.16.15'
|
|
34
|
+
s.add_dependency 'rdf-turtle', '~> 3.3', '>= 3.3.1'
|
|
35
|
+
s.add_dependency 'rdf-rdfxml', '~> 3.3'
|
|
36
|
+
s.add_dependency 'gender_detector', '~> 2.1'
|
|
37
|
+
s.add_dependency 'concurrent-ruby', '~> 1.3', '>= 1.3.6'
|
|
38
|
+
s.add_dependency 'csv', '~> 3.3', '>= 3.3.5'
|
|
39
|
+
s.add_development_dependency 'bundler', '>= 2.0'
|
|
40
|
+
s.add_development_dependency 'irb'
|
|
41
|
+
s.add_development_dependency 'rspec', '~> 3.13', '>= 3.13.2'
|
|
42
|
+
s.add_development_dependency 'rake', '~> 13.3', '>= 13.3.1'
|
|
43
|
+
s.add_development_dependency 'rack-test', '~> 2.2'
|
|
44
|
+
s.add_development_dependency 'vcr', '~> 6.4'
|
|
45
|
+
s.add_development_dependency 'webmock', '~> 3.26', '>= 3.26.1'
|
|
46
|
+
s.add_development_dependency 'simplecov', '0.22.0'
|
|
51
47
|
s.add_development_dependency 'byebug'
|
|
52
|
-
s.add_development_dependency 'json-canonicalization', '0.3.1'
|
|
53
48
|
|
|
54
49
|
s.require_paths = ["lib"]
|
|
55
50
|
s.files = `git ls-files`.split($/).reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Minimal patch for csl-ruby and citeproc-ruby compatibility
|
|
4
|
+
# Root cause: 'contributor' is not recognized as a names variable in citeproc gem
|
|
5
|
+
# https://github.com/inukshuk/citeproc/blob/121fa4a950b9bd71960e42d20db96bcea1165201/lib/citeproc/variable.rb#L20-L24
|
|
6
|
+
|
|
7
|
+
module CiteProc
|
|
8
|
+
class Variable
|
|
9
|
+
# Unfreeze, modify, and refreeze the fields to add 'contributor' and 'accepted-date'
|
|
10
|
+
if @fields
|
|
11
|
+
# Unfreeze the fields hash temporarily
|
|
12
|
+
fields_dup = @fields.dup
|
|
13
|
+
|
|
14
|
+
# Add contributor to names (make a new unfrozen array)
|
|
15
|
+
fields_dup[:names] = (@fields[:names] + [:contributor]).uniq
|
|
16
|
+
|
|
17
|
+
# Add accepted-date to dates (make a new unfrozen array)
|
|
18
|
+
fields_dup[:date] = (@fields[:date] + [:'accepted-date']).uniq
|
|
19
|
+
|
|
20
|
+
# Rebuild the types mapping - only use actual type keys, not aliases like :all, :any, etc.
|
|
21
|
+
types_hash = Hash[*[:date, :names, :number, :text].map { |k| fields_dup[k].map { |n| [n, k] } }.flatten]
|
|
22
|
+
|
|
23
|
+
# Update the class instance variables
|
|
24
|
+
@fields = fields_dup
|
|
25
|
+
@types = Hash.new { |h,k| h.fetch(k.to_sym, nil) }.merge(types_hash).freeze
|
|
26
|
+
|
|
27
|
+
# Rebuild @factories from the new @types
|
|
28
|
+
# This maps each field name to its Variable subclass (Names, Date, Text, Number)
|
|
29
|
+
@factories = Hash.new { |h,k| h.fetch(k.to_s.intern, CiteProc::Variable) }.merge(
|
|
30
|
+
Hash[*@types.map { |field_name, type|
|
|
31
|
+
[field_name, CiteProc.const_get(type.to_s.capitalize)]
|
|
32
|
+
}.flatten]
|
|
33
|
+
).freeze
|
|
34
|
+
|
|
35
|
+
# Recreate the aliases
|
|
36
|
+
@fields[:name] = @fields[:names]
|
|
37
|
+
@fields[:dates] = @fields[:date]
|
|
38
|
+
@fields[:numbers] = @fields[:number]
|
|
39
|
+
|
|
40
|
+
# Recreate :all and :any
|
|
41
|
+
@fields[:all] = @fields[:any] =
|
|
42
|
+
[:date, :names, :text, :number].reduce([]) { |s,a| s.concat(@fields[a]) }.sort
|
|
43
|
+
|
|
44
|
+
# Refreeze fields
|
|
45
|
+
@fields.freeze
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -33,7 +33,6 @@ require_relative 'writers/turtle_writer'
|
|
|
33
33
|
|
|
34
34
|
module Bolognese
|
|
35
35
|
module MetadataUtils
|
|
36
|
-
# include BenchmarkMethods
|
|
37
36
|
include Bolognese::DoiUtils
|
|
38
37
|
include Bolognese::AuthorUtils
|
|
39
38
|
include Bolognese::DataciteUtils
|
|
@@ -140,19 +139,28 @@ module Bolognese
|
|
|
140
139
|
author = to_citeproc(creators)
|
|
141
140
|
end
|
|
142
141
|
|
|
143
|
-
if types["resourceTypeGeneral"] == "Software"
|
|
144
|
-
type = "
|
|
142
|
+
if types["resourceTypeGeneral"] == "Software"
|
|
143
|
+
type = "software"
|
|
145
144
|
else
|
|
146
145
|
type = types["citeproc"]
|
|
147
146
|
end
|
|
148
147
|
|
|
148
|
+
# Filter out contributors who are already creators, editors, or translators to avoid duplication
|
|
149
|
+
creator_names = Array.wrap(creators).map { |c| c["name"] || [c["givenName"], c["familyName"]].compact.join(" ") }.compact
|
|
150
|
+
unique_contributors = Array.wrap(contributors).reject do |c|
|
|
151
|
+
contributor_name = c["name"] || [c["givenName"], c["familyName"]].compact.join(" ")
|
|
152
|
+
creator_names.include?(contributor_name) ||
|
|
153
|
+
c["contributorType"] == "Editor" ||
|
|
154
|
+
c["contributorType"] == "Translator"
|
|
155
|
+
end
|
|
156
|
+
|
|
149
157
|
{
|
|
150
158
|
"type" => type,
|
|
151
159
|
"id" => normalize_doi(doi),
|
|
152
160
|
"categories" => Array.wrap(subjects).map { |k| parse_attributes(k, content: "subject", first: true) }.presence,
|
|
153
161
|
"language" => language,
|
|
154
162
|
"author" => author,
|
|
155
|
-
"contributor" => to_citeproc(
|
|
163
|
+
"contributor" => unique_contributors.presence ? to_citeproc(unique_contributors) : nil,
|
|
156
164
|
"editor" => contributors ? to_citeproc(contributors.select { |c| c["contributorType"] == "Editor" }) : nil,
|
|
157
165
|
"translator" => contributors ? to_citeproc(contributors.select { |c| c["contributorType"] == "Translator" }) : nil,
|
|
158
166
|
"issued" => get_date(dates, "Issued") ? get_date_parts(get_date(dates, "Issued")) : get_date_parts(publication_year.to_s),
|