arclight 0.4.0 → 0.5.0
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/ruby.yml +5 -2
- data/.rubocop.yml +4 -2
- data/.rubocop_todo.yml +199 -34
- data/Gemfile +5 -0
- data/app/assets/stylesheets/arclight/modules/layout.scss +3 -2
- data/app/controllers/concerns/arclight/field_config_helpers.rb +1 -1
- data/app/helpers/arclight_helper.rb +3 -3
- data/app/views/arclight/requests/_aeon_web_ead.html.erb +1 -1
- data/app/views/catalog/_search_form.html.erb +5 -1
- data/arclight.gemspec +9 -8
- data/lib/arclight/engine.rb +3 -9
- data/lib/arclight/repository.rb +2 -2
- data/lib/arclight/version.rb +1 -1
- data/lib/generators/arclight/templates/catalog_controller.rb +4 -0
- data/package.json +4 -4
- data/solr/conf/schema.xml +2 -2
- data/solr/conf/solrconfig.xml +1 -0
- data/template.rb +1 -1
- metadata +45 -25
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5ad2c5251cf3130cce536075a7a1049031b459535566a6654f5601be20318820
|
|
4
|
+
data.tar.gz: 8e4770a4035b7df7c9e870dc60d7d3d44c8e7b90b70389f19a4e1ba9322aa09a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 046246fbbf865afb0677463746b458d94b0efb12f63729b9a4f60166547b0cac25a4a3498702c31fc8e2fadc357742d65e613e11b6c23307997245b5c4db50e3
|
|
7
|
+
data.tar.gz: 8011c4c5b33be7a6983cb1e887cb2f159efa680411ff29cf31dc7d79115029fc61c21cae7ad2955bd08310059e2f062c0aa91dad186fffcd5c53f8aaba6d9216
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -11,8 +11,11 @@ jobs:
|
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
strategy:
|
|
13
13
|
matrix:
|
|
14
|
-
rails_version: [
|
|
15
|
-
ruby: [2.
|
|
14
|
+
rails_version: [6.1.4.7, 7.0.2.3]
|
|
15
|
+
ruby: [2.7, '3.0']
|
|
16
|
+
include:
|
|
17
|
+
- rails_version: 6.0.3.7
|
|
18
|
+
ruby: 2.7
|
|
16
19
|
env:
|
|
17
20
|
RAILS_VERSION: ${{ matrix.rails_version }}
|
|
18
21
|
steps:
|
data/.rubocop.yml
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
require:
|
|
1
|
+
require:
|
|
2
|
+
- rubocop-rspec
|
|
3
|
+
- rubocop-rails
|
|
2
4
|
|
|
3
5
|
inherit_from:
|
|
4
6
|
- .rubocop_todo.yml
|
|
@@ -11,7 +13,7 @@ AllCops:
|
|
|
11
13
|
- 'lib/generators/arclight/templates/**/*'
|
|
12
14
|
- 'vendor/**/*'
|
|
13
15
|
- 'node_modules/**/*'
|
|
14
|
-
TargetRubyVersion: 2.
|
|
16
|
+
TargetRubyVersion: 2.5
|
|
15
17
|
DisplayCopNames: true
|
|
16
18
|
|
|
17
19
|
Metrics/ModuleLength:
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,44 +1,113 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on
|
|
3
|
+
# on 2021-05-17 20:57:22 UTC using RuboCop version 1.15.0.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count:
|
|
9
|
+
# Offense count: 1
|
|
10
|
+
# Configuration parameters: Include.
|
|
11
|
+
# Include: **/*.gemspec
|
|
12
|
+
Gemspec/RequiredRubyVersion:
|
|
13
|
+
Exclude:
|
|
14
|
+
- 'arclight.gemspec'
|
|
15
|
+
|
|
16
|
+
# Offense count: 2
|
|
17
|
+
# Cop supports --auto-correct.
|
|
18
|
+
# Configuration parameters: EnforcedStyleAlignWith, Severity.
|
|
19
|
+
# SupportedStylesAlignWith: start_of_line, begin
|
|
20
|
+
Layout/BeginEndAlignment:
|
|
21
|
+
Exclude:
|
|
22
|
+
- 'app/models/arclight/document_downloads.rb'
|
|
23
|
+
- 'lib/tasks/index.rake'
|
|
24
|
+
|
|
25
|
+
# Offense count: 1
|
|
26
|
+
# Cop supports --auto-correct.
|
|
27
|
+
# Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
|
|
28
|
+
Layout/EmptyLineBetweenDefs:
|
|
29
|
+
Exclude:
|
|
30
|
+
- 'lib/arclight/exceptions.rb'
|
|
31
|
+
|
|
32
|
+
# Offense count: 7
|
|
33
|
+
# Cop supports --auto-correct.
|
|
34
|
+
# Configuration parameters: AllowAliasSyntax, AllowedMethods.
|
|
35
|
+
# AllowedMethods: alias_method, public, protected, private
|
|
36
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
|
37
|
+
Exclude:
|
|
38
|
+
- 'app/models/arclight/document_downloads.rb'
|
|
39
|
+
- 'app/models/arclight/parent.rb'
|
|
40
|
+
- 'app/models/arclight/parents.rb'
|
|
41
|
+
- 'app/models/arclight/requests/aeon_web_ead.rb'
|
|
42
|
+
- 'app/models/arclight/requests/google_form.rb'
|
|
43
|
+
- 'lib/arclight/digital_object.rb'
|
|
44
|
+
- 'lib/arclight/hash_absolute_xpath.rb'
|
|
45
|
+
|
|
46
|
+
# Offense count: 2
|
|
47
|
+
# Cop supports --auto-correct.
|
|
48
|
+
Layout/RescueEnsureAlignment:
|
|
49
|
+
Exclude:
|
|
50
|
+
- 'app/models/arclight/document_downloads.rb'
|
|
51
|
+
- 'lib/tasks/index.rake'
|
|
52
|
+
|
|
53
|
+
# Offense count: 2
|
|
54
|
+
# Configuration parameters: IgnoredMethods.
|
|
10
55
|
Lint/AmbiguousBlockAssociation:
|
|
11
56
|
Exclude:
|
|
12
57
|
- 'lib/arclight/traject/ead2_config.rb'
|
|
13
58
|
|
|
59
|
+
# Offense count: 1
|
|
60
|
+
# Cop supports --auto-correct.
|
|
61
|
+
Lint/RedundantCopDisableDirective:
|
|
62
|
+
Exclude:
|
|
63
|
+
- 'spec/features/search_results_spec.rb'
|
|
64
|
+
|
|
65
|
+
# Offense count: 1
|
|
66
|
+
# Cop supports --auto-correct.
|
|
67
|
+
Lint/SendWithMixinArgument:
|
|
68
|
+
Exclude:
|
|
69
|
+
- 'lib/arclight/engine.rb'
|
|
70
|
+
|
|
71
|
+
# Offense count: 1
|
|
72
|
+
# Cop supports --auto-correct.
|
|
73
|
+
Lint/UriRegexp:
|
|
74
|
+
Exclude:
|
|
75
|
+
- 'lib/tasks/index.rake'
|
|
76
|
+
|
|
14
77
|
# Offense count: 1
|
|
15
78
|
# Configuration parameters: CheckForMethodsWithNoSideEffects.
|
|
16
79
|
Lint/Void:
|
|
17
80
|
Exclude:
|
|
18
81
|
- 'lib/arclight/year_range.rb'
|
|
19
82
|
|
|
20
|
-
# Offense count: 68
|
|
21
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
|
22
|
-
Metrics/BlockLength:
|
|
23
|
-
Max: 278
|
|
24
|
-
Exclude:
|
|
25
|
-
- 'spec/features/collection_page_spec.rb'
|
|
26
|
-
|
|
27
83
|
# Offense count: 1
|
|
28
|
-
# Configuration parameters:
|
|
84
|
+
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
|
85
|
+
Metrics/AbcSize:
|
|
86
|
+
Max: 19
|
|
87
|
+
|
|
88
|
+
# Offense count: 2
|
|
89
|
+
# Configuration parameters: IgnoredMethods.
|
|
90
|
+
Metrics/CyclomaticComplexity:
|
|
91
|
+
Max: 8
|
|
92
|
+
|
|
93
|
+
# Offense count: 4
|
|
94
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
|
29
95
|
Metrics/MethodLength:
|
|
30
|
-
Max:
|
|
31
|
-
|
|
32
|
-
|
|
96
|
+
Max: 17
|
|
97
|
+
|
|
98
|
+
# Offense count: 1
|
|
99
|
+
# Configuration parameters: IgnoredMethods.
|
|
100
|
+
Metrics/PerceivedComplexity:
|
|
101
|
+
Max: 9
|
|
33
102
|
|
|
34
103
|
# Offense count: 1
|
|
35
|
-
# Configuration parameters:
|
|
36
|
-
#
|
|
104
|
+
# Configuration parameters: ForbiddenDelimiters.
|
|
105
|
+
# ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
|
|
37
106
|
Naming/HeredocDelimiterNaming:
|
|
38
107
|
Exclude:
|
|
39
108
|
- 'spec/features/autocomplete_spec.rb'
|
|
40
109
|
|
|
41
|
-
# Offense count:
|
|
110
|
+
# Offense count: 80
|
|
42
111
|
# Configuration parameters: Prefixes.
|
|
43
112
|
# Prefixes: when, with, without
|
|
44
113
|
RSpec/ContextWording:
|
|
@@ -52,58 +121,122 @@ RSpec/DescribedClass:
|
|
|
52
121
|
Exclude:
|
|
53
122
|
- 'spec/presenters/arclight/show_presenter_spec.rb'
|
|
54
123
|
|
|
55
|
-
# Offense count:
|
|
124
|
+
# Offense count: 55
|
|
56
125
|
# Cop supports --auto-correct.
|
|
57
126
|
RSpec/EmptyLineAfterExampleGroup:
|
|
58
127
|
Enabled: false
|
|
59
128
|
|
|
60
|
-
# Offense count:
|
|
129
|
+
# Offense count: 10
|
|
61
130
|
# Cop supports --auto-correct.
|
|
62
131
|
RSpec/EmptyLineAfterHook:
|
|
63
132
|
Exclude:
|
|
64
133
|
- 'spec/features/collection_page_spec.rb'
|
|
65
134
|
- 'spec/features/home_page_spec.rb'
|
|
66
135
|
- 'spec/features/many_component_ead_spec.rb'
|
|
67
|
-
- 'spec/features/search_results_spec.rb'
|
|
68
136
|
- 'spec/helpers/arclight_helper_spec.rb'
|
|
69
|
-
- 'spec/views/_collection_count.html.erb_spec.rb'
|
|
70
137
|
- 'spec/views/repositories/index.html.erb_spec.rb'
|
|
71
138
|
|
|
72
|
-
# Offense count:
|
|
73
|
-
# Configuration parameters:
|
|
139
|
+
# Offense count: 63
|
|
140
|
+
# Configuration parameters: CountAsOne.
|
|
74
141
|
RSpec/ExampleLength:
|
|
75
|
-
|
|
142
|
+
Max: 49
|
|
76
143
|
|
|
77
|
-
# Offense count:
|
|
144
|
+
# Offense count: 3
|
|
78
145
|
RSpec/ExpectInHook:
|
|
79
146
|
Exclude:
|
|
80
147
|
- 'spec/helpers/arclight_helper_spec.rb'
|
|
81
|
-
- 'spec/presenters/arclight/index_presenter_spec.rb'
|
|
82
148
|
|
|
83
149
|
# Offense count: 1
|
|
84
|
-
# Configuration parameters: CustomTransform, IgnoreMethods.
|
|
150
|
+
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
|
|
151
|
+
# Include: **/*_spec*rb*, **/spec/**/*
|
|
85
152
|
RSpec/FilePath:
|
|
86
153
|
Exclude:
|
|
87
154
|
- 'spec/lib/arclight/viewers/oembed_spec.rb'
|
|
88
155
|
|
|
89
|
-
# Offense count:
|
|
90
|
-
# Configuration parameters: AggregateFailuresByDefault.
|
|
156
|
+
# Offense count: 133
|
|
91
157
|
RSpec/MultipleExpectations:
|
|
92
|
-
Max:
|
|
158
|
+
Max: 25
|
|
159
|
+
|
|
160
|
+
# Offense count: 30
|
|
161
|
+
# Configuration parameters: AllowSubject.
|
|
162
|
+
RSpec/MultipleMemoizedHelpers:
|
|
163
|
+
Max: 10
|
|
93
164
|
|
|
94
|
-
# Offense count:
|
|
165
|
+
# Offense count: 19
|
|
95
166
|
RSpec/NestedGroups:
|
|
96
167
|
Max: 4
|
|
97
168
|
|
|
98
169
|
# Offense count: 7
|
|
99
170
|
# Cop supports --auto-correct.
|
|
100
|
-
# Configuration parameters: Strict, EnforcedStyle.
|
|
171
|
+
# Configuration parameters: Strict, EnforcedStyle, AllowedExplicitMatchers.
|
|
101
172
|
# SupportedStyles: inflected, explicit
|
|
102
173
|
RSpec/PredicateMatcher:
|
|
103
174
|
Exclude:
|
|
104
175
|
- 'spec/helpers/arclight_helper_spec.rb'
|
|
105
176
|
- 'spec/lib/arclight/year_range_spec.rb'
|
|
106
177
|
|
|
178
|
+
# Offense count: 7
|
|
179
|
+
RSpec/StubbedMock:
|
|
180
|
+
Exclude:
|
|
181
|
+
- 'spec/helpers/arclight_helper_spec.rb'
|
|
182
|
+
- 'spec/lib/arclight/viewer_spec.rb'
|
|
183
|
+
|
|
184
|
+
# Offense count: 4
|
|
185
|
+
# Cop supports --auto-correct.
|
|
186
|
+
# Configuration parameters: NilOrEmpty, NotPresent, UnlessPresent.
|
|
187
|
+
Rails/Blank:
|
|
188
|
+
Exclude:
|
|
189
|
+
- 'app/controllers/concerns/arclight/ead_format_helpers.rb'
|
|
190
|
+
- 'lib/arclight/repository.rb'
|
|
191
|
+
|
|
192
|
+
# Offense count: 5
|
|
193
|
+
# Cop supports --auto-correct.
|
|
194
|
+
Rails/ContentTag:
|
|
195
|
+
Exclude:
|
|
196
|
+
- 'app/controllers/concerns/arclight/ead_format_helpers.rb'
|
|
197
|
+
- 'app/controllers/concerns/arclight/field_config_helpers.rb'
|
|
198
|
+
- 'app/helpers/arclight_helper.rb'
|
|
199
|
+
|
|
200
|
+
# Offense count: 1
|
|
201
|
+
# Configuration parameters: EnforcedStyle.
|
|
202
|
+
# SupportedStyles: slashes, arguments
|
|
203
|
+
Rails/FilePath:
|
|
204
|
+
Exclude:
|
|
205
|
+
- 'app/models/arclight/document_downloads.rb'
|
|
206
|
+
|
|
207
|
+
# Offense count: 1
|
|
208
|
+
# Configuration parameters: Include.
|
|
209
|
+
# Include: app/helpers/**/*.rb
|
|
210
|
+
Rails/HelperInstanceVariable:
|
|
211
|
+
Exclude:
|
|
212
|
+
- 'app/helpers/arclight_helper.rb'
|
|
213
|
+
|
|
214
|
+
# Offense count: 1
|
|
215
|
+
# Cop supports --auto-correct.
|
|
216
|
+
Rails/IndexWith:
|
|
217
|
+
Exclude:
|
|
218
|
+
- 'app/models/arclight/document_downloads.rb'
|
|
219
|
+
|
|
220
|
+
# Offense count: 1
|
|
221
|
+
Rails/OutputSafety:
|
|
222
|
+
Exclude:
|
|
223
|
+
- 'app/controllers/concerns/arclight/field_config_helpers.rb'
|
|
224
|
+
|
|
225
|
+
# Offense count: 1
|
|
226
|
+
# Cop supports --auto-correct.
|
|
227
|
+
Rails/Presence:
|
|
228
|
+
Exclude:
|
|
229
|
+
- 'lib/arclight/digital_object.rb'
|
|
230
|
+
|
|
231
|
+
# Offense count: 7
|
|
232
|
+
# Cop supports --auto-correct.
|
|
233
|
+
# Configuration parameters: Include.
|
|
234
|
+
# Include: **/Rakefile, **/*.rake
|
|
235
|
+
Rails/RakeEnvironment:
|
|
236
|
+
Exclude:
|
|
237
|
+
- 'lib/tasks/index.rake'
|
|
238
|
+
- 'tasks/arclight.rake'
|
|
239
|
+
|
|
107
240
|
# Offense count: 1
|
|
108
241
|
Security/Open:
|
|
109
242
|
Exclude:
|
|
@@ -111,7 +244,7 @@ Security/Open:
|
|
|
111
244
|
|
|
112
245
|
# Offense count: 1
|
|
113
246
|
# Cop supports --auto-correct.
|
|
114
|
-
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners.
|
|
247
|
+
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
|
115
248
|
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
|
116
249
|
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
|
117
250
|
# FunctionalMethods: let, let!, subject, watch
|
|
@@ -121,19 +254,51 @@ Style/BlockDelimiters:
|
|
|
121
254
|
- 'lib/tasks/index.rake'
|
|
122
255
|
|
|
123
256
|
# Offense count: 1
|
|
257
|
+
# Cop supports --auto-correct.
|
|
258
|
+
# Configuration parameters: Keywords.
|
|
259
|
+
# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE
|
|
260
|
+
Style/CommentAnnotation:
|
|
261
|
+
Exclude:
|
|
262
|
+
- 'app/models/concerns/arclight/solr_document.rb'
|
|
263
|
+
|
|
264
|
+
# Offense count: 1
|
|
265
|
+
# Cop supports --auto-correct.
|
|
124
266
|
Style/CommentedKeyword:
|
|
125
267
|
Exclude:
|
|
126
268
|
- 'lib/arclight/year_range.rb'
|
|
127
269
|
|
|
128
270
|
# Offense count: 1
|
|
271
|
+
# Configuration parameters: AllowedConstants.
|
|
129
272
|
Style/Documentation:
|
|
130
273
|
Exclude:
|
|
131
|
-
- 'spec/**/*'
|
|
132
|
-
- 'test/**/*'
|
|
133
274
|
- 'lib/arclight.rb'
|
|
134
275
|
|
|
276
|
+
# Offense count: 4
|
|
277
|
+
# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, IgnoredMethods.
|
|
278
|
+
# SupportedStyles: annotated, template, unannotated
|
|
279
|
+
Style/FormatStringToken:
|
|
280
|
+
EnforcedStyle: template
|
|
281
|
+
|
|
135
282
|
# Offense count: 1
|
|
136
283
|
# Cop supports --auto-correct.
|
|
284
|
+
Style/HashEachMethods:
|
|
285
|
+
Exclude:
|
|
286
|
+
- 'lib/arclight/repository.rb'
|
|
287
|
+
|
|
288
|
+
# Offense count: 2
|
|
289
|
+
# Cop supports --auto-correct.
|
|
137
290
|
Style/IfUnlessModifier:
|
|
138
291
|
Exclude:
|
|
139
292
|
- 'app/models/concerns/arclight/search_behavior.rb'
|
|
293
|
+
|
|
294
|
+
# Offense count: 1
|
|
295
|
+
# Cop supports --auto-correct.
|
|
296
|
+
Style/RedundantRegexpEscape:
|
|
297
|
+
Exclude:
|
|
298
|
+
- 'spec/features/collection_page_spec.rb'
|
|
299
|
+
|
|
300
|
+
# Offense count: 1
|
|
301
|
+
# Cop supports --auto-correct.
|
|
302
|
+
Style/StringConcatenation:
|
|
303
|
+
Exclude:
|
|
304
|
+
- 'spec/lib/arclight/repository_spec.rb'
|
data/Gemfile
CHANGED
|
@@ -4,6 +4,9 @@ source 'https://rubygems.org'
|
|
|
4
4
|
|
|
5
5
|
# Specify your gem's dependencies in arclight.gemspec
|
|
6
6
|
gemspec
|
|
7
|
+
|
|
8
|
+
gem 'rexml' if RUBY_VERSION >= '3'
|
|
9
|
+
|
|
7
10
|
# BEGIN ENGINE_CART BLOCK
|
|
8
11
|
# engine_cart: 1.1.0
|
|
9
12
|
# engine_cart stanza: 0.10.0
|
|
@@ -38,3 +41,5 @@ else
|
|
|
38
41
|
end
|
|
39
42
|
end
|
|
40
43
|
# END ENGINE_CART BLOCK
|
|
44
|
+
|
|
45
|
+
eval_gemfile File.expand_path('spec/test_app_templates/Gemfile.extra', File.dirname(__FILE__))
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
.breadcrumb-home-link {
|
|
22
22
|
margin-bottom: ($spacer / 4);
|
|
23
23
|
}
|
|
24
|
+
|
|
24
25
|
.al-show-actions-box {
|
|
25
26
|
border: $default-border-styling;
|
|
26
27
|
background-color: $gray-200;
|
|
@@ -81,7 +82,7 @@
|
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
// Show page breadcrumbs
|
|
84
|
-
@for $i from 1 to
|
|
85
|
+
@for $i from 1 to 20 {
|
|
85
86
|
.breadcrumb-item.breadcrumb-item-#{$i}.media {
|
|
86
87
|
padding-left: 0;
|
|
87
88
|
|
|
@@ -99,7 +100,7 @@
|
|
|
99
100
|
|
|
100
101
|
// Show page metadata.
|
|
101
102
|
// Indent to match terminal show page breadcrumb.
|
|
102
|
-
@for $i from 1 to
|
|
103
|
+
@for $i from 1 to 20 {
|
|
103
104
|
.al-metadata-section.breadcrumb-item-#{$i} {
|
|
104
105
|
padding-left: 0;
|
|
105
106
|
|
|
@@ -117,7 +117,7 @@ module ArclightHelper
|
|
|
117
117
|
end
|
|
118
118
|
|
|
119
119
|
def collection_active?
|
|
120
|
-
|
|
120
|
+
respond_to?(:search_state) && search_state&.params_for_search&.dig('f', 'level_sim') == ['Collection']
|
|
121
121
|
end
|
|
122
122
|
|
|
123
123
|
def collection_active_class
|
|
@@ -129,7 +129,7 @@ module ArclightHelper
|
|
|
129
129
|
end
|
|
130
130
|
|
|
131
131
|
def grouped?
|
|
132
|
-
|
|
132
|
+
respond_to?(:search_state) && search_state&.params_for_search&.dig('group') == 'true'
|
|
133
133
|
end
|
|
134
134
|
|
|
135
135
|
def search_with_group
|
|
@@ -167,7 +167,7 @@ module ArclightHelper
|
|
|
167
167
|
#
|
|
168
168
|
# @return [Repository]
|
|
169
169
|
def repository_faceted_on
|
|
170
|
-
return unless
|
|
170
|
+
return unless respond_to?(:search_state) && search_state && facet_field_in_params?('repository_sim')
|
|
171
171
|
|
|
172
172
|
repos = Array(facet_params('repository_sim'))
|
|
173
173
|
faceted = repos && repos.length == 1 && repos.first
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<% document ||= @document %>
|
|
2
2
|
<% if parsed_files = ead_files(document) %>
|
|
3
3
|
<% aeon_web_ead ||= Arclight::Requests::AeonWebEad.new(document, parsed_files.href) %>
|
|
4
|
-
<% aeon_web_ead_url = aeon_web_ead
|
|
4
|
+
<% aeon_web_ead_url = aeon_web_ead&.url %>
|
|
5
5
|
|
|
6
6
|
<%= link_to 'Request', aeon_web_ead_url, class: 'btn btn-secondary btn-sm' %>
|
|
7
7
|
<% end %>
|
|
@@ -21,7 +21,11 @@
|
|
|
21
21
|
<% end %>
|
|
22
22
|
|
|
23
23
|
<label for="q" class="sr-only"><%= t('blacklight.search.form.search.label') %></label>
|
|
24
|
-
|
|
24
|
+
<%
|
|
25
|
+
# Use "autocomplete_path: suggest_index_catalog_path" explicitly so that the RepositoriesController gets the appropriate
|
|
26
|
+
# autocomplete path w/o having to have the search form action be local to the controller (by including Blacklight::Catalog)
|
|
27
|
+
%>
|
|
28
|
+
<%= text_field_tag :q, params[:q], placeholder: t('blacklight.search.form.search.placeholder'), class: "search-q q rounded-0 form-control", id: "q", autofocus: presenter.autofocus?, data: { autocomplete_enabled: presenter.autocomplete_enabled?, autocomplete_path: suggest_index_catalog_path } %>
|
|
25
29
|
|
|
26
30
|
<span class="input-group-append">
|
|
27
31
|
<button type="submit" class="btn btn-primary search-btn" id="search">
|
data/arclight.gemspec
CHANGED
|
@@ -23,20 +23,21 @@ Gem::Specification.new do |spec|
|
|
|
23
23
|
spec.require_paths = ['lib']
|
|
24
24
|
|
|
25
25
|
spec.add_dependency 'blacklight', '~> 7.2'
|
|
26
|
-
spec.add_dependency 'blacklight_range_limit', '
|
|
27
|
-
spec.add_dependency 'rails', '>=
|
|
28
|
-
spec.add_dependency '
|
|
26
|
+
spec.add_dependency 'blacklight_range_limit', '>= 7.1', '< 9'
|
|
27
|
+
spec.add_dependency 'rails', '>= 6', '< 7.1'
|
|
28
|
+
spec.add_dependency 'rexml'
|
|
29
29
|
spec.add_dependency 'traject', '~> 3.0'
|
|
30
|
-
spec.add_dependency 'traject_plus', '~>
|
|
30
|
+
spec.add_dependency 'traject_plus', '~> 2.0'
|
|
31
31
|
|
|
32
|
-
spec.add_development_dependency 'bundler'
|
|
32
|
+
spec.add_development_dependency 'bundler'
|
|
33
33
|
spec.add_development_dependency 'capybara'
|
|
34
34
|
spec.add_development_dependency 'engine_cart'
|
|
35
35
|
spec.add_development_dependency 'i18n-tasks'
|
|
36
|
-
spec.add_development_dependency 'rake', '
|
|
36
|
+
spec.add_development_dependency 'rake', '>= 12.0'
|
|
37
37
|
spec.add_development_dependency 'rspec-rails'
|
|
38
|
-
spec.add_development_dependency 'rubocop', '~>
|
|
39
|
-
spec.add_development_dependency 'rubocop-
|
|
38
|
+
spec.add_development_dependency 'rubocop', '~> 1.8'
|
|
39
|
+
spec.add_development_dependency 'rubocop-rails', '~> 2.8'
|
|
40
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 2.3'
|
|
40
41
|
spec.add_development_dependency 'selenium-webdriver'
|
|
41
42
|
spec.add_development_dependency 'simplecov'
|
|
42
43
|
spec.add_development_dependency 'solr_wrapper'
|
data/lib/arclight/engine.rb
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'sprockets/bumble_d'
|
|
4
3
|
require 'blacklight'
|
|
5
4
|
require 'traject'
|
|
6
5
|
require 'active_model'
|
|
@@ -15,13 +14,6 @@ module Arclight
|
|
|
15
14
|
##
|
|
16
15
|
# This is the defining class for the Arclight Rails Engine
|
|
17
16
|
class Engine < ::Rails::Engine
|
|
18
|
-
extend ::Sprockets::BumbleD::DSL
|
|
19
|
-
|
|
20
|
-
# We're not sure this is right, but we aren't doing module imports
|
|
21
|
-
# at the moment anyway
|
|
22
|
-
register_umd_globals :arclight,
|
|
23
|
-
'blacklight' => 'Blacklight'
|
|
24
|
-
|
|
25
17
|
config.viewer_class = Arclight::Viewers::OEmbed
|
|
26
18
|
config.oembed_resource_exclude_patterns = [/\.pdf$/, /\.ppt$/]
|
|
27
19
|
|
|
@@ -60,7 +52,9 @@ module Arclight
|
|
|
60
52
|
end
|
|
61
53
|
|
|
62
54
|
initializer 'arclight.helpers' do
|
|
63
|
-
|
|
55
|
+
config.after_initialize do
|
|
56
|
+
ActionView::Base.send :include, ArclightHelper
|
|
57
|
+
end
|
|
64
58
|
end
|
|
65
59
|
end
|
|
66
60
|
end
|
data/lib/arclight/repository.rb
CHANGED
|
@@ -117,8 +117,8 @@ module Arclight
|
|
|
117
117
|
# @param [String] `slug` or `name` -- same as `find_by`
|
|
118
118
|
# @return [Repository]
|
|
119
119
|
# @raise [ActiveRecord::RecordNotFound] if cannot find repository
|
|
120
|
-
def self.find_by!(
|
|
121
|
-
repository = find_by(
|
|
120
|
+
def self.find_by!(**kwargs)
|
|
121
|
+
repository = find_by(**kwargs)
|
|
122
122
|
raise ActiveRecord::RecordNotFound if repository.blank?
|
|
123
123
|
|
|
124
124
|
repository
|
data/lib/arclight/version.rb
CHANGED
|
@@ -96,7 +96,11 @@ class CatalogController < ApplicationController
|
|
|
96
96
|
config.add_facet_field 'places_ssim', label: 'Places', show: false
|
|
97
97
|
config.add_facet_field 'access_subjects_ssim', label: 'Subject', limit: 10
|
|
98
98
|
config.add_facet_field 'component_level_isim', show: false
|
|
99
|
+
|
|
100
|
+
# Note that parent_ssim is an array of all ancestor nodes, including the parent
|
|
101
|
+
# parent_ssi is just the immediate parent; it's used in queries for context nav
|
|
99
102
|
config.add_facet_field 'parent_ssim', show: false
|
|
103
|
+
config.add_facet_field 'parent_ssi', show: false
|
|
100
104
|
|
|
101
105
|
# Have BL send all facet field names to Solr, which has been the default
|
|
102
106
|
# previously. Simply remove these lines if you'd rather use Solr request
|
data/package.json
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
"description": "",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@babel/core": "^7.
|
|
7
|
-
"@babel/plugin-external-helpers": "^7.
|
|
8
|
-
"@babel/plugin-transform-modules-umd": "^7.
|
|
9
|
-
"@babel/preset-env": "^7.
|
|
6
|
+
"@babel/core": "^7.18.5",
|
|
7
|
+
"@babel/plugin-external-helpers": "^7.17.12",
|
|
8
|
+
"@babel/plugin-transform-modules-umd": "^7.18.0",
|
|
9
|
+
"@babel/preset-env": "^7.18.2"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"eslint": "^3.19.0",
|
data/solr/conf/schema.xml
CHANGED
|
@@ -244,8 +244,8 @@
|
|
|
244
244
|
</analyzer>
|
|
245
245
|
</fieldType>
|
|
246
246
|
|
|
247
|
-
<!-- A specialized field for geospatial search
|
|
248
|
-
<fieldType name="location" class="solr.
|
|
247
|
+
<!-- A specialized field for geospatial search filters and distance sorting. -->
|
|
248
|
+
<fieldType name="location" class="solr.LatLonPointSpatialField" docValues="true" />
|
|
249
249
|
|
|
250
250
|
<fieldType name="_nest_path_" class="solr.NestPathField" />
|
|
251
251
|
|
data/solr/conf/solrconfig.xml
CHANGED
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
-->
|
|
31
31
|
<luceneMatchVersion>8.2.0</luceneMatchVersion>
|
|
32
32
|
|
|
33
|
+
<lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib" />
|
|
33
34
|
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" />
|
|
34
35
|
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" />
|
|
35
36
|
|
data/template.rb
CHANGED
metadata
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: arclight
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Darren Hardy
|
|
8
8
|
- Jessie Keck
|
|
9
9
|
- Gordon Leacock
|
|
10
10
|
- Jack Reed
|
|
11
|
-
autorequire:
|
|
11
|
+
autorequire:
|
|
12
12
|
bindir: exe
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date:
|
|
14
|
+
date: 2022-06-23 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: blacklight
|
|
@@ -31,38 +31,44 @@ dependencies:
|
|
|
31
31
|
name: blacklight_range_limit
|
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
|
33
33
|
requirements:
|
|
34
|
-
- - "
|
|
34
|
+
- - ">="
|
|
35
35
|
- !ruby/object:Gem::Version
|
|
36
36
|
version: '7.1'
|
|
37
|
+
- - "<"
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '9'
|
|
37
40
|
type: :runtime
|
|
38
41
|
prerelease: false
|
|
39
42
|
version_requirements: !ruby/object:Gem::Requirement
|
|
40
43
|
requirements:
|
|
41
|
-
- - "
|
|
44
|
+
- - ">="
|
|
42
45
|
- !ruby/object:Gem::Version
|
|
43
46
|
version: '7.1'
|
|
47
|
+
- - "<"
|
|
48
|
+
- !ruby/object:Gem::Version
|
|
49
|
+
version: '9'
|
|
44
50
|
- !ruby/object:Gem::Dependency
|
|
45
51
|
name: rails
|
|
46
52
|
requirement: !ruby/object:Gem::Requirement
|
|
47
53
|
requirements:
|
|
48
54
|
- - ">="
|
|
49
55
|
- !ruby/object:Gem::Version
|
|
50
|
-
version:
|
|
56
|
+
version: '6'
|
|
51
57
|
- - "<"
|
|
52
58
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: '
|
|
59
|
+
version: '7.1'
|
|
54
60
|
type: :runtime
|
|
55
61
|
prerelease: false
|
|
56
62
|
version_requirements: !ruby/object:Gem::Requirement
|
|
57
63
|
requirements:
|
|
58
64
|
- - ">="
|
|
59
65
|
- !ruby/object:Gem::Version
|
|
60
|
-
version:
|
|
66
|
+
version: '6'
|
|
61
67
|
- - "<"
|
|
62
68
|
- !ruby/object:Gem::Version
|
|
63
|
-
version: '
|
|
69
|
+
version: '7.1'
|
|
64
70
|
- !ruby/object:Gem::Dependency
|
|
65
|
-
name:
|
|
71
|
+
name: rexml
|
|
66
72
|
requirement: !ruby/object:Gem::Requirement
|
|
67
73
|
requirements:
|
|
68
74
|
- - ">="
|
|
@@ -95,28 +101,28 @@ dependencies:
|
|
|
95
101
|
requirements:
|
|
96
102
|
- - "~>"
|
|
97
103
|
- !ruby/object:Gem::Version
|
|
98
|
-
version: '
|
|
104
|
+
version: '2.0'
|
|
99
105
|
type: :runtime
|
|
100
106
|
prerelease: false
|
|
101
107
|
version_requirements: !ruby/object:Gem::Requirement
|
|
102
108
|
requirements:
|
|
103
109
|
- - "~>"
|
|
104
110
|
- !ruby/object:Gem::Version
|
|
105
|
-
version: '
|
|
111
|
+
version: '2.0'
|
|
106
112
|
- !ruby/object:Gem::Dependency
|
|
107
113
|
name: bundler
|
|
108
114
|
requirement: !ruby/object:Gem::Requirement
|
|
109
115
|
requirements:
|
|
110
|
-
- - "
|
|
116
|
+
- - ">="
|
|
111
117
|
- !ruby/object:Gem::Version
|
|
112
|
-
version: '
|
|
118
|
+
version: '0'
|
|
113
119
|
type: :development
|
|
114
120
|
prerelease: false
|
|
115
121
|
version_requirements: !ruby/object:Gem::Requirement
|
|
116
122
|
requirements:
|
|
117
|
-
- - "
|
|
123
|
+
- - ">="
|
|
118
124
|
- !ruby/object:Gem::Version
|
|
119
|
-
version: '
|
|
125
|
+
version: '0'
|
|
120
126
|
- !ruby/object:Gem::Dependency
|
|
121
127
|
name: capybara
|
|
122
128
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -163,14 +169,14 @@ dependencies:
|
|
|
163
169
|
name: rake
|
|
164
170
|
requirement: !ruby/object:Gem::Requirement
|
|
165
171
|
requirements:
|
|
166
|
-
- - "
|
|
172
|
+
- - ">="
|
|
167
173
|
- !ruby/object:Gem::Version
|
|
168
174
|
version: '12.0'
|
|
169
175
|
type: :development
|
|
170
176
|
prerelease: false
|
|
171
177
|
version_requirements: !ruby/object:Gem::Requirement
|
|
172
178
|
requirements:
|
|
173
|
-
- - "
|
|
179
|
+
- - ">="
|
|
174
180
|
- !ruby/object:Gem::Version
|
|
175
181
|
version: '12.0'
|
|
176
182
|
- !ruby/object:Gem::Dependency
|
|
@@ -193,28 +199,42 @@ dependencies:
|
|
|
193
199
|
requirements:
|
|
194
200
|
- - "~>"
|
|
195
201
|
- !ruby/object:Gem::Version
|
|
196
|
-
version:
|
|
202
|
+
version: '1.8'
|
|
203
|
+
type: :development
|
|
204
|
+
prerelease: false
|
|
205
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
206
|
+
requirements:
|
|
207
|
+
- - "~>"
|
|
208
|
+
- !ruby/object:Gem::Version
|
|
209
|
+
version: '1.8'
|
|
210
|
+
- !ruby/object:Gem::Dependency
|
|
211
|
+
name: rubocop-rails
|
|
212
|
+
requirement: !ruby/object:Gem::Requirement
|
|
213
|
+
requirements:
|
|
214
|
+
- - "~>"
|
|
215
|
+
- !ruby/object:Gem::Version
|
|
216
|
+
version: '2.8'
|
|
197
217
|
type: :development
|
|
198
218
|
prerelease: false
|
|
199
219
|
version_requirements: !ruby/object:Gem::Requirement
|
|
200
220
|
requirements:
|
|
201
221
|
- - "~>"
|
|
202
222
|
- !ruby/object:Gem::Version
|
|
203
|
-
version:
|
|
223
|
+
version: '2.8'
|
|
204
224
|
- !ruby/object:Gem::Dependency
|
|
205
225
|
name: rubocop-rspec
|
|
206
226
|
requirement: !ruby/object:Gem::Requirement
|
|
207
227
|
requirements:
|
|
208
228
|
- - "~>"
|
|
209
229
|
- !ruby/object:Gem::Version
|
|
210
|
-
version: '
|
|
230
|
+
version: '2.3'
|
|
211
231
|
type: :development
|
|
212
232
|
prerelease: false
|
|
213
233
|
version_requirements: !ruby/object:Gem::Requirement
|
|
214
234
|
requirements:
|
|
215
235
|
- - "~>"
|
|
216
236
|
- !ruby/object:Gem::Version
|
|
217
|
-
version: '
|
|
237
|
+
version: '2.3'
|
|
218
238
|
- !ruby/object:Gem::Dependency
|
|
219
239
|
name: selenium-webdriver
|
|
220
240
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -470,7 +490,7 @@ homepage: https://github.com/sul-dlss/arclight
|
|
|
470
490
|
licenses:
|
|
471
491
|
- Apache-2.0
|
|
472
492
|
metadata: {}
|
|
473
|
-
post_install_message:
|
|
493
|
+
post_install_message:
|
|
474
494
|
rdoc_options: []
|
|
475
495
|
require_paths:
|
|
476
496
|
- lib
|
|
@@ -485,8 +505,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
485
505
|
- !ruby/object:Gem::Version
|
|
486
506
|
version: '0'
|
|
487
507
|
requirements: []
|
|
488
|
-
rubygems_version: 3.
|
|
489
|
-
signing_key:
|
|
508
|
+
rubygems_version: 3.2.32
|
|
509
|
+
signing_key:
|
|
490
510
|
specification_version: 4
|
|
491
511
|
summary: ''
|
|
492
512
|
test_files: []
|