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

pulibrary / bibdata / f400817a-dbb4-4213-8c38-ea1927389f1a

01 Oct 2025 12:30PM UTC coverage: 90.779% (+1.1%) from 89.665%
f400817a-dbb4-4213-8c38-ea1927389f1a

push

circleci

christinach
Update CacheMap to look for the correct structure from figgy
Exclude resource types with no ark
and no resource_identifier(bibID)

related to [#1720]
related to [#1848]

4 of 28 new or added lines in 1 file covered. (14.29%)

4051 existing lines in 107 files now uncovered.

3229 of 3557 relevant lines covered (90.78%)

913.12 hits per line

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

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

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

UNCOV
34
  private
1✔
35

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