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

pulibrary / bibdata / eab5afc2-6f59-4b65-81bf-6840483c58da

26 Jun 2026 09:46PM UTC coverage: 75.156% (-15.5%) from 90.701%
eab5afc2-6f59-4b65-81bf-6840483c58da

Pull #3382

circleci

christinach
Rename group_field to cluster_id
Pull Request #3382: 321 result clustering

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

1975 existing lines in 89 files now uncovered.

9632 of 12816 relevant lines covered (75.16%)

17.14 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: 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: 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

© 2026 Coveralls, Inc