blacklight 7.40.0 → 7.42.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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/.github/matrix.json +71 -0
  3. data/.github/workflows/build.yml +16 -0
  4. data/.github/workflows/lint.yml +23 -0
  5. data/.github/workflows/main.yml +23 -0
  6. data/.github/workflows/test.yml +52 -0
  7. data/.rubocop.yml +1 -1
  8. data/.rubocop_todo.yml +2 -2
  9. data/.solr_wrapper.yml +3 -1
  10. data/VERSION +1 -1
  11. data/app/components/blacklight/document/action_component.rb +1 -3
  12. data/app/components/blacklight/search_context/server_item_pagination_component.html.erb +10 -0
  13. data/app/components/blacklight/search_context/server_item_pagination_component.rb +15 -0
  14. data/app/components/blacklight/search_context_component.rb +1 -0
  15. data/app/controllers/concerns/blacklight/search_fields.rb +1 -1
  16. data/app/helpers/blacklight/catalog_helper_behavior.rb +1 -1
  17. data/app/helpers/blacklight/url_helper_behavior.rb +2 -2
  18. data/app/presenters/blacklight/json_presenter.rb +1 -3
  19. data/app/views/catalog/_previous_next_doc.html.erb +1 -1
  20. data/blacklight.gemspec +1 -1
  21. data/config/importmap.rb +3 -0
  22. data/docker-compose.yml +1 -0
  23. data/lib/blacklight/configuration/field.rb +6 -6
  24. data/lib/blacklight/configuration/sort_field.rb +2 -2
  25. data/lib/blacklight/engine.rb +9 -4
  26. data/lib/blacklight/nested_open_struct_with_hash_access.rb +1 -1
  27. data/lib/generators/blacklight/assets/importmap_generator.rb +56 -0
  28. data/lib/generators/blacklight/assets/propshaft_generator.rb +34 -0
  29. data/lib/generators/blacklight/assets/sprockets_generator.rb +100 -0
  30. data/lib/generators/blacklight/assets_generator.rb +9 -86
  31. data/lib/generators/blacklight/controller_generator.rb +1 -1
  32. data/lib/generators/blacklight/install_generator.rb +2 -2
  33. data/lib/generators/blacklight/templates/solr/conf/solrconfig.xml +4 -8
  34. data/lib/generators/blacklight/test_support_generator.rb +1 -1
  35. data/package.json +1 -1
  36. data/spec/components/blacklight/search_context/server_item_pagination_component_spec.rb +35 -0
  37. data/spec/components/blacklight/search_context_component_spec.rb +31 -0
  38. data/spec/controllers/blacklight/base_spec.rb +1 -1
  39. data/spec/features/facets_spec.rb +3 -5
  40. data/spec/features/search_context_spec.rb +1 -1
  41. data/spec/helpers/blacklight/facets_helper_behavior_spec.rb +1 -2
  42. data/spec/models/solr_document_spec.rb +3 -1
  43. data/spec/spec_helper.rb +5 -2
  44. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
  45. data/tasks/blacklight.rake +1 -1
  46. metadata +20 -6
  47. data/.github/workflows/ruby.yml +0 -159
@@ -1,94 +1,17 @@
1
1
  # frozen_string_literal: true
2
- module Blacklight
3
- class Assets < Rails::Generators::Base
4
- source_root File.expand_path('../templates', __FILE__)
5
-
6
- class_option :'bootstrap-version', type: :string, default: ENV.fetch('BOOTSTRAP_VERSION', '~> 4.0'), desc: "Set the generated app's bootstrap version"
7
-
8
- # This could be skipped if you want to use webpacker
9
- def add_javascript_dependencies
10
- gem 'bootstrap', options[:'bootstrap-version']
11
- gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript'
12
- end
13
-
14
- def appease_rails7
15
- return unless Rails.version > '7'
16
-
17
- gem "sassc-rails", "~> 2.1"
18
- end
19
-
20
- # Add sprockets javascript if needed
21
- def create_sprockets_javascript
22
- create_file 'app/assets/javascripts/application.js' do
23
- <<~CONTENT
24
- //= require jquery3
25
- //= require rails-ujs
26
- #{'//= require turbolinks' if Rails.version < '7'}
27
- CONTENT
28
- end
29
- end
30
-
31
- ##
32
- # Remove the empty generated app/assets/images directory. Without doing this,
33
- # the default Sprockets 4 manifest will raise an exception.
34
- def appease_sprockets4
35
- return if !defined?(Sprockets::VERSION) || Sprockets::VERSION < '4' || using_importmap?
36
-
37
- append_to_file 'app/assets/config/manifest.js', "\n//= link application.js\n"
38
- empty_directory 'app/assets/images'
39
- end
40
-
41
- def assets
42
- copy_file "blacklight.scss", "app/assets/stylesheets/blacklight.scss"
43
-
44
- # Ensure this method is idempotent
45
- return if has_blacklight_assets?
46
2
 
