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

pulibrary / bibdata / f04bc944-f9b4-4a42-8b26-dcacd0e3e688

11 Mar 2025 10:27PM UTC coverage: 34.017% (-58.1%) from 92.162%
f04bc944-f9b4-4a42-8b26-dcacd0e3e688

Pull #2653

circleci

christinach
Add new lc_subject_facet field.
Helps with the vocabulary work https://github.com/pulibrary/orangelight/pull/3386
In this new field we index only the lc subject heading and the subdivisions
So that when the user searches using the Details section, they can query solr for
all the subject headings and their divisions.

This is needed for the Subject browse Vocabulary work.
example: "lc_subject_facet": [
             "Booksellers and bookselling—Italy—Directories",
             "Booksellers and bookselling-Italy",
             "Booksellers and bookselling"
              ]
Pull Request #2653: Add new lc_subject_facet field.

1 of 3 new or added lines in 1 file covered. (33.33%)

2215 existing lines in 93 files now uncovered.

1294 of 3804 relevant lines covered (34.02%)

0.99 hits per line

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

20.83
/app/controllers/availability_controller.rb
1
class AvailabilityController < ApplicationController
1✔
2
  def adapter
1✔
3
    @adapter ||= AlmaAdapter.new
×
4
  end
5

6
  def index
1✔
UNCOV
7
    if params[:ids] || params[:id] || params[:mfhd] || params[:mfhd_serial]
×
UNCOV
8
      render plain: 'This endpoint no longer accepts this param', status: :bad_request
×
UNCOV
9
    elsif params[:barcodes]
×
UNCOV
10
      scsb_lookup = ScsbLookup.new
×
UNCOV
11
      avail = scsb_lookup.find_by_barcodes(sanitize_array(params[:barcodes]))
×
UNCOV
12
      if avail.empty?
×
UNCOV
13
        render plain: "SCSB Barcodes(s): #{params[:barcodes]} not found.", status: :not_found
×
14
      else
UNCOV
15
        respond_to do |wants|
×
UNCOV
16
          wants.json  { render json: MultiJson.dump(avail) }
×
17
        end
18
      end
UNCOV
19
    elsif params[:scsb_id]
×
UNCOV
20
      scsb_lookup = ScsbLookup.new
×
UNCOV
21
      avail = scsb_lookup.find_by_id(CGI.escape(params[:scsb_id]))
×
UNCOV
22
      if avail.empty?
×
UNCOV
23
        render plain: "SCSB Record: #{params[:scsb_id]} not found.", status: :not_found
×
24
      else
UNCOV
25
        respond_to do |wants|
×
UNCOV
26
          wants.json  { render json: MultiJson.dump(avail) }
×
27
        end
28
      end
29
    else
30
      render plain: 'Please provide a bib id.', status: :not_found
×
31
    end
32
  end
33

34
  private
1✔
35

36
    def sanitize_array(arr)
1✔
UNCOV
37
      arr.map { |s| CGI.escape(s) }
×
38
    end
39
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