blacklight 8.2.2 → 8.3.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.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/.env +1 -1
  3. data/.github/workflows/ruby.yml +56 -62
  4. data/.rubocop.yml +226 -21
  5. data/VERSION +1 -1
  6. data/app/assets/stylesheets/blacklight/_mixins.scss +2 -17
  7. data/app/components/blacklight/facet_item_pivot_component.rb +2 -2
  8. data/app/components/blacklight/system/dropdown_component.rb +1 -1
  9. data/app/helpers/blacklight/catalog_helper_behavior.rb +1 -5
  10. data/app/helpers/blacklight/layout_helper_behavior.rb +3 -3
  11. data/app/views/shared/_flash_messages.html.erb +1 -1
  12. data/lib/blacklight/configuration.rb +1 -0
  13. data/lib/blacklight/nested_open_struct_with_hash_access.rb +2 -2
  14. data/lib/blacklight/solr/request.rb +1 -1
  15. data/lib/blacklight/solr/response/facets.rb +1 -1
  16. data/lib/blacklight/solr/search_builder_behavior.rb +1 -1
  17. data/package.json +1 -1
  18. data/spec/components/blacklight/advanced_search_form_component_spec.rb +2 -2
  19. data/spec/components/blacklight/constraint_layout_component_spec.rb +11 -11
  20. data/spec/components/blacklight/constraints_component_spec.rb +9 -9
  21. data/spec/components/blacklight/document/group_component_spec.rb +3 -3
  22. data/spec/components/blacklight/document/sidebar_component_spec.rb +3 -4
  23. data/spec/components/blacklight/document_component_spec.rb +21 -25
  24. data/spec/components/blacklight/facet_component_spec.rb +2 -2
  25. data/spec/components/blacklight/facet_field_checkboxes_component_spec.rb +5 -5
  26. data/spec/components/blacklight/facet_field_list_component_spec.rb +13 -13
  27. data/spec/components/blacklight/facet_item_component_spec.rb +5 -5
  28. data/spec/components/blacklight/facet_item_pivot_component_spec.rb +6 -6
  29. data/spec/components/blacklight/header_component_spec.rb +1 -2
  30. data/spec/components/blacklight/hidden_search_state_component_spec.rb +6 -6
  31. data/spec/components/blacklight/metadata_field_component_spec.rb +3 -3
  32. data/spec/components/blacklight/response/pagination_component_spec.rb +4 -4
  33. data/spec/components/blacklight/search_context/server_applied_params_component_spec.rb +1 -1
  34. data/spec/components/blacklight/search_context/server_item_pagination_component_spec.rb +1 -3
  35. data/spec/components/blacklight/system/flash_message_component_spec.rb +5 -5
  36. data/spec/controllers/blacklight/catalog_spec.rb +1 -1
  37. data/spec/controllers/blacklight/{catalog/component_configuration_spec.rb → configurable_spec.rb} +1 -1
  38. data/spec/controllers/bookmarks_controller_spec.rb +10 -10
  39. data/spec/controllers/catalog_controller_spec.rb +24 -26
  40. data/spec/features/advanced_search_spec.rb +14 -14
  41. data/spec/features/alternate_controller_spec.rb +9 -9
  42. data/spec/features/axe_spec.rb +4 -4
  43. data/spec/features/bookmarks_spec.rb +19 -19
  44. data/spec/features/citation_spec.rb +1 -1
  45. data/spec/features/did_you_mean_spec.rb +23 -23
  46. data/spec/features/facet_missing_spec.rb +9 -9
  47. data/spec/features/facets_spec.rb +21 -20
  48. data/spec/features/modal_spec.rb +4 -4
  49. data/spec/features/record_view_spec.rb +2 -2
  50. data/spec/features/search_context_spec.rb +6 -6
  51. data/spec/features/search_crawler_spec.rb +5 -5
  52. data/spec/features/search_filters_spec.rb +65 -65
  53. data/spec/features/search_history_spec.rb +12 -12
  54. data/spec/features/search_pagination_spec.rb +10 -10
  55. data/spec/features/search_results_spec.rb +1 -1
  56. data/spec/features/search_sort_spec.rb +4 -4
  57. data/spec/features/search_spec.rb +25 -25
  58. data/spec/features/sitelinks_search_box_spec.rb +2 -2
  59. data/spec/features/sms_spec.rb +1 -1
  60. data/spec/helpers/blacklight/layout_helper_behavior_spec.rb +20 -3
  61. data/spec/helpers/blacklight/render_partials_helper_behavior_spec.rb +2 -1
  62. data/spec/helpers/blacklight/url_helper_behavior_spec.rb +7 -8
  63. data/spec/helpers/blacklight_helper_spec.rb +13 -15
  64. data/spec/helpers/catalog_helper_spec.rb +3 -6
  65. data/spec/i18n_spec.rb +2 -1
  66. data/spec/lib/blacklight/search_state_spec.rb +4 -4
  67. data/spec/lib/tasks/blacklight_task_spec.rb +2 -1
  68. data/spec/models/blacklight/configurable_spec.rb +1 -1
  69. data/spec/models/blacklight/configuration/context_spec.rb +1 -1
  70. data/spec/models/blacklight/configuration_spec.rb +2 -2
  71. data/spec/models/blacklight/document/active_model_shim_spec.rb +1 -1
  72. data/spec/models/blacklight/document/cache_key_spec.rb +1 -1
  73. data/spec/models/blacklight/document_spec.rb +1 -1
  74. data/spec/models/blacklight/facet_paginator_spec.rb +14 -14
  75. data/spec/models/blacklight/icon_spec.rb +1 -1
  76. data/spec/models/blacklight/search_builder_spec.rb +1 -1
  77. data/spec/models/blacklight/solr/document_spec.rb +1 -1
  78. data/spec/models/blacklight/solr/facet_paginator_spec.rb +1 -1
  79. data/spec/models/blacklight/solr/repository_spec.rb +2 -2
  80. data/spec/models/blacklight/solr/request_spec.rb +1 -1
  81. data/spec/models/blacklight/solr/response/facets_spec.rb +1 -1
  82. data/spec/models/blacklight/solr/response/group_response_spec.rb +1 -1
  83. data/spec/models/blacklight/solr/response/group_spec.rb +1 -1
  84. data/spec/models/blacklight/solr/response_spec.rb +1 -1
  85. data/spec/models/blacklight/solr/{search_builder_spec.rb → search_builder_behavior_spec.rb} +9 -19
  86. data/spec/models/blacklight/suggest/response_spec.rb +1 -1
  87. data/spec/models/blacklight/suggest_search_spec.rb +1 -1
  88. data/spec/models/blacklight/user_spec.rb +1 -1
  89. data/spec/models/solr_document_spec.rb +1 -1
  90. data/spec/presenters/blacklight/document_presenter_spec.rb +1 -2
  91. data/spec/presenters/blacklight/field_presenter_spec.rb +1 -1
  92. data/spec/presenters/blacklight/index_presenter_spec.rb +2 -3
  93. data/spec/presenters/blacklight/json_presenter_spec.rb +1 -1
  94. data/spec/presenters/{pipeline_spec.rb → blacklight/rendering/pipeline_spec.rb} +1 -1
  95. data/spec/presenters/blacklight/show_presenter_spec.rb +5 -6
  96. data/spec/presenters/{thumbnail_presenter_spec.rb → blacklight/thumbnail_presenter_spec.rb} +5 -3
  97. data/spec/routing/catalog_routing_spec.rb +1 -1
  98. data/spec/services/blacklight/field_retriever_spec.rb +1 -1
  99. data/spec/services/blacklight/search_service_spec.rb +9 -9
  100. data/spec/spec_helper.rb +2 -2
  101. data/spec/support/features/search_helpers.rb +2 -2
  102. data/spec/support/features/session_helpers.rb +3 -3
  103. data/spec/test_app_templates/lib/generators/test_app_generator.rb +2 -2
  104. data/spec/views/catalog/_document.html.erb_spec.rb +1 -4
  105. data/spec/views/catalog/_document_list.html.erb_spec.rb +2 -2
  106. data/spec/views/catalog/_facet_index_navigation.html.erb_spec.rb +5 -6
  107. data/spec/views/catalog/_facet_layout.html.erb_spec.rb +7 -7
  108. data/spec/views/catalog/_paginate_compact.html.erb_spec.rb +4 -4
  109. data/spec/views/catalog/_show_sidebar.erb_spec.rb +1 -4
  110. data/spec/views/catalog/_show_tools.html.erb_spec.rb +1 -2
  111. data/spec/views/catalog/_view_type_group.html.erb_spec.rb +7 -7
  112. data/spec/views/catalog/email_success.html.erb_spec.rb +1 -1
  113. data/spec/views/catalog/facet.html.erb_spec.rb +1 -1
  114. data/spec/views/catalog/facet.json.jbuilder_spec.rb +1 -1
  115. data/spec/views/catalog/index.atom.builder_spec.rb +18 -19
  116. data/spec/views/catalog/index.html.erb_spec.rb +2 -4
  117. data/spec/views/catalog/index.json.jbuilder_spec.rb +5 -8
  118. data/spec/views/catalog/show.html.erb_spec.rb +3 -5
  119. data/spec/views/catalog/show.json.jbuilder_spec.rb +1 -2
  120. data/spec/views/catalog/sms_success.html.erb_spec.rb +1 -1
  121. data/spec/views/shared/_user_util_links.html.erb_spec.rb +2 -3
  122. metadata +10 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b852f9b5c0e06c9c807400bb9449ced0e192137d62bdabfcb09b7eed2314262
4
- data.tar.gz: b3a1f6285c858b9acdb74d7200da29dd426ef61b1cdf0a843424c6670f5fca80
3
+ metadata.gz: b1e6e672e07634c504da353b57fe4f15f41d56f3bc6656aedc03f7b312f1531e
4
+ data.tar.gz: 0cc0c2d92c0622e27889eb49b08b5f2d39e455e725076c59ef119f45606a1e4e
5
5
  SHA512:
6
- metadata.gz: f8059481dee8d4a30b3497cccde70d195112840870f08e8a732e11ca22e0fe985e8cfb52d202e5d2ecce06289710bff4ed2a7c98cef97ae32977c2064a8361b2
7
- data.tar.gz: d5b6d82af1332ccdf0e18cbe7ceb66bdb9a189db77ad7885cb4e16b8c05a82a52e16b9499ab018a9d43681bc02144f010f4bd343926363a5e093d0bac3ad477c
6
+ metadata.gz: b5847ccdf59e00a4c34e36081626cead1263475e517c9ea79b23ebd6e0c656b0e272eff35c0da02cbc500c0c8b119a2454e397ce323ce64eb473bdc1dc897a44
7
+ data.tar.gz: 90db3e0bd7e6a24d782832a0967f5af56c0f3b803f8d4debeef669040e98077829e5c49dd03449719d1de9ed19e26a33b060a231d173e5d1e00d2d31ed2f6764
data/.env CHANGED
@@ -1,6 +1,6 @@
1
1
  ALPINE_RUBY_VERSION=3.0.3
