diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index a1ea3513cb..de306b000d 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -1,12 +1,12 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
-# on 2016-08-25 07:56:15 -0700 using RuboCop version 0.42.0.
+# on 2016-09-07 07:22:49 -0700 using RuboCop version 0.42.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
-# Offense count: 19
+# Offense count: 17
# Cop supports --auto-correct.
# Configuration parameters: AlignWith, SupportedStyles, AutoCorrect.
# SupportedStyles: keyword, variable, start_of_line
@@ -14,7 +14,6 @@ Lint/EndAlignment:
Exclude:
- 'app/controllers/concerns/blacklight/token_based_user.rb'
- 'app/helpers/blacklight/catalog_helper_behavior.rb'
- - 'app/helpers/blacklight/deprecated_url_helper_behavior.rb'
- 'app/helpers/blacklight/facets_helper_behavior.rb'
- 'app/helpers/blacklight/render_partials_helper.rb'
- 'app/helpers/blacklight/url_helper_behavior.rb'
@@ -25,7 +24,7 @@ Lint/EndAlignment:
- 'lib/blacklight/solr/response/facets.rb'
- 'lib/blacklight/solr/search_builder_behavior.rb'
-# Offense count: 30
+# Offense count: 26
# Cop supports --auto-correct.
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
Lint/UnusedBlockArgument:
@@ -33,7 +32,6 @@ Lint/UnusedBlockArgument:
- 'app/controllers/concerns/blacklight/search_context.rb'
- 'app/helpers/blacklight/configuration_helper_behavior.rb'
- 'app/models/concerns/blacklight/document/dublin_core.rb'
- - 'lib/blacklight/configuration.rb'
- 'lib/blacklight/configuration/fields.rb'
- 'lib/blacklight/engine.rb'
- 'lib/blacklight/parameters.rb'
@@ -42,17 +40,15 @@ Lint/UnusedBlockArgument:
- 'lib/railties/blacklight.rake'
- 'tasks/blacklight.rake'
-# Offense count: 21
+# Offense count: 18
# Cop supports --auto-correct.
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
Lint/UnusedMethodArgument:
Exclude:
- - 'app/controllers/concerns/blacklight/default_component_configuration.rb'
- 'app/helpers/blacklight/blacklight_helper_behavior.rb'
- 'app/helpers/blacklight/catalog_helper_behavior.rb'
- 'app/helpers/blacklight/component_helper_behavior.rb'
- 'app/helpers/blacklight/configuration_helper_behavior.rb'
- - 'app/helpers/blacklight/deprecated_url_helper_behavior.rb'
- 'app/helpers/blacklight/facets_helper_behavior.rb'
- 'app/helpers/blacklight/render_partials_helper.rb'
- 'app/helpers/blacklight/search_history_constraints_helper_behavior.rb'
@@ -62,11 +58,10 @@ Lint/UnusedMethodArgument:
- 'lib/blacklight/search_builder.rb'
- 'lib/blacklight/search_state.rb'
-# Offense count: 9
+# Offense count: 7
Lint/UselessAssignment:
Exclude:
- 'app/controllers/concerns/blacklight/search_context.rb'
- - 'app/helpers/blacklight/deprecated_url_helper_behavior.rb'
- 'app/helpers/blacklight/facets_helper_behavior.rb'
- 'app/models/bookmark.rb'
- 'lib/blacklight/routes/exportable.rb'
@@ -85,21 +80,21 @@ Metrics/BlockNesting:
# Offense count: 2
# Configuration parameters: CountComments.
Metrics/ClassLength:
- Max: 200
+ Max: 185
# Offense count: 20
Metrics/CyclomaticComplexity:
Max: 12
-# Offense count: 59
+# Offense count: 54
# Configuration parameters: CountComments.
Metrics/MethodLength:
- Max: 52
+ Max: 51
# Offense count: 9
# Configuration parameters: CountComments.
Metrics/ModuleLength:
- Max: 213
+ Max: 208
# Offense count: 1
# Configuration parameters: CountKeywordArgs.
@@ -132,7 +127,7 @@ Style/Alias:
- 'lib/blacklight/solr/response.rb'
- 'lib/blacklight/solr/response/group_response.rb'
-# Offense count: 7
+# Offense count: 6
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: with_first_parameter, with_fixed_indentation
@@ -143,7 +138,7 @@ Style/AlignParameters:
- 'lib/blacklight/configuration.rb'
- 'lib/generators/blacklight/solr4_generator.rb'
-# Offense count: 66
+# Offense count: 64
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: always, conditionals
@@ -160,17 +155,15 @@ Style/BracesAroundHashParameters:
- 'lib/blacklight/solr/response/facets.rb'
- 'lib/generators/blacklight/test_support_generator.rb'
-# Offense count: 13
+# Offense count: 8
# Cop supports --auto-correct.
# Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep, IndentationWidth.
# SupportedStyles: case, end
Style/CaseIndentation:
Exclude:
- 'app/helpers/blacklight/catalog_helper_behavior.rb'
- - 'app/helpers/blacklight/deprecated_url_helper_behavior.rb'
- 'app/presenters/blacklight/index_presenter.rb'
- 'lib/blacklight/configuration/fields.rb'
- - 'lib/blacklight/search_builder.rb'
# Offense count: 51
# Configuration parameters: EnforcedStyle, SupportedStyles.
@@ -186,7 +179,7 @@ Style/ConditionalAssignment:
Exclude:
- 'lib/blacklight/solr/response/spelling.rb'
-# Offense count: 104
+# Offense count: 103
Style/Documentation:
Enabled: false
@@ -216,7 +209,7 @@ Style/ElseAlignment:
- 'lib/blacklight/solr/response/facets.rb'
- 'lib/blacklight/solr/search_builder_behavior.rb'
-# Offense count: 26
+# Offense count: 25
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
Style/ExtraSpacing:
@@ -224,7 +217,6 @@ Style/ExtraSpacing:
- 'app/helpers/blacklight/catalog_helper_behavior.rb'
- 'app/helpers/blacklight/configuration_helper_behavior.rb'
- 'app/models/concerns/blacklight/document/dublin_core.rb'
- - 'app/models/concerns/blacklight/document/export.rb'
- 'app/models/record_mailer.rb'
- 'blacklight.gemspec'
- 'config/routes.rb'
@@ -254,7 +246,7 @@ Style/GuardClause:
Style/HashSyntax:
Enabled: false
-# Offense count: 16
+# Offense count: 15
# Cop supports --auto-correct.
# Configuration parameters: MaxLineLength.
Style/IfUnlessModifier:
@@ -265,7 +257,6 @@ Style/IfUnlessModifier:
- 'app/helpers/blacklight/catalog_helper_behavior.rb'
- 'app/helpers/blacklight/url_helper_behavior.rb'
- 'app/models/blacklight/facet_paginator.rb'
- - 'lib/blacklight/configuration.rb'
- 'lib/blacklight/configuration/fields.rb'
- 'lib/blacklight/search_state.rb'
- 'lib/generators/blacklight/install_generator.rb'
@@ -279,7 +270,7 @@ Style/IndentHash:
Exclude:
- 'lib/blacklight/configuration.rb'
-# Offense count: 23
+# Offense count: 22
# Cop supports --auto-correct.
# Configuration parameters: Width.
Style/IndentationWidth:
@@ -308,7 +299,7 @@ Style/LeadingCommentSpace:
- 'lib/blacklight/configuration.rb'
- 'lib/blacklight/solr/response/spelling.rb'
-# Offense count: 139
+# Offense count: 119
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
@@ -331,7 +322,7 @@ Style/MultilineMethodCallIndentation:
- 'app/controllers/concerns/blacklight/search_helper.rb'
- 'lib/blacklight/search_builder.rb'
-# Offense count: 13
+# Offense count: 12
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: aligned, indented
@@ -372,7 +363,7 @@ Style/PredicateName:
Style/RedundantSelf:
Enabled: false
-# Offense count: 24
+# Offense count: 17
# Cop supports --auto-correct.
Style/SpaceAfterComma:
Exclude:
@@ -381,7 +372,6 @@ Style/SpaceAfterComma:
- 'app/helpers/blacklight/facets_helper_behavior.rb'
- 'app/helpers/blacklight/render_constraints_helper_behavior.rb'
- 'app/models/concerns/blacklight/document/dublin_core.rb'
- - 'lib/blacklight/configuration.rb'
- 'lib/blacklight/configuration/fields.rb'
- 'lib/blacklight/parameters.rb'
- 'lib/blacklight/solr/response/facets.rb'
@@ -397,7 +387,7 @@ Style/SpaceAroundBlockParameters:
- 'app/controllers/concerns/blacklight/catalog.rb'
- 'app/models/concerns/blacklight/document/extensions.rb'
-# Offense count: 27
+# Offense count: 23
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: space, no_space
@@ -408,15 +398,13 @@ Style/SpaceAroundEqualsInParameterDefault:
- 'app/helpers/blacklight/component_helper_behavior.rb'
- 'app/helpers/blacklight/configuration_helper_behavior.rb'
- 'app/helpers/blacklight/facets_helper_behavior.rb'
- - 'app/helpers/blacklight/render_partials_helper.rb'
- 'app/helpers/blacklight/url_helper_behavior.rb'
- 'app/models/concerns/blacklight/document.rb'
- - 'app/presenters/blacklight/document_presenter.rb'
- 'app/presenters/blacklight/index_presenter.rb'
- 'app/presenters/blacklight/show_presenter.rb'
- 'lib/blacklight/search_state.rb'
-# Offense count: 13
+# Offense count: 12
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment.
Style/SpaceAroundOperators:
@@ -426,7 +414,6 @@ Style/SpaceAroundOperators:
- 'app/helpers/blacklight/facets_helper_behavior.rb'
- 'app/helpers/blacklight/search_history_constraints_helper_behavior.rb'
- 'app/helpers/blacklight/url_helper_behavior.rb'
- - 'app/models/concerns/blacklight/document/export.rb'
- 'lib/blacklight/configuration.rb'
- 'lib/blacklight/solr/repository.rb'
- 'lib/blacklight/solr/response/spelling.rb'
@@ -497,14 +484,13 @@ Style/SpaceInsideHashLiteralBraces:
- 'lib/blacklight/configuration.rb'
- 'lib/blacklight/solr/repository.rb'
-# Offense count: 19
+# Offense count: 18
# Cop supports --auto-correct.
Style/SpaceInsideParens:
Exclude:
- 'app/controllers/concerns/blacklight/search_context.rb'
- 'app/helpers/blacklight/catalog_helper_behavior.rb'
- 'app/helpers/blacklight/facets_helper_behavior.rb'
- - 'app/helpers/blacklight/render_constraints_helper_behavior.rb'
- 'app/helpers/blacklight/search_history_constraints_helper_behavior.rb'
- 'app/helpers/blacklight/url_helper_behavior.rb'
- 'app/models/concerns/blacklight/document/dublin_core.rb'
@@ -513,8 +499,7 @@ Style/SpaceInsideParens:
- 'lib/blacklight/search_state.rb'
- 'lib/blacklight/solr/search_builder_behavior.rb'
-# Offense count: 217
+# Offense count: 197
# Cop supports --auto-correct.
Style/TrailingWhitespace:
Enabled: false
-
diff --git a/app/assets/stylesheets/blacklight/_facets.scss b/app/assets/stylesheets/blacklight/_facets.scss
index a955d1d358..5e3439c94c 100644
--- a/app/assets/stylesheets/blacklight/_facets.scss
+++ b/app/assets/stylesheets/blacklight/_facets.scss
@@ -107,13 +107,6 @@
}
-/* deprecated in Blacklight 5.x */
-ul.facet_extended_list, .facet_extended_list ul
-{
- @extend .list-unstyled;
-
-}
-
.collapse-toggle {
cursor: pointer;
}
diff --git a/app/helpers/blacklight/blacklight_helper_behavior.rb b/app/helpers/blacklight/blacklight_helper_behavior.rb
index f9282a07af..f5a0d3244f 100644
--- a/app/helpers/blacklight/blacklight_helper_behavior.rb
+++ b/app/helpers/blacklight/blacklight_helper_behavior.rb
@@ -7,8 +7,6 @@ module Blacklight::BlacklightHelperBehavior
include RenderConstraintsHelper
include RenderPartialsHelper
include FacetsHelper
- extend Deprecation
- self.deprecation_horizon = 'Blacklight version 7.0.0'
##
# Get the name of this application, from either:
@@ -137,45 +135,6 @@ def render_index_field_label *args
html_escape t(:"blacklight.search.index.#{document_index_view_type}.label", default: :'blacklight.search.index.label', label: index_field_label(document, field))
end
- ##
- # Render the index field label for a document
- #
- # @overload render_index_field_value(options)
- # Use the default, document-agnostic configuration
- # @param [Hash] opts
- # @option opts [String] :field
- # @option opts [String] :value
- # @option opts [String] :document
- # @overload render_index_field_value(document, options)
- # Allow an extention point where information in the document
- # may drive the value of the field
- # @param [SolrDocument] doc
- # @param [Hash] opts
- # @option opts [String] :field
- # @option opts [String] :value
- # @overload render_index_field_value(document, field, options)
- # Allow an extention point where information in the document
- # may drive the value of the field
- # @param [SolrDocument] doc
- # @param [String] field
- # @param [Hash] opts
- # @option opts [String] :value
- # @deprecated use IndexPresenter#field_value
- def render_index_field_value *args
- render_field_value(*args)
- end
- deprecation_deprecate render_index_field_value: 'replaced by IndexPresenter#field_value'
-
- # @deprecated use IndexPresenter#field_value
- def render_field_value(*args)
- options = args.extract_options!
- document = args.shift || options[:document]
-
- field = args.shift || options[:field]
- presenter(document).field_value field, options.except(:document, :field)
- end
- deprecation_deprecate render_field_value: 'replaced by IndexPresenter#field_value'
-
##
# Render the show field label for a document
#
@@ -198,35 +157,6 @@ def render_document_show_field_label *args
t(:'blacklight.search.show.label', label: document_show_field_label(document, field))
end
- ##
- # Render the index field label for a document
- #
- # @overload render_document_show_field_value(options)
- # Use the default, document-agnostic configuration
- # @param [Hash] opts
- # @option opts [String] :field
- # @option opts [String] :value
- # @option opts [String] :document
- # @overload render_document_show_field_value(document, options)
- # Allow an extention point where information in the document
- # may drive the value of the field
- # @param [SolrDocument] doc
- # @param [Hash] opts
- # @option opts [String] :field
- # @option opts [String] :value
- # @overload render_document_show_field_value(document, field, options)
- # Allow an extention point where information in the document
- # may drive the value of the field
- # @param [SolrDocument] doc
- # @param [String] field
- # @param [Hash] opts
- # @option opts [String] :value
- # @deprecated use ShowPresenter#field_value
- def render_document_show_field_value *args
- render_field_value(*args)
- end
- deprecation_deprecate render_document_show_field_value: 'replaced by ShowPresenter#field_value'
-
##
# Get the value of the document's "title" field, or a placeholder
# value (if empty)
@@ -269,24 +199,6 @@ def render_document_heading(*args)
content_tag(tag, presenter(document).heading, itemprop: "name")
end
- ##
- # Get the value for a document's field, and prepare to render it.
- # - highlight_field
- # - accessor
- # - solr field
- #
- # Rendering:
- # - helper_method
- # - link_to_search
- # @param [SolrDocument] document
- # @param [String] _field name
- # @param [Blacklight::Configuration::Field] field_config solr field configuration
- # @param [Hash] options additional options to pass to the rendering helpers
- def get_field_values document, _field, field_config, options = {}
- presenter(document).field_values field_config, options
- end
- deprecation_deprecate :get_field_values
-
##
# Get the current "view type" (and ensure it is a valid type)
#
@@ -335,9 +247,6 @@ def presenter(document)
show_presenter(document)
when 'index'
index_presenter(document)
- else
- Deprecation.warn(Blacklight::BlacklightHelperBehavior, "Unable to determine presenter type for #{action_name} on #{controller_name}, falling back on deprecated Blacklight::DocumentPresenter")
- presenter_class.new(document, self)
end
end
@@ -349,11 +258,6 @@ def index_presenter(document)
index_presenter_class(document).new(document, self)
end
- def presenter_class
- blacklight_config.document_presenter_class
- end
- deprecation_deprecate presenter_class: "replaced by show_presenter_class and index_presenter_class"
-
##
# Override this method if you want to use a different presenter class
def show_presenter_class(_document)
diff --git a/app/helpers/blacklight/deprecated_url_helper_behavior.rb b/app/helpers/blacklight/deprecated_url_helper_behavior.rb
deleted file mode 100644
index e794767631..0000000000
--- a/app/helpers/blacklight/deprecated_url_helper_behavior.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-# frozen_string_literal: true
-module Blacklight
- module DeprecatedUrlHelperBehavior
- extend Deprecation
- self.deprecation_horizon = 'blacklight 7.x'
-
- def params_for_search(*args, &block)
- source_params, params_to_merge = case args.length
- when 0
- search_state.params_for_search
- when 1
- search_state.params_for_search(args.first)
- when 2
- Deprecation.warn(Blacklight::DeprecatedUrlHelperBehavior, 'Use Blacklight::SearchState.new(source_params).params_for_search instead')
- Blacklight::SearchState.new(args.first, blacklight_config).params_for_search(args.last)
- else
- raise ArgumentError, "wrong number of arguments (#{args.length} for 0..2)"
- end
- end
- deprecation_deprecate :params_for_search
-
- def sanitize_search_params(source_params)
- Blacklight::Parameters.sanitize(source_params)
- end
- deprecation_deprecate :sanitize_search_params
-
- def reset_search_params(source_params)
- Blacklight::SearchState.new(source_params, blacklight_config).send(:reset_search_params)
- end
- deprecation_deprecate :reset_search_params
-
- def add_facet_params(field, item, source_params = nil)
- if source_params
- Deprecation.warn(Blacklight::DeprecatedUrlHelperBehavior, 'Use Blacklight::SearchState.new(source_params).add_facet_params instead')
-
- Blacklight::SearchState.new(source_params, blacklight_config).add_facet_params(field, item)
- else
- search_state.add_facet_params(field, item)
- end
- end
- deprecation_deprecate :add_facet_params
-
- def remove_facet_params(field, item, source_params = nil)
- if source_params
- Deprecation.warn(Blacklight::DeprecatedUrlHelperBehavior, 'Use Blacklight::SearchState.new(source_params).remove_facet_params instead')
-
- Blacklight::SearchState.new(source_params, blacklight_config).remove_facet_params(field, item)
- else
- search_state.remove_facet_params(field, item)
- end
- end
- deprecation_deprecate :remove_facet_params
-
- delegate :add_facet_params_and_redirect, to: :search_state
- deprecation_deprecate :add_facet_params_and_redirect
- end
-end
diff --git a/app/helpers/blacklight/facets_helper_behavior.rb b/app/helpers/blacklight/facets_helper_behavior.rb
index a3389ba1e1..7c99b096c2 100644
--- a/app/helpers/blacklight/facets_helper_behavior.rb
+++ b/app/helpers/blacklight/facets_helper_behavior.rb
@@ -43,7 +43,6 @@ def render_facet_limit(display_facet, options = {})
options[:layout] ||= "facet_layout" unless options.key?(:layout)
options[:locals] ||= {}
options[:locals][:field_name] ||= display_facet.name
- options[:locals][:solr_field] ||= display_facet.name # deprecated
options[:locals][:facet_field] ||= facet_configuration_for_field(display_facet.name)
options[:locals][:display_facet] ||= display_facet
diff --git a/app/helpers/blacklight/url_helper_behavior.rb b/app/helpers/blacklight/url_helper_behavior.rb
index 3ca8da7907..d7a19ef919 100644
--- a/app/helpers/blacklight/url_helper_behavior.rb
+++ b/app/helpers/blacklight/url_helper_behavior.rb
@@ -2,8 +2,6 @@
##
# URL helper methods
module Blacklight::UrlHelperBehavior
- include Blacklight::DeprecatedUrlHelperBehavior
-
##
# Extension point for downstream applications
# to provide more interesting routing to
diff --git a/app/presenters/blacklight/document_presenter.rb b/app/presenters/blacklight/document_presenter.rb
deleted file mode 100644
index 71e9bc21cf..0000000000
--- a/app/presenters/blacklight/document_presenter.rb
+++ /dev/null
@@ -1,153 +0,0 @@
-# frozen_string_literal: true
-module Blacklight
- # @deprecated
- class DocumentPresenter
- extend Deprecation
- self.deprecation_horizon = 'Blacklight version 7.0.0'
-
- # @param [SolrDocument] document
- # @param [ActionController::Base] controller scope for linking and generating urls
- # @param [Blacklight::Configuration] configuration
- def initialize(document, controller, configuration = controller.blacklight_config)
- @document = document
- @configuration = configuration
- @controller = controller
- end
-
- ##
- # Get the value of the document's "title" field, or a placeholder
- # value (if empty)
- #
- # @return [String]
- # @deprecated use ShowPresenter#heading instead
- def document_heading
- show_presenter.heading
- end
- deprecation_deprecate document_heading: "use ShowPresenter#heading instead"
-
- ##
- # Create links from a documents dynamically
- # provided export formats. Returns empty string if no links available.
- #
- # @param [Hash] options
- # @option options [Boolean] :unique ensures only one link is output for every
- # content type, e.g. as required by atom
- # @option options [Array] :exclude array of format shortnames to not include in the output
- # @deprecated moved to ShowPresenter#link_rel_alternates
- def link_rel_alternates(options = {})
- show_presenter.link_rel_alternates(options)
- end
- deprecation_deprecate link_rel_alternates: "use ShowPresenter#link_rel_alternates instead"
-
- ##
- # Get the document's "title" to display in the element.
- # (by default, use the #document_heading)
- #
- # @see #document_heading
- # @return [String]
- # @deprecated use ShowPresenter#html_title instead
- def document_show_html_title
- show_presenter.html_title
- end
- deprecation_deprecate document_show_html_title: "use ShowPresenter#html_title instead"
-
- ##
- # Render the document index heading
- #
- # @overload render_document_index_label(field, opts)
- # @param [Symbol, Proc, String] field Render the given field or evaluate the proc or render the given string
- # @param [Hash] opts
- # @deprecated use IndexPresenter#label instead
- def render_document_index_label(*args)
- index_presenter.label(*args)
- end
- deprecation_deprecate render_document_index_label: "use IndexPresenter#label instead"
-
- ##
- # Render the index field label for a document
- #
- # Allow an extention point where information in the document
- # may drive the value of the field
- # @overload render_index_field_value(field, opts)
- # @param [String] field
- # @param [Hash] opts
- # @option opts [String] :value
- # @deprecated use IndexPresenter#field_value instead
- def render_index_field_value *args
- index_presenter.field_value(*args)
- end
- deprecation_deprecate render_index_field_value: "use IndexPresenter#field_value instead"
-
- ##
- # Render the show field value for a document
- #
- # Allow an extention point where information in the document
- # may drive the value of the field
- #
- # @overload render_index_field_value(field, options)
- # @param [String] field
- # @param [Hash] options
- # @option options [String] :value
- # @deprecated use ShowPresenter#field_value
- def render_document_show_field_value *args
- show_presenter.field_value(*args)
- end
- deprecation_deprecate render_document_show_field_value: "use ShowPresenter#field_value instead"
-
- ##
- # Get the value for a document's field, and prepare to render it.
- # - highlight_field
- # - accessor
- # - solr field
- #
- # Rendering:
- # - helper_method
- # - link_to_search
- # @param [String] _field name
- # @param [Blacklight::Configuration::Field] field_config solr field configuration
- # @param [Hash] options additional options to pass to the rendering helpers
- # @deprecated
- def get_field_values _field, field_config, options = {}
- field_values(field_config, options)
- end
- deprecation_deprecate get_field_values: 'Use field_values instead'
-
- ##
- # Get the value for a document's field, and prepare to render it.
- # - highlight_field
- # - accessor
- # - solr field
- #
- # Rendering:
- # - helper_method
- # - link_to_search
- # @param [Blacklight::Configuration::Field] field_config solr field configuration
- # @param [Hash] options additional options to pass to the rendering helpers
- def field_values(field_config, options={})
- FieldPresenter.new(@controller, @document, field_config, options).render
- end
- deprecation_deprecate field_values: 'Use ShowPresenter or IndexPresenter field_values instead'
-
- # @deprecated
- def render_field_value(values, field_config = Configuration::NullField.new)
- field_values(field_config, value: Array(values))
- end
- deprecation_deprecate render_field_value: 'Use FieldPresenter instead'
-
- # @deprecated
- def render_values(values, field_config = Configuration::NullField.new)
- field_values(field_config, value: Array(values))
- end
- deprecation_deprecate render_values: 'Use FieldPresenter instead'
-
- private
-
- def index_presenter
- @controller.index_presenter(@document)
- end
-
- def show_presenter
- @controller.show_presenter(@document)
- end
- end
-end
diff --git a/app/presenters/blacklight/index_presenter.rb b/app/presenters/blacklight/index_presenter.rb
index 1f8a5ae486..f6283d0ff6 100644
--- a/app/presenters/blacklight/index_presenter.rb
+++ b/app/presenters/blacklight/index_presenter.rb
@@ -1,9 +1,6 @@
# frozen_string_literal: true
module Blacklight
class IndexPresenter
- extend Deprecation
- self.deprecation_horizon = 'Blacklight version 7.0.0'
-
attr_reader :document, :configuration, :view_context
# @param [SolrDocument] document
@@ -37,12 +34,6 @@ def label(field_or_string_or_proc, opts = {})
field_values(config, value: value)
end
- # @deprecated
- def render_document_index_label(*args)
- label(*args)
- end
- deprecation_deprecate render_document_index_label: 'Use #label instead'
-
##
# Render the index field label for a document
#
@@ -56,30 +47,6 @@ def field_value field, options = {}
field_values(field_config, options)
end
- # @deprecated
- def render_index_field_value(*args)
- field_value(*args)
- end
- deprecation_deprecate render_index_field_value: 'replaced by #field_value'
-
- # @deprecated
- def get_field_values(field_config, options={})
- field_values(field_config, options)
- end
- deprecation_deprecate get_field_values: "replaced by #field_value"
-
- # @deprecated
- def render_field_values(values, field_config = Configuration::NullField.new)
- field_values(field_config, value: Array(values))
- end
- deprecation_deprecate render_field_values: "replaced by #field_value"
-
- # @deprecated
- def render_values(values, field_config = Configuration::NullField.new)
- field_values(field_config, value: Array(values))
- end
- deprecation_deprecate render_values: "replaced by #field_value"
-
private
##
diff --git a/app/presenters/blacklight/show_presenter.rb b/app/presenters/blacklight/show_presenter.rb
index 0640a4e719..1f6f5bf0b6 100644
--- a/app/presenters/blacklight/show_presenter.rb
+++ b/app/presenters/blacklight/show_presenter.rb
@@ -1,9 +1,6 @@
# frozen_string_literal: true
module Blacklight
class ShowPresenter
- extend Deprecation
- self.deprecation_horizon = 'Blacklight version 7.0.0'
-
attr_reader :document, :configuration, :view_context
# @param [SolrDocument] document
@@ -23,7 +20,6 @@ def initialize(document, view_context, configuration = view_context.blacklight_c
# @option options [Boolean] :unique ensures only one link is output for every
# content type, e.g. as required by atom
# @option options [Array] :exclude array of format shortnames to not include in the output
- # @deprecated moved to ShowPresenter#link_rel_alternates
def link_rel_alternates(options = {})
LinkAlternatePresenter.new(view_context, document, options).render
end
@@ -45,12 +41,6 @@ def html_title
end
end
- # @deprecated
- def document_show_html_title
- html_title
- end
- deprecation_deprecate document_show_html_title: "use #html_title"
-
##
# Get the value of the document's "title" field, or a placeholder
# value (if empty)
@@ -63,12 +53,6 @@ def heading
field_values(field_config(f), value: document[f])
end
- # @deprecated
- def document_heading
- heading
- end
- deprecation_deprecate document_heading: "replaced by #heading"
-
##
# Render the show field value for a document
#
@@ -81,30 +65,6 @@ def field_value field, options={}
field_values(field_config(field), options)
end
- # @deprecated
- def render_document_show_field_value(*args)
- field_value(*args)
- end
- deprecation_deprecate render_document_show_field_value: 'replaced by #field_value'
-
- # @deprecated
- def get_field_values(field_config, options={})
- field_values(field_config, options)
- end
- deprecation_deprecate get_field_values: "replaced by #field_value"
-
- # @deprecated
- def render_field_values(values, field_config = Configuration::NullField.new)
- field_values(field_config, value: Array(values))
- end
- deprecation_deprecate render_field_values: "replaced by #field_value"
-
- # @deprecated
- def render_values(values, field_config = Configuration::NullField.new)
- field_values(field_config, value: Array(values))
- end
- deprecation_deprecate render_values: "replaced by #field_value"
-
private
##
diff --git a/app/views/catalog/_previous_next_doc.html.erb b/app/views/catalog/_previous_next_doc.html.erb
index 8f8ae7b2f3..f92e1a27e0 100644
--- a/app/views/catalog/_previous_next_doc.html.erb
+++ b/app/views/catalog/_previous_next_doc.html.erb
@@ -1,6 +1,5 @@
<% #Using the Bootstrap Pagination class -%>
-<% #DEPRECATED - using id="previousNextDocument" as a selector is deprecated and will be removed in Blacklight 6.0 %>
-