blacklight-spotlight 3.0.0.rc5 → 3.0.0.rc6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/spotlight/base.rb +1 -1
  3. data/app/controllers/spotlight/browse_controller.rb +5 -16
  4. data/app/controllers/spotlight/catalog_controller.rb +7 -5
  5. data/app/controllers/spotlight/dashboards_controller.rb +3 -3
  6. data/app/controllers/spotlight/pages_controller.rb +3 -5
  7. data/app/helpers/spotlight/application_helper.rb +1 -1
  8. data/app/helpers/spotlight/main_app_helpers.rb +3 -4
  9. data/app/helpers/spotlight/meta_helper.rb +2 -2
  10. data/app/helpers/spotlight/searches_helper.rb +1 -1
  11. data/app/models/concerns/spotlight/browse_category_search_builder.rb +59 -0
  12. data/app/models/concerns/spotlight/search_builder.rb +11 -0
  13. data/app/models/sir_trevor_rails/blocks/solr_documents_block.rb +9 -0
  14. data/app/models/spotlight/blacklight_configuration.rb +14 -5
  15. data/app/models/spotlight/page_configurations.rb +10 -9
  16. data/app/presenters/spotlight/iiif_manifest_presenter.rb +1 -1
  17. data/app/views/catalog/_add_tags.html.erb +1 -1
  18. data/app/views/catalog/_change_visibility.html.erb +1 -1
  19. data/app/views/catalog/_remove_tags.html.erb +1 -1
  20. data/app/views/catalog/_save_search.html.erb +1 -1
  21. data/app/views/spotlight/browse/_search_box.html.erb +9 -9
  22. data/app/views/spotlight/catalog/_admin_index_header_default.html.erb +1 -1
  23. data/app/views/spotlight/catalog/_admin_thumbnail_default.html.erb +3 -2
  24. data/app/views/spotlight/catalog/index.iiif_json.jbuilder +1 -1
  25. data/app/views/spotlight/featured_images/_form.html.erb +1 -1
  26. data/app/views/spotlight/metadata_configurations/_metadata_field.html.erb +2 -2
  27. data/app/views/spotlight/pages/_view_type_group.html.erb +3 -3
  28. data/app/views/spotlight/search_configurations/_document_index_view_types.html.erb +2 -2
  29. data/app/views/spotlight/searches/_form.html.erb +2 -2
  30. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb +5 -5
  31. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb +5 -5
  32. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb +7 -5
  33. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb +3 -3
  34. data/config/routes.rb +1 -0
  35. data/db/migrate/20210308090000_migrate_caption_values_for_title_key.rb +29 -0
  36. data/lib/generators/spotlight/install_generator.rb +2 -2
  37. data/lib/spotlight/version.rb +1 -1
  38. data/spec/controllers/spotlight/browse_controller_spec.rb +0 -6
  39. data/spec/examples.txt +1489 -1488
  40. data/spec/features/javascript/blocks/solr_documents_block_spec.rb +1 -1
  41. data/spec/helpers/spotlight/application_helper_spec.rb +5 -5
  42. data/spec/models/spotlight/blacklight_configuration_spec.rb +14 -14
  43. data/spec/models/spotlight/browse_category_search_builder_spec.rb +49 -0
  44. data/spec/presenters/spotlight/iiif_manifest_presenter_spec.rb +1 -1
  45. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
  46. data/spec/views/spotlight/metadata_configurations/_metadata_field.html.erb_spec.rb +3 -4
  47. data/spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb +1 -1
  48. data/spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb +1 -1
  49. data/spec/views/spotlight/sir_trevor/blocks/_link_to_search_block.html.erb_spec.rb +1 -1
  50. data/spec/views/spotlight/sir_trevor/blocks/_rule_block.html.erb_spec.rb +1 -1
  51. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb_spec.rb +8 -4
  52. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb +7 -2
  53. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb_spec.rb +8 -5
  54. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb_spec.rb +3 -2
  55. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb_spec.rb +9 -4
  56. metadata +9 -4
@@ -225,6 +225,6 @@ describe 'Solr Document Block', feature: true, versioning: true, default_max_wai
225
225
 
226
226
  # for some reason, the text area above isn't getting filled in
227
227
  # expect(page).to have_selector ".st-text-block", text: "zzz"
