From cc7077f8cefc3ee837ba77f93760e739f71cd25a Mon Sep 17 00:00:00 2001 From: Charlie Morris Date: Wed, 27 May 2020 00:03:48 -0400 Subject: [PATCH 1/5] Requires blacklight/solr/document so as to "reopen" the namespace owned by Blacklight and used by Blacklight Marc --- lib/blacklight/marc/engine.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/blacklight/marc/engine.rb b/lib/blacklight/marc/engine.rb index 5d85259..3b6d74d 100644 --- a/lib/blacklight/marc/engine.rb +++ b/lib/blacklight/marc/engine.rb @@ -14,6 +14,8 @@ class Engine < Rails::Engine end initializer 'blacklight_marc.initialize' do |app| + require 'blacklight/solr/document' + Mime::Type.register_alias "text/plain", :refworks_marc_txt Mime::Type.register_alias "text/plain", :openurl_kev Mime::Type.register "application/x-endnote-refer", :endnote From 811ea6c55615a7cdcfbc54965b40fe2f251afe6e Mon Sep 17 00:00:00 2001 From: Charlie Morris Date: Thu, 11 Jun 2020 19:55:19 -0400 Subject: [PATCH 2/5] Accounts for the second argument that ActionDispatch::Routing::PolymorphicRoutes.polymorphic_method sends in Rails 6 --- app/helpers/blacklight_marc_helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/blacklight_marc_helper.rb b/app/helpers/blacklight_marc_helper.rb index 408566b..e364751 100644 --- a/app/helpers/blacklight_marc_helper.rb +++ b/app/helpers/blacklight_marc_helper.rb @@ -1,18 +1,18 @@ module BlacklightMarcHelper # This method should move to BlacklightMarc in Blacklight 6.x - def refworks_export_url params = {} + def refworks_export_url params = {}, *_ "http://www.refworks.com/express/expressimport.asp?vendor=#{CGI.escape(params[:vendor] || application_name)}&filter=#{CGI.escape(params[:filter] || "MARC Format")}&encoding=65001" + (("&url=#{CGI.escape(params[:url])}" if params[:url]) || "") end - def refworks_solr_document_path opts = {} + def refworks_solr_document_path opts = {}, *_ if opts[:id] refworks_export_url(url: solr_document_url(opts[:id], format: :refworks_marc_txt)) end end # For exporting a single endnote document. (endnote_catalog_path is defined by blacklight-marc and it is used for multiple document export) - def single_endnote_catalog_path opts = {} + def single_endnote_catalog_path opts = {}, *_ solr_document_path(opts.merge(format: 'endnote')) end From c9787016a2254cf19c6a5aaf7c87496b6422d951 Mon Sep 17 00:00:00 2001 From: Chris Beer Date: Sun, 2 Aug 2020 09:29:04 -0700 Subject: [PATCH 3/5] Update the solr schema from upstream for solr 8 compatibility --- solr/conf/schema.xml | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/solr/conf/schema.xml b/solr/conf/schema.xml index 038c868..cc9597e 100644 --- a/solr/conf/schema.xml +++ b/solr/conf/schema.xml @@ -71,7 +71,7 @@ - + @@ -93,7 +93,7 @@ - + @@ -113,7 +113,7 @@ - + @@ -133,7 +133,7 @@ - + @@ -153,7 +153,7 @@ - + @@ -231,23 +231,23 @@ - - - - + + + + - - - - - + + + + + - - - + + + - - + +