2
2
  RAILS_VERSION=6.1.4.6
3
- VIEW_COMPONENT_VERSION=2.66.0
3
+ VIEW_COMPONENT_VERSION=3.12.1
4
4
  SOLR_PORT=8983
5
5
  SOLR_URL=http://solr:8983/solr/blacklight-core
6
6
  SOLR_VERSION=latest
@@ -11,69 +11,63 @@ on:
11
11
  push:
12
12
  branches:
13
13
  - main
14
- - 'release-*'
14
+ - "release-*"
15
15
  pull_request:
16
16
 
17
17
  jobs:
18
18
  lint:
19
19
  runs-on: ubuntu-latest
20
20
  steps:
21
- - uses: actions/checkout@v3
22
- - name: Set up Ruby
23
- uses: ruby/setup-ruby@v1
24
- with:
25
- ruby-version: 3.2
26
- bundler: 'latest'
27
- - name: Install dependencies
28
- run: bundle install
29
- - name: Run linter
30
- run: bundle exec rake rubocop
21
+ - uses: actions/checkout@v3
22
+ - name: Set up Ruby
23
+ uses: ruby/setup-ruby@v1
24
+ with:
25
+ ruby-version: 3.2
26
+ bundler: "latest"
27
+ - name: Install dependencies
28
+ run: bundle install
29
+ - name: Run linter
30
+ run: bundle exec rake rubocop
31
31
  test:
32
32
  runs-on: ubuntu-latest
33
33
  name: test (ruby ${{ matrix.ruby }} / rails ${{ matrix.rails_version }} ${{ matrix.additional_name }})
34
34
  strategy:
35
35
  matrix:
36
- ruby: ['3.0']
37
- rails_version: ['6.1.7', '7.0.4']
36
+ ruby: ["3.3"]
37
+ rails_version: ["7.0.8.4", "7.1.3.4"]
38
38
  bootstrap_version: [null]
39
- view_component_version: ['~> 2.66']
39
+ view_component_version: ["~> 3.12"]
40
40
  api: [null]
41
- additional_engine_cart_rails_options: ['']
42
- additional_name: ['']
41
+ additional_engine_cart_rails_options: [""]
42
+ additional_name: [""]
43
43
  include:
44
- - ruby: '3.3.0'
45
- rails_version: '7.1.1'
46
- - ruby: '3.2.2'
47
- rails_version: '7.1.1'
48
- - ruby: '3.2.2'
49
- rails_version: '7.0.4'
50
- - ruby: '3.2.2'
51
- rails_version: '7.0.4'
52
- solr_version: '9.3.0'
53
- additional_name: 'Solr 9.3.0'
54
- - ruby: '3.2.2'
55
- rails_version: '7.0.4'
56
- solr_version: '8.11.2'
57
- additional_name: 'Solr 8.11.2'
58
- - ruby: '3.1'
59
- rails_version: '7.0.4'
60
- - ruby: '3.1'
61
- rails_version: '7.0.4'
62
- view_component_version: '~> 3.0.0.rc1'
63
- additional_name: '/ ViewComponent 3'
64
- - ruby: '3.1'
65
- rails_version: '7.0.4'
66
- additional_name: '/ Propshaft'
67
- additional_engine_cart_rails_options: -a propshaft --css=bootstrap
68
- - ruby: '3.0'
69
- rails_version: '7.0.4'
70
- bootstrap_version: '~> 4.0'
71
- additional_name: '/ Bootstrap 4'
72
- - ruby: '3.0'
73
- rails_version: '7.0.4'
74
- api: 'true'
75
- additional_engine_cart_rails_options: --api --skip-yarn
76
- additional_name: '/ API'
44
+ - ruby: "3.2"
45
+ rails_version: "6.1.7.8"
46
+ - ruby: "3.2"
47
+ rails_version: "7.0.8.4"
48
+ - ruby: "3.2"
49
+ rails_version: "7.1.3.4"
50
+ solr_version: "8.11.2"
51
+ additional_name: "Solr 8.11.2"
52
+ - ruby: "3.1"
53
+ rails_version: "7.1.3.4"
54
+ - ruby: "3.1"
55
+ rails_version: "7.1.3.4"
56
+ view_component_version: "~> 2.66"
57
+ additional_name: "/ ViewComponent 2"
58
+ - ruby: "3.1"
59
+ rails_version: "7.0.8.4"
60
+ additional_name: "/ Propshaft"
61
+ additional_engine_cart_rails_options: -a propshaft --css=bootstrap
62
+ - ruby: "3.1"
63
+ rails_version: "7.0.8.4"
64
+ bootstrap_version: "~> 4.0"
65
+ additional_name: "/ Bootstrap 4"
66
+ - ruby: "3.3"
67
+ rails_version: "7.1.3.4"
68
+ api: "true"
69
+ additional_engine_cart_rails_options: --api --skip-yarn
70
+ additional_name: "/ API"
77
71
  env:
78
72
  RAILS_VERSION: ${{ matrix.rails_version }}
79
73
  SOLR_VERSION: ${{ matrix.solr_version || 'latest' }}
@@ -82,19 +76,19 @@ jobs:
82
76
  BLACKLIGHT_API_TEST: ${{ matrix.api }}
83
77
  ENGINE_CART_RAILS_OPTIONS: "--skip-git --skip-listen --skip-spring --skip-keeps --skip-coffee --skip-test ${{ matrix.additional_engine_cart_rails_options }}"
84
78
  steps:
85
- - uses: actions/checkout@v3
86
- - name: Set up Ruby
87
- uses: ruby/setup-ruby@v1
88
- with:
89
- bundler: 'latest'
90
- ruby-version: ${{ matrix.ruby }}
91
- - name: Install dependencies
92
- run: bundle install
93
- - name: Run tests
94
- run: bundle exec rake ci
79
+ - uses: actions/checkout@v3
80
+ - name: Set up Ruby
81
+ uses: ruby/setup-ruby@v1
82
+ with:
83
+ bundler: "latest"
84
+ ruby-version: ${{ matrix.ruby }}
85
+ - name: Install dependencies
86
+ run: bundle install
87
+ - name: Run tests
88
+ run: bundle exec rake ci
95
89
  docker_build:
96
90
  runs-on: ubuntu-latest
97
91
  steps:
98
- - uses: actions/checkout@v3
99
- - name: Build docker image
100
- run: docker-compose build app
92
+ - uses: actions/checkout@v3
93
+ - name: Build docker image
94
+ run: docker-compose build app
data/.rubocop.yml CHANGED
@@ -1,6 +1,7 @@
1
1
  require:
2
2
  - rubocop-capybara
3
3
  - rubocop-rspec
4
+ - rubocop-rspec_rails
4
5
  - rubocop-rails
5
6
 
6
7
  inherit_from:
@@ -8,27 +9,25 @@ inherit_from:
8
9
 
9
10
  AllCops:
10
11
  DisplayCopNames: true
11
- TargetRubyVersion: 2.7
12
+ TargetRubyVersion: 3.0
12
13
  TargetRailsVersion: 6.1
13
14
  Exclude:
14
- - "lib/generators/blacklight/templates/**/*"
15
- - "blacklight.gemspec"
16
-
15
+ - "lib/generators/blacklight/templates/**/*"
16
+ - "blacklight.gemspec"
17
17
 
18
18
  Lint/UselessAssignment:
19
19
  Exclude:
20
20
  - app/presenters/blacklight/facet_item_pivot_presenter.rb # https://github.com/rubocop/rubocop/issues/11124
21
21
 
22
-
23
22
  # engine_cart block includes conditional, not duplication
24
23
  Bundler/DuplicatedGem:
25
24
  Exclude:
26
- - 'Gemfile'
25
+ - "Gemfile"
27
26
 
28
27
  # engine_cart block is following default Rails order
29
28
  Bundler/OrderedGems:
30
29
  Exclude:
31
- - 'Gemfile'
30
+ - "Gemfile"
32
31
 
33
32
  Layout/IndentationConsistency:
34
33
  EnforcedStyle: normal
@@ -51,13 +50,13 @@ Metrics/ClassLength:
51
50
  Layout/LineLength:
52
51
  Max: 200
53
52
  Exclude:
54
- - 'spec/**/*'
53
+ - "spec/**/*"
55
54
 
56
55
  Metrics/ModuleLength:
57
56
  Exclude:
58
- - 'app/controllers/concerns/blacklight/catalog.rb'
59
- - 'lib/blacklight/solr/search_builder_behavior.rb'
60
- - 'lib/blacklight/solr/response/facets.rb'
57
+ - "app/controllers/concerns/blacklight/catalog.rb"
58
+ - "lib/blacklight/solr/search_builder_behavior.rb"
59
+ - "lib/blacklight/solr/response/facets.rb"
61
60
 
62
61
  Metrics/AbcSize:
63
62
  Exclude:
@@ -90,7 +89,7 @@ Style/AccessModifierDeclarations:
90
89
 
91
90
  Style/MissingRespondToMissing:
92
91
  Exclude:
93
- - 'lib/blacklight/nested_open_struct_with_hash_access.rb'
92
+ - "lib/blacklight/nested_open_struct_with_hash_access.rb"
94
93
 
95
94
  Style/StringLiterals:
96
95
  Enabled: false
@@ -122,7 +121,7 @@ Style/ExponentialNotation:
122
121
  Style/HashEachMethods:
123
122
  Enabled: true
124
123
  Exclude:
125
- - 'spec/services/blacklight/search_service_spec.rb'
124
+ - "spec/services/blacklight/search_service_spec.rb"
126
125
 
127
126
  Style/HashTransformKeys:
128
127
  Enabled: true
@@ -200,7 +199,7 @@ Style/ArgumentsForwarding: # new in 1.1
200
199
  Enabled: true
201
200
  Exclude:
202
201
  # This cop includes some checks specific to Ruby 3.2
203
- - 'lib/blacklight/solr/response/group_response.rb'
202
+ - "lib/blacklight/solr/response/group_response.rb"
204
203
  Style/CollectionCompact: # new in 1.2
205
204
  Enabled: true
206
205
  Style/DocumentDynamicEvalDefinition: # new in 1.1
@@ -241,18 +240,18 @@ Style/SwapValues: # new in 1.1
241
240
  Enabled: true
242
241
  RSpec/DescribeClass:
243
242
  Exclude:
244
- - 'spec/lib/tasks/blacklight_task_spec.rb'
245
- - 'spec/features/**/*'
246
- - 'spec/requests/**/*'
247
- - 'spec/routing/**/*'
248
- - 'spec/views/**/*'
243
+ - "spec/lib/tasks/blacklight_task_spec.rb"
244
+ - "spec/features/**/*"
245
+ - "spec/requests/**/*"
246
+ - "spec/routing/**/*"
247
+ - "spec/views/**/*"
249
248
  RSpec/ExcessiveDocstringSpacing: # new in 2.5
250
249
  Enabled: true
251
250
  RSpec/IdenticalEqualityAssertion: # new in 2.4
252
251
  Enabled: true
253
252
  RSpec/SubjectDeclaration: # new in 2.5
254
253
  Enabled: true
255
- RSpec/Rails/AvoidSetupHook: # new in 2.4
254
+ RSpecRails/AvoidSetupHook: # new in 2.4
256
255
  Enabled: true
257
256
  Rails/ActiveRecordCallbacksOrder: # new in 2.7
258
257
  Enabled: true
@@ -320,7 +319,7 @@ RSpec/BeEq: # new in 2.9.0
320
319
  Enabled: true
321
320
  RSpec/BeNil: # new in 2.9.0
322
321
  Enabled: true
323
- RSpec/FactoryBot/SyntaxMethods: # new in 2.7
322
+ FactoryBot/SyntaxMethods: # new in 2.7
324
323
  Enabled: true
325
324
  Rails/ActionControllerTestCase: # new in 2.14
326
325
  Enabled: true
@@ -376,3 +375,209 @@ Rails/StripHeredoc: # new in 2.15
376
375
  Enabled: true
377
376
  Rails/ToFormattedS: # new in 2.15
378
377
  Enabled: true
378
+ Gemspec/DevelopmentDependencies: # new in 1.44
379
+ Enabled: true
380
+ Lint/DuplicateMagicComment: # new in 1.37
381
+ Enabled: true
382
+ Lint/DuplicateMatchPattern: # new in 1.50
383
+ Enabled: true
384
+ Lint/ItWithoutArgumentsInBlock: # new in 1.59
385
+ Enabled: true
386
+ Lint/LiteralAssignmentInCondition: # new in 1.58
387
+ Enabled: true
388
+ Lint/MixedCaseRange: # new in 1.53
389
+ Enabled: true
390
+ Lint/RedundantRegexpQuantifiers: # new in 1.53
391
+ Enabled: true
392
+ Lint/RequireRangeParentheses: # new in 1.32
393
+ Enabled: true
394
+ Lint/UselessRescue: # new in 1.43
395
+ Enabled: true
396
+ Metrics/CollectionLiteralLength: # new in 1.47
397
+ Enabled: true
398
+ Style/ArrayIntersect: # new in 1.40
399
+ Enabled: true
400
+ Style/ComparableClamp: # new in 1.44
401
+ Enabled: true
402
+ Style/ConcatArrayLiterals: # new in 1.41
403
+ Enabled: true
404
+ Style/DataInheritance: # new in 1.49
405
+ Enabled: true
406
+ Style/DirEmpty: # new in 1.48
407
+ Enabled: true
408
+ Style/EmptyHeredoc: # new in 1.32
409
+ Enabled: true
410
+ Style/ExactRegexpMatch: # new in 1.51
411
+ Enabled: true
412
+ Style/FileEmpty: # new in 1.48
413
+ Enabled: true
414
+ Style/MagicCommentFormat: # new in 1.35
415
+ Enabled: true
416
+ Style/MapIntoArray: # new in 1.63
417
+ Enabled: true
418
+ Style/MapToSet: # new in 1.42
419
+ Enabled: true
420
+ Style/MinMaxComparison: # new in 1.42
421
+ Enabled: true
422
+ Style/OperatorMethodCall: # new in 1.37
423
+ Enabled: true
424
+ Style/RedundantArrayConstructor: # new in 1.52
425
+ Enabled: true
426
+ Style/RedundantConstantBase: # new in 1.40
427
+ Enabled: true
428
+ Style/RedundantCurrentDirectoryInPath: # new in 1.53
429
+ Enabled: true
430
+ Style/RedundantDoubleSplatHashBraces: # new in 1.41
431
+ Enabled: true
432
+ Style/RedundantEach: # new in 1.38
433
+ Enabled: true
434
+ Style/RedundantFilterChain: # new in 1.52
435
+ Enabled: true
436
+ Style/RedundantHeredocDelimiterQuotes: # new in 1.45
437
+ Enabled: true
438
+ Style/RedundantLineContinuation: # new in 1.49
439
+ Enabled: true
440
+ Style/RedundantRegexpArgument: # new in 1.53
441
+ Enabled: true
442
+ Style/RedundantRegexpConstructor: # new in 1.52
443
+ Enabled: true
444
+ Style/RedundantStringEscape: # new in 1.37
445
+ Enabled: true
446
+ Style/ReturnNilInPredicateMethodDefinition: # new in 1.53
447
+ Enabled: true
448
+ Style/SendWithLiteralMethodName: # new in 1.64
449
+ Enabled: true
450
+ Style/SingleLineDoEndBlock: # new in 1.57
451
+ Enabled: true
452
+ Style/SuperArguments: # new in 1.64
453
+ Enabled: true
454
+ Style/SuperWithArgsParentheses: # new in 1.58
455
+ Enabled: true
456
+ Style/YAMLFileRead: # new in 1.53
457
+ Enabled: true
458
+ Capybara/ClickLinkOrButtonStyle: # new in 2.19
459
+ Enabled: true
460
+ Capybara/MatchStyle: # new in 2.17
461
+ Enabled: true
462
+ Capybara/NegationMatcher: # new in 2.14
463
+ Enabled: true
464
+ Exclude:
465
+ - "spec/models/**/*"
466
+ Capybara/RedundantWithinFind: # new in 2.20
467
+ Enabled: true
468
+ Capybara/SpecificActions: # new in 2.14
469
+ Enabled: true
470
+ Capybara/SpecificFinders: # new in 2.13
471
+ Enabled: true
472
+ Capybara/SpecificMatcher: # new in 2.12
473
+ Enabled: true
474
+ Capybara/RSpec/HaveSelector: # new in 2.19
475
+ Enabled: true
476
+ Capybara/RSpec/PredicateMatcher: # new in 2.19
477
+ Enabled: true
478
+ FactoryBot/AssociationStyle: # new in 2.23
479
+ Enabled: true
480
+ FactoryBot/ConsistentParenthesesStyle: # new in 2.14
481
+ Enabled: true
482
+ FactoryBot/ExcessiveCreateList: # new in 2.25
483
+ Enabled: true
484
+ FactoryBot/FactoryAssociationWithStrategy: # new in 2.23
485
+ Enabled: true
486
+ FactoryBot/FactoryNameStyle: # new in 2.16
487
+ Enabled: true
488
+ FactoryBot/IdSequence: # new in 2.24
489
+ Enabled: true
490
+ FactoryBot/RedundantFactoryOption: # new in 2.23
491
+ Enabled: true
492
+ RSpecRails/HaveHttpStatus: # new in 2.12
493
+ Enabled: true
494
+ RSpecRails/InferredSpecType: # new in 2.14
495
+ Enabled: true
496
+ RSpecRails/MinitestAssertions: # new in 2.17
497
+ Enabled: true
498
+ RSpecRails/NegationBeValid: # new in 2.23
499
+ Enabled: true
500
+ RSpecRails/TravelAround: # new in 2.19
501
+ Enabled: true
502
+ RSpec/BeEmpty: # new in 2.20
503
+ Enabled: true
504
+ RSpec/ContainExactly: # new in 2.19
505
+ Enabled: true
506
+ RSpec/DuplicatedMetadata: # new in 2.16
507
+ Enabled: true
508
+ RSpec/EmptyMetadata: # new in 2.24
509
+ Enabled: true
510
+ RSpec/EmptyOutput: # new in 2.29
511
+ Enabled: true
512
+ RSpec/Eq: # new in 2.24
513
+ Enabled: true
514
+ RSpec/ExpectInLet: # new in 2.30
515
+ Enabled: true
516
+ RSpec/IndexedLet: # new in 2.20
517
+ Enabled: true
518
+ RSpec/IsExpectedSpecify: # new in 2.27
519
+ Enabled: true
520
+ RSpec/MatchArray: # new in 2.19
521
+ Enabled: true
522
+ RSpec/MetadataStyle: # new in 2.24
523
+ Enabled: true
524
+ RSpec/NoExpectationExample: # new in 2.13
525
+ Enabled: true
526
+ RSpec/PendingWithoutReason: # new in 2.16
527
+ Enabled: true
528
+ RSpec/ReceiveMessages: # new in 2.23
529
+ Enabled: true
530
+ RSpec/RedundantAround: # new in 2.19
531
+ Enabled: true
532
+ RSpec/RedundantPredicateMatcher: # new in 2.26
533
+ Enabled: true
534
+ RSpec/RemoveConst: # new in 2.26
535
+ Enabled: true
536
+ RSpec/RepeatedSubjectCall: # new in 2.27
537
+ Enabled: true
538
+ RSpec/SkipBlockInsideExample: # new in 2.19
539
+ Enabled: true
540
+ RSpec/SortMetadata: # new in 2.14
541
+ Enabled: true
542
+ RSpec/SpecFilePathFormat: # new in 2.24
543
+ Enabled: true
544
+ RSpec/SpecFilePathSuffix: # new in 2.24
545
+ Enabled: true
546
+ RSpec/UndescriptiveLiteralsDescription: # new in 2.29
547
+ Enabled: true
548
+ Rails/ActionControllerFlashBeforeRender: # new in 2.16
549
+ Enabled: true
550
+ Rails/ActionOrder: # new in 2.17
551
+ Enabled: true
552
+ Rails/ActiveSupportOnLoad: # new in 2.16
553
+ Enabled: true
554
+ Rails/DangerousColumnNames: # new in 2.21
555
+ Enabled: true
556
+ Rails/EnvLocal: # new in 2.22
557
+ Enabled: true
558
+ Rails/FreezeTime: # new in 2.16
559
+ Enabled: true
560
+ Rails/IgnoredColumnsAssignment: # new in 2.17
561
+ Enabled: true
562
+ Rails/RedundantActiveRecordAllMethod: # new in 2.21
563
+ Enabled: true
564
+ Rails/ResponseParsedBody: # new in 2.18
565
+ Enabled: true
566
+ Rails/RootPathnameMethods: # new in 2.16
567
+ Enabled: true
568
+ Rails/SelectMap: # new in 2.21
569
+ Enabled: true
570
+ Rails/ThreeStateBooleanColumn: # new in 2.19
571
+ Enabled: true
572
+ Rails/ToSWithArgument: # new in 2.16
573
+ Enabled: true
574
+ Rails/TopLevelHashWithIndifferentAccess: # new in 2.16
575
+ Enabled: true
576
+ Rails/UnusedRenderContent: # new in 2.21
577
+ Enabled: true
578
+ Rails/WhereMissing: # new in 2.16
579
+ Enabled: true
580
+ Rails/WhereNotWithMultipleConditions: # new in 2.17
581
+ Enabled: true
582
+ Rails/WhereRange: # new in 2.25
583
+ Enabled: true
data/VERSION CHANGED
@@ -1 +1 @@
1
- 8.2.2
1
+ 8.3.0
@@ -1,19 +1,3 @@
1
- // Stroke contrast
2
- // Ripped off from https://github.com/twbs/bootstrap/commit/c31d52499811d5c68d122db806ce27a112b489bd
3
- @mixin fill-yiq($color) {
4
- $r: red($color);
5
- $g: green($color);
6
- $b: blue($color);
7
-
8
- $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
9
-
10
- @if ($yiq >= 150) {
11
- fill: #111;
12
- } @else {
13
- fill: #fff;
14
- }
15
- }
16
-
17
1
  // define a visually-hidden class that applies to a given breakpoint and below
18
2
  // https://getbootstrap.com/docs/5.3/helpers/visually-hidden/
19
3
  @if mixin-exists(visually-hidden) {
@@ -24,7 +8,8 @@
24
8
  }
25
9
  }
26
10
  }
27
- } @else if mixin-exists(sr-only) { // Bootstrap 4 version
11
+ } @else if mixin-exists(sr-only) {
12
+ // Bootstrap 4 version
28
13
  @each $infix, $breakpoint in $grid-breakpoints {
29
14
  .visually-hidden-#{$infix} {
30
15
  @include media-breakpoint-down($breakpoint) {
@@ -52,13 +52,13 @@ module Blacklight
52
52
  private
53
53
 
54
54
  def has_items?
55
- return unless @facet_item.respond_to? :facet_item_presenters
55
+ return false unless @facet_item.respond_to? :facet_item_presenters
56
56
 
57
57
  @facet_item.facet_item_presenters.any?
58
58
  end
59
59
 
60
60
  def expanded?
61
- return unless @collapsing
61
+ return false unless @collapsing
62
62
 
63
63
  @facet_item.shown?
64
64
  end
@@ -18,7 +18,7 @@ module Blacklight
18
18
  @choices = choices
19
19
  @search_state = search_state
20
20
  @id = id
21
- @classes = classes.concat(['btn-group', "#{param.to_s.parameterize}-dropdown"])
21
+ @classes = classes.push('btn-group', "#{param.to_s.parameterize}-dropdown")
22
22
  @selected = selected || default || option_text_and_value(@choices.first)&.first
23
23
  @interpolation = interpolation
24
24
  end
@@ -53,11 +53,7 @@ module Blacklight::CatalogHelperBehavior
53
53
  collection.limit_value
54
54
  end
55
55
 
56
- end_num = if collection.offset_value + end_num <= collection.total_count
57
- collection.offset_value + end_num
58
- else
59
- collection.total_count
60
- end
56
+ end_num = [collection.offset_value + end_num, collection.total_count].min
61
57
 
62
58
  case collection.total_count
63
59
  when 0
@@ -41,11 +41,11 @@ module Blacklight
41
41
  end
42
42
 
43
43
  ##
44
- # Class used for specifying main layout container classes. Can be
45
- # overwritten to return 'container-fluid' for Bootstrap full-width layout
44
+ # Class used for specifying main layout container classes.
45
+ # Set config.full_width_layout to true to use a fluid layout.
46
46
  # @return [String]
47
47
  def container_classes
48
- 'container'
48
+ blacklight_config.full_width_layout ? 'container-fluid' : 'container'
49
49
  end
50
50
 
51
51
  ##
@@ -1,6 +1,6 @@
1
1
  <div class="row">
2
2
  <div class="col-md-12">
3
- <div id="main-flashes">
3
+ <div id="main-flashes" class="<%= class_names(container: blacklight_config&.full_width_layout) %>">
4
4
  <%= yield %>
5
5
  </div>
6
6
  </div>
@@ -60,6 +60,7 @@ module Blacklight
60
60
  default_configuration do
61
61
  property :logo_link, default: nil
62
62
  property :header_component, default: Blacklight::HeaderComponent
63
+ property :full_width_layout, default: false
63
64
 
64
65
  # bootstrap_version may be set to 4 or 5
65
66
  bootstrap_version = ENV['BOOTSTRAP_VERSION'].presence || "5"
@@ -20,7 +20,7 @@ module Blacklight
20
20
  end
21
21
  end
22
22
 
23
- super value
23
+ super(value)
24
24
  set_default_proc!
25
25
  end
26
26
 
@@ -56,7 +56,7 @@ module Blacklight
56
56
  # to the internal hash
57
57
  def marshal_load x
58
58
  @nested_class = x.first
59
- super x.last
59
+ super(x.last)
60
60
  set_default_proc!
61
61
  end
62
62
 
@@ -14,7 +14,7 @@ class Blacklight::Solr::Request < ActiveSupport::HashWithIndifferentAccess
14
14
  super()
15
15
  update(constructor)
16
16
  else
17
- super(constructor)
17
+ super
18
18
  end
19
19
  end
20
20
 
@@ -102,7 +102,7 @@ module Blacklight::Solr::Response::Facets
102
102
 
103
103
  class NullFacetField < FacetField
104
104
  def initialize name, items = [], response: nil, **kwargs
105
- super(name, items, response: response, **kwargs)
105
+ super
106
106
  end
107
107
  end
108
108
 
@@ -324,7 +324,7 @@ module Blacklight::Solr
324
324
  unless val =~ /^[a-zA-Z0-9$_\-\^]+$/
325
325
  val = options[:quote] +
326
326
  # Yes, we need crazy escaping here, to deal with regexp esc too!
327
- val.gsub("'", "\\\\\'").gsub('"', "\\\\\"") +
327
+ val.gsub("'", "\\\\'").gsub('"', "\\\\\"") +
328
328
  options[:quote]
329
329
  end
330
330
  val
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blacklight-frontend",
3
- "version": "8.2.2",
3
+ "version": "8.3.0",
4
4
  "description": "The frontend code and styles for Blacklight",
5
5
  "main": "app/assets/javascripts/blacklight",
6
6
  "module": "app/assets/javascripts/blacklight/blacklight.esm.js",