228
- expect(find_field('primary-caption-field').value).to eq 'full_title_tesim'
228
+ expect(find_field('primary-caption-field').value).to eq Spotlight::PageConfigurations::DOCUMENT_TITLE_KEY
229
229
  end
230
230
  end
@@ -155,8 +155,8 @@ describe Spotlight::ApplicationHelper, type: :helper do
155
155
  end
156
156
 
157
157
  it 'excludes view fields that are never visible (e.g. atom, rss)' do
158
- blacklight_config.view.a.if = true
159
- blacklight_config.view.b.if = false
158
+ blacklight_config.view.a(if: true)
159
+ blacklight_config.view.b(if: false)
160
160
 
161
161
  expect(helper.available_view_fields).to include :a
162
162
  expect(helper.available_view_fields).not_to include :b
@@ -172,9 +172,9 @@ describe Spotlight::ApplicationHelper, type: :helper do
172
172
  # clean out the default views
173
173
  blacklight_config.view.reject! { |_| true }
174
174
 
175
- blacklight_config.view.a
176
- blacklight_config.view.b
177
- blacklight_config.view.c
175
+ blacklight_config.view.a!
176
+ blacklight_config.view.b!
177
+ blacklight_config.view.c!
178
178
  allow(helper).to receive(:blacklight_config).and_return(blacklight_config)
179
179
  end
180
180
 
@@ -314,7 +314,7 @@ describe Spotlight::BlacklightConfiguration, type: :model do
314
314
  context 'title only configuration' do
315
315
  before do
316
316
  blacklight_config.configure do |config|
317
- config.view.gallery.title_only_by_default = true
317
+ config.view.gallery(title_only_by_default: true)
318
318
  config.add_index_field 'a'
319
319
  end
320
320
  end
@@ -478,20 +478,20 @@ describe Spotlight::BlacklightConfiguration, type: :model do
478
478
  # rubocop:disable RSpec/PredicateMatcher
479
479
  it 'filters the upstream blacklight config' do
480
480
  subject.document_index_view_types = %w[list gallery unknown]
481
- blacklight_config.view.list
482
- blacklight_config.view.gallery
483
- blacklight_config.view.something
481
+ blacklight_config.view.list!
482
+ blacklight_config.view.gallery!
483
+ blacklight_config.view.something!
484
484
 
485
485
  expect(subject.blacklight_config.view.keys).to include :list, :gallery, :something
486
- expect(subject.blacklight_config.view.all? { |k, v| v.key == k && v.if == :enabled_in_spotlight_view_type_configuration? }).to be_truthy
486
+ expect(subject.blacklight_config.view.select { |k, v| v.key == k && v.if == :enabled_in_spotlight_view_type_configuration? }.any?).to be_truthy
487
487
  end
488
488
  # rubocop:enable RSpec/PredicateMatcher
489
489
 
490
490
  it 'passes through the blacklight configuration when not set' do
491
- blacklight_config.view.list
492
- blacklight_config.view.gallery
493
- blacklight_config.view.something
494
- expect(subject.blacklight_config.view.keys).to include(*blacklight_config.view.keys)
491
+ blacklight_config.view.list!
492
+ blacklight_config.view.gallery!
493
+ blacklight_config.view.something!
494
+ expect(subject.blacklight_config.view.keys.map(&:to_s)).to include(*blacklight_config.view.keys.map(&:to_s))
495
495
  end
496
496
  end
497
497
 
@@ -627,9 +627,9 @@ describe Spotlight::BlacklightConfiguration, type: :model do
627
627
 
628
628
  describe '#document_index_view_types_selected_hash' do
629
629
  before do
630
- subject.default_blacklight_config.view.list
631
- subject.default_blacklight_config.view.gallery
632
- subject.default_blacklight_config.view.map
630
+ subject.default_blacklight_config.view.list!
631
+ subject.default_blacklight_config.view.gallery!
632
+ subject.default_blacklight_config.view.whatever!
633
633
  subject.default_blacklight_config.view.rss.if = false
634
634
  subject.document_index_view_types = %w[list gallery rss]
635
635
  end
@@ -638,8 +638,8 @@ describe Spotlight::BlacklightConfiguration, type: :model do
638
638
  expect(subject.document_index_view_types_selected_hash.to_h).to include list: true, gallery: true
639
639
  end
640
640
 
641
- it 'disabled view types are not included' do
642
- expect(subject.document_index_view_types_selected_hash.to_h).not_to include :map
641
+ it 'disabled view types use the value false' do
642
+ expect(subject.document_index_view_types_selected_hash.to_h).to include whatever: false
643
643
  end
