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

pulibrary / bibdata / 1dcebae2-3318-4e77-bc53-82276e293354

02 May 2025 04:45PM UTC coverage: 28.256% (-63.9%) from 92.189%
1dcebae2-3318-4e77-bc53-82276e293354

push

circleci

sandbergja
Add basic infrastructure for compiling rust code

* Add a rake compile task to compile
* Run the rake task in CI
* Run the rake task before rspec tests with the rust tag, to provide quick feedback on rust changes in TDD cycles

2 of 7 new or added lines in 2 files covered. (28.57%)

2467 existing lines in 97 files now uncovered.

1089 of 3854 relevant lines covered (28.26%)

0.29 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