47
- gem 'jquery-rails'
48
- contents = "\n//\n// Required by Blacklight\n"
49
- contents += "//= require popper\n"
50
- contents += "// Twitter Typeahead for autocomplete\n"
51
- contents += "//= require twitter/typeahead\n"
52
- contents += "//= require bootstrap\n"
53
- contents += "//= require blacklight/blacklight\n"
3
+ require 'shellwords'
54
4
 
55
- marker = if turbolinks?
56
- '//= require turbolinks'
57
- else
58
- '//= require rails-ujs'
59
- end
60
-
61
- insert_into_file "app/assets/javascripts/application.js", after: marker do
62
- contents
63
- end
64
-
65
- insert_into_file "app/assets/javascripts/application.js", before: '//= require rails-ujs' do
66
- "//= require jquery3\n"
67
- end
68
- end
69
-
70
- private
71
-
72
- def root
73
- @root ||= Pathname(destination_root)
74
- end
75
-
76
- def using_importmap?
77
- @using_importmap ||= root.join('config/importmap.rb').exist?
78
- end
79
-
80
- def turbolinks?
81
- @turbolinks ||= application_js.include?('turbolinks')
82
- end
83
-
84
- def has_blacklight_assets?
85
- application_js.include?('blacklight/blacklight')
86
- end
5
+ module Blacklight
6
+ class AssetsGenerator < Rails::Generators::Base
7
+ class_option :'bootstrap-version', type: :string, default: ENV.fetch('BOOTSTRAP_VERSION', '~> 4.0'), desc: "Set the generated app's bootstrap version"
87
8
 
88
- def application_js
89
- path = File.expand_path("app/assets/javascripts/application.js", destination_root)
9
+ def run_asset_pipeline_specific_generator
10
+ generated_options = "--bootstrap-version='#{Shellwords.escape(options[:'bootstrap-version'])}'" if options[:'bootstrap-version']
90
11
 
91
- File.exist?(path) ? File.read(path) : ''
12
+ # Blacklight 7.x JS is distributed via Sprockets (//= require directives, jQuery, etc.)
13
+ # so we always use the sprockets generator regardless of what Rails defaulted to.
14
+ generate 'blacklight:assets:sprockets', generated_options
92
15
  end
93
16
  end
94
17
  end
@@ -30,7 +30,7 @@ module Blacklight
30
30
  route <<-EOF
31
31
  concern :searchable, Blacklight::Routes::Searchable.new
32
32
 
33
- resource :catalog, only: [:index], as: 'catalog', path: '/catalog', controller: 'catalog' do
33
+ resource :catalog, only: [], as: 'catalog', path: '/catalog', controller: 'catalog' do
34
34
  concerns :searchable
35
35
  end
36
36
  EOF
@@ -11,7 +11,7 @@ module Blacklight
11
11
  class_option :devise, type: :boolean, default: false, aliases: "-d", desc: "Use Devise as authentication logic."
12
12
  class_option :marc, type: :boolean, default: false, aliases: "-m", desc: "Generate MARC-based demo."
13
13
  class_option :'bootstrap-version', type: :string, default: nil, desc: "Set the generated app's bootstrap version"
14
- class_option :'skip-assets', type: :boolean, default: !defined?(Sprockets), desc: "Skip generating javascript and css assets into the application"
14
+ class_option :'skip-assets', type: :boolean, default: false, desc: "Skip generating javascript and css assets into the application"
15
15
  class_option :'skip-solr', type: :boolean, default: false, desc: "Skip generating solr configurations."
