• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / orangelight / 00dbc10b-d747-4ad7-b211-7b26d753abbb

14 Aug 2025 01:25PM UTC coverage: 0.483% (-94.9%) from 95.343%
00dbc10b-d747-4ad7-b211-7b26d753abbb

push

circleci

web-flow
Merge pull request #5181 from pulibrary/dependabot/bundler/activestorage-7.2.2.2

Bump activestorage from 7.2.2.1 to 7.2.2.2

47 of 9721 relevant lines covered (0.48%)

0.01 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/app/models/numismatics_form_search_builder.rb
1
# frozen_string_literal: true
2
class NumismaticsFormSearchBuilder < SearchBuilder
×
3
  self.default_processor_chain += %i[fetch_configured_facets do_not_limit_configured_facets ensure_format_coin_is_the_only_fq]
×
4

5
  def fetch_configured_facets(solr_params)
×
6
    solr_params['facet.field'] = facet_config
×
7
  end
×
8

9
  def do_not_limit_configured_facets(solr_params)
×
10
    # -1 means do not limit
11
    limit_configuration = facet_config.to_h { |field| ["f.#{field}.facet.limit", '-1'] }
×
12
    solr_params.merge! limit_configuration
×
13
  end
×
14

15
  # :reek:UtilityFunction
16
  def ensure_format_coin_is_the_only_fq(solr_params)
×
17
    # We want a fq of format:Coin, so that we only fetch facet values relevant to numismatics
18
    # We don't want any other fq, since those would restrict the facet values and counts displayed
19
    # on the screen to only those relevant to the supplied fq, meaning that a user would not have
20
    # the opportunity to broaden their search
21
    solr_params[:fq] = ['format:Coin']
×
22
  end
×
23

24
  private
×
25

26
    def facet_config
×
27
      blacklight_config.numismatics_search[:facet_fields]
×
28
    end
×
29
end
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc