blacklight 7.5.1 → 7.9.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/.docker/app/Dockerfile +26 -0
- data/.docker/app/entrypoint.sh +6 -0
- data/.env +5 -0
- data/.gitignore +0 -1
- data/.rubocop_todo.yml +25 -36
- data/.travis.yml +15 -23
- data/Gemfile +4 -1
- data/README.md +4 -0
- data/VERSION +1 -1
- data/app/assets/stylesheets/blacklight/_facets.scss +20 -4
- data/app/assets/stylesheets/blacklight/_pagination.scss +4 -0
- data/app/components/blacklight/constraint_layout_component.html.erb +23 -0
- data/app/components/blacklight/constraint_layout_component.rb +16 -0
- data/app/components/blacklight/facet_field_component.html.erb +25 -0
- data/app/components/blacklight/facet_field_component.rb +11 -0
- data/app/components/blacklight/facet_field_list_component.html.erb +18 -0
- data/app/components/blacklight/facet_field_list_component.rb +22 -0
- data/app/components/blacklight/facet_field_no_layout_component.rb +13 -0
- data/app/components/blacklight/facet_item_component.rb +120 -0
- data/app/components/blacklight/facet_item_pivot_component.rb +84 -0
- data/app/helpers/blacklight/blacklight_helper_behavior.rb +4 -2
- data/app/helpers/blacklight/catalog_helper_behavior.rb +2 -4
- data/app/helpers/blacklight/configuration_helper_behavior.rb +3 -2
- data/app/helpers/blacklight/facets_helper_behavior.rb +92 -49
- data/app/helpers/blacklight/render_constraints_helper_behavior.rb +64 -33
- data/app/javascript/blacklight/modal.js +1 -1
- data/app/models/blacklight/icon.rb +13 -11
- data/app/models/concerns/blacklight/document.rb +0 -10
- data/app/models/concerns/blacklight/document/extensions.rb +3 -0
- data/app/models/concerns/blacklight/document/semantic_fields.rb +0 -4
- data/app/presenters/blacklight/document_presenter.rb +27 -36
- data/app/presenters/blacklight/facet_field_presenter.rb +57 -0
- data/app/presenters/blacklight/facet_item_presenter.rb +81 -0
- data/app/presenters/blacklight/field_presenter.rb +31 -6
- data/app/presenters/blacklight/index_presenter.rb +2 -2
- data/app/presenters/blacklight/show_presenter.rb +3 -3
- data/app/views/catalog/_citation.html.erb +1 -1
- data/app/views/catalog/_constraints.html.erb +3 -3
- data/app/views/catalog/_constraints_element.html.erb +5 -24
- data/app/views/catalog/_email_form.html.erb +1 -1
- data/app/views/catalog/_facet_layout.html.erb +8 -17
- data/app/views/catalog/_facet_limit.html.erb +3 -12
- data/app/views/catalog/_facet_pagination.html.erb +2 -2
- data/app/views/catalog/_facet_pivot.html.erb +3 -18
- data/app/views/catalog/_field.json.jbuilder +2 -2
- data/app/views/catalog/_index.html.erb +3 -3
- data/app/views/catalog/_previous_next_doc.html.erb +5 -5
- data/app/views/catalog/_search_form.html.erb +1 -1
- data/app/views/catalog/_show.html.erb +3 -3
- data/app/views/catalog/_sms_form.html.erb +1 -1
- data/app/views/catalog/_sort_and_per_page.html.erb +1 -1
- data/app/views/catalog/_start_over.html.erb +1 -0
- data/app/views/catalog/_thumbnail.html.erb +1 -1
- data/app/views/catalog/index.json.jbuilder +2 -1
- data/app/views/catalog/show.html.erb +1 -1
- data/app/views/catalog/show.json.jbuilder +2 -1
- data/app/views/layouts/blacklight/base.html.erb +2 -2
- data/blacklight.gemspec +1 -0
- data/config/locales/blacklight.ar.yml +33 -24
- data/config/locales/blacklight.de.yml +5 -0
- data/config/locales/blacklight.en.yml +5 -0
- data/config/locales/blacklight.es.yml +5 -0
- data/config/locales/blacklight.fr.yml +5 -0
- data/config/locales/blacklight.hu.yml +5 -0
- data/config/locales/blacklight.it.yml +5 -0
- data/config/locales/blacklight.nl.yml +5 -0
- data/config/locales/blacklight.pt-BR.yml +5 -0
- data/config/locales/blacklight.sq.yml +5 -0
- data/config/locales/blacklight.zh.yml +5 -0
- data/docker-compose.yml +35 -0
- data/lib/blacklight/configuration.rb +35 -8
- data/lib/blacklight/configuration/field.rb +5 -4
- data/lib/blacklight/engine.rb +2 -6
- data/lib/blacklight/search_state.rb +52 -0
- data/lib/blacklight/solr/response/facets.rb +2 -0
- data/lib/generators/blacklight/assets_generator.rb +10 -0
- data/lib/generators/blacklight/templates/catalog_controller.rb +1 -1
- data/package-lock.json +4 -4
- data/package.json +2 -2
- data/spec/{views/catalog/_constraints_element.html.erb_spec.rb → components/blacklight/constraint_layout_component_spec.rb} +22 -12
- data/spec/components/blacklight/facet_field_list_component_spec.rb +108 -0
- data/spec/components/blacklight/facet_item_component_spec.rb +50 -0
- data/spec/components/blacklight/facet_item_pivot_component_spec.rb +66 -0
- data/spec/features/facets_spec.rb +21 -1
- data/spec/helpers/blacklight/configuration_helper_behavior_spec.rb +3 -0
- data/spec/helpers/blacklight/facets_helper_behavior_spec.rb +24 -12
- data/spec/helpers/blacklight/render_constraints_helper_behavior_spec.rb +4 -23
- data/spec/helpers/blacklight_helper_spec.rb +17 -0
- data/spec/helpers/catalog_helper_spec.rb +0 -7
- data/spec/lib/blacklight/search_state_spec.rb +50 -0
- data/spec/models/blacklight/configuration_spec.rb +4 -0
- data/spec/models/blacklight/icon_spec.rb +11 -10
- data/spec/models/blacklight/solr/response/facets_spec.rb +30 -1
- data/spec/presenters/blacklight/document_presenter_spec.rb +22 -62
- data/spec/presenters/blacklight/facet_field_presenter_spec.rb +109 -0
- data/spec/presenters/blacklight/facet_item_presenter_spec.rb +92 -0
- data/spec/presenters/blacklight/field_presenter_spec.rb +268 -0
- data/spec/presenters/blacklight/index_presenter_spec.rb +0 -142
- data/spec/presenters/blacklight/show_presenter_spec.rb +0 -177
- data/spec/spec_helper.rb +3 -0
- data/spec/support/presenter_test_helpers.rb +11 -0
- data/spec/views/catalog/_facet_group.html.erb_spec.rb +1 -0
- data/spec/views/catalog/_previous_next_doc.html.erb_spec.rb +18 -0
- data/tasks/blacklight.rake +30 -23
- metadata +51 -7
- data/Vagrantfile +0 -79
- data/provision.sh +0 -30
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bd2196992d71cdb76b3080eb944caa30d0534fd0b8954f641e50ba6287e00c75
|
|
4
|
+
data.tar.gz: 3d273772786614bae0a216a1be97b038d90f24c1ddea1aee25a3a993613bed97
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 57ea5cb5460c6eff4a4554f73c8da22552984a9860ccb116f251d8f799d057b9b864e15b722319548c390df4fa686a9f46a96be5972b56eef46d9271e3e37368
|
|
7
|
+
data.tar.gz: b364146ff5cec3708b246b917bf09cd11000e92e6e6d7103b363479c342091d1da759bc952718788476b83abd4b32c95365a52206337118ac8782f257e59376f
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
ARG ALPINE_RUBY_VERSION
|
|
2
|
+
|
|
3
|
+
FROM ruby:${ALPINE_RUBY_VERSION}-alpine
|
|
4
|
+
|
|
5
|
+
RUN apk add --update --no-cache \
|
|
6
|
+
bash \
|
|
7
|
+
build-base \
|
|
8
|
+
git \
|
|
9
|
+
libxml2-dev \
|
|
10
|
+
libxslt-dev \
|
|
11
|
+
nodejs \
|
|
12
|
+
sqlite-dev \
|
|
13
|
+
tzdata
|
|
14
|
+
|
|
15
|
+
RUN mkdir /app
|
|
16
|
+
WORKDIR /app
|
|
17
|
+
|
|
18
|
+
RUN gem update --system && \
|
|
19
|
+
gem install bundler && \
|
|
20
|
+
bundle config build.nokogiri --use-system-libraries
|
|
21
|
+
|
|
22
|
+
COPY . .
|
|
23
|
+
|
|
24
|
+
EXPOSE 3000
|
|
25
|
+
|
|
26
|
+
CMD [".docker/app/entrypoint.sh"]
|
data/.env
ADDED
data/.gitignore
CHANGED
data/.rubocop_todo.yml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on
|
|
3
|
+
# on 2020-03-30 10:03:33 -0700 using RuboCop version 0.63.1.
|
|
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
|
|
@@ -36,17 +36,16 @@ Layout/ClosingParenthesisIndentation:
|
|
|
36
36
|
Exclude:
|
|
37
37
|
- 'app/views/catalog/index.atom.builder'
|
|
38
38
|
|
|
39
|
-
# Offense count:
|
|
39
|
+
# Offense count: 109
|
|
40
40
|
# Cop supports --auto-correct.
|
|
41
41
|
Layout/EmptyLineAfterMagicComment:
|
|
42
42
|
Enabled: false
|
|
43
43
|
|
|
44
|
-
# Offense count:
|
|
44
|
+
# Offense count: 7
|
|
45
45
|
# Cop supports --auto-correct.
|
|
46
46
|
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
|
|
47
47
|
Layout/ExtraSpacing:
|
|
48
48
|
Exclude:
|
|
49
|
-
- 'app/helpers/blacklight/catalog_helper_behavior.rb'
|
|
50
49
|
- 'app/models/concerns/blacklight/document/dublin_core.rb'
|
|
51
50
|
- 'app/models/record_mailer.rb'
|
|
52
51
|
- 'app/views/catalog/index.atom.builder'
|
|
@@ -126,13 +125,6 @@ Layout/SpaceInsideParens:
|
|
|
126
125
|
- 'app/views/catalog/_document.rss.builder'
|
|
127
126
|
- 'app/views/catalog/index.atom.builder'
|
|
128
127
|
|
|
129
|
-
# Offense count: 1
|
|
130
|
-
# Cop supports --auto-correct.
|
|
131
|
-
# Configuration parameters: AllowInHeredoc.
|
|
132
|
-
Layout/TrailingWhitespace:
|
|
133
|
-
Exclude:
|
|
134
|
-
- 'app/views/catalog/_document.rss.builder'
|
|
135
|
-
|
|
136
128
|
# Offense count: 1
|
|
137
129
|
Lint/AmbiguousBlockAssociation:
|
|
138
130
|
Exclude:
|
|
@@ -185,7 +177,7 @@ Lint/UselessComparison:
|
|
|
185
177
|
Exclude:
|
|
186
178
|
- 'spec/models/blacklight/document/active_model_shim_spec.rb'
|
|
187
179
|
|
|
188
|
-
# Offense count:
|
|
180
|
+
# Offense count: 60
|
|
189
181
|
Metrics/AbcSize:
|
|
190
182
|
Max: 49
|
|
191
183
|
|
|
@@ -207,26 +199,26 @@ Metrics/ClassLength:
|
|
|
207
199
|
|
|
208
200
|
# Offense count: 19
|
|
209
201
|
Metrics/CyclomaticComplexity:
|
|
210
|
-
Max:
|
|
202
|
+
Max: 11
|
|
211
203
|
|
|
212
|
-
# Offense count:
|
|
204
|
+
# Offense count: 56
|
|
213
205
|
# Configuration parameters: CountComments, ExcludedMethods.
|
|
214
206
|
Metrics/MethodLength:
|
|
215
|
-
Max:
|
|
207
|
+
Max: 30
|
|
216
208
|
|
|
217
209
|
# Offense count: 8
|
|
218
210
|
# Configuration parameters: CountComments.
|
|
219
211
|
Metrics/ModuleLength:
|
|
220
212
|
Max: 212
|
|
221
213
|
|
|
222
|
-
# Offense count:
|
|
214
|
+
# Offense count: 5
|
|
223
215
|
# Configuration parameters: CountKeywordArgs.
|
|
224
216
|
Metrics/ParameterLists:
|
|
225
|
-
Max:
|
|
217
|
+
Max: 7
|
|
226
218
|
|
|
227
219
|
# Offense count: 16
|
|
228
220
|
Metrics/PerceivedComplexity:
|
|
229
|
-
Max:
|
|
221
|
+
Max: 13
|
|
230
222
|
|
|
231
223
|
# Offense count: 4
|
|
232
224
|
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
|
|
@@ -253,12 +245,11 @@ Naming/UncommunicativeMethodParamName:
|
|
|
253
245
|
- 'spec/features/search_context_spec.rb'
|
|
254
246
|
- 'spec/features/search_results_spec.rb'
|
|
255
247
|
|
|
256
|
-
# Offense count:
|
|
248
|
+
# Offense count: 14
|
|
257
249
|
# Configuration parameters: EnforcedStyle.
|
|
258
250
|
# SupportedStyles: snake_case, normalcase, non_integer
|
|
259
251
|
Naming/VariableNumber:
|
|
260
252
|
Exclude:
|
|
261
|
-
- 'spec/views/catalog/_facets.html.erb_spec.rb'
|
|
262
253
|
- 'spec/views/catalog/_index.html.erb_spec.rb'
|
|
263
254
|
- 'spec/views/catalog/_show.html.erb_spec.rb'
|
|
264
255
|
|
|
@@ -290,13 +281,13 @@ RSpec/BeforeAfterAll:
|
|
|
290
281
|
- 'spec/models/blacklight/document/sms_spec.rb'
|
|
291
282
|
- 'spec/models/blacklight/solr/document_spec.rb'
|
|
292
283
|
|
|
293
|
-
# Offense count:
|
|
284
|
+
# Offense count: 77
|
|
294
285
|
# Configuration parameters: Prefixes.
|
|
295
286
|
# Prefixes: when, with, without
|
|
296
287
|
RSpec/ContextWording:
|
|
297
288
|
Enabled: false
|
|
298
289
|
|
|
299
|
-
# Offense count:
|
|
290
|
+
# Offense count: 56
|
|
300
291
|
RSpec/DescribeClass:
|
|
301
292
|
Enabled: false
|
|
302
293
|
|
|
@@ -306,7 +297,7 @@ RSpec/EmptyExampleGroup:
|
|
|
306
297
|
Exclude:
|
|
307
298
|
- 'spec/models/blacklight/solr/search_builder_spec.rb'
|
|
308
299
|
|
|
309
|
-
# Offense count:
|
|
300
|
+
# Offense count: 130
|
|
310
301
|
# Configuration parameters: Max.
|
|
311
302
|
RSpec/ExampleLength:
|
|
312
303
|
Enabled: false
|
|
@@ -330,7 +321,7 @@ RSpec/FilePath:
|
|
|
330
321
|
- 'spec/presenters/pipeline_spec.rb'
|
|
331
322
|
- 'spec/presenters/thumbnail_presenter_spec.rb'
|
|
332
323
|
|
|
333
|
-
# Offense count:
|
|
324
|
+
# Offense count: 191
|
|
334
325
|
# Configuration parameters: AssignmentOnly.
|
|
335
326
|
RSpec/InstanceVariable:
|
|
336
327
|
Enabled: false
|
|
@@ -358,10 +349,10 @@ RSpec/LeakyConstantDeclaration:
|
|
|
358
349
|
RSpec/MessageChain:
|
|
359
350
|
Exclude:
|
|
360
351
|
- 'spec/controllers/bookmarks_controller_spec.rb'
|
|
361
|
-
- 'spec/presenters/blacklight/
|
|
352
|
+
- 'spec/presenters/blacklight/field_presenter_spec.rb'
|
|
362
353
|
- 'spec/views/shared/_user_util_links.html.erb_spec.rb'
|
|
363
354
|
|
|
364
|
-
# Offense count:
|
|
355
|
+
# Offense count: 61
|
|
365
356
|
# Configuration parameters: EnforcedStyle.
|
|
366
357
|
# SupportedStyles: have_received, receive
|
|
367
358
|
RSpec/MessageSpies:
|
|
@@ -377,16 +368,15 @@ RSpec/MessageSpies:
|
|
|
377
368
|
- 'spec/lib/blacklight/configuration/facet_field_spec.rb'
|
|
378
369
|
- 'spec/models/blacklight/search_builder_spec.rb'
|
|
379
370
|
- 'spec/models/blacklight/suggest_search_spec.rb'
|
|
380
|
-
- 'spec/presenters/blacklight/
|
|
381
|
-
- 'spec/presenters/blacklight/show_presenter_spec.rb'
|
|
371
|
+
- 'spec/presenters/blacklight/field_presenter_spec.rb'
|
|
382
372
|
- 'spec/presenters/thumbnail_presenter_spec.rb'
|
|
383
373
|
|
|
384
|
-
# Offense count:
|
|
374
|
+
# Offense count: 343
|
|
385
375
|
# Configuration parameters: AggregateFailuresByDefault.
|
|
386
376
|
RSpec/MultipleExpectations:
|
|
387
377
|
Max: 16
|
|
388
378
|
|
|
389
|
-
# Offense count:
|
|
379
|
+
# Offense count: 341
|
|
390
380
|
# Configuration parameters: IgnoreSharedExamples.
|
|
391
381
|
RSpec/NamedSubject:
|
|
392
382
|
Enabled: false
|
|
@@ -403,10 +393,9 @@ RSpec/RepeatedDescription:
|
|
|
403
393
|
- 'spec/helpers/catalog_helper_spec.rb'
|
|
404
394
|
- 'spec/models/blacklight/solr/search_builder_spec.rb'
|
|
405
395
|
|
|
406
|
-
# Offense count:
|
|
396
|
+
# Offense count: 2
|
|
407
397
|
RSpec/RepeatedExample:
|
|
408
398
|
Exclude:
|
|
409
|
-
- 'spec/features/search_filters_spec.rb'
|
|
410
399
|
- 'spec/models/blacklight/solr/document_spec.rb'
|
|
411
400
|
|
|
412
401
|
# Offense count: 4
|
|
@@ -423,7 +412,7 @@ RSpec/SubjectStub:
|
|
|
423
412
|
- 'spec/models/blacklight/search_builder_spec.rb'
|
|
424
413
|
- 'spec/services/blacklight/search_service_spec.rb'
|
|
425
414
|
|
|
426
|
-
# Offense count:
|
|
415
|
+
# Offense count: 118
|
|
427
416
|
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
|
|
428
417
|
RSpec/VerifiedDoubles:
|
|
429
418
|
Enabled: false
|
|
@@ -508,7 +497,7 @@ Style/ConditionalAssignment:
|
|
|
508
497
|
Exclude:
|
|
509
498
|
- 'lib/blacklight/solr/response/spelling.rb'
|
|
510
499
|
|
|
511
|
-
# Offense count:
|
|
500
|
+
# Offense count: 99
|
|
512
501
|
Style/Documentation:
|
|
513
502
|
Enabled: false
|
|
514
503
|
|
|
@@ -548,12 +537,12 @@ Style/GuardClause:
|
|
|
548
537
|
- 'app/helpers/blacklight/catalog_helper_behavior.rb'
|
|
549
538
|
- 'lib/blacklight/solr/search_builder_behavior.rb'
|
|
550
539
|
|
|
551
|
-
# Offense count:
|
|
540
|
+
# Offense count: 39
|
|
552
541
|
# Cop supports --auto-correct.
|
|
553
542
|
Style/IfUnlessModifier:
|
|
554
543
|
Enabled: false
|
|
555
544
|
|
|
556
|
-
# Offense count:
|
|
545
|
+
# Offense count: 122
|
|
557
546
|
# Cop supports --auto-correct.
|
|
558
547
|
# Configuration parameters: EnforcedStyle.
|
|
559
548
|
# SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
|
data/.travis.yml
CHANGED
|
@@ -1,50 +1,42 @@
|
|
|
1
1
|
dist: bionic
|
|
2
|
+
|
|
2
3
|
addons:
|
|
3
4
|
chrome: stable
|
|
4
|
-
language: ruby
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
email: false
|
|
6
|
+
language: ruby
|
|
8
7
|
|
|
9
8
|
matrix:
|
|
10
9
|
include:
|
|
11
10
|
- rvm: 2.7.0
|
|
12
|
-
env: "RAILS_VERSION=6.0.2.
|
|
11
|
+
env: "RAILS_VERSION=6.0.2.2"
|
|
13
12
|
- rvm: 2.6.5
|
|
14
|
-
env: "RAILS_VERSION=6.0.
|
|
13
|
+
env: "RAILS_VERSION=6.0.2.2"
|
|
15
14
|
- rvm: 2.6.5
|
|
16
|
-
env: "RAILS_VERSION=5.2.
|
|
15
|
+
env: "RAILS_VERSION=5.2.4.2"
|
|
17
16
|
- rvm: 2.5.7
|
|
18
|
-
env: "RAILS_VERSION=5.2.
|
|
17
|
+
env: "RAILS_VERSION=5.2.4.2 BLACKLIGHT_API_TEST=true ENGINE_CART_RAILS_OPTIONS=\"--api --skip-git --skip-bundle --skip-listen --skip-spring --skip-yarn --skip-keeps --skip-action-cable --skip-coffee --skip-test\""
|
|
19
18
|
- rvm: 2.4.9
|
|
20
|
-
env: "RAILS_VERSION=5.2.4.
|
|
19
|
+
env: "RAILS_VERSION=5.2.4.2"
|
|
21
20
|
- rvm: jruby-9.2.8.0
|
|
22
|
-
env: "RAILS_VERSION=5.2.4.
|
|
21
|
+
env: "RAILS_VERSION=5.2.4.2 JRUBY_OPTS=\"-J-Xms512m -J-Xmx1024m\""
|
|
23
22
|
allow_failures:
|
|
24
23
|
- rvm: jruby-9.2.8.0
|
|
25
24
|
fast_finish: true
|
|
26
25
|
|
|
27
26
|
before_install:
|
|
28
|
-
- docker pull solr:7
|
|
29
|
-
- docker run -d -p 8983:8983 -v $PWD/lib/generators/blacklight/templates/solr/conf:/myconfig solr:7 solr-create -c blacklight-core -d /myconfig
|
|
30
|
-
- docker ps -a
|
|
31
27
|
- google-chrome-stable --headless --disable-gpu --no-sandbox --remote-debugging-port=9222 http://localhost &
|
|
32
28
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
global_env:
|
|
39
|
-
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
|
|
40
|
-
- ENGINE_CART_RAILS_OPTIONS='--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test'
|
|
41
|
-
- CC_TEST_REPORTER_ID=5042c7358c96b0b926088a4cda3e132fffe7a66ce8047cdb1dc6f0b4b6676b79
|
|
42
|
-
|
|
43
|
-
jdk: openjdk11
|
|
29
|
+
env:
|
|
30
|
+
global:
|
|
31
|
+
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
|
|
32
|
+
- ENGINE_CART_RAILS_OPTIONS='--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test'
|
|
33
|
+
- CC_TEST_REPORTER_ID=5042c7358c96b0b926088a4cda3e132fffe7a66ce8047cdb1dc6f0b4b6676b79
|
|
44
34
|
|
|
45
35
|
before_script:
|
|
46
36
|
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
|
47
37
|
- chmod +x ./cc-test-reporter
|
|
48
38
|
- ./cc-test-reporter before-build
|
|
39
|
+
|
|
49
40
|
after_script:
|
|
50
41
|
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
|
42
|
+
- docker-compose build app || travis_terminate 1 # validates application Dockerfile
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -38,6 +38,10 @@ rails generate blacklight:install
|
|
|
38
38
|
* Bundler
|
|
39
39
|
* Rails 5.1+
|
|
40
40
|
|
|
41
|
+
## Contributing Code
|
|
42
|
+
|
|
43
|
+
Code contributions are always welcome, instructions for contributing can be found at [CONTRIBUTING.md](https://github.com/projectblacklight/blacklight/blob/master/CONTRIBUTING.md).
|
|
44
|
+
|
|
41
45
|
## Configuring Apache Solr
|
|
42
46
|
You'll also want some information about how Blacklight expects [Apache Solr](http://lucene.apache.org/solr ) to run, which you can find in [README_SOLR](https://github.com/projectblacklight/blacklight/wiki/README_SOLR)
|
|
43
47
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
7.
|
|
1
|
+
7.9.0
|
|
@@ -150,10 +150,26 @@
|
|
|
150
150
|
|
|
151
151
|
.pivot-facet {
|
|
152
152
|
@extend .list-unstyled;
|
|
153
|
+
@extend .py-1;
|
|
154
|
+
@extend .px-4;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.facet-leaf-node {
|
|
158
|
+
margin-left: 1rem;
|
|
159
|
+
padding-right: 1rem;
|
|
160
|
+
margin-top: -1.5rem;
|
|
161
|
+
}
|
|
153
162
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
163
|
+
.facet-toggle-handle {
|
|
164
|
+
margin: 0;
|
|
165
|
+
margin-left: -5px;
|
|
166
|
+
padding: 0;
|
|
167
|
+
|
|
168
|
+
&.collapsed {
|
|
169
|
+
.show { display: block; }
|
|
170
|
+
.hide { display: none; }
|
|
158
171
|
}
|
|
172
|
+
|
|
173
|
+
.show { display: none; }
|
|
174
|
+
.hide { display: block; }
|
|
159
175
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<span class="btn-group applied-filter constraint <%= @classes %>">
|
|
2
|
+
<span class="constraint-value btn btn-outline-secondary">
|
|
3
|
+
<% if @label.present? %>
|
|
4
|
+
<span class="filter-name"><%= @label %></span>
|
|
5
|
+
<% end %>
|
|
6
|
+
<% if @value.present? %>
|
|
7
|
+
<%= content_tag :span, @value, class: 'filter-value', title: strip_tags(@value) %>
|
|
8
|
+
<% end %>
|
|
9
|
+
</span>
|
|
10
|
+
<% if @remove_path.present? %>
|
|
11
|
+
<%= link_to(@remove_path, class: 'btn btn-outline-secondary remove') do %>
|
|
12
|
+
<span class="remove-icon">✖</span>
|
|
13
|
+
<span class="sr-only">
|
|
14
|
+
<%= if @label.blank?
|
|
15
|
+
t('blacklight.search.filters.remove.value', value: @value)
|
|
16
|
+
else
|
|
17
|
+
t('blacklight.search.filters.remove.label_value', label: @label, value: @value)
|
|
18
|
+
end
|
|
19
|
+
%>
|
|
20
|
+
</span>
|
|
21
|
+
<% end %>
|
|
22
|
+
<% end %>
|
|
23
|
+
</span>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Blacklight
|
|
4
|
+
class ConstraintLayoutComponent < ::ViewComponent::Base
|
|
5
|
+
def initialize(value:, label: nil, remove_path: nil, classes: nil)
|
|
6
|
+
@value = value
|
|
7
|
+
@label = label
|
|
8
|
+
@remove_path = remove_path
|
|
9
|
+
@classes = Array(classes).join(' ')
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def render?
|
|
13
|
+
@value.present?
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<div class="card facet-limit blacklight-<%= @facet_field.key %> <%= 'facet-limit-active' if @facet_field.active? %>">
|
|
2
|
+
<h3 class="card-header p-0 facet-field-heading" id="<%= @facet_field.html_id %>-header">
|
|
3
|
+
<button
|
|
4
|
+
class="btn btn-block p-2 text-left collapse-toggle <%= "collapsed" if @facet_field.collapsed? %>"
|
|
5
|
+
data-toggle="collapse"
|
|
6
|
+
data-target="#<%= @facet_field.html_id %>"
|
|
7
|
+
aria-expanded="<%= @facet_field.collapsed? ? 'false' : 'true' %>"
|
|
8
|
+
>
|
|
9
|
+
<%= label %>
|
|
10
|
+
</button>
|
|
11
|
+
</h3>
|
|
12
|
+
<div id="<%= @facet_field.html_id %>" aria-labelledby="<%= @facet_field.html_id %>-header" class="panel-collapse facet-content collapse <%= "show" unless @facet_field.collapsed? %>">
|
|
13
|
+
<div class="card-body">
|
|
14
|
+
<%= body %>
|
|
15
|
+
|
|
16
|
+
<% if @facet_field.modal_path %>
|
|
17
|
+
<div class="more_facets">
|
|
18
|
+
<%= link_to t("more_#{@facet_field.key}_html", scope: 'blacklight.search.facets', default: :more_html, field_name: @facet_field.label),
|
|
19
|
+
@facet_field.modal_path,
|
|
20
|
+
data: { blacklight_modal: 'trigger' } %>
|
|
21
|
+
</div>
|
|
22
|
+
<% end %>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|