16
16
 
17
17
  desc <<-EOS
@@ -41,7 +41,7 @@ module Blacklight
41
41
 
42
42
  def bundle_install
43
43
  inside destination_root do
44
- Bundler.with_clean_env do
44
+ Bundler.with_unbundled_env do
45
45
  run "bundle install"
46
46
  end
47
47
  end
@@ -16,14 +16,14 @@
16
16
  </updateLog>
17
17
  </updateHandler>
18
18
 
19
- <!-- solr lib dirs -->
19
+ <!-- solr lib dirs, which are needed for Solr 8 compatibility but ignored in solr 9.8 and above -->
20
20
  <lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib" />
21
21
  <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" />
22
22
  <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" />
23
23
 
24
24
  <dataDir>${solr.data.dir:}</dataDir>
25
25
 
26
- <requestHandler name="search" class="solr.SearchHandler" default="true">
26
+ <requestHandler name="/select" class="solr.SearchHandler" default="true">
27
27
  <!-- default values for query parameters can be specified, these
28
28
  will be overridden by parameters in the request
29
29
  -->
@@ -47,7 +47,6 @@
47
47
  full_title_tsim
48
48
  short_title_tsim
49
49
  alternative_title_tsim
50
- active_fedora_model_ssi
51
50
  title_tsim
52
51
  author_tsim
53
52
  subject_tsim
@@ -84,7 +83,6 @@
84
83
  <str name="facet">true</str>
85
84
  <str name="facet.mincount">1</str>
86
85
  <str name="facet.limit">10</str>
87
- <str name="facet.field">active_fedora_model_ssi</str>
88
86
  <str name="facet.field">subject_ssim</str>
89
87
 
90
88
  <str name="spellcheck">true</str>
@@ -116,7 +114,6 @@
116
114
  full_title_tsim
117
115
  short_title_tsim
118
116
  alternative_title_tsim
119
- active_fedora_model_ssi
120
117
  title_tsim
121
118
  author_tsim
122
119
  subject_tsim
@@ -153,7 +150,6 @@
153
150
  <str name="facet">true</str>
154
151
  <str name="facet.mincount">1</str>
155
152
  <str name="facet.limit">10</str>
156
- <str name="facet.field">active_fedora_model_ssi</str>
157
153
  <str name="facet.field">subject_ssim</str>
158
154
 
159
155
  <str name="spellcheck">true</str>
@@ -257,8 +253,8 @@
257
253
 
258
254
  <requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
259
255
 
260
- <requestDispatcher handleSelect="true" >
261
- <requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048" />
256
+ <requestDispatcher>
257
+ <requestParsers multipartUploadLimitInKB="2048" />
262
258
  </requestDispatcher>
263
259
 
264
260
  <requestHandler name="/analysis/field" startup="lazy" class="solr.FieldAnalysisRequestHandler" />
@@ -17,7 +17,7 @@ module Blacklight
17
17
  copy_file "alternate_controller.rb", "app/controllers/alternate_controller.rb"
18
18
 
19
19
  routing_code = <<-EOF
20
- resource :alternate, controller: 'alternate', only: [:index] do
20
+ resource :alternate, controller: 'alternate', only: [] do
21
21
  concerns :searchable
22
22
  end
23
23
  EOF
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blacklight-frontend",
3
- "version": "7.40.0",
3
+ "version": "7.42.0",
4
4
  "description": "The frontend code and styles for Blacklight",
5
5
  "main": "app/assets/javascripts/blacklight",
6
6
  "scripts": {
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe Blacklight::SearchContext::ServerItemPaginationComponent, type: :component do
6
+ subject(:render) { render_inline(instance) }
7
+
8
+ let(:current_document_id) { 9 }
9
+ let(:current_document) { SolrDocument.new(id: current_document_id) }
10
+ let(:search_session) { { 'document_id' => current_document_id, 'counter' => 1, 'total' => '3' } }
11
+ let(:instance) { described_class.new(search_context: search_context, search_session: search_session, current_document: current_document) }
12
+
13
+ before do
14
+ allow(controller).to receive(:search_session).and_return(search_session)
15
+ allow(controller).to receive(:current_search_session).and_return(double(id: current_document_id))
16
+ controller.class.helper_method :search_session
17
+ controller.class.helper_method :current_search_session
18
+ end
19
+
20
+ context 'when there is next and previous' do
21
+ let(:search_context) { { next: next_doc, prev: prev_doc } }
22
+ let(:prev_doc) { SolrDocument.new(id: '777') }
23
+ let(:next_doc) { SolrDocument.new(id: '888') }
24
+
25
+ before do
26
+ # allow(controller).to receive(:controller_tracking_method).and_return('track_catalog_path')
27
+
28
+ allow(controller).to receive_messages(controller_name: 'catalog', link_to_previous_document: '', link_to_next_document: '')
29
+ end
30
+
31
+ it "renders content" do
32
+ expect(render.css('.page-links').to_html).not_to be_blank
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+ RSpec.describe Blacklight::SearchContextComponent, type: :component do
5
+ subject(:render) { render_inline(instance) }
6
+
7
+ let(:current_document_id) { 9 }
8
+ let(:search_session) { { 'document_id' => current_document_id, 'counter' => 1, 'total' => '3' } }
9
+ let(:instance) { described_class.new(search_context: search_context, search_session: search_session) }
10
+
11
+ before do
12
+ allow(controller).to receive(:search_session).and_return(search_session)
13
+ allow(controller).to receive(:current_search_session).and_return(double(id: current_document_id))
14
+ controller.class.helper_method :search_session
15
+ controller.class.helper_method :current_search_session
16
+ end
17
+
18
+ context 'when there is next and previous' do
19
+ let(:search_context) { { next: next_doc, prev: prev_doc } }
20
+ let(:prev_doc) { SolrDocument.new(id: '777') }
21
+ let(:next_doc) { SolrDocument.new(id: '888') }
22
+
23
+ before do
24
+ allow(controller).to receive_messages(controller_name: 'catalog', link_to_previous_document: '', link_to_next_document: '')
25
+ end
26
+
27
+ it "renders content" do
28
+ expect(render.css('.page-links').to_html).not_to be_blank
29
+ end
30
+ end
31
+ end
@@ -3,7 +3,7 @@
3
3
  RSpec.describe Blacklight::Base do
4
4
  subject { controller }
5
5
 
6
- let(:controller) { Deprecation.silence(described_class) { (Class.new(ApplicationController) { include Blacklight::Base }).new } }
6
+ let(:controller) { Deprecation.silence(described_class) { Class.new(ApplicationController) { include Blacklight::Base }.new } }
7
7
 
8
8
  describe "#search_state" do
9
9
  subject { controller.send(:search_state) }
@@ -79,13 +79,11 @@ RSpec.describe "Facets" do
79
79
  expect(page).to have_css('.constraint-value', text: 'Language Tibetan')
80
80
  end
81
81
 
82
- describe 'heading button focus with Firefox' do
83
- it 'changes to the button on button click in Firefox' do
84
- pending 'Capybara::NotSupportedByDriverError: Capybara::Driver::Base#evaluate_script'
82
+ describe 'heading button focus' do
83
+ it 'changes to the button on button click', js: true do
85
84
  visit root_path
86
85
  page.find('h3.facet-field-heading button', text: 'Format').click
87
- focused_element_data_target = page.evaluate_script("document.activeElement")['data-bs-target']
88
- expect(focused_element_data_target).to eq '#facet-format'
86
+ expect(page.active_element.text).to eq 'Format'
89
87
  end
90
88
  end
91
89
 
@@ -35,7 +35,7 @@ RSpec.describe "Search Results context", js: true do
35
35
  it "does not display stale previous and next links for direct item views" do
36
36
  search_for ''
37
37
  click_on 'Pluvial nectar of blessings'
38
-
38
+ expect(page).to have_link('Cite')
39
39
  # Go to the number 9 result separately
40
40
  visit '/catalog/2003546302'
41
41
  expect(page).not_to have_selector '.page-links'
@@ -231,8 +231,7 @@ RSpec.describe Blacklight::FacetsHelperBehavior do
231
231
  context "when one of the facet items is rendered as nil" do
232
232
  # An app may override render_facet_item to filter out some undesired facet items by returning nil.
233
233
  before do
234
- allow(helper.method(:render_facet_item)).to receive(:owner).and_return(self.class)
235
- # allow_any_instance_of(Blacklight::FacetItemComponent).to receive(:overridden_helper_methods?).and_return(true)
234
+ allow_any_instance_of Blacklight::FacetItemComponent.to receive(:overridden_helper_methods?).and_return(true) # rubocop:disable RSpec/AnyInstance
236
235
  allow(helper).to receive(:render_facet_item).and_return('<a class="facet-select">Book</a>'.html_safe, nil)
237
236
  end
238
237
 
@@ -37,7 +37,9 @@ RSpec.describe SolrDocument, api: true do
37
37
  title_tesim: ['Good Omens'])
38
38
  end
39
39
 
40
- it { is_expected.to end_with "_source: {\"id\"=>\"123\", \"title_tesim\"=>[\"Good Omens\"]}>" }
40
+ it 'ends with the expected information' do
41
+ expect(inspect).to match(/_source: {"id" ?=> ?"123", "title_tesim" ?=> ?\["Good Omens"\]\}>$/)
42
+ end
41
43
  end
42
44
 
43
45
  describe '.attribute' do
data/spec/spec_helper.rb CHANGED
@@ -48,8 +48,11 @@ RSpec.configure do |config|
48
48
  # When we're testing the API, only run the api tests
49
49
  config.filter_run api: true if ENV['BLACKLIGHT_API_TEST']
50
50
 
51
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
52
- config.fixture_path = Rails.root.join("spec/fixtures")
51
+ if Rails.version.to_f >= 7.1
52
+ config.fixture_paths = [Rails.root.join("spec/fixtures")]
53
+ else
54
+ config.fixture_path = Rails.root.join("spec/fixtures")
55
+ end
53
56
 
54
57
  # If you're not using ActiveRecord, or you'd prefer not to run each of your
55
58
  # examples within a transaction, remove the following line or assign false
@@ -11,7 +11,7 @@ class TestAppGenerator < Rails::Generators::Base
11
11
  def run_blacklight_generator
12
12
  say_status("warning", "GENERATING BL", :yellow)
13
13
 
14
- Bundler.with_clean_env do
14
+ Bundler.with_unbundled_env do
15
15
  run "bundle install"
16
16
  end
17
17
  options = '--devise'
@@ -24,7 +24,7 @@ def with_solr
24
24
  # We're being invoked by the app entrypoint script and solr is already up via docker compose
25
25
  if ENV['SOLR_ENV'] == 'docker-compose'
26
26
  yield
27
- elsif system('docker compose -v')
27
+ elsif system('docker compose version')
28
28
  # We're not running `docker compose up' but still want to use a docker instance of solr.
29
29
  begin
30
30
  puts "Starting Solr"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.40.0
4
+ version: 7.42.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rochkind
@@ -17,7 +17,7 @@ authors:
17
17
  autorequire:
18
18
  bindir: exe
19
19
  cert_chain: []
20
- date: 2024-10-25 00:00:00.000000000 Z
20
+ date: 2026-06-09 00:00:00.000000000 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: rails
@@ -28,7 +28,7 @@ dependencies:
28
28
  version: '6.1'
29
29
  - - "<"
30
30
  - !ruby/object:Gem::Version
31
- version: '7.3'
31
+ version: '9'
32
32
  type: :runtime
33
33
  prerelease: false
34
34
  version_requirements: !ruby/object:Gem::Requirement
@@ -38,7 +38,7 @@ dependencies:
38
38
  version: '6.1'
39
39
  - - "<"
40
40
  - !ruby/object:Gem::Version
41
- version: '7.3'
41
+ version: '9'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: globalid
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -417,7 +417,11 @@ files:
417
417
  - ".docker/app/entrypoint.sh"
418
418
  - ".dockerignore"
419
419
  - ".env"
420
- - ".github/workflows/ruby.yml"
420
+ - ".github/matrix.json"
421
+ - ".github/workflows/build.yml"
422
+ - ".github/workflows/lint.yml"
423
+ - ".github/workflows/main.yml"
424
+ - ".github/workflows/test.yml"
421
425
  - ".gitignore"
422
426
  - ".hound.yml"
423
427
  - ".jshintrc"
@@ -528,6 +532,8 @@ files:
528
532
  - app/components/blacklight/search_bar_component.html.erb
529
533
  - app/components/blacklight/search_bar_component.rb
530
534
  - app/components/blacklight/search_button_component.rb
535
+ - app/components/blacklight/search_context/server_item_pagination_component.html.erb
536
+ - app/components/blacklight/search_context/server_item_pagination_component.rb
531
537
  - app/components/blacklight/search_context_component.html.erb
532
538
  - app/components/blacklight/search_context_component.rb
533
539
  - app/components/blacklight/search_history_constraint_layout_component.rb
@@ -723,6 +729,7 @@ files:
723
729
  - app/views/shared/_user_util_links.html.erb
724
730
  - blacklight.gemspec
725
731
  - config/i18n-tasks.yml
732
+ - config/importmap.rb
726
733
  - config/locales/blacklight.ar.yml
727
734
  - config/locales/blacklight.ca.yml
728
735
  - config/locales/blacklight.de.yml
@@ -786,6 +793,9 @@ files:
786
793
  - lib/blacklight/solr/response/spelling.rb
787
794
  - lib/blacklight/solr/search_builder_behavior.rb
788
795
  - lib/blacklight/version.rb
796
+ - lib/generators/blacklight/assets/importmap_generator.rb
797
+ - lib/generators/blacklight/assets/propshaft_generator.rb
798
+ - lib/generators/blacklight/assets/sprockets_generator.rb
789
799
  - lib/generators/blacklight/assets_generator.rb
790
800
  - lib/generators/blacklight/controller_generator.rb
791
801
  - lib/generators/blacklight/document_generator.rb
@@ -841,6 +851,8 @@ files:
841
851
  - spec/components/blacklight/response/pagination_component_spec.rb
842
852
  - spec/components/blacklight/response/spellcheck_component_spec.rb
843
853
  - spec/components/blacklight/search_bar_component_spec.rb
854
+ - spec/components/blacklight/search_context/server_item_pagination_component_spec.rb
855
+ - spec/components/blacklight/search_context_component_spec.rb
844
856
  - spec/components/blacklight/start_over_button_component_spec.rb
845
857
  - spec/components/blacklight/system/flash_message_component_spec.rb
846
858
  - spec/controllers/alternate_controller_spec.rb
@@ -1004,7 +1016,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1004
1016
  - !ruby/object:Gem::Version
1005
1017
  version: '0'
1006
1018
  requirements: []
1007
- rubygems_version: 3.5.9
1019
+ rubygems_version: 3.4.1
1008
1020
  signing_key:
1009
1021
  specification_version: 4
