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

pulibrary / bibdata / aa977bbb-cb49-44c2-84c5-66aa8ea1e89a

05 Mar 2026 04:37PM UTC coverage: 68.266% (-22.0%) from 90.235%
aa977bbb-cb49-44c2-84c5-66aa8ea1e89a

Pull #3059

circleci

sandbergja
Remove orangetheses

Closes #2816
Pull Request #3059: Remove orangetheses

7015 of 10276 relevant lines covered (68.27%)

12.91 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✔
7
    if params[:ids] || params[:id] || params[:mfhd] || params[:mfhd_serial]
×
8
      render plain: 'This endpoint no longer accepts this param', status: :bad_request
×
9
    elsif params[:barcodes]
×
10
      scsb_lookup = ScsbLookup.new
×
11
      avail = scsb_lookup.find_by_barcodes(sanitize_array(params[:barcodes]))
×
12
      if avail.empty?
×
13
        render plain: "SCSB Barcodes(s): #{params[:barcodes]} not found.", status: :not_found
×
14
      else
15
        respond_to do |wants|
×
16
          wants.json  { render json: avail }
×
17
        end
18
      end
19
    elsif params[:scsb_id]
×
20
      scsb_lookup = ScsbLookup.new
×
21
      avail = scsb_lookup.find_by_id(CGI.escape(params[:scsb_id]))
×
22
      if avail.empty?
×
23
        render plain: "SCSB Record: #{params[:scsb_id]} not found.", status: :not_found
×
24
      else
25
        respond_to do |wants|
×
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✔
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