644
644
 
645
645
  it 'excludes view types disabled by configuration (not by curator settings)' do
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ describe Spotlight::BrowseCategorySearchBuilder do
4
+ class BrowseCategoryMockSearchBuilder < Blacklight::SearchBuilder
5
+ include Blacklight::Solr::SearchBuilderBehavior
6
+ include Spotlight::BrowseCategorySearchBuilder
7
+ end
8
+
9
+ subject { BrowseCategoryMockSearchBuilder.new(scope).with(blacklight_params) }
10
+
11
+ let(:exhibit) { FactoryBot.create(:exhibit) }
12
+ let(:scope) { double(blacklight_config: exhibit.blacklight_config, current_exhibit: exhibit) }
13
+ let(:solr_request) { Blacklight::Solr::Request.new }
14
+ let(:blacklight_params) { { browse_category_id: search.id } }
15
+ let(:search) { FactoryBot.create(:search, exhibit: exhibit, query_params: { sort: 'type', f: { genre_ssim: ['term'] }, q: 'search query' }) }
16
+
17
+ describe '#restrict_to_browse_category' do
18
+ it 'adds the search query parameters from the browse category' do
19
+ params = subject.to_hash.with_indifferent_access
20
+
21
+ expect(params).to include(
22
+ q: 'search query',
23
+ fq: ['{!term f=genre_ssim}term'],
24
+ sort: 'sort_type_ssi asc'
25
+ )
26
+ end
27
+
28
+ context 'with a user-provided query' do
29
+ let(:blacklight_params) { { browse_category_id: search.id, q: 'cats' } }
30
+
31
+ it 'uses the user-provided query to further restrict the search' do
32
+ params = subject.to_hash.with_indifferent_access
33
+ expect(params).not_to include(:q)
34
+ expect(params).to include(
35
+ json: {
36
+ query: {
37
+ bool: {
38
+ must: [
39
+ { edismax: { query: 'cats' } },
40
+ { edismax: { query: 'search query' } }
41
+ ]
42
+ }
43
+ }
44
+ }
45
+ )
46
+ end
47
+ end
48
+ end
49
+ end
@@ -16,7 +16,7 @@ describe Spotlight::IiifManifestPresenter do
16
16
  end
17
17
 
18
18
  describe 'public methods' do
19
- let(:helpers) { double(show_presenter: presenter) }
19
+ let(:helpers) { double(document_presenter: presenter) }
20
20
  let(:presenter) { instance_double(Blacklight::ShowPresenter, heading: title_field_value) }
21
21
 
22
22
  let(:iiif_url) { 'https://iiif.test/images/1-1' }
@@ -10,7 +10,7 @@ class TestAppGenerator < Rails::Generators::Base
10
10
  end
11
11
 
12
12
  def add_gems
13
- gem 'blacklight', '~> 7.0'
13
+ gem 'blacklight', '~> 7.17'
14
14
  gem 'blacklight-gallery', '~> 3.0'
15
15
  Bundler.with_clean_env do
16
16
  run 'bundle install'
@@ -2,9 +2,9 @@
2
2
 
3
3
  describe 'spotlight/metadata_configurations/_metadata_field', type: :view do
4
4
  let(:exhibit) { FactoryBot.create(:exhibit) }
5
- let(:field) { Blacklight::Configuration::Field.new immutable: OpenStruct.new(another_view_type: false) }
5
+ let(:field) { Blacklight::Configuration::Field.new label: 'Some label', immutable: OpenStruct.new(another_view_type: false) }
6
6
  let(:builder) { ActionView::Helpers::FormBuilder.new 'z', nil, view, {} }
7
- let(:p) { 'spotlight/metadata_configurations/metadata_field.html.erb' }
7
+ let(:p) { 'spotlight/metadata_configurations/metadata_field' }
8
8
 
9
9
  before do
10
10
  assign(:exhibit, exhibit)
@@ -17,8 +17,7 @@ describe 'spotlight/metadata_configurations/_metadata_field', type: :view do
17
17
  )
18
18
  end
19
19
 
20
- it 'uses the index_field_label helper to render the label' do
21
- allow(view).to receive(:index_field_label).with(anything, 'some_key').and_return 'Some label'
20
+ it 'uses the metadata field label' do
22
21
  render partial: p, locals: { key: 'some_key', config: field, f: builder }
