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

pulibrary / bibdata / 39c03fef-76bf-4aae-9be3-c3920e4648f4

24 Dec 2024 05:17PM UTC coverage: 91.859% (-0.04%) from 91.902%
39c03fef-76bf-4aae-9be3-c3920e4648f4

push

circleci

web-flow
Rubocop gems (#2569)

* Remove stale line for bixby in rubocop.yml

* Include Rails and Performance rubocop gems
Remove Rails and Performance cops from rubocop.yml
Let rubocop target ruby version to be 3.2

* bundle exec rubocop -a

* Generate new .rubocop_todo.yml
rubocop fix

335 of 378 new or added lines in 57 files covered. (88.62%)

2 existing lines in 2 files now uncovered.

3385 of 3685 relevant lines covered (91.86%)

378.14 hits per line

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

95.0
/app/controllers/application_controller.rb
1
class ApplicationController < ActionController::Base
1✔
2
  # Prevent CSRF attacks by raising an exception.
3
  # For APIs, you may want to use :null_session instead.
4
  protect_from_forgery with: :exception
1✔
5
  include ApplicationHelper
1✔
6

7
  def after_sign_out_path_for(_resource_or_scope)
1✔
NEW
8
    request.referer
×
9
  end
10

11
  def handle_alma_exception(exception:, message:)
1✔
12
    if exception.is_a?(Alma::PerSecondThresholdError)
14✔
13
      Rails.logger.error "HTTP 429. #{message} #{exception}"
9✔
14
      head :too_many_requests
9✔
15
    elsif exception.is_a?(Alma::NotFoundError)
5✔
16
      Rails.logger.error "HTTP 404. #{message} #{exception}"
2✔
17
      head :not_found
2✔
18
    elsif exception.is_a?(Alma::StandardError)
3✔
19
      Rails.logger.error "HTTP 400. #{message} #{exception}"
1✔
20
      head :bad_request
1✔
21
    elsif exception.is_a?(Net::ReadTimeout)
2✔
22
      Rails.logger.error "HTTP 504. #{message} #{exception}"
1✔
23
      head :gateway_timeout
1✔
24
    else
25
      Rails.logger.error "HTTP 500. #{message} #{exception}"
1✔
26
      head :internal_server_error
1✔
27
    end
28
  end
29
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