diff --git a/.rubocop.yml b/.rubocop.yml
index 21b2a85ed..aa2d91a09 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -42,6 +42,7 @@ Layout/LineLength:
- 'spec/controllers/catalog_controller_spec.rb'
- 'app/components/blacklight/advanced_search_form_component.rb'
- 'spec/features/availability_spec.rb'
+ - 'app/components/psul_document_component.rb'
Lint/MissingSuper:
Exclude:
diff --git a/Gemfile b/Gemfile
index 9a0835ffc..734345cfd 100644
--- a/Gemfile
+++ b/Gemfile
@@ -34,10 +34,10 @@ gem 'shelvit'
gem 'sprockets-rails'
gem 'stackprof'
-gem 'blacklight', '~> 7.35'
+gem 'blacklight', '~> 8.7.0'
gem 'blacklight_advanced_search', '~> 8.0.0.alpha'
-gem 'blacklight-marc', '~> 8.0'
-gem 'blacklight_range_limit', '~> 8.1.0'
+gem 'blacklight-marc', '~> 8.1'
+gem 'blacklight_range_limit'
group :development do
gem 'better_errors'
diff --git a/Gemfile.lock b/Gemfile.lock
index 6f19ac41c..0dbaa9124 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -95,10 +95,8 @@ GEM
bindex (0.8.1)
binding_of_caller (1.0.1)
debug_inspector (>= 1.2.0)
- blacklight (7.42.0)
- deprecation
+ blacklight (8.7.0)
globalid
- hashdiff
i18n (>= 1.7.0)
jbuilder (~> 2.7)
kaminari (>= 0.15)
@@ -113,11 +111,12 @@ GEM
marc-fastxmlwriter
rails
traject (~> 3.0)
- blacklight_advanced_search (8.0.0.alpha2)
- blacklight (>= 7.15, < 9)
+ blacklight_advanced_search (8.0.0)
+ blacklight (>= 7.15, < 10)
parslet
- blacklight_range_limit (8.1.0)
- blacklight (~> 7.0)
+ blacklight_range_limit (9.2.0)
+ blacklight (>= 7.25.2, < 10)
+ view_component (>= 2.54, < 5)
bootsnap (1.18.6)
msgpack (~> 1.2)
bot_challenge_page (1.2.0)
@@ -153,8 +152,6 @@ GEM
date (3.5.1)
debug_inspector (1.2.0)
deep_merge (1.2.2)
- deprecation (1.1.0)
- activesupport
devise (5.0.4)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
@@ -203,6 +200,7 @@ GEM
faraday-retry (1.0.4)
ffi (1.17.4)
ffi (1.17.4-arm64-darwin)
+ ffi (1.17.4-x86_64-linux-gnu)
ffi-compiler (1.4.2)
ffi (>= 1.15.5)
rake
@@ -286,7 +284,6 @@ GEM
memory_profiler (1.1.0)
method_source (1.1.0)
mini_mime (1.1.5)
- mini_portile2 (2.8.9)
minitest (6.0.6)
drb (~> 2.0)
prism (~> 1.5)
@@ -317,11 +314,10 @@ GEM
rubocop-rspec_rails (~> 2.30)
scss_lint (~> 0.60)
nio4r (2.7.5)
- nokogiri (1.19.4)
- mini_portile2 (~> 2.8.2)
- racc (~> 1.4)
nokogiri (1.19.4-arm64-darwin)
racc (~> 1.4)
+ nokogiri (1.19.4-x86_64-linux-gnu)
+ racc (~> 1.4)
okcomputer (1.19.0)
orm_adapter (0.5.0)
ostruct (0.6.3)
@@ -538,9 +534,8 @@ GEM
actionpack (>= 6.1)
activesupport (>= 6.1)
sprockets (>= 3.0.0)
- sqlite3 (2.9.5)
- mini_portile2 (~> 2.8.0)
sqlite3 (2.9.5-arm64-darwin)
+ sqlite3 (2.9.5-x86_64-linux-gnu)
stackprof (0.2.27)
thor (1.5.0)
tilt (2.7.0)
@@ -595,15 +590,16 @@ GEM
PLATFORMS
arm64-darwin-24
- ruby
+ arm64-darwin-25
+ x86_64-linux
DEPENDENCIES
better_errors
binding_of_caller
- blacklight (~> 7.35)
- blacklight-marc (~> 8.0)
+ blacklight (~> 8.7.0)
+ blacklight-marc (~> 8.1)
blacklight_advanced_search (~> 8.0.0.alpha)
- blacklight_range_limit (~> 8.1.0)
+ blacklight_range_limit
bootsnap
bot_challenge_page
bugsnag (~> 6.26)
diff --git a/app/components/blacklight/document/action_component.rb b/app/components/blacklight/document/action_component.rb
index 601e9187b..dd25541db 100644
--- a/app/components/blacklight/document/action_component.rb
+++ b/app/components/blacklight/document/action_component.rb
@@ -7,7 +7,8 @@ class ActionComponent < Blacklight::Component
with_collection_parameter :action
# @param [Blacklight::Document] document
- def initialize(document:, action:, options: {}, url_opts: {}, id: nil, link_classes: 'nav-link ps-3')
+ def initialize(document:, action:, options: {}, url_opts: {}, id: nil,
+link_classes: 'nav-link ps-3 dropdown-item')
super
@document = document
@action = action
diff --git a/app/components/blacklight/document/show_tools_component.html.erb b/app/components/blacklight/document/show_tools_component.html.erb
new file mode 100644
index 000000000..7d1c1ed65
--- /dev/null
+++ b/app/components/blacklight/document/show_tools_component.html.erb
@@ -0,0 +1,14 @@
+
+
+
Share
+ <%= render Blacklight::Document::ActionsComponent.new(
+ document: document,
+ tag: 'ul',
+ classes: 'dropdown-menu',
+ wrapping_tag: 'li',
+ actions: actions,
+ url_opts: Blacklight::Parameters.sanitize(params.to_unsafe_h),
+ link_classes: 'dropdown-item'
+ ) %>
+
+
diff --git a/app/components/catalog/document_component.rb b/app/components/catalog/document_component.rb
new file mode 100644
index 000000000..cf2ed4cf7
--- /dev/null
+++ b/app/components/catalog/document_component.rb
@@ -0,0 +1,3 @@
+# frozen_string_literal: true
+
+# Intentionally left as a legacy stub to avoid autoload confusion during the Blacklight 8 migration.
diff --git a/app/components/psul_document_component.rb b/app/components/psul_document_component.rb
new file mode 100644
index 000000000..0027eb605
--- /dev/null
+++ b/app/components/psul_document_component.rb
@@ -0,0 +1,57 @@
+# frozen_string_literal: true
+
+class PsulDocumentComponent < Blacklight::DocumentComponent
+ def before_render
+ super
+ set_slot(:title, nil, actions: false) unless @show
+
+ with_footer do
+ safe_join([
+ helpers.render(partial: 'external_links/index_external_links', locals: { document: @document }),
+ content_tag(:div, class: 'blacklight-availability') do
+ unless Settings.readonly
+ helpers.render(partial: 'catalog/index_availability',
+ locals: { document: @document })
+ end
+ end
+ ].compact)
+ end
+ end
+
+ def call
+ content_tag @component,
+ id: @id,
+ data: {
+ 'document-id': @document.id.to_s.parameterize,
+ 'document-counter': @counter
+ },
+ itemscope: true,
+ itemtype: @document.itemtype,
+ class: classes.flatten.join(' ') do
+ safe_join([
+ content_tag(:div, class: 'document-header row align-items-start gx-3') do
+ safe_join([
+ content_tag(:div, class: 'col-sm-9 pe-0') do
+ safe_join([
+ title,
+ embed,
+ content,
+ metadata,
+ metadata_sections.to_a,
+ partials
+ ].compact)
+ end,
+ content_tag(:div, class: 'col-sm-3 d-flex flex-column align-items-end ps-0 pe-0') do
+ safe_join([
+ helpers.render_index_doc_actions(@document,
+ wrapping_class: 'index-document-functions d-flex justify-content-end mb-2'),
+ thumbnail
+ ].compact)
+ end
+ ].compact)
+ end,
+ footer
+ ].compact)
+ end
+ end
+end
diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb
index e12ec71e7..9ae43d4f3 100644
--- a/app/controllers/catalog_controller.rb
+++ b/app/controllers/catalog_controller.rb
@@ -24,7 +24,7 @@ def index
if cache_key
@response = Rails.cache.fetch(cache_key, expires_in: 12.hours) do
- response = search_service.search_results.first
+ response = search_service.search_results
# Nilling out below is necessary in order to avoid a Marshal.dump error of "can't dump an anonymous class" when
# attempting to cache the Solr response object.
response.blacklight_config = nil
@@ -38,7 +38,7 @@ def index
blacklight_config: blacklight_config
}
else
- @response = search_service.search_results.first
+ @response = search_service.search_results
end
respond_to do |format|
@@ -77,9 +77,11 @@ def ris
end
configure_blacklight do |config|
- # Controls the document actions (also called "tools"), note that blacklight_marc adds refworks and endnote
+ # Controls the document actions (also called "tools"), note that blacklight_marc adds refworks and endnote.
+ # Blacklight 8 defaults document actions to a modal trigger unless modal: false is set, which breaks
+ # direct-download actions like RIS exports.
config.add_show_tools_partial(:email, callback: :email_action, validator: :validate_email_params, html_class: 'dropdown-item')
- config.add_show_tools_partial(:ris, callback: :ris_action, html_class: 'dropdown-item')
+ config.add_show_tools_partial(:ris, callback: :ris_action, html_class: 'dropdown-item', modal: false)
config.add_show_tools_partial(:report_issue, callback: :report_issue_action, validator: :validate_report_issue_params?)
# TODO: hide SMS action for now, should be enabled when fixed
# config.add_show_tools_partial(:sms, if: :render_sms_action?, callback: :sms_action, validator: :validate_sms_params, html_class: 'dropdown-item')
@@ -147,6 +149,8 @@ def ris
config.index.title_field = 'title_display_ssm'
config.index.display_type_field = 'format'
config.index.thumbnail_method = :render_thumbnail
+ config.index.document_component = PsulDocumentComponent
+ config.index.partials = []
# solr field configuration for document/show views
config.show.partials = [:show]
@@ -212,46 +216,6 @@ def ris
config.add_facet_field 'title_sort', label: 'Title', show: false
config.add_facet_field 'thesis_dept_facet', label: 'Graduate Program', show: false
- #
- # Facets that only appear on the home page
- #
- config.add_home_facet_field 'access_facet',
- label: 'Access',
- collapse: false,
- presenter: Blacklight::FacetFieldPresenter
-
- config.add_home_facet_field 'format',
- label: 'Format',
- limit: true,
- collapse: false,
- presenter: Blacklight::FacetFieldPresenter
-
- config.add_home_facet_field 'campus_facet',
- label: 'Campus',
- sort: 'index',
- limit: -1,
- single: true,
- collapse: true,
- presenter: Blacklight::FacetFieldPresenter
-
- config.add_home_facet_field 'media_type_facet',
- label: 'Media Type',
- limit: 20,
- index_range: 'A'..'Z',
- collapse: true,
- presenter: Blacklight::FacetFieldPresenter
-
- config.add_home_facet_field 'classification_pivot_field',
- label: 'Call Number',
- pivot: %w[lc_1letter_facet lc_rest_facet],
- collapse: true,
- collapsing: true,
- presenter: Blacklight::FacetFieldPresenter,
- icons: {
- show: "\uf0fe", # same as '',
- hide: "\uf146"
- }
-
# Have BL send all facet field names to Solr, which has been the default
# previously. Simply remove these lines if you'd rather use Solr request
# handler defaults, or have no facets.
diff --git a/app/helpers/url_helper.rb b/app/helpers/url_helper.rb
index 2931448f8..b55a083c6 100644
--- a/app/helpers/url_helper.rb
+++ b/app/helpers/url_helper.rb
@@ -10,17 +10,18 @@ module UrlHelper
# @example
# session_tracking_params(SolrDocument.new(id: 123), 7)
# => { data: { :'context-href' => '/catalog/123/track?counter=7&search_id=999' } }
- def session_tracking_params(document, counter)
- path = session_tracking_path(document,
- per_page: params.fetch(:per_page, search_session['per_page']),
- counter: counter,
- search_id: current_search_session.try(:id),
- document_id: document&.id)
- if path.nil?
- return {}
+ def session_tracking_params(document, counter, per_page: search_session['per_page'],
+search_id: current_search_session&.id)
+ path_params = { per_page: params.fetch(:per_page, per_page), counter: counter, search_id: search_id }
+ if blacklight_config.track_search_session.storage == 'server'
+ path_params[:document_id] = document&.id
+ path_params[:search_id] = search_id
end
+ path = session_tracking_path(document, path_params)
+ return {} if path.nil?
- { data: { 'context-href': path } }
+ context_method = blacklight_config.track_search_session.storage == 'client' ? 'get' : 'post'
+ { data: { context_href: path, context_method: context_method, turbo_prefetch: false } }
end
end
diff --git a/app/javascript/psulib_blacklight/styles/_catalog_index_default.scss b/app/javascript/psulib_blacklight/styles/_catalog_index_default.scss
index 18784cfe0..844a5003c 100644
--- a/app/javascript/psulib_blacklight/styles/_catalog_index_default.scss
+++ b/app/javascript/psulib_blacklight/styles/_catalog_index_default.scss
@@ -14,7 +14,30 @@ article.document {
}
.documents-list .document .document-thumbnail {
+ display: flex;
float: none;
- margin-bottom: 1em;
+ justify-content: flex-end;
+ margin-bottom: 0;
padding-left: 0;
+ text-align: right;
+ width: 100%;
+
+ > * { // scss-lint:disable SelectorDepth
+ display: inline-block;
+ line-height: 1;
+ }
+}
+
+.documents-list .document .index-document-functions {
+ display: flex;
+ justify-content: flex-end;
+ width: 100%;
+}
+
+.documents-list .document .document-header {
+ margin-bottom: 0;
+}
+
+.documents-list .document .document-title-heading {
+ margin-bottom: 0;
}
diff --git a/app/services/document_ris.rb b/app/services/document_ris.rb
index 5c5d11981..4a07e231e 100644
--- a/app/services/document_ris.rb
+++ b/app/services/document_ris.rb
@@ -29,8 +29,7 @@ class DocumentRis
}.freeze
def initialize(document)
- @document = document
- @docs = @document.first['response']['docs'].first
+ @docs = document
end
def ris_to_string
diff --git a/app/views/bookmarks/_tools.html.erb b/app/views/bookmarks/_tools.html.erb
index 54de66ca7..de92490a9 100644
--- a/app/views/bookmarks/_tools.html.erb
+++ b/app/views/bookmarks/_tools.html.erb
@@ -2,15 +2,7 @@
diff --git a/app/views/catalog/_bookmark_control.html.erb b/app/views/catalog/_bookmark_control.html.erb
index 8201114d6..741f231d0 100644
--- a/app/views/catalog/_bookmark_control.html.erb
+++ b/app/views/catalog/_bookmark_control.html.erb
@@ -1,5 +1,6 @@
<% if current_user %>
-<%= render PsulBookmarkComponent.new(document: document) %>
+<%# The ID value here is a placeholder value to bypass inheritance issues %>
+<%= render PsulBookmarkComponent.new(document: document, id: 'bookmark') %>
<% else %>
Bookmark
<% end %>
diff --git a/app/views/catalog/_constraints.html.erb b/app/views/catalog/_constraints.html.erb
index 0d41561d8..89174407b 100644
--- a/app/views/catalog/_constraints.html.erb
+++ b/app/views/catalog/_constraints.html.erb
@@ -1 +1 @@
-<%= render(PsulConstraintsComponent.new(search_state: convert_to_search_state(controller.params == params ? search_state : params))) %>
+<%= render(PsulConstraintsComponent.new(search_state: search_state)) %>
diff --git a/app/views/catalog/_document_list.html.erb b/app/views/catalog/_document_list.html.erb
new file mode 100644
index 000000000..02b7a4559
--- /dev/null
+++ b/app/views/catalog/_document_list.html.erb
@@ -0,0 +1,13 @@
+
+
+
+<% view_config = local_assigns[:view_config] || blacklight_config&.view_config(document_index_view_type) %>
+
+ <% document_presenters = documents.map { |doc| document_presenter(doc) } -%>
+ <%= render view_config.document_component.with_collection(document_presenters, partials: view_config.partials, counter_offset: @response&.start || 0) %>
+
diff --git a/app/views/catalog/_index_default.html.erb b/app/views/catalog/_index_default.html.erb
index 4bff45aa3..a0b8eb4e4 100644
--- a/app/views/catalog/_index_default.html.erb
+++ b/app/views/catalog/_index_default.html.erb
@@ -1,39 +1,11 @@
-<% doc_presenter = document_presenter(document) %>
+<%# Blacklight 8 renders the default document title + metadata automatically.
+ Keep this partial limited to the custom extras that used to live below the metadata. %>
-
-
- <%= render(
- Blacklight::Document::ThumbnailComponent.new(
- presenter: document_presenter(document),
- counter: document_counter_with_offset(document_counter)
- )
- ) %>
-
-
-
-
-
- <%= render partial: 'external_links/index_external_links',
- locals: {
- document: document
- } %>
-
-
+<%= render partial: 'external_links/index_external_links',
+ locals: {
+ document: document
+ } %>
- <%= render partial: 'index_availability', locals: { document: document } unless Settings.readonly %>
+ <%= render partial: 'catalog/index_availability', locals: { document: document } unless Settings.readonly %>
diff --git a/app/views/catalog/_record_toolbar.html.erb b/app/views/catalog/_record_toolbar.html.erb
index 53815e68c..f92221113 100644
--- a/app/views/catalog/_record_toolbar.html.erb
+++ b/app/views/catalog/_record_toolbar.html.erb
@@ -1,27 +1,7 @@
Actions for <%= document_presenter(@document).html_title.split('/').first %>
-
- <%= render_show_doc_actions @document do |config, inner| %>
- <% if (config.key == :citation) %>
- <%= inner %>
- <% end %>
- <% end %>
-
-
-
-
+ <%= render Blacklight::Document::ShowToolsComponent.new(document: @document) %>
<%= render(partial: 'bookmark_control', locals: { document: @document }) %>
diff --git a/app/views/catalog/email_success.html.erb b/app/views/catalog/email_success.html.erb
new file mode 100644
index 000000000..33212dbe6
--- /dev/null
+++ b/app/views/catalog/email_success.html.erb
@@ -0,0 +1,6 @@
+<%= render Blacklight::System::ModalComponent.new do |component| %>
+ <% component.with_title(t('blacklight.email.form.title')) %>
+
+ <%= render partial: '/shared/flash_msg' %>
+
+<% end %>
diff --git a/app/views/catalog/index.html.erb b/app/views/catalog/index.html.erb
index c0af2dbe1..80ae136c6 100644
--- a/app/views/catalog/index.html.erb
+++ b/app/views/catalog/index.html.erb
@@ -1,5 +1,9 @@
<% content_for(:sidebar) do %>
- <%= render 'search_sidebar' %>
+ <% conf = blacklight_config.view_config(document_index_view_type) %>
+
+ <%= render conf.sidebar_component.new(blacklight_config: blacklight_config,
+ response: @response,
+ view_config: conf) %>
<% end %>
<% unless has_search_parameters? %>
diff --git a/app/views/catalog/report_issue.html.erb b/app/views/catalog/report_issue.html.erb
index 89db56b14..033e917d7 100644
--- a/app/views/catalog/report_issue.html.erb
+++ b/app/views/catalog/report_issue.html.erb
@@ -1,7 +1,7 @@
<%= render Blacklight::System::ModalComponent.new do |component| %>
- <% component.with(:title, t('blackcat.report_issue.form.title')) %>
+ <% component.with_title(t('blackcat.report_issue.form.title')) %>
- <% component.with(:body) do %>
+ <% component.with_body do %>
<%= render 'report_issue_form' %>
<% end %>
<% end %>
diff --git a/app/views/catalog/report_issue_success.html.erb b/app/views/catalog/report_issue_success.html.erb
index 08c259eb5..3e1f5d686 100644
--- a/app/views/catalog/report_issue_success.html.erb
+++ b/app/views/catalog/report_issue_success.html.erb
@@ -1,6 +1,8 @@
<%= render Blacklight::System::ModalComponent.new do |component| %>
- <% component.with(:title, t('blacklight.email.success')) %>
+ <% component.with_title(t('blacklight.email.success')) %>
- <%= render partial: '/shared/flash_msg' %>
-
+ <% component.with_body do %>
+ <%= render partial: '/shared/flash_msg' %>
+
+ <% end %>
<% end %>
diff --git a/app/views/layouts/blacklight/base.html.erb b/app/views/layouts/blacklight/base.html.erb
index c82e36701..5df391815 100644
--- a/app/views/layouts/blacklight/base.html.erb
+++ b/app/views/layouts/blacklight/base.html.erb
@@ -55,8 +55,8 @@
<%= link_back_to_catalog label: t('blacklight.back_to_search.html'), class: 'btn btn-outline-secondary btn-sm' %>
<% end %>
+ <%= render(Blacklight::SearchContext::ServerItemPaginationComponent.new(search_context: @search_context, search_session: search_session, current_document: @document)) if search_session['document_id'] == @document.id %>
- <%= render 'previous_next_doc' if search_session['document_id'] == @document.id %>
<% end %>
<% if @document %>
<%= render 'record_toolbar' %>
diff --git a/app/views/record_mailer/email_record.text.erb b/app/views/record_mailer/email_record.text.erb
index 5042042cf..cc82b2fd2 100644
--- a/app/views/record_mailer/email_record.text.erb
+++ b/app/views/record_mailer/email_record.text.erb
@@ -1,10 +1,15 @@
Penn State University Libraries record(s):
<% @documents.each do |document| %>
-<%= document.to_email_text %>
+<% title = Array(document['title_display_ssm']).first || Array(document['title_tsim']).first || document.id %>
+<%= "Title: #{title}" %>
+
+<% author = Array(document['author_person_display_ssm']).first || Array(document['author_tsim']).first %>
+<%= "Author: #{author}" if author.present? %>
+
<%= t('blacklight.email.text.url', :url =>polymorphic_url(document, @url_gen_params)) %>
-
+
<% end %>
<%= t('blacklight.email.text.message', :message => @message) %>
diff --git a/config/locales/blacklight.en.yml b/config/locales/blacklight.en.yml
index d0fd5466c..14db43ac5 100644
--- a/config/locales/blacklight.en.yml
+++ b/config/locales/blacklight.en.yml
@@ -12,6 +12,7 @@ en:
html: '
Back to results'
tools:
librarian_view: 'MARC View'
+ ris: 'RIS File'
sms: 'SMS'
search:
errors:
diff --git a/spec/controllers/catalog_controller_spec.rb b/spec/controllers/catalog_controller_spec.rb
index 3134c18b0..1f24c00c1 100644
--- a/spec/controllers/catalog_controller_spec.rb
+++ b/spec/controllers/catalog_controller_spec.rb
@@ -4,12 +4,6 @@
RSpec.describe CatalogController do
describe 'index action' do
- it 'gets the homepage and renders only the homepage facets' do
- get :index
- configured_home_page_facets = %w[access_facet format campus_facet media_type_facet classification_pivot_field]
- expect(assigns(:blacklight_config)[:facet_fields].keys).to eq(configured_home_page_facets)
- end
-
it 'updates the blacklight Solr URL from request context' do
request_config = instance_double(
PsulibBlacklight::SolrRequestConfig,
@@ -97,20 +91,9 @@
before do
allow(controller).to receive(:search_service).and_return(service)
allow(service).to receive(:search_results) { |*_args| raise fake_error }
- allow(Rails.env).to receive_messages(test?: false)
- end
-
- it 'redirects the user to the root url for a bad search' do
- expect(controller.logger).to receive(:error).with(fake_error)
- get :index, params: { q: '+' }
- expect(response.redirect_url).to eq root_url
- expect(request.flash[:notice]).to eq I18n.t('blacklight.search.errors.request_error')
- expect(response).not_to be_successful
- expect(response).to have_http_status :found
end
- it 'returns status 500 if the catalog path is raising an exception' do
- allow(controller).to receive(:flash).and_return(notice: I18n.t('blacklight.search.errors.request_error'))
+ it 'raises an InvalidRequest exception' do
expect { get :index, params: { q: '+' } }.to raise_error Blacklight::Exceptions::InvalidRequest
end
end
diff --git a/spec/features/share_spec.rb b/spec/features/share_spec.rb
index 80a139658..6aecfdb16 100644
--- a/spec/features/share_spec.rb
+++ b/spec/features/share_spec.rb
@@ -27,6 +27,6 @@
visit '/catalog/22090269'
sleep 0.5
click_on 'Share'
- expect(page).to have_link 'RIS file'
+ expect(page).to have_link 'RIS File'
end
end
diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb
index 25542b3b7..3bc45cc96 100644
--- a/spec/rails_helper.rb
+++ b/spec/rails_helper.rb
@@ -52,7 +52,7 @@
RSpec.configure do |config|
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
- config.fixture_path = Rails.root.join('spec/fixtures').to_s
+ config.fixture_paths = [Rails.root.join('spec/fixtures').to_s]
# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false
diff --git a/spec/services/document_ris_spec.rb b/spec/services/document_ris_spec.rb
index dbc1a1ad3..db4dceda4 100644
--- a/spec/services/document_ris_spec.rb
+++ b/spec/services/document_ris_spec.rb
@@ -4,22 +4,17 @@
RSpec.describe DocumentRis do
let(:service) { described_class.new(document) }
- let(:document) { [{ 'response' =>
- { 'numFound' => 1,
- 'start' => 0,
- 'numFoundExact' => true,
- 'docs' =>
- [{ 'id' => '24053587',
- 'isbn_valid_ssm' => ['9781524763138', '1524763136'],
- 'title_245ab_tsim' => ['Becoming'],
- 'author_tsim' => ['Obama, Michelle, 1964-'],
- 'author_addl_tsim' => ['Additional Author'],
- 'publication_display_ssm' => ['New York : Crown, [2018]'],
- 'edition_display_ssm' => ['First edition.'],
- 'pub_date_illiad_ssm' => ['2018'],
- 'publisher_name_ssm' => ['Crown'],
- 'publication_place_ssm' => ['New York'],
- 'format' => ['Book'] }] } }]}
+ let(:document) { { 'id' => '24053587',
+ 'isbn_valid_ssm' => ['9781524763138', '1524763136'],
+ 'title_245ab_tsim' => ['Becoming'],
+ 'author_tsim' => ['Obama, Michelle, 1964-'],
+ 'author_addl_tsim' => ['Additional Author'],
+ 'publication_display_ssm' => ['New York : Crown, [2018]'],
+ 'edition_display_ssm' => ['First edition.'],
+ 'pub_date_illiad_ssm' => ['2018'],
+ 'publisher_name_ssm' => ['Crown'],
+ 'publication_place_ssm' => ['New York'],
+ 'format' => ['Book'] }}
let(:ris) { "TY - BOOK\r\n" \
"TI - Becoming\r\n" \
"A1 - Obama, Michelle, 1964-\r\n" \
diff --git a/spec/views/shared/_header_navbar.html.erb_spec.rb b/spec/views/shared/_header_navbar.html.erb_spec.rb
index 4251382d4..f7b22b7e5 100644
--- a/spec/views/shared/_header_navbar.html.erb_spec.rb
+++ b/spec/views/shared/_header_navbar.html.erb_spec.rb
@@ -8,7 +8,8 @@
before do
stub_template 'shared/_user_util_links.html.erb' => 'Some content'
stub_template 'catalog/_search_form.html.erb' => 'Other content'
- assign(:search_bar, Blacklight::SearchBarPresenter.new(controller, blacklight_config))
+ # "The SearchBarPresenter has been deprecated. Call `render Blacklight::SearchBarComponent.new' instead"
+ # assign(:search_bar, Blacklight::SearchBarPresenter.new(controller, blacklight_config))
end
it 'displays search bar except on Advanced Search' do