23
22
  expect(rendered).to have_selector '.field-label', text: 'Some label'
24
23
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe 'spotlight/sir_trevor/blocks/_browse_block.html.erb', type: :view do
4
- let(:p) { 'spotlight/sir_trevor/blocks/browse_block.html.erb' }
4
+ let(:p) { 'spotlight/sir_trevor/blocks/browse_block' }
5
5
  let(:page) { double('Page', display_sidebar?: true) }
6
6
  let(:search) { FactoryBot.create(:search) }
7
7
  let(:block) do
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe 'spotlight/sir_trevor/blocks/_iframe_block.html.erb', type: :view do
4
- let(:p) { 'spotlight/sir_trevor/blocks/iframe_block.html.erb' }
4
+ let(:p) { 'spotlight/sir_trevor/blocks/iframe_block' }
5
5
  let(:block) do
6
6
  OpenStruct.new
7
7
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe 'spotlight/sir_trevor/blocks/_link_to_search_block.html.erb', type: :view do
4
- let(:p) { 'spotlight/sir_trevor/blocks/link_to_search_block.html.erb' }
4
+ let(:p) { 'spotlight/sir_trevor/blocks/link_to_search_block' }
5
5
  let(:page) { double('Page', display_sidebar?: true) }
6
6
  let(:search) { FactoryBot.create(:search, query_params: { a: 1 }) }
7
7
  let(:block) do
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe 'spotlight/sir_trevor/blocks/_rule_block.html.erb', type: :view do
4
- let(:p) { 'spotlight/sir_trevor/blocks/rule_block.html.erb' }
4
+ let(:p) { 'spotlight/sir_trevor/blocks/rule_block' }
5
5
 
6
6
  it 'has an hr' do
7
7
  render partial: p
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe 'spotlight/sir_trevor/blocks/_solr_documents_block.html.erb', type: :view do
4
- let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_block.html.erb' }
4
+ let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_block' }
5
5
  let(:page) { double('Page') }
6
6
  let(:block) do
7
7
  SirTrevorRails::Blocks::SolrDocumentsBlock.new({ type: 'block', data: { title: 'Some title', text: 'Some text', 'text-align' => 'right' } }, page)
@@ -9,10 +9,14 @@ describe 'spotlight/sir_trevor/blocks/_solr_documents_block.html.erb', type: :vi
9
9
  let(:doc) { blacklight_config.document_model.new(id: 1) }
10
10
  let(:blacklight_config) do
11
11
  Blacklight::Configuration.new do |config|
12
- config.view.embed.partials = %w[a b c]
13
- config.view.embed.locals = { a: 1 }
12
+ config.view.embed(partials: %w[a b c], locals: { a: 1 })
14
13
  end
15
14
  end
15
+ let(:stub_presenter) do
16
+ instance_double(Blacklight::DocumentPresenter, heading: 'blah', thumbnail: thumbnail_presenter)
17
+ end
18
+
19
+ let(:thumbnail_presenter) { instance_double(Blacklight::ThumbnailPresenter, exists?: true, thumbnail_tag: 'thumb') }
16
20
 
17
21
  before do
18
22
  allow(block).to receive(:each_document).and_yield({}, doc)
@@ -21,7 +25,7 @@ describe 'spotlight/sir_trevor/blocks/_solr_documents_block.html.erb', type: :vi
21
25
 
22
26
  before do
23
27
  allow(view).to receive(:blacklight_config).and_return(blacklight_config)
24
- allow(view).to receive_messages(has_thumbnail?: true, render_thumbnail_tag: 'thumb', document_link_params: {})
28
+ allow(view).to receive_messages(document_presenter: stub_presenter, document_link_params: {})
25
29
  end
26
30
 
27
31
  context 'with a multi-image object' do
@@ -1,10 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe 'spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb', type: :view do
4
- let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_carousel_block.html.erb' }
4
+ let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_carousel_block' }
5
5
  let(:block) do
6
6
  SirTrevorRails::Blocks::SolrDocumentsCarouselBlock.new({ type: 'block', data: {} }, page)
7
7
  end
8
+ let(:stub_presenter) do
9
+ instance_double(Blacklight::DocumentPresenter, heading: 'blah', thumbnail: thumbnail_presenter)
10
+ end
11
+
12
+ let(:thumbnail_presenter) { instance_double(Blacklight::ThumbnailPresenter, exists?: true, thumbnail_tag: 'thumb') }
8
13
 
