dor_indexing 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +2 -0
- data/.rubocop.yml +355 -0
- data/Gemfile +16 -0
- data/Gemfile.lock +218 -0
- data/README.md +33 -0
- data/Rakefile +11 -0
- data/dor_indexing.gemspec +40 -0
- data/lib/dor_indexing/builders/all_search_text_builder.rb +58 -0
- data/lib/dor_indexing/builders/author_builder.rb +31 -0
- data/lib/dor_indexing/builders/collection_rights_description_builder.rb +29 -0
- data/lib/dor_indexing/builders/document_builder.rb +106 -0
- data/lib/dor_indexing/builders/event_date_builder.rb +71 -0
- data/lib/dor_indexing/builders/event_place_builder.rb +73 -0
- data/lib/dor_indexing/builders/geographic_builder.rb +82 -0
- data/lib/dor_indexing/builders/name_builder.rb +70 -0
- data/lib/dor_indexing/builders/orcid_builder.rb +62 -0
- data/lib/dor_indexing/builders/publisher_name_builder.rb +53 -0
- data/lib/dor_indexing/builders/temporal_builder.rb +56 -0
- data/lib/dor_indexing/builders/topic_builder.rb +96 -0
- data/lib/dor_indexing/cocina_repository.rb +24 -0
- data/lib/dor_indexing/indexers/administrative_tag_indexer.rb +69 -0
- data/lib/dor_indexing/indexers/collection_title_indexer.rb +27 -0
- data/lib/dor_indexing/indexers/composite_indexer.rb +36 -0
- data/lib/dor_indexing/indexers/content_metadata_indexer.rb +69 -0
- data/lib/dor_indexing/indexers/data_indexer.rb +66 -0
- data/lib/dor_indexing/indexers/default_object_rights_indexer.rb +36 -0
- data/lib/dor_indexing/indexers/descriptive_metadata_indexer.rb +226 -0
- data/lib/dor_indexing/indexers/embargo_metadata_indexer.rb +32 -0
- data/lib/dor_indexing/indexers/identifiable_indexer.rb +92 -0
- data/lib/dor_indexing/indexers/identity_metadata_indexer.rb +85 -0
- data/lib/dor_indexing/indexers/process_indexer.rb +63 -0
- data/lib/dor_indexing/indexers/releasable_indexer.rb +62 -0
- data/lib/dor_indexing/indexers/rights_metadata_indexer.rb +59 -0
- data/lib/dor_indexing/indexers/role_metadata_indexer.rb +31 -0
- data/lib/dor_indexing/indexers/workflow_indexer.rb +51 -0
- data/lib/dor_indexing/indexers/workflows_indexer.rb +40 -0
- data/lib/dor_indexing/marc_country.rb +359 -0
- data/lib/dor_indexing/selectors/event_selector.rb +112 -0
- data/lib/dor_indexing/selectors/pub_year_selector.rb +119 -0
- data/lib/dor_indexing/version.rb +5 -0
- data/lib/dor_indexing/workflow_fields.rb +63 -0
- data/lib/dor_indexing/workflow_solr_document.rb +93 -0
- data/lib/dor_indexing.rb +19 -0
- metadata +173 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 71c334c97d771acc75413c68261666d4f1d70d1e170c478015f642d2d91f4f3c
|
4
|
+
data.tar.gz: 6319cd1b6f4f8f264a5767fb130a2176e2bf3299157dd5335297b92a8526876e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b4605796f14b4d8a724571fda997ad62b45e68c521715ffb49d1d62389e9e14dca0a78adb19c5a7f91e15e9a9853489a35a3f4b664e88cfdde6109de4550e597
|
7
|
+
data.tar.gz: 0cb2a88b5aeaacb0b5ac273d37bb65c4bfb0d68dfc72c0c36054c44e24714576bd8d0ef001393433352e1d2abea38d39f671ecac63bdbb4ab58e76f9cd5812ed
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,355 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-performance
|
3
|
+
- rubocop-rspec
|
4
|
+
|
5
|
+
AllCops:
|
6
|
+
TargetRubyVersion: 3.2
|
7
|
+
DisplayCopNames: true
|
8
|
+
SuggestExtensions: false
|
9
|
+
|
10
|
+
# Per team developer playbook
|
11
|
+
Layout/LineLength:
|
12
|
+
Max: 150
|
13
|
+
RSpec/MultipleMemoizedHelpers:
|
14
|
+
Enabled: false
|
15
|
+
RSpec/MultipleExpectations:
|
16
|
+
Enabled: false
|
17
|
+
RSpec/ExampleLength:
|
18
|
+
Enabled: false
|
19
|
+
RSpec/NestedGroups:
|
20
|
+
Enabled: false
|
21
|
+
|
22
|
+
Gemspec/DeprecatedAttributeAssignment: # new in 1.30
|
23
|
+
Enabled: true
|
24
|
+
Gemspec/DevelopmentDependencies: # new in 1.44
|
25
|
+
Enabled: true
|
26
|
+
Gemspec/RequireMFA: # new in 1.23
|
27
|
+
Enabled: true
|
28
|
+
Layout/LineContinuationLeadingSpace: # new in 1.31
|
29
|
+
Enabled: true
|
30
|
+
Layout/LineContinuationSpacing: # new in 1.31
|
31
|
+
Enabled: true
|
32
|
+
Layout/LineEndStringConcatenationIndentation: # new in 1.18
|
33
|
+
Enabled: true
|
34
|
+
Layout/SpaceBeforeBrackets: # new in 1.7
|
35
|
+
Enabled: true
|
36
|
+
Lint/AmbiguousAssignment: # new in 1.7
|
37
|
+
Enabled: true
|
38
|
+
Lint/AmbiguousOperatorPrecedence: # new in 1.21
|
39
|
+
Enabled: true
|
40
|
+
Lint/AmbiguousRange: # new in 1.19
|
41
|
+
Enabled: true
|
42
|
+
Lint/ConstantOverwrittenInRescue: # new in 1.31
|
43
|
+
Enabled: true
|
44
|
+
Lint/DeprecatedConstants: # new in 1.8
|
45
|
+
Enabled: true
|
46
|
+
Lint/DuplicateBranch: # new in 1.3
|
47
|
+
Enabled: true
|
48
|
+
Lint/DuplicateMagicComment: # new in 1.37
|
49
|
+
Enabled: true
|
50
|
+
Lint/DuplicateMatchPattern: # new in 1.50
|
51
|
+
Enabled: true
|
52
|
+
Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
|
53
|
+
Enabled: true
|
54
|
+
Lint/EmptyBlock: # new in 1.1
|
55
|
+
Enabled: true
|
56
|
+
Lint/EmptyClass: # new in 1.3
|
57
|
+
Enabled: true
|
58
|
+
Lint/EmptyInPattern: # new in 1.16
|
59
|
+
Enabled: true
|
60
|
+
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
|
61
|
+
Enabled: true
|
62
|
+
Lint/ItWithoutArgumentsInBlock: # new in 1.59
|
63
|
+
Enabled: true
|
64
|
+
Lint/LambdaWithoutLiteralBlock: # new in 1.8
|
65
|
+
Enabled: true
|
66
|
+
Lint/LiteralAssignmentInCondition: # new in 1.58
|
67
|
+
Enabled: true
|
68
|
+
Lint/MixedCaseRange: # new in 1.53
|
69
|
+
Enabled: true
|
70
|
+
Lint/NoReturnInBeginEndBlocks: # new in 1.2
|
71
|
+
Enabled: true
|
72
|
+
Lint/NonAtomicFileOperation: # new in 1.31
|
73
|
+
Enabled: true
|
74
|
+
Lint/NumberedParameterAssignment: # new in 1.9
|
75
|
+
Enabled: true
|
76
|
+
Lint/OrAssignmentToConstant: # new in 1.9
|
77
|
+
Enabled: true
|
78
|
+
Lint/RedundantDirGlobSort: # new in 1.8
|
79
|
+
Enabled: true
|
80
|
+
Lint/RedundantRegexpQuantifiers: # new in 1.53
|
81
|
+
Enabled: true
|
82
|
+
Lint/RefinementImportMethods: # new in 1.27
|
83
|
+
Enabled: true
|
84
|
+
Lint/RequireRangeParentheses: # new in 1.32
|
85
|
+
Enabled: true
|
86
|
+
Lint/RequireRelativeSelfPath: # new in 1.22
|
87
|
+
Enabled: true
|
88
|
+
Lint/SymbolConversion: # new in 1.9
|
89
|
+
Enabled: true
|
90
|
+
Lint/ToEnumArguments: # new in 1.1
|
91
|
+
Enabled: true
|
92
|
+
Lint/TripleQuotes: # new in 1.9
|
93
|
+
Enabled: true
|
94
|
+
Lint/UnexpectedBlockArity: # new in 1.5
|
95
|
+
Enabled: true
|
96
|
+
Lint/UnmodifiedReduceAccumulator: # new in 1.1
|
97
|
+
Enabled: true
|
98
|
+
Lint/UselessRescue: # new in 1.43
|
99
|
+
Enabled: true
|
100
|
+
Lint/UselessRuby2Keywords: # new in 1.23
|
101
|
+
Enabled: true
|
102
|
+
Metrics/CollectionLiteralLength: # new in 1.47
|
103
|
+
Enabled: true
|
104
|
+
Naming/BlockForwarding: # new in 1.24
|
105
|
+
Enabled: true
|
106
|
+
Security/CompoundHash: # new in 1.28
|
107
|
+
Enabled: true
|
108
|
+
Security/IoMethods: # new in 1.22
|
109
|
+
Enabled: true
|
110
|
+
Style/ArgumentsForwarding: # new in 1.1
|
111
|
+
Enabled: true
|
112
|
+
Style/ArrayIntersect: # new in 1.40
|
113
|
+
Enabled: true
|
114
|
+
Style/CollectionCompact: # new in 1.2
|
115
|
+
Enabled: true
|
116
|
+
Style/ComparableClamp: # new in 1.44
|
117
|
+
Enabled: true
|
118
|
+
Style/ConcatArrayLiterals: # new in 1.41
|
119
|
+
Enabled: true
|
120
|
+
Style/DataInheritance: # new in 1.49
|
121
|
+
Enabled: true
|
122
|
+
Style/DirEmpty: # new in 1.48
|
123
|
+
Enabled: true
|
124
|
+
Style/DocumentDynamicEvalDefinition: # new in 1.1
|
125
|
+
Enabled: true
|
126
|
+
Style/EmptyHeredoc: # new in 1.32
|
127
|
+
Enabled: true
|
128
|
+
Style/EndlessMethod: # new in 1.8
|
129
|
+
Enabled: true
|
130
|
+
Style/EnvHome: # new in 1.29
|
131
|
+
Enabled: true
|
132
|
+
Style/ExactRegexpMatch: # new in 1.51
|
133
|
+
Enabled: true
|
134
|
+
Style/FetchEnvVar: # new in 1.28
|
135
|
+
Enabled: true
|
136
|
+
Style/FileEmpty: # new in 1.48
|
137
|
+
Enabled: true
|
138
|
+
Style/FileRead: # new in 1.24
|
139
|
+
Enabled: true
|
140
|
+
Style/FileWrite: # new in 1.24
|
141
|
+
Enabled: true
|
142
|
+
Style/HashConversion: # new in 1.10
|
143
|
+
Enabled: true
|
144
|
+
Style/HashExcept: # new in 1.7
|
145
|
+
Enabled: true
|
146
|
+
Style/IfWithBooleanLiteralBranches: # new in 1.9
|
147
|
+
Enabled: true
|
148
|
+
Style/InPatternThen: # new in 1.16
|
149
|
+
Enabled: true
|
150
|
+
Style/MagicCommentFormat: # new in 1.35
|
151
|
+
Enabled: true
|
152
|
+
Style/MapCompactWithConditionalBlock: # new in 1.30
|
153
|
+
Enabled: true
|
154
|
+
Style/MapToHash: # new in 1.24
|
155
|
+
Enabled: true
|
156
|
+
Style/MapToSet: # new in 1.42
|
157
|
+
Enabled: true
|
158
|
+
Style/MinMaxComparison: # new in 1.42
|
159
|
+
Enabled: true
|
160
|
+
Style/MultilineInPatternThen: # new in 1.16
|
161
|
+
Enabled: true
|
162
|
+
Style/NegatedIfElseCondition: # new in 1.2
|
163
|
+
Enabled: true
|
164
|
+
Style/NestedFileDirname: # new in 1.26
|
165
|
+
Enabled: true
|
166
|
+
Style/NilLambda: # new in 1.3
|
167
|
+
Enabled: true
|
168
|
+
Style/NumberedParameters: # new in 1.22
|
169
|
+
Enabled: true
|
170
|
+
Style/NumberedParametersLimit: # new in 1.22
|
171
|
+
Enabled: true
|
172
|
+
Style/ObjectThen: # new in 1.28
|
173
|
+
Enabled: true
|
174
|
+
Style/OpenStructUse: # new in 1.23
|
175
|
+
Enabled: true
|
176
|
+
Style/OperatorMethodCall: # new in 1.37
|
177
|
+
Enabled: true
|
178
|
+
Style/QuotedSymbols: # new in 1.16
|
179
|
+
Enabled: true
|
180
|
+
Style/RedundantArgument: # new in 1.4
|
181
|
+
Enabled: true
|
182
|
+
Style/RedundantArrayConstructor: # new in 1.52
|
183
|
+
Enabled: true
|
184
|
+
Style/RedundantConstantBase: # new in 1.40
|
185
|
+
Enabled: true
|
186
|
+
Style/RedundantCurrentDirectoryInPath: # new in 1.53
|
187
|
+
Enabled: true
|
188
|
+
Style/RedundantDoubleSplatHashBraces: # new in 1.41
|
189
|
+
Enabled: true
|
190
|
+
Style/RedundantEach: # new in 1.38
|
191
|
+
Enabled: true
|
192
|
+
Style/RedundantFilterChain: # new in 1.52
|
193
|
+
Enabled: true
|
194
|
+
Style/RedundantHeredocDelimiterQuotes: # new in 1.45
|
195
|
+
Enabled: true
|
196
|
+
Style/RedundantInitialize: # new in 1.27
|
197
|
+
Enabled: true
|
198
|
+
Style/RedundantLineContinuation: # new in 1.49
|
199
|
+
Enabled: true
|
200
|
+
Style/RedundantRegexpArgument: # new in 1.53
|
201
|
+
Enabled: true
|
202
|
+
Style/RedundantRegexpConstructor: # new in 1.52
|
203
|
+
Enabled: true
|
204
|
+
Style/RedundantSelfAssignmentBranch: # new in 1.19
|
205
|
+
Enabled: true
|
206
|
+
Style/RedundantStringEscape: # new in 1.37
|
207
|
+
Enabled: true
|
208
|
+
Style/ReturnNilInPredicateMethodDefinition: # new in 1.53
|
209
|
+
Enabled: true
|
210
|
+
Style/SelectByRegexp: # new in 1.22
|
211
|
+
Enabled: true
|
212
|
+
Style/SingleLineDoEndBlock: # new in 1.57
|
213
|
+
Enabled: true
|
214
|
+
Style/StringChars: # new in 1.12
|
215
|
+
Enabled: true
|
216
|
+
Style/SuperWithArgsParentheses: # new in 1.58
|
217
|
+
Enabled: true
|
218
|
+
Style/SwapValues: # new in 1.1
|
219
|
+
Enabled: true
|
220
|
+
Style/YAMLFileRead: # new in 1.53
|
221
|
+
Enabled: true
|
222
|
+
Performance/AncestorsInclude: # new in 1.7
|
223
|
+
Enabled: true
|
224
|
+
Performance/BigDecimalWithNumericArgument: # new in 1.7
|
225
|
+
Enabled: true
|
226
|
+
Performance/BlockGivenWithExplicitBlock: # new in 1.9
|
227
|
+
Enabled: true
|
228
|
+
Performance/CollectionLiteralInLoop: # new in 1.8
|
229
|
+
Enabled: true
|
230
|
+
Performance/ConcurrentMonotonicTime: # new in 1.12
|
231
|
+
Enabled: true
|
232
|
+
Performance/ConstantRegexp: # new in 1.9
|
233
|
+
Enabled: true
|
234
|
+
Performance/MapCompact: # new in 1.11
|
235
|
+
Enabled: true
|
236
|
+
Performance/MapMethodChain: # new in 1.19
|
237
|
+
Enabled: true
|
238
|
+
Performance/MethodObjectAsBlock: # new in 1.9
|
239
|
+
Enabled: true
|
240
|
+
Performance/RedundantEqualityComparisonBlock: # new in 1.10
|
241
|
+
Enabled: true
|
242
|
+
Performance/RedundantSortBlock: # new in 1.7
|
243
|
+
Enabled: true
|
244
|
+
Performance/RedundantSplitRegexpArgument: # new in 1.10
|
245
|
+
Enabled: true
|
246
|
+
Performance/RedundantStringChars: # new in 1.7
|
247
|
+
Enabled: true
|
248
|
+
Performance/ReverseFirst: # new in 1.7
|
249
|
+
Enabled: true
|
250
|
+
Performance/SortReverse: # new in 1.7
|
251
|
+
Enabled: true
|
252
|
+
Performance/Squeeze: # new in 1.7
|
253
|
+
Enabled: true
|
254
|
+
Performance/StringIdentifierArgument: # new in 1.13
|
255
|
+
Enabled: true
|
256
|
+
Performance/StringInclude: # new in 1.7
|
257
|
+
Enabled: true
|
258
|
+
Performance/Sum: # new in 1.8
|
259
|
+
Enabled: true
|
260
|
+
Capybara/ClickLinkOrButtonStyle: # new in 2.19
|
261
|
+
Enabled: true
|
262
|
+
Capybara/MatchStyle: # new in 2.17
|
263
|
+
Enabled: true
|
264
|
+
Capybara/NegationMatcher: # new in 2.14
|
265
|
+
Enabled: true
|
266
|
+
Capybara/RedundantWithinFind: # new in 2.20
|
267
|
+
Enabled: true
|
268
|
+
Capybara/SpecificActions: # new in 2.14
|
269
|
+
Enabled: true
|
270
|
+
Capybara/SpecificFinders: # new in 2.13
|
271
|
+
Enabled: true
|
272
|
+
Capybara/SpecificMatcher: # new in 2.12
|
273
|
+
Enabled: true
|
274
|
+
Capybara/RSpec/HaveSelector: # new in 2.19
|
275
|
+
Enabled: true
|
276
|
+
Capybara/RSpec/PredicateMatcher: # new in 2.19
|
277
|
+
Enabled: true
|
278
|
+
FactoryBot/AssociationStyle: # new in 2.23
|
279
|
+
Enabled: true
|
280
|
+
FactoryBot/ConsistentParenthesesStyle: # new in 2.14
|
281
|
+
Enabled: true
|
282
|
+
FactoryBot/ExcessiveCreateList: # new in 2.25
|
283
|
+
Enabled: true
|
284
|
+
FactoryBot/FactoryAssociationWithStrategy: # new in 2.23
|
285
|
+
Enabled: true
|
286
|
+
FactoryBot/FactoryNameStyle: # new in 2.16
|
287
|
+
Enabled: true
|
288
|
+
FactoryBot/IdSequence: # new in 2.24
|
289
|
+
Enabled: true
|
290
|
+
FactoryBot/RedundantFactoryOption: # new in 2.23
|
291
|
+
Enabled: true
|
292
|
+
FactoryBot/SyntaxMethods: # new in 2.7
|
293
|
+
Enabled: true
|
294
|
+
RSpec/BeEmpty: # new in 2.20
|
295
|
+
Enabled: true
|
296
|
+
RSpec/BeEq: # new in 2.9.0
|
297
|
+
Enabled: true
|
298
|
+
RSpec/BeNil: # new in 2.9.0
|
299
|
+
Enabled: true
|
300
|
+
RSpec/ChangeByZero: # new in 2.11
|
301
|
+
Enabled: true
|
302
|
+
RSpec/ContainExactly: # new in 2.19
|
303
|
+
Enabled: true
|
304
|
+
RSpec/DuplicatedMetadata: # new in 2.16
|
305
|
+
Enabled: true
|
306
|
+
RSpec/EmptyMetadata: # new in 2.24
|
307
|
+
Enabled: true
|
308
|
+
RSpec/Eq: # new in 2.24
|
309
|
+
Enabled: true
|
310
|
+
RSpec/ExcessiveDocstringSpacing: # new in 2.5
|
311
|
+
Enabled: true
|
312
|
+
RSpec/IdenticalEqualityAssertion: # new in 2.4
|
313
|
+
Enabled: true
|
314
|
+
RSpec/IndexedLet: # new in 2.20
|
315
|
+
Enabled: true
|
316
|
+
RSpec/MatchArray: # new in 2.19
|
317
|
+
Enabled: true
|
318
|
+
RSpec/MetadataStyle: # new in 2.24
|
319
|
+
Enabled: true
|
320
|
+
RSpec/NoExpectationExample: # new in 2.13
|
321
|
+
Enabled: true
|
322
|
+
RSpec/PendingWithoutReason: # new in 2.16
|
323
|
+
Enabled: true
|
324
|
+
RSpec/ReceiveMessages: # new in 2.23
|
325
|
+
Enabled: true
|
326
|
+
RSpec/RedundantAround: # new in 2.19
|
327
|
+
Enabled: true
|
328
|
+
RSpec/RedundantPredicateMatcher: # new in 2.26
|
329
|
+
Enabled: true
|
330
|
+
RSpec/RemoveConst: # new in 2.26
|
331
|
+
Enabled: true
|
332
|
+
RSpec/SkipBlockInsideExample: # new in 2.19
|
333
|
+
Enabled: true
|
334
|
+
RSpec/SortMetadata: # new in 2.14
|
335
|
+
Enabled: true
|
336
|
+
RSpec/SpecFilePathFormat: # new in 2.24
|
337
|
+
Enabled: true
|
338
|
+
RSpec/SpecFilePathSuffix: # new in 2.24
|
339
|
+
Enabled: true
|
340
|
+
RSpec/SubjectDeclaration: # new in 2.5
|
341
|
+
Enabled: true
|
342
|
+
RSpec/VerifiedDoubleReference: # new in 2.10.0
|
343
|
+
Enabled: true
|
344
|
+
RSpec/Rails/AvoidSetupHook: # new in 2.4
|
345
|
+
Enabled: true
|
346
|
+
RSpec/Rails/HaveHttpStatus: # new in 2.12
|
347
|
+
Enabled: true
|
348
|
+
RSpec/Rails/InferredSpecType: # new in 2.14
|
349
|
+
Enabled: true
|
350
|
+
RSpec/Rails/MinitestAssertions: # new in 2.17
|
351
|
+
Enabled: true
|
352
|
+
RSpec/Rails/NegationBeValid: # new in 2.23
|
353
|
+
Enabled: true
|
354
|
+
RSpec/Rails/TravelAround: # new in 2.19
|
355
|
+
Enabled: true
|
data/Gemfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
# Development dependencies
|
9
|
+
gem 'byebug'
|
10
|
+
gem 'dor-workflow-client', '~> 5.0'
|
11
|
+
gem 'rake', '~> 13.0'
|
12
|
+
gem 'rspec', '~> 3.0'
|
13
|
+
gem 'rubocop'
|
14
|
+
gem 'rubocop-performance'
|
15
|
+
gem 'rubocop-rspec'
|
16
|
+
gem 'simplecov'
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,218 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
dor_indexing (1.0.0)
|
5
|
+
cocina-models (~> 0.93.0)
|
6
|
+
honeybadger
|
7
|
+
marc-vocab (~> 0.3.0)
|
8
|
+
solrizer
|
9
|
+
stanford-mods
|
10
|
+
zeitwerk
|
11
|
+
|
12
|
+
GEM
|
13
|
+
remote: https://rubygems.org/
|
14
|
+
specs:
|
15
|
+
activesupport (7.1.2)
|
16
|
+
base64
|
17
|
+
bigdecimal
|
18
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
19
|
+
connection_pool (>= 2.2.5)
|
20
|
+
drb
|
21
|
+
i18n (>= 1.6, < 2)
|
22
|
+
minitest (>= 5.1)
|
23
|
+
mutex_m
|
24
|
+
tzinfo (~> 2.0)
|
25
|
+
ast (2.4.2)
|
26
|
+
attr_extras (7.1.0)
|
27
|
+
base64 (0.2.0)
|
28
|
+
bigdecimal (3.1.5)
|
29
|
+
byebug (11.1.3)
|
30
|
+
cocina-models (0.93.0)
|
31
|
+
activesupport
|
32
|
+
deprecation
|
33
|
+
dry-struct (~> 1.0)
|
34
|
+
dry-types (~> 1.1)
|
35
|
+
edtf
|
36
|
+
equivalent-xml
|
37
|
+
i18n
|
38
|
+
jsonpath
|
39
|
+
nokogiri
|
40
|
+
openapi3_parser
|
41
|
+
openapi_parser (~> 1.0)
|
42
|
+
rss
|
43
|
+
super_diff
|
44
|
+
thor
|
45
|
+
zeitwerk (~> 2.1)
|
46
|
+
commonmarker (0.23.10)
|
47
|
+
concurrent-ruby (1.2.2)
|
48
|
+
connection_pool (2.4.1)
|
49
|
+
deprecation (1.1.0)
|
50
|
+
activesupport
|
51
|
+
diff-lcs (1.5.0)
|
52
|
+
docile (1.4.0)
|
53
|
+
dor-workflow-client (5.1.0)
|
54
|
+
activesupport (>= 3.2.1, < 8)
|
55
|
+
deprecation (>= 0.99.0)
|
56
|
+
faraday (~> 2.0)
|
57
|
+
faraday-retry (~> 2.0)
|
58
|
+
nokogiri (~> 1.6)
|
59
|
+
zeitwerk (~> 2.1)
|
60
|
+
drb (2.2.0)
|
61
|
+
ruby2_keywords
|
62
|
+
dry-core (1.0.1)
|
63
|
+
concurrent-ruby (~> 1.0)
|
64
|
+
zeitwerk (~> 2.6)
|
65
|
+
dry-inflector (1.0.0)
|
66
|
+
dry-logic (1.5.0)
|
67
|
+
concurrent-ruby (~> 1.0)
|
68
|
+
dry-core (~> 1.0, < 2)
|
69
|
+
zeitwerk (~> 2.6)
|
70
|
+
dry-struct (1.6.0)
|
71
|
+
dry-core (~> 1.0, < 2)
|
72
|
+
dry-types (>= 1.7, < 2)
|
73
|
+
ice_nine (~> 0.11)
|
74
|
+
zeitwerk (~> 2.6)
|
75
|
+
dry-types (1.7.2)
|
76
|
+
bigdecimal (~> 3.0)
|
77
|
+
concurrent-ruby (~> 1.0)
|
78
|
+
dry-core (~> 1.0)
|
79
|
+
dry-inflector (~> 1.0)
|
80
|
+
dry-logic (~> 1.4)
|
81
|
+
zeitwerk (~> 2.6)
|
82
|
+
edtf (3.1.1)
|
83
|
+
activesupport (>= 3.0, < 8.0)
|
84
|
+
equivalent-xml (0.6.0)
|
85
|
+
nokogiri (>= 1.4.3)
|
86
|
+
faraday (2.9.0)
|
87
|
+
faraday-net_http (>= 2.0, < 3.2)
|
88
|
+
faraday-net_http (3.1.0)
|
89
|
+
net-http
|
90
|
+
faraday-retry (2.2.0)
|
91
|
+
faraday (~> 2.0)
|
92
|
+
honeybadger (5.4.1)
|
93
|
+
i18n (1.14.1)
|
94
|
+
concurrent-ruby (~> 1.0)
|
95
|
+
ice_nine (0.11.2)
|
96
|
+
iso-639 (0.3.6)
|
97
|
+
json (2.7.1)
|
98
|
+
jsonpath (1.1.5)
|
99
|
+
multi_json
|
100
|
+
language_server-protocol (3.17.0.3)
|
101
|
+
marc-vocab (0.3.0)
|
102
|
+
minitest (5.20.0)
|
103
|
+
mods (3.0.4)
|
104
|
+
edtf (~> 3.0)
|
105
|
+
iso-639
|
106
|
+
nokogiri (>= 1.6.6)
|
107
|
+
nom-xml (~> 1.0)
|
108
|
+
multi_json (1.15.0)
|
109
|
+
mutex_m (0.2.0)
|
110
|
+
net-http (0.4.1)
|
111
|
+
uri
|
112
|
+
nokogiri (1.16.0-x86_64-darwin)
|
113
|
+
racc (~> 1.4)
|
114
|
+
nokogiri (1.16.0-x86_64-linux)
|
115
|
+
racc (~> 1.4)
|
116
|
+
nom-xml (1.2.0)
|
117
|
+
i18n
|
118
|
+
nokogiri
|
119
|
+
openapi3_parser (0.9.2)
|
120
|
+
commonmarker (~> 0.17)
|
121
|
+
openapi_parser (1.0.0)
|
122
|
+
optimist (3.1.0)
|
123
|
+
parallel (1.24.0)
|
124
|
+
parser (3.3.0.2)
|
125
|
+
ast (~> 2.4.1)
|
126
|
+
racc
|
127
|
+
patience_diff (1.2.0)
|
128
|
+
optimist (~> 3.0)
|
129
|
+
racc (1.7.3)
|
130
|
+
rainbow (3.1.1)
|
131
|
+
rake (13.1.0)
|
132
|
+
regexp_parser (2.9.0)
|
133
|
+
rexml (3.2.6)
|
134
|
+
rspec (3.12.0)
|
135
|
+
rspec-core (~> 3.12.0)
|
136
|
+
rspec-expectations (~> 3.12.0)
|
137
|
+
rspec-mocks (~> 3.12.0)
|
138
|
+
rspec-core (3.12.2)
|
139
|
+
rspec-support (~> 3.12.0)
|
140
|
+
rspec-expectations (3.12.3)
|
141
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
142
|
+
rspec-support (~> 3.12.0)
|
143
|
+
rspec-mocks (3.12.6)
|
144
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
145
|
+
rspec-support (~> 3.12.0)
|
146
|
+
rspec-support (3.12.1)
|
147
|
+
rss (0.3.0)
|
148
|
+
rexml
|
149
|
+
rubocop (1.59.0)
|
150
|
+
json (~> 2.3)
|
151
|
+
language_server-protocol (>= 3.17.0)
|
152
|
+
parallel (~> 1.10)
|
153
|
+
parser (>= 3.2.2.4)
|
154
|
+
rainbow (>= 2.2.2, < 4.0)
|
155
|
+
regexp_parser (>= 1.8, < 3.0)
|
156
|
+
rexml (>= 3.2.5, < 4.0)
|
157
|
+
rubocop-ast (>= 1.30.0, < 2.0)
|
158
|
+
ruby-progressbar (~> 1.7)
|
159
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
160
|
+
rubocop-ast (1.30.0)
|
161
|
+
parser (>= 3.2.1.0)
|
162
|
+
rubocop-capybara (2.20.0)
|
163
|
+
rubocop (~> 1.41)
|
164
|
+
rubocop-factory_bot (2.25.1)
|
165
|
+
rubocop (~> 1.41)
|
166
|
+
rubocop-performance (1.20.2)
|
167
|
+
rubocop (>= 1.48.1, < 2.0)
|
168
|
+
rubocop-ast (>= 1.30.0, < 2.0)
|
169
|
+
rubocop-rspec (2.26.1)
|
170
|
+
rubocop (~> 1.40)
|
171
|
+
rubocop-capybara (~> 2.17)
|
172
|
+
rubocop-factory_bot (~> 2.22)
|
173
|
+
ruby-progressbar (1.13.0)
|
174
|
+
ruby2_keywords (0.0.5)
|
175
|
+
simplecov (0.22.0)
|
176
|
+
docile (~> 1.1)
|
177
|
+
simplecov-html (~> 0.11)
|
178
|
+
simplecov_json_formatter (~> 0.1)
|
179
|
+
simplecov-html (0.12.3)
|
180
|
+
simplecov_json_formatter (0.1.4)
|
181
|
+
solrizer (4.1.0)
|
182
|
+
activesupport
|
183
|
+
nokogiri
|
184
|
+
xml-simple
|
185
|
+
stanford-mods (3.3.9)
|
186
|
+
activesupport
|
187
|
+
mods (~> 3.0, >= 3.0.4)
|
188
|
+
super_diff (0.10.0)
|
189
|
+
attr_extras (>= 6.2.4)
|
190
|
+
diff-lcs
|
191
|
+
patience_diff
|
192
|
+
thor (1.3.0)
|
193
|
+
tzinfo (2.0.6)
|
194
|
+
concurrent-ruby (~> 1.0)
|
195
|
+
unicode-display_width (2.5.0)
|
196
|
+
uri (0.13.0)
|
197
|
+
xml-simple (1.1.9)
|
198
|
+
rexml
|
199
|
+
zeitwerk (2.6.12)
|
200
|
+
|
201
|
+
PLATFORMS
|
202
|
+
x86_64-darwin-21
|
203
|
+
x86_64-darwin-22
|
204
|
+
x86_64-linux
|
205
|
+
|
206
|
+
DEPENDENCIES
|
207
|
+
byebug
|
208
|
+
dor-workflow-client (~> 5.0)
|
209
|
+
dor_indexing!
|
210
|
+
rake (~> 13.0)
|
211
|
+
rspec (~> 3.0)
|
212
|
+
rubocop
|
213
|
+
rubocop-performance
|
214
|
+
rubocop-rspec
|
215
|
+
simplecov
|
216
|
+
|
217
|
+
BUNDLED WITH
|
218
|
+
2.4.13
|
data/README.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# DorIndexing
|
2
|
+
|
3
|
+
DorIndexing is a Ruby gem that creates Solr documents from Cocina objects for the purposes of indexing. It was extracted from DOR Indexing App.
|
4
|
+
|
5
|
+
## Motivation
|
6
|
+
|
7
|
+
In our previous architecture, rolling indexing was performed on the Dor Indexing App server. This was inefficient and slow, as it required API calls to Dor Services App to retrieve Cocina items.
|
8
|
+
|
9
|
+
Gemifying the creation of Solr documents allows changing the architecture such that rolling indexing is performed on the Dor Services App server. This allows the more efficient retrieval of Cocina items via direct ActiveRecord db access.
|
10
|
+
|
11
|
+
Further, it allows other indexing (e.g., via RabbitMQ messages) to continue on the Dor Indexing App server.
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
Install the gem and add to the application's Gemfile by executing:
|
16
|
+
|
17
|
+
$ bundle add dor_indexing
|
18
|
+
|
19
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
20
|
+
|
21
|
+
$ gem install dor_indexing
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
DorIndexing that a configured Workflow Client and a Cocina Repository be injected.
|
26
|
+
|
27
|
+
The Cocina Repository provides methods for finding Cocina objects and administrative tags. One possible implementation of a Cocina Repository would be to use DOR Services Client.
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
require 'dor_indexing'
|
31
|
+
|
32
|
+
doc = DorIndexing.build(cocina_with_metadata:, workflow_client:, cocina_repository:)
|
33
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'dor_indexing/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'dor_indexing'
|
9
|
+
spec.version = DorIndexing::VERSION
|
10
|
+
spec.authors = ['Justin Littman']
|
11
|
+
spec.email = ['justinlittman@stanford.edu']
|
12
|
+
|
13
|
+
spec.summary = 'Library for creating Solr documents for SDR indexing.'
|
14
|
+
spec.description = 'Library for creating Solr documents for SDR indexing.'
|
15
|
+
spec.homepage = 'https://github.com/sul-dlss/dor_indexing'
|
16
|
+
spec.required_ruby_version = '>= 3.2.0'
|
17
|
+
|
18
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
19
|
+
spec.metadata['source_code_uri'] = 'https://github.com/sul-dlss/dor_indexing'
|
20
|
+
spec.metadata['changelog_uri'] = 'https://github.com/sul-dlss/folio_client/releases'
|
21
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
22
|
+
|
23
|
+
# Specify which files should be added to the gem when it is released.
|
24
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
25
|
+
spec.files = Dir.chdir(__dir__) do
|
26
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
|
28
|
+
end
|
29
|
+
end
|
30
|
+
spec.bindir = 'exe'
|
31
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
32
|
+
spec.require_paths = ['lib']
|
33
|
+
|
34
|
+
spec.add_dependency 'cocina-models', '~> 0.93.0'
|
35
|
+
spec.add_dependency 'honeybadger'
|
36
|
+
spec.add_dependency 'marc-vocab', '~> 0.3.0'
|
37
|
+
spec.add_dependency 'solrizer'
|
38
|
+
spec.add_dependency 'stanford-mods'
|
39
|
+
spec.add_dependency 'zeitwerk'
|
40
|
+
end
|