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

pulibrary / orangelight / 0e37073d-109c-440c-949f-49d2aa86311b

18 Aug 2025 09:05PM UTC coverage: 0.482% (-94.9%) from 95.343%
0e37073d-109c-440c-949f-49d2aa86311b

push

circleci

web-flow
Replace per_page_options_for_select with custom component to avoid deprecation issue (#5186)

* Start creating new component to address deprecaton warning

* Replace per_page_options_for_select with custom component to avoid deprecation issue

Co-authored-by: Jane Sandberg <sandbergja@users.noreply.github.com>

---------

Co-authored-by: Ryan Jensen <rj1044@princeton.edu>
Co-authored-by: Jane Sandberg <sandbergja@users.noreply.github.com>

0 of 33 new or added lines in 1 file covered. (0.0%)

9374 existing lines in 213 files now uncovered.

47 of 9753 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/services/faceted_query_service.rb
1
# frozen_string_literal: true
2

UNCOV
3
class FacetedQueryService
×
4
  # Constructor
5
  # @param blacklight_context [Class] Blacklight Class providing the global context
UNCOV
6
  def initialize(blacklight_context, rows = 10)
×
UNCOV
7
    @blacklight_context = blacklight_context
×
UNCOV
8
    @rows = rows
×
UNCOV
9
  end
×
10

11
  # Retrieve a response from the Solr endpoint for a faceted query
12
  # @param fq [String] the Solr facet query
13
  # @return [Faraday::Response] the HTTP response to the query
UNCOV
14
  def get_fq_solr_response(fq)
×
UNCOV
15
    solr_url = @blacklight_context.connection_config[:url]
×
UNCOV
16
    conn = Faraday.new(url: solr_url) do |faraday|
×
UNCOV
17
      faraday.request  :url_encoded             # form-encode POST params
×
UNCOV
18
      faraday.adapter  Faraday.default_adapter  # make requests with Net::HTTP
×
UNCOV
19
    end
×
UNCOV
20
    facet_request = \
×
UNCOV
21
      "#{core_url}select?fq=#{fq}&fl=id,title_display,title_vern_display,author_display,\
×
UNCOV
22
      isbn_display,issn_display,lccn_display,oclc_s,holdings_1display,electronic_portfolio_s\
×
UNCOV
23
      &rows=#{@rows}&wt=json"
×
UNCOV
24
    conn.get facet_request
×
UNCOV
25
  end
×
26

27
  # Retrieve the URL for the current Blacklight Solr core
28
  # @return [String] the URL
UNCOV
29
  def core_url
×
UNCOV
30
    @blacklight_context.default_index.connection.uri.to_s.gsub(%r{^.*\/solr}, '/solr')
×
UNCOV
31
  end
×
UNCOV
32
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