1010
1022
  summary: Blacklight provides a discovery interface for any Solr (http://lucene.apache.org/solr)
@@ -1029,6 +1041,8 @@ test_files:
1029
1041
  - spec/components/blacklight/response/pagination_component_spec.rb
1030
1042
  - spec/components/blacklight/response/spellcheck_component_spec.rb
1031
1043
  - spec/components/blacklight/search_bar_component_spec.rb
1044
+ - spec/components/blacklight/search_context/server_item_pagination_component_spec.rb
1045
+ - spec/components/blacklight/search_context_component_spec.rb
1032
1046
  - spec/components/blacklight/start_over_button_component_spec.rb
1033
1047
  - spec/components/blacklight/system/flash_message_component_spec.rb
1034
1048
  - spec/controllers/alternate_controller_spec.rb
@@ -1,159 +0,0 @@
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
-
17
- jobs:
18
- lint:
19
- runs-on: ubuntu-latest
20
- steps:
21
- - uses: actions/checkout@v2
22
- - name: Set up Ruby
23
- uses: ruby/setup-ruby@v1
24
- with:
25
- ruby-version: 3.1
26
- bundler: 'default'
27
- - name: Install dependencies
28
- run: bundle install
29
- - name: Run linter
30
- run: bundle exec rake rubocop
31
- test:
32
- runs-on: ubuntu-latest
33
- strategy:
34
- matrix:
35
- ruby: [3.1, 3.2]
36
- env:
37
- RAILS_VERSION: 7.0.8
38
- steps:
39
- - uses: actions/checkout@v2
40
- - name: Set up Ruby
41
- uses: ruby/setup-ruby@v1
42
- with:
43
- ruby-version: ${{ matrix.ruby }}
44
- bundler: 'default'
45
- - name: Install dependencies
46
- run: bundle install
47
- - name: Run tests
48
- run: bundle exec rake ci
49
- env:
50
- ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-coffee --skip-test'
51
- test_bootstrap5:
52
- runs-on: ubuntu-latest
53
- strategy:
54
- matrix:
55
- ruby: ['3.0']
56
- env:
57
- RAILS_VERSION: 7.0.8
58
- steps:
59
- - uses: actions/checkout@v2
60
- - name: Set up Ruby
61
- uses: ruby/setup-ruby@v1
62
- with:
63
- ruby-version: ${{ matrix.ruby }}
64
- bundler: 'default'
65
- - name: Install dependencies
66
- run: bundle install
67
- - name: Run tests
68
- run: bundle exec rake ci
69
- env:
70
- BOOTSTRAP_VERSION: '~> 5.0'
71
- ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-coffee --skip-test'
72
- test_rails6_1:
73
- runs-on: ubuntu-latest
74
- strategy:
75
- matrix:
76
- ruby: ['3.0']
77
- env:
78
- RAILS_VERSION: 6.1.6.1
79
- steps:
80
- - uses: actions/checkout@v2
81
- - name: Set up Ruby
82
- uses: ruby/setup-ruby@v1
83
- with:
84
- ruby-version: ${{ matrix.ruby }}
85
- bundler: 'default'
86
- - name: Install dependencies
87
- run: bundle install
88
- - name: Run tests
89
- run: bundle exec rake ci
90
- env:
91
- ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-keeps --skip-action-cable --skip-test'
92
- test_rails7_2:
93
- runs-on: ubuntu-latest
94
- strategy:
95
- matrix:
96
- ruby: [3.1, 3.2]
97
- env:
98
- RAILS_VERSION: 7.2.0
99
- steps:
100
- - uses: actions/checkout@v2
101
- - name: Set up Ruby
102
- uses: ruby/setup-ruby@v1
103
- with:
104
- ruby-version: ${{ matrix.ruby }}
105
- bundler: 'default'
106
- - name: Install dependencies
107
- run: bundle install
108
- - name: Run tests
109
- run: bundle exec rake ci
110
- env:
111
- ENGINE_CART_RAILS_OPTIONS: '--skip-keeps --skip-test'
112
- test_vc2:
113
- runs-on: ubuntu-latest
114
- strategy:
115
- matrix:
116
- ruby: ['3.2']
117
- env:
118
- RAILS_VERSION: 7.0.8
119
- VIEW_COMPONENT_VERSION: "~> 2.74"
120
- steps:
121
- - uses: actions/checkout@v2
122
- - name: Set up Ruby
123
- uses: ruby/setup-ruby@v1
124
- with:
125
- ruby-version: ${{ matrix.ruby }}
126
- bundler: 'default'
127
- - name: Install dependencies
128
- run: bundle install
129
- - name: Run tests
130
- run: bundle exec rake ci
131
- env:
132
- ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-coffee --skip-test'
133
- api_test:
134
- runs-on: ubuntu-latest
135
- strategy:
136
- matrix:
137
- ruby: [2.7, '3.0']
138
- env:
139
- RAILS_VERSION: 7.0.8
140
- steps:
141
- - uses: actions/checkout@v2
142
- - name: Set up Ruby
143
- uses: ruby/setup-ruby@v1
144
- with:
145
- bundler: 'default'
146
- ruby-version: ${{ matrix.ruby }}
147
- - name: Install dependencies
148
- run: bundle install
149
- - name: Run tests
150
- run: bundle exec rake ci
151
- env:
152
- BLACKLIGHT_API_TEST: true
153
- ENGINE_CART_RAILS_OPTIONS: '-a propshaft --api --skip-git --skip-bundle --skip-listen --skip-spring --skip-yarn --skip-keeps --skip-action-cable --skip-coffee --skip-test'
154
- docker_build:
155
- runs-on: ubuntu-latest
156
- steps:
157
- - uses: actions/checkout@v3
158
- - name: Build docker image
159
- run: docker compose build app