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

pulibrary / bibdata / 03936b48-38dc-426c-afe8-57993b6e85af

27 Jan 2026 10:01PM UTC coverage: 55.504% (-34.7%) from 90.159%
03936b48-38dc-426c-afe8-57993b6e85af

push

circleci

christinach
Add custom implementation of Deserialize in origin_place and coverage
If pref_label is missing then defalt to an empty string
If the exact_match exists and it has the wrong structure it returns None instead of erroring

related to [#3020]

80 of 81 new or added lines in 4 files covered. (98.77%)

4044 existing lines in 108 files now uncovered.

6288 of 11329 relevant lines covered (55.5%)

11.64 hits per line

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

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

UNCOV
6
  def index
×
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
×
UNCOV
14
      else
×
UNCOV
15
        respond_to do |wants|
×
UNCOV
16
          wants.json  { render json: MultiJson.dump(avail) }
×
UNCOV
17
        end
×
UNCOV
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
×
UNCOV
24
      else
×
UNCOV
25
        respond_to do |wants|
×
UNCOV
26
          wants.json  { render json: MultiJson.dump(avail) }
×
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
×
35

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