9
14
  before do
10
15
  allow(block).to receive(:each_document).and_return([
@@ -14,7 +19,7 @@ describe 'spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb',
14
19
  ])
15
20
  allow(block).to receive_messages(documents?: true)
16
21
  allow(view).to receive_messages(solr_documents_carousel_block: block)
17
- allow(view).to receive_messages(has_thumbnail?: true, render_thumbnail_tag: 'thumb', blacklight_config: Blacklight::Configuration.new)
22
+ allow(view).to receive_messages(document_presenter: stub_presenter, blacklight_config: Blacklight::Configuration.new)
18
23
  end
19
24
 
20
25
  it 'has a slideshow block' do
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe 'spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb', type: :view do
4
- let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_embed_block.html.erb' }
4
+ let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_embed_block' }
5
5
  let(:page) { double('Page') }
6
6
  let(:block) do
7
7
  SirTrevorRails::Blocks::SolrDocumentsEmbedBlock.new({ type: 'block', data: { title: 'Some title', text: 'Some text', 'text-align' => 'right' } }, page)
@@ -9,10 +9,14 @@ describe 'spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb', typ
9
9
  let(:doc) { blacklight_config.document_model.new(id: 1) }
10
10
  let(:blacklight_config) do
11
11
  Blacklight::Configuration.new do |config|
12
- config.view.embed.partials = %w[a b c]
13
- config.view.embed.locals = { a: 1 }
12
+ config.view.embed(partials: %w[a b c], locals: { a: 1 })
14
13
  end
15
14
  end
15
+ let(:stub_presenter) do
16
+ instance_double(Blacklight::DocumentPresenter, heading: 'blah', thumbnail: thumbnail_presenter)
17
+ end
18
+
19
+ let(:thumbnail_presenter) { instance_double(Blacklight::ThumbnailPresenter, exists?: true, thumbnail_tag: 'thumb') }
16
20
 
17
21
  before do
18
22
  allow(block).to receive(:each_document).and_yield({}, doc)
@@ -20,8 +24,7 @@ describe 'spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb', typ
20
24
  end
21
25
 
22
26
  before do
23
- allow(view).to receive(:blacklight_config).and_return(blacklight_config)
24
- allow(view).to receive_messages(has_thumbnail?: true, render_thumbnail_tag: 'thumb')
27
+ allow(view).to receive_messages(blacklight_config: blacklight_config, document_presenter: stub_presenter)
25
28
  end
26
29
 
27
30
  it 'has a embed block' do
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe 'spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb', type: :view do
4
- let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_features_block.html.erb' }
4
+ let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_features_block' }
5
5
  let(:block) do
6
6
  SirTrevorRails::Blocks::SolrDocumentsFeaturesBlock.new({ type: 'block', data: { 'show-primary-caption' => true, 'primary-caption-field' => 'x' } }, page)
7
7
  end
@@ -19,7 +19,8 @@ describe 'spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb',
19
19
  allow(block).to receive(:each_document).and_return([doc1, doc2, doc3])
20
20
  allow(block).to receive_messages(documents?: true)
21
21
  allow(view).to receive_messages(solr_documents_features_block: block)
22
- allow(view).to receive_messages(has_thumbnail?: true, render_thumbnail_tag: 'thumb', blacklight_config: blacklight_config)
22
+ allow(view).to receive_messages(blacklight_config: blacklight_config)
23
+ allow_any_instance_of(Blacklight::ThumbnailPresenter).to receive_messages(exists?: true, thumbnail_tag: 'thumb')
23
24
  end
24
25
 
25
26
  it 'has a slideshow block' do
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- describe 'spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb', type: :view do
4
- let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_grid_block.html.erb' }
3
+ describe 'spotlight/sir_trevor/blocks/_solr_documents_grid_block', type: :view do
4
+ let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_grid_block' }
5
5
  let(:page) { double('Page') }
6
6
  let(:block) do
7
7
  SirTrevorRails::Blocks::SolrDocumentsGridBlock.new({ type: 'block', data: { title: 'Some title', text: 'Some text', 'text-align' => 'right' } }, page)
@@ -10,6 +10,12 @@ describe 'spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb', type
10
10
  Blacklight::Configuration.new
11
11
  end
12
12
 
13
+ let(:stub_presenter) do
14
+ instance_double(Blacklight::DocumentPresenter, heading: 'blah', thumbnail: thumbnail_presenter)
15
+ end
16
+
17
+ let(:thumbnail_presenter) { instance_double(Blacklight::ThumbnailPresenter, exists?: true, thumbnail_tag: 'thumb') }
18
+
13
19
  before do
14
20
  allow(block).to receive(:each_document).and_return([
15
21
  [{}, SolrDocument.new(id: 1)],
@@ -21,8 +27,7 @@ describe 'spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb', type
21
27
  before do
22
28
  allow(view).to receive_messages(
23
29
  blacklight_config: blacklight_config,
24
- has_thumbnail?: true,
25
- render_thumbnail_tag: 'thumb'
30
+ document_presenter: stub_presenter
26
31
  )
27
32
  end
28
33
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-spotlight
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.rc5
4
+ version: 3.0.0.rc6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2021-04-14 00:00:00.000000000 Z
14
+ date: 2021-04-28 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activejob-status
@@ -67,14 +67,14 @@ dependencies:
67
67
  requirements:
68
68
  - - "~>"
69
69
  - !ruby/object:Gem::Version
70
- version: '7.0'
70
+ version: '7.18'
71
71
  type: :runtime
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - "~>"
76
76
  - !ruby/object:Gem::Version
77
- version: '7.0'
77
+ version: '7.18'
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: bootstrap_form
80
80
  requirement: !ruby/object:Gem::Requirement
@@ -1080,11 +1080,13 @@ files:
1080
1080
  - app/models/ability.rb
1081
1081
  - app/models/concerns/spotlight/access_controls_enforcement_search_builder.rb
1082
1082
  - app/models/concerns/spotlight/blacklight_configuration_defaults.rb
1083
+ - app/models/concerns/spotlight/browse_category_search_builder.rb
1083
1084
  - app/models/concerns/spotlight/custom_translation_extension.rb
1084
1085
  - app/models/concerns/spotlight/exhibit_analytics.rb
1085
1086
  - app/models/concerns/spotlight/exhibit_defaults.rb
1086
1087
  - app/models/concerns/spotlight/exhibit_documents.rb
1087
1088
  - app/models/concerns/spotlight/resources/web.rb
1089
+ - app/models/concerns/spotlight/search_builder.rb
1088
1090
  - app/models/concerns/spotlight/sitemap.rb
1089
1091
  - app/models/concerns/spotlight/solr_document.rb
1090
1092
  - app/models/concerns/spotlight/solr_document/atomic_updates.rb
@@ -1455,6 +1457,7 @@ files:
1455
1457
  - db/migrate/20210126123041_create_events.rb
1456
1458
  - db/migrate/20210305070001_remove_class_from_sirtrevor_image_blocks.rb
1457
1459
  - db/migrate/20210305171150_create_bulk_updates.rb
1460
+ - db/migrate/20210308090000_migrate_caption_values_for_title_key.rb
1458
1461
  - lib/blacklight/spotlight.rb
1459
1462
  - lib/generators/spotlight/install_generator.rb
1460
1463
  - lib/generators/spotlight/scaffold_resource_generator.rb
@@ -1650,6 +1653,7 @@ files:
1650
1653
  - spec/models/spotlight/analytics/ga_spec.rb
1651
1654
  - spec/models/spotlight/background_job_progress_spec.rb
1652
1655
  - spec/models/spotlight/blacklight_configuration_spec.rb
1656
+ - spec/models/spotlight/browse_category_search_builder_spec.rb
1653
1657
  - spec/models/spotlight/contact_email_spec.rb
1654
1658
  - spec/models/spotlight/contact_form_spec.rb
1655
1659
  - spec/models/spotlight/contact_image_spec.rb
@@ -2008,6 +2012,7 @@ test_files:
2008
2012
  - spec/models/spotlight/analytics/ga_spec.rb
2009
2013
  - spec/models/spotlight/background_job_progress_spec.rb
2010
2014
  - spec/models/spotlight/blacklight_configuration_spec.rb
2015
+ - spec/models/spotlight/browse_category_search_builder_spec.rb
2011
2016
  - spec/models/spotlight/contact_email_spec.rb
2012
2017
  - spec/models/spotlight/contact_form_spec.rb
2013
2018
  - spec/models/spotlight/contact_image_spec.rb