blacklight 9.0.0.beta1 → 9.0.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 +2 -1
- data/.github/matrix.json +55 -0
- data/.github/workflows/build.yml +16 -0
- data/.github/workflows/lint.yml +25 -0
- data/.github/workflows/main.yml +22 -0
- data/.github/workflows/release_7_x_scheduled.yml +39 -0
- data/.github/workflows/release_8_x_scheduled.yml +39 -0
- data/.github/workflows/test.yml +53 -0
- data/.rubocop.yml +81 -3
- data/.rubocop_todo.yml +46 -71
- data/.solr_wrapper.yml +3 -1
- data/README.md +2 -2
- data/VERSION +1 -1
- data/app/assets/builds/blacklight.css +51 -38
- data/app/assets/javascripts/blacklight/blacklight.esm.js +62 -77
- data/app/assets/javascripts/blacklight/blacklight.esm.js.map +1 -1
- data/app/assets/javascripts/blacklight/blacklight.js +62 -77
- data/app/assets/javascripts/blacklight/blacklight.js.map +1 -1
- data/app/assets/stylesheets/blacklight/_blacklight_base.scss +0 -1
- data/app/assets/stylesheets/blacklight/_bootstrap_overrides.scss +4 -0
- data/app/assets/stylesheets/blacklight/_facets.scss +37 -29
- data/app/assets/stylesheets/blacklight/_header.scss +4 -0
- data/app/assets/stylesheets/blacklight/_modal.scss +9 -8
- data/app/assets/stylesheets/blacklight/_pagination.scss +1 -3
- data/app/assets/stylesheets/blacklight/_search_history.scss +0 -4
- data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +3 -0
- data/app/components/blacklight/advanced_search_form_component.html.erb +4 -4
- data/app/components/blacklight/advanced_search_form_component.rb +6 -5
- data/app/components/blacklight/constraint_component.html.erb +1 -5
- data/app/components/blacklight/constraint_component.rb +11 -0
- data/app/components/blacklight/constraint_layout_component.html.erb +1 -6
- data/app/components/blacklight/constraint_layout_component.rb +9 -0
- data/app/components/blacklight/constraints_component.html.erb +3 -8
- data/app/components/blacklight/constraints_component.rb +59 -14
- data/app/components/blacklight/document/action_component.rb +1 -3
- data/app/components/blacklight/document/bookmark_component.html.erb +3 -3
- data/app/components/blacklight/document/bookmark_component.rb +10 -4
- data/app/components/blacklight/document/group_component.html.erb +1 -1
- data/app/components/blacklight/document/more_like_this_component.rb +2 -2
- data/app/components/blacklight/document/page_header_component.rb +3 -3
- data/app/components/blacklight/document/thumbnail_component.html.erb +3 -7
- data/app/components/blacklight/document/thumbnail_component.rb +7 -6
- data/app/components/blacklight/document_component.html.erb +3 -3
- data/app/components/blacklight/document_component.rb +22 -26
- data/app/components/blacklight/document_title_component.rb +6 -10
- data/app/components/blacklight/facet_field_checkboxes_component.rb +4 -18
- data/app/components/blacklight/facet_field_component.rb +4 -15
- data/app/components/blacklight/facet_field_filter_component.rb +4 -19
- data/app/components/blacklight/facet_field_inclusive_constraint_component.rb +4 -23
- data/app/components/blacklight/facet_field_list_component.rb +4 -30
- data/app/components/blacklight/facet_field_no_layout_component.rb +4 -8
- data/app/components/blacklight/facet_field_pagination_component.html.erb +2 -2
- data/app/components/blacklight/facet_item_component.rb +4 -72
- data/app/components/blacklight/facet_item_pivot_component.rb +8 -4
- data/app/components/blacklight/{facet_field_checkboxes_component.html.erb → facets/checkboxes_component.html.erb} +4 -4
- data/app/components/blacklight/facets/checkboxes_component.rb +26 -0
- data/app/components/blacklight/facets/count_component.rb +23 -0
- data/app/components/blacklight/{facet_field_component.html.erb → facets/field_component.html.erb} +1 -3
- data/app/components/blacklight/facets/field_component.rb +23 -0
- data/app/components/blacklight/facets/filters_component.html.erb +4 -0
- data/app/components/blacklight/facets/filters_component.rb +39 -0
- data/app/components/blacklight/{facet_field_inclusive_constraint_component.html.erb → facets/inclusive_constraint_component.html.erb} +1 -1
- data/app/components/blacklight/facets/inclusive_constraint_component.rb +31 -0
- data/app/components/blacklight/{facet_field_filter_component.html.erb → facets/index_navigation_component.html.erb} +1 -1
- data/app/components/blacklight/facets/index_navigation_component.rb +32 -0
- data/app/components/blacklight/facets/item_component.rb +76 -0
- data/app/components/blacklight/facets/list_component.html.erb +11 -0
- data/app/components/blacklight/facets/list_component.rb +46 -0
- data/app/components/blacklight/facets/no_layout_component.rb +16 -0
- data/app/components/blacklight/facets/pivot_list_component.rb +14 -0
- data/app/components/blacklight/facets/selected_value_component.rb +29 -0
- data/app/components/blacklight/facets/suggest_component.html.erb +17 -0
- data/app/components/blacklight/facets/suggest_component.rb +21 -0
- data/app/components/blacklight/header_component.rb +2 -2
- data/app/components/blacklight/icons/remove_component.rb +2 -2
- data/app/components/blacklight/metadata_field_component.html.erb +2 -2
- data/app/components/blacklight/metadata_field_component.rb +2 -1
- data/app/components/blacklight/metadata_field_layout_component.rb +9 -4
- data/app/components/blacklight/metadata_field_plain_text_layout_component.rb +2 -2
- data/app/components/blacklight/response/facet_group_component.html.erb +3 -3
- data/app/components/blacklight/response/facet_group_component.rb +9 -1
- data/app/components/blacklight/search_bar_component.html.erb +2 -2
- data/app/components/blacklight/system/dropdown_component.html.erb +1 -1
- data/app/components/blacklight/system/dropdown_component.rb +1 -1
- data/app/components/blacklight/system/flash_message_component.html.erb +1 -1
- data/app/components/blacklight/system/flash_message_component.rb +0 -9
- data/app/components/blacklight/system/modal_component.html.erb +1 -2
- data/app/components/blacklight/top_navbar_component.html.erb +2 -2
- data/app/controllers/concerns/blacklight/bookmarks.rb +13 -3
- data/app/controllers/concerns/blacklight/catalog.rb +27 -30
- data/app/controllers/concerns/blacklight/controller.rb +1 -1
- data/app/controllers/concerns/blacklight/search_context.rb +1 -1
- data/app/controllers/concerns/blacklight/searchable.rb +1 -1
- data/app/helpers/blacklight/catalog_helper_behavior.rb +5 -3
- data/app/helpers/blacklight/configuration_helper_behavior.rb +2 -2
- data/app/helpers/blacklight/document_helper_behavior.rb +3 -1
- data/app/helpers/blacklight/facets_helper_behavior.rb +7 -12
- data/app/helpers/blacklight/icon_helper_behavior.rb +2 -2
- data/app/javascript/blacklight-frontend/bookmark_toggle.js +7 -2
- data/app/javascript/blacklight-frontend/button_focus.js +1 -1
- data/app/javascript/blacklight-frontend/checkbox_submit.js +9 -2
- data/app/javascript/blacklight-frontend/debounce.js +1 -1
- data/app/javascript/blacklight-frontend/facet_suggest.js +27 -3
- data/app/javascript/blacklight-frontend/index.js +0 -2
- data/app/javascript/blacklight-frontend/modal.js +15 -8
- data/app/javascript/blacklight-frontend/search_context.js +3 -2
- data/app/presenters/blacklight/constraint_presenter.rb +22 -0
- data/app/presenters/blacklight/document_presenter.rb +6 -5
- data/app/presenters/blacklight/facet_field_presenter.rb +18 -2
- data/app/presenters/blacklight/facet_grouped_item_presenter.rb +6 -0
- data/app/presenters/blacklight/facet_item_pivot_presenter.rb +1 -5
- data/app/presenters/blacklight/facet_item_presenter.rb +5 -18
- data/app/presenters/blacklight/field_presenter.rb +4 -2
- data/app/presenters/blacklight/json_presenter.rb +8 -4
- data/app/presenters/blacklight/rendering/abstract_step.rb +7 -1
- data/app/presenters/blacklight/rendering/helper_method.rb +4 -4
- data/app/presenters/blacklight/rendering/join.rb +11 -7
- data/app/presenters/blacklight/rendering/terminator.rb +1 -1
- data/app/services/blacklight/field_retriever.rb +1 -1
- data/app/services/blacklight/search_service.rb +10 -8
- data/app/values/blacklight/types.rb +2 -2
- data/app/views/blacklight/nav/_bookmark.html.erb +1 -1
- data/app/views/catalog/_document.atom.builder +1 -1
- data/app/views/catalog/_document.html.erb +1 -1
- data/app/views/catalog/_email_form.html.erb +4 -4
- data/app/views/catalog/_home_text.html.erb +2 -2
- data/app/views/catalog/_show_main_content.html.erb +9 -5
- data/app/views/catalog/_sms_form.html.erb +4 -4
- data/app/views/catalog/_sort_and_per_page.html.erb +1 -1
- data/app/views/catalog/advanced_search.html.erb +1 -1
- data/app/views/catalog/facet.html.erb +8 -10
- data/app/views/catalog/index.html.erb +0 -1
- data/app/views/catalog/index.json.jbuilder +5 -3
- data/app/views/catalog/show.html.erb +2 -2
- data/app/views/layouts/blacklight/base.html.erb +1 -1
- data/blacklight.gemspec +1 -1
- data/config/locales/blacklight.ar.yml +14 -14
- data/config/locales/blacklight.ca.yml +2 -2
- data/config/locales/blacklight.de.yml +13 -13
- data/config/locales/blacklight.en.yml +3 -3
- data/config/locales/blacklight.es.yml +13 -13
- data/config/locales/blacklight.fr.yml +14 -14
- data/config/locales/blacklight.hu.yml +15 -15
- data/config/locales/blacklight.it.yml +16 -16
- data/config/locales/blacklight.nl.yml +13 -13
- data/config/locales/blacklight.pt-BR.yml +15 -15
- data/config/locales/blacklight.sq.yml +14 -14
- data/config/locales/blacklight.zh.yml +12 -12
- data/lib/blacklight/abstract_repository.rb +2 -2
- data/lib/blacklight/component.rb +7 -1
- data/lib/blacklight/configuration/context.rb +3 -3
- data/lib/blacklight/configuration/facet_field.rb +11 -6
- data/lib/blacklight/configuration/field.rb +4 -4
- data/lib/blacklight/configuration/fields.rb +0 -1
- data/lib/blacklight/configuration/search_field.rb +1 -1
- data/lib/blacklight/configuration/view_config.rb +32 -18
- data/lib/blacklight/configuration.rb +64 -10
- data/lib/blacklight/nested_open_struct_with_hash_access.rb +1 -1
- data/lib/blacklight/open_struct_with_hash_access.rb +2 -2
- data/lib/blacklight/routes/searchable.rb +1 -1
- data/lib/blacklight/search_builder.rb +2 -1
- data/lib/blacklight/search_state/filter_field.rb +4 -4
- data/lib/blacklight/search_state/pivot_filter_field.rb +5 -5
- data/lib/blacklight/search_state.rb +2 -0
- data/lib/blacklight/solr/abstract_filter_query_builder.rb +77 -0
- data/lib/blacklight/solr/default_filter_query_builder.rb +20 -0
- data/lib/blacklight/solr/field_reflection_search_builder.rb +11 -0
- data/lib/blacklight/solr/repository.rb +17 -15
- data/lib/blacklight/solr/response/facets.rb +2 -2
- data/lib/blacklight/solr/response/params.rb +0 -4
- data/lib/blacklight/solr/response.rb +5 -1
- data/lib/blacklight/solr/search_builder_behavior.rb +48 -97
- data/lib/blacklight/solr/single_doc_search_builder.rb +25 -0
- data/lib/blacklight.rb +6 -4
- data/lib/generators/blacklight/assets/importmap_generator.rb +3 -5
- data/lib/generators/blacklight/assets_generator.rb +1 -1
- data/lib/generators/blacklight/search_builder_generator.rb +1 -1
- data/lib/generators/blacklight/templates/.solr_wrapper.yml +3 -1
- data/lib/generators/blacklight/templates/catalog_controller.rb +34 -8
- data/lib/generators/blacklight/templates/solr/conf/solrconfig.xml +0 -71
- data/package.json +3 -3
- data/spec/components/blacklight/advanced_search_form_component_spec.rb +18 -22
- data/spec/components/blacklight/constraint_layout_component_spec.rb +8 -8
- data/spec/components/blacklight/constraints_component_spec.rb +11 -11
- data/spec/components/blacklight/document/action_component_spec.rb +23 -15
- data/spec/components/blacklight/document/group_component_spec.rb +10 -15
- data/spec/components/blacklight/document/page_header_component_spec.rb +35 -28
- data/spec/components/blacklight/document/sidebar_component_spec.rb +5 -11
- data/spec/components/blacklight/document_component_spec.rb +105 -79
- data/spec/components/blacklight/facet_component_spec.rb +12 -8
- data/spec/components/blacklight/facet_item_pivot_component_spec.rb +12 -12
- data/spec/components/blacklight/{facet_field_checkboxes_component_spec.rb → facets/checkboxes_component_spec.rb} +13 -13
- data/spec/components/blacklight/facets/filters_component_spec.rb +36 -0
- data/spec/components/blacklight/facets/index_navigation_component_spec.rb +41 -0
- data/spec/components/blacklight/{facet_item_component_spec.rb → facets/item_component_spec.rb} +10 -10
- data/spec/components/blacklight/{facet_field_list_component_spec.rb → facets/list_component_spec.rb} +34 -23
- data/spec/components/blacklight/facets/pivot_list_component_spec.rb +53 -0
- data/spec/components/blacklight/facets/suggest_component_spec.rb +82 -0
- data/spec/components/blacklight/header_component_spec.rb +2 -4
- data/spec/components/blacklight/hidden_search_state_component_spec.rb +7 -7
- data/spec/components/blacklight/metadata_field_component_spec.rb +17 -15
- data/spec/components/blacklight/response/facet_group_component_spec.rb +37 -0
- data/spec/components/blacklight/response/pagination_component_spec.rb +1 -1
- data/spec/components/blacklight/response/spellcheck_component_spec.rb +1 -1
- data/spec/components/blacklight/search_bar_component_spec.rb +28 -5
- data/spec/components/blacklight/search_context/server_applied_params_component_spec.rb +2 -2
- data/spec/components/blacklight/search_context/server_item_pagination_component_spec.rb +3 -5
- data/spec/components/blacklight/skip_link_component_spec.rb +8 -11
- data/spec/components/blacklight/start_over_button_component_spec.rb +4 -4
- data/spec/components/blacklight/system/dropdown_component_spec.rb +26 -0
- data/spec/components/blacklight/system/flash_message_component_spec.rb +7 -11
- data/spec/controllers/blacklight/catalog_spec.rb +1 -1
- data/spec/controllers/catalog_controller_spec.rb +12 -20
- data/spec/features/advanced_search_spec.rb +42 -21
- data/spec/features/facets_spec.rb +84 -12
- data/spec/features/modal_spec.rb +1 -1
- data/spec/features/search_filters_spec.rb +6 -4
- data/spec/features/search_spec.rb +3 -3
- data/spec/helpers/blacklight/facets_helper_behavior_spec.rb +10 -0
- data/spec/lib/blacklight/configuration/facet_field_spec.rb +2 -2
- data/spec/lib/blacklight/parameters_spec.rb +12 -1
- data/spec/lib/blacklight/search_state/filter_field_spec.rb +18 -0
- data/spec/models/blacklight/configuration_spec.rb +178 -28
- data/spec/models/blacklight/solr/default_filter_query_builder_spec.rb +72 -0
- data/spec/models/blacklight/solr/document_spec.rb +0 -4
- data/spec/models/blacklight/solr/repository_spec.rb +37 -29
- data/spec/models/blacklight/solr/response/facets_spec.rb +86 -40
- data/spec/models/blacklight/solr/response/group_response_spec.rb +8 -5
- data/spec/models/blacklight/solr/response/group_spec.rb +9 -5
- data/spec/models/blacklight/solr/response_spec.rb +96 -64
- data/spec/models/blacklight/solr/search_builder_behavior_spec.rb +38 -57
- data/spec/models/solr_document_spec.rb +5 -1
- data/spec/presenters/blacklight/constraint_presenter_spec.rb +32 -0
- data/spec/presenters/blacklight/document_presenter_spec.rb +3 -3
- data/spec/presenters/blacklight/facet_item_presenter_spec.rb +0 -7
- data/spec/presenters/blacklight/field_presenter_spec.rb +103 -22
- data/spec/presenters/blacklight/json_presenter_spec.rb +17 -0
- data/spec/presenters/blacklight/rendering/pipeline_spec.rb +130 -14
- data/spec/services/blacklight/search_service_spec.rb +6 -27
- data/spec/spec_helper.rb +0 -1
- data/spec/support/presenter_test_helpers.rb +1 -1
- data/spec/support/view_component_test_helpers.rb +0 -18
- data/spec/views/catalog/facet.html.erb_spec.rb +10 -3
- data/spec/views/catalog/index.atom.builder_spec.rb +8 -3
- data/spec/views/catalog/index.html.erb_spec.rb +3 -1
- metadata +69 -38
- data/.github/workflows/ruby.yml +0 -98
- data/app/assets/stylesheets/blacklight/_icons.scss +0 -4
- data/app/components/blacklight/facet_field_list_component.html.erb +0 -19
- data/app/components/blacklight/search/facet_suggest_input.html.erb +0 -9
- data/app/components/blacklight/search/facet_suggest_input.rb +0 -16
- data/app/javascript/blacklight-frontend/modalForm.js +0 -60
- data/app/views/catalog/_facet_index_navigation.html.erb +0 -1
- data/app/views/catalog/_facet_layout.html.erb +0 -8
- data/app/views/catalog/_facet_pagination.html.erb +0 -1
- data/app/views/catalog/_facet_pivot.html.erb +0 -3
- data/app/views/shared/_sitelinks_search_box.html.erb +0 -12
- data/spec/components/blacklight/document_metadata_component_spec.rb +0 -0
- data/spec/components/blacklight/search/facet_suggest_input_spec.rb +0 -33
- data/spec/features/sitelinks_search_box_spec.rb +0 -13
- data/spec/views/catalog/_facet_index_navigation.html.erb_spec.rb +0 -43
- data/spec/views/catalog/_facet_layout.html.erb_spec.rb +0 -41
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7e40641612cebe399faf9868c171d6cf711b59d66c1bc473785ebc801fc5529b
|
|
4
|
+
data.tar.gz: 68c5ee0c75357603704e1ff05c3b0cf05e9671d5d4f59f5980e795031125da79
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c2775c6c51e94929bfb33f8fe539e827999e5622d0a02b2bce5b9df9c7c756b6e2e12143e6e26e3a179a1d2a56bf53b42ca9d452f1309ffebeb3566cef9b2ff
|
|
7
|
+
data.tar.gz: e99e05050ac7160926a2ce94a9581a6a6454d7d611e63a59881ce4d2882364bf7c346c96722a839ff43f1efbf3d44b010b9ab54792e7be339c0146599c8114a9
|
data/.docker/app/Dockerfile
CHANGED
data/.github/matrix.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ruby": ["3.4"],
|
|
3
|
+
"rails_version": ["8.1.1"],
|
|
4
|
+
"bootstrap_version": [null],
|
|
5
|
+
"view_component_version": ["~> 4.0"],
|
|
6
|
+
"api": [null],
|
|
7
|
+
"additional_engine_cart_rails_options": ["--css=bootstrap"],
|
|
8
|
+
"additional_name": [""],
|
|
9
|
+
"include": [
|
|
10
|
+
{
|
|
11
|
+
"ruby": "3.4",
|
|
12
|
+
"rails_version": "8.1.1",
|
|
13
|
+
"additional_engine_cart_rails_options": "--css=bootstrap --js=esbuild",
|
|
14
|
+
"additional_name": "| esbuild"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"ruby": "3.4",
|
|
18
|
+
"rails_version": "8.0.4",
|
|
19
|
+
"additional_engine_cart_rails_options": "--css=bootstrap",
|
|
20
|
+
"view_component_version": "~> 3.0",
|
|
21
|
+
"additional_name": "ViewComponent 3"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"ruby": "3.3",
|
|
25
|
+
"rails_version": "8.0.4",
|
|
26
|
+
"additional_engine_cart_rails_options": "--css=bootstrap",
|
|
27
|
+
"additional_name": "| Rails 8.0 + Ruby 3.3"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"ruby": "3.4",
|
|
31
|
+
"rails_version": "8.0.4",
|
|
32
|
+
"additional_engine_cart_rails_options": "--css=bootstrap --js=esbuild",
|
|
33
|
+
"additional_name": "| esbuild"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"ruby": "3.2",
|
|
37
|
+
"rails_version": "8.0.4",
|
|
38
|
+
"solr_version": "8.11.2",
|
|
39
|
+
"additional_name": "| Solr 8.11.2 and Ruby 3.2"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"ruby": "3.4",
|
|
43
|
+
"rails_version": "8.1.1",
|
|
44
|
+
"api": "true",
|
|
45
|
+
"additional_engine_cart_rails_options": "--api --skip-yarn",
|
|
46
|
+
"additional_name": "| API"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"ruby": "3.4",
|
|
50
|
+
"rails_version": "7.2.3",
|
|
51
|
+
"additional_engine_cart_rails_options": "-a propshaft --css=bootstrap --js=esbuild",
|
|
52
|
+
"additional_name": "| Rails 7.2 + Propshaft, esbuild"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
on:
|
|
2
|
+
workflow_call:
|
|
3
|
+
inputs:
|
|
4
|
+
ref:
|
|
5
|
+
required: false
|
|
6
|
+
type: string
|
|
7
|
+
default: ''
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
with:
|
|
14
|
+
ref: ${{ inputs.ref }}
|
|
15
|
+
- name: Build docker image
|
|
16
|
+
run: docker compose build app
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
on:
|
|
2
|
+
workflow_call:
|
|
3
|
+
inputs:
|
|
4
|
+
ref:
|
|
5
|
+
required: false
|
|
6
|
+
type: string
|
|
7
|
+
default: ''
|
|
8
|
+
jobs:
|
|
9
|
+
lint:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
with:
|
|
14
|
+
ref: ${{ inputs.ref }}
|
|
15
|
+
- name: Set up Ruby
|
|
16
|
+
uses: ruby/setup-ruby@v1
|
|
17
|
+
with:
|
|
18
|
+
ruby-version: 3.2
|
|
19
|
+
bundler: "latest"
|
|
20
|
+
- name: Change permissions
|
|
21
|
+
run: "chmod -f -R o-w /opt/hostedtoolcache/Ruby/3.2.5/x64/lib/ruby/gems/3.2.0/gems | :"
|
|
22
|
+
- name: Install dependencies
|
|
23
|
+
run: bundle install
|
|
24
|
+
- name: Run linter
|
|
25
|
+
run: bundle exec rake rubocop
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
2
|
+
# They are provided by a third-party and are governed by
|
|
3
|
+
# separate terms of service, privacy policy, and support
|
|
4
|
+
# documentation.
|
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
|
7
|
+
|
|
8
|
+
name: CI
|
|
9
|
+
|
|
10
|
+
on:
|
|
11
|
+
push:
|
|
12
|
+
branches:
|
|
13
|
+
- main
|
|
14
|
+
- "release-*"
|
|
15
|
+
pull_request:
|
|
16
|
+
jobs:
|
|
17
|
+
lint:
|
|
18
|
+
uses: ./.github/workflows/lint.yml
|
|
19
|
+
test:
|
|
20
|
+
uses: ./.github/workflows/test.yml
|
|
21
|
+
docker_build:
|
|
22
|
+
uses: ./.github/workflows/build.yml
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# If there are failures running this workflow, please resolve them on the release-7.x branch
|
|
2
|
+
# and then port any necessary changes to this branch.
|
|
3
|
+
|
|
4
|
+
name: release-7.x scheduled
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
schedule:
|
|
9
|
+
# Weekly at 9:35 on Friday
|
|
10
|
+
# Somewhat weird timing so that it isn't delayed too much
|
|
11
|
+
- cron: '35 9 * * 5'
|
|
12
|
+
jobs:
|
|
13
|
+
lint:
|
|
14
|
+
uses: projectblacklight/blacklight/.github/workflows/lint.yml@release-7.x
|
|
15
|
+
with:
|
|
16
|
+
ref: release-7.x
|
|
17
|
+
test:
|
|
18
|
+
uses: projectblacklight/blacklight/.github/workflows/test.yml@release-7.x
|
|
19
|
+
with:
|
|
20
|
+
ref: release-7.x
|
|
21
|
+
docker_build:
|
|
22
|
+
uses: projectblacklight/blacklight/.github/workflows/build.yml@release-7.x
|
|
23
|
+
with:
|
|
24
|
+
ref: release-7.x
|
|
25
|
+
report:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
if: ${{ always() && contains(join(needs.*.result, ','), 'failure') }}
|
|
28
|
+
needs: [lint, test, docker_build]
|
|
29
|
+
steps:
|
|
30
|
+
- name: Report on failure of any dependent job
|
|
31
|
+
env:
|
|
32
|
+
NEEDS: ${{ toJSON(needs) }}
|
|
33
|
+
uses: slackapi/slack-github-action@v2.0.0
|
|
34
|
+
with:
|
|
35
|
+
method: chat.postMessage
|
|
36
|
+
token: ${{ secrets.SLACK_BOT_TOKEN }}
|
|
37
|
+
payload: |
|
|
38
|
+
channel: ${{ secrets.SLACK_CHANNEL_ID }}
|
|
39
|
+
text: "The weekly CI run of the release-7.x branch has failed"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# If there are failures running this workflow, please resolve them on the release-8.x branch
|
|
2
|
+
# and then port any necessary changes to this branch.
|
|
3
|
+
|
|
4
|
+
name: release-8.x scheduled
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
schedule:
|
|
9
|
+
# Weekly at 9:35 on Friday
|
|
10
|
+
# Somewhat weird timing so that it isn't delayed too much
|
|
11
|
+
- cron: '35 9 * * 5'
|
|
12
|
+
jobs:
|
|
13
|
+
lint:
|
|
14
|
+
uses: projectblacklight/blacklight/.github/workflows/lint.yml@release-8.x
|
|
15
|
+
with:
|
|
16
|
+
ref: release-8.x
|
|
17
|
+
test:
|
|
18
|
+
uses: projectblacklight/blacklight/.github/workflows/test.yml@release-8.x
|
|
19
|
+
with:
|
|
20
|
+
ref: release-8.x
|
|
21
|
+
docker_build:
|
|
22
|
+
uses: projectblacklight/blacklight/.github/workflows/build.yml@release-8.x
|
|
23
|
+
with:
|
|
24
|
+
ref: release-8.x
|
|
25
|
+
report:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
if: ${{ always() && contains(join(needs.*.result, ','), 'failure') }}
|
|
28
|
+
needs: [lint, test, docker_build]
|
|
29
|
+
steps:
|
|
30
|
+
- name: Report on failure of any dependent job
|
|
31
|
+
env:
|
|
32
|
+
NEEDS: ${{ toJSON(needs) }}
|
|
33
|
+
uses: slackapi/slack-github-action@v2.0.0
|
|
34
|
+
with:
|
|
35
|
+
method: chat.postMessage
|
|
36
|
+
token: ${{ secrets.SLACK_BOT_TOKEN }}
|
|
37
|
+
payload: |
|
|
38
|
+
channel: ${{ secrets.SLACK_CHANNEL_ID }}
|
|
39
|
+
text: "The weekly CI run of the release-8.x branch has failed"
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
on:
|
|
2
|
+
workflow_call:
|
|
3
|
+
inputs:
|
|
4
|
+
ref:
|
|
5
|
+
required: false
|
|
6
|
+
type: string
|
|
7
|
+
default: ''
|
|
8
|
+
description: The branch or reference to run the workflow against
|
|
9
|
+
jobs:
|
|
10
|
+
set_matrix:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
outputs:
|
|
13
|
+
matrix: ${{ steps.matrix.outputs.matrix }}
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout repository
|
|
16
|
+
uses: actions/checkout@v3
|
|
17
|
+
with:
|
|
18
|
+
ref: ${{ inputs.ref }}
|
|
19
|
+
- name: Echo ./.github/matrix.json
|
|
20
|
+
id: matrix
|
|
21
|
+
run: |
|
|
22
|
+
echo "matrix<<EOF" >> $GITHUB_OUTPUT
|
|
23
|
+
cat ./.github/matrix.json >> $GITHUB_OUTPUT
|
|
24
|
+
echo "EOF" >> $GITHUB_OUTPUT
|
|
25
|
+
test:
|
|
26
|
+
needs: set_matrix
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
name: ruby ${{ matrix.ruby }} | rails ${{ matrix.rails_version }} ${{ matrix.additional_name }}
|
|
29
|
+
strategy:
|
|
30
|
+
fail-fast: false
|
|
31
|
+
matrix: ${{fromJson(needs.set_matrix.outputs.matrix)}}
|
|
32
|
+
env:
|
|
33
|
+
RAILS_VERSION: ${{ matrix.rails_version }}
|
|
34
|
+
SOLR_VERSION: ${{ matrix.solr_version || 'latest' }}
|
|
35
|
+
VIEW_COMPONENT_VERSION: ${{ matrix.view_component_version }}
|
|
36
|
+
BOOTSTRAP_VERSION: ${{ matrix.bootstrap_version }}
|
|
37
|
+
BLACKLIGHT_API_TEST: ${{ matrix.api }}
|
|
38
|
+
ENGINE_CART_RAILS_OPTIONS: "--skip-git --skip-listen --skip-spring --skip-keeps --skip-kamal --skip-solid --skip-coffee --skip-test ${{ matrix.additional_engine_cart_rails_options }}"
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v4
|
|
41
|
+
with:
|
|
42
|
+
ref: ${{ inputs.ref }}
|
|
43
|
+
- name: Set up Ruby
|
|
44
|
+
uses: ruby/setup-ruby@v1
|
|
45
|
+
with:
|
|
46
|
+
bundler: "latest"
|
|
47
|
+
ruby-version: ${{ matrix.ruby }}
|
|
48
|
+
- name: Change permissions
|
|
49
|
+
run: "chmod -f -R o-w /opt/hostedtoolcache/Ruby/3.2.5/x64/lib/ruby/gems/3.2.0/gems | :"
|
|
50
|
+
- name: Install dependencies
|
|
51
|
+
run: bundle install
|
|
52
|
+
- name: Run tests
|
|
53
|
+
run: bundle exec rake ci
|
data/.rubocop.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
plugins:
|
|
2
2
|
- rubocop-capybara
|
|
3
3
|
- rubocop-rspec
|
|
4
4
|
- rubocop-rspec_rails
|
|
@@ -10,7 +10,7 @@ inherit_from:
|
|
|
10
10
|
|
|
11
11
|
AllCops:
|
|
12
12
|
DisplayCopNames: true
|
|
13
|
-
TargetRubyVersion: 3.
|
|
13
|
+
TargetRubyVersion: 3.2
|
|
14
14
|
TargetRailsVersion: 7.0
|
|
15
15
|
Exclude:
|
|
16
16
|
- "lib/generators/blacklight/templates/**/*"
|
|
@@ -75,7 +75,7 @@ Naming/MethodParameterName:
|
|
|
75
75
|
- of
|
|
76
76
|
- by
|
|
77
77
|
|
|
78
|
-
Naming/
|
|
78
|
+
Naming/PredicatePrefix:
|
|
79
79
|
ForbiddenPrefixes:
|
|
80
80
|
- is_
|
|
81
81
|
|
|
@@ -585,3 +585,81 @@ Rails/WhereRange: # new in 2.25
|
|
|
585
585
|
Enabled: true
|
|
586
586
|
Gemspec/AddRuntimeDependency: # new in 1.65
|
|
587
587
|
Enabled: true
|
|
588
|
+
Lint/ArrayLiteralInRegexp: # new in 1.71
|
|
589
|
+
Enabled: true
|
|
590
|
+
Lint/ConstantReassignment: # new in 1.70
|
|
591
|
+
Enabled: true
|
|
592
|
+
Lint/DuplicateSetElement: # new in 1.67
|
|
593
|
+
Enabled: true
|
|
594
|
+
Lint/HashNewWithKeywordArgumentsAsDefault: # new in 1.69
|
|
595
|
+
Enabled: true
|
|
596
|
+
Lint/NumericOperationWithConstantResult: # new in 1.69
|
|
597
|
+
Enabled: true
|
|
598
|
+
Lint/SharedMutableDefault: # new in 1.70
|
|
599
|
+
Enabled: true
|
|
600
|
+
Lint/UnescapedBracketInRegexp: # new in 1.68
|
|
601
|
+
Enabled: true
|
|
602
|
+
Lint/UselessDefined: # new in 1.69
|
|
603
|
+
Enabled: true
|
|
604
|
+
Lint/UselessNumericOperation: # new in 1.66
|
|
605
|
+
Enabled: true
|
|
606
|
+
Style/AmbiguousEndlessMethodDefinition: # new in 1.68
|
|
607
|
+
Enabled: true
|
|
608
|
+
Style/BitwisePredicate: # new in 1.68
|
|
609
|
+
Enabled: true
|
|
610
|
+
Style/CombinableDefined: # new in 1.68
|
|
611
|
+
Enabled: true
|
|
612
|
+
Style/DigChain: # new in 1.69
|
|
613
|
+
Enabled: true
|
|
614
|
+
Style/FileNull: # new in 1.69
|
|
615
|
+
Enabled: true
|
|
616
|
+
Style/FileTouch: # new in 1.69
|
|
617
|
+
Enabled: true
|
|
618
|
+
Style/HashSlice: # new in 1.71
|
|
619
|
+
Enabled: true
|
|
620
|
+
Style/ItAssignment: # new in 1.70
|
|
621
|
+
Enabled: true
|
|
622
|
+
Style/KeywordArgumentsMerging: # new in 1.68
|
|
623
|
+
Enabled: true
|
|
624
|
+
Style/RedundantInterpolationUnfreeze: # new in 1.66
|
|
625
|
+
Enabled: true
|
|
626
|
+
Style/SafeNavigationChainLength: # new in 1.68
|
|
627
|
+
Enabled: true
|
|
628
|
+
Rails/EnumSyntax: # new in 2.26
|
|
629
|
+
Enabled: true
|
|
630
|
+
Rails/MultipleRoutePaths: # new in 2.29
|
|
631
|
+
Enabled: true
|
|
632
|
+
Rails/StrongParametersExpect: # new in 2.29
|
|
633
|
+
Enabled: true
|
|
634
|
+
Lint/CopDirectiveSyntax: # new in 1.72
|
|
635
|
+
Enabled: true
|
|
636
|
+
Lint/RedundantTypeConversion: # new in 1.72
|
|
637
|
+
Enabled: true
|
|
638
|
+
Lint/SuppressedExceptionInNumberConversion: # new in 1.72
|
|
639
|
+
Enabled: true
|
|
640
|
+
Lint/UselessConstantScoping: # new in 1.72
|
|
641
|
+
Enabled: true
|
|
642
|
+
Style/ComparableBetween: # new in 1.74
|
|
643
|
+
Enabled: true
|
|
644
|
+
Style/HashFetchChain: # new in 1.75
|
|
645
|
+
Enabled: true
|
|
646
|
+
Style/ItBlockParameter: # new in 1.75
|
|
647
|
+
Enabled: true
|
|
648
|
+
Style/RedundantFormat: # new in 1.72
|
|
649
|
+
Enabled: true
|
|
650
|
+
Capybara/FindAllFirst: # new in 2.22
|
|
651
|
+
Enabled: true
|
|
652
|
+
Capybara/NegationMatcherAfterVisit: # new in 2.22
|
|
653
|
+
Enabled: true
|
|
654
|
+
RSpec/IncludeExamples: # new in 3.6
|
|
655
|
+
Enabled: true
|
|
656
|
+
Lint/UselessDefaultValueArgument: # new in 1.76
|
|
657
|
+
Enabled: true
|
|
658
|
+
Lint/UselessOr: # new in 1.76
|
|
659
|
+
Enabled: true
|
|
660
|
+
Naming/PredicateMethod: # new in 1.76
|
|
661
|
+
Enabled: true
|
|
662
|
+
Style/EmptyStringInsideInterpolation: # new in 1.76
|
|
663
|
+
Enabled: true
|
|
664
|
+
Style/RedundantArrayFlatten: # new in 1.76
|
|
665
|
+
Enabled: true
|