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

tulibraries / tul_cob / 851d65ec-976a-41e6-91d1-93fc84f0a2c3

pending completion
851d65ec-976a-41e6-91d1-93fc84f0a2c3

push

circleci

web-flow
Bump tough-cookie from 4.1.2 to 4.1.3 (#3879)

Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.1.2...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

2975 of 3507 relevant lines covered (84.83%)

54.98 hits per line

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

82.86
/app/controllers/application_controller.rb
1
# frozen_string_literal: true
2

3
# Application Controller.
4
class ApplicationController < ActionController::Base
1✔
5
  # Adds a few additional behaviors into the application controller
6
  include Blacklight::Controller
1✔
7
  include Blacklight::BlacklightHelperBehavior
1✔
8
  include Blacklight::ConfigurationHelperBehavior
1✔
9
  include JsonLogger
1✔
10

11
  layout "blacklight"
1✔
12

13
  protect_from_forgery with: :exception
1✔
14

15
  before_action :get_manifold_alerts, only: [
1✔
16
    :index, :show, :not_found, :internal_server_error,
17
    :account, :librarian_view, :citation, :email, :facet
18
  ]
19

20
  rescue_from ActionController::InvalidAuthenticityToken,
1✔
21
    with: :redirect_to_referer
22

23
  # Rails 5.1 and above requires permitted params to be defined in the Controller
24
  # BL doesn't do that, but might in the future. This allows us to use the pre 5.1
25
  # behavior until we can define all possible param  in the future.
26
  ActionController::Parameters.permit_all_parameters = true
1✔
27

28
  helper_method :should_show_spellcheck_suggestions?
1✔
29

30
  # Overrides Devise::Controllers::Helpers#after_sign_out_path_for
31
  #
32
  # We want to make sure user actually gets signed out.
33
  # @see BL-224
34
  def after_sign_out_path_for(resource_or_scope)
1✔
35
    if request.params[:type] == "sso"
2✔
36
      Rails.configuration.devise[:sign_out_redirect_url]
2✔
37
    else
38
      super
×
39
    end
40
  end
41

42
  def redirect_to_referer
1✔
43
    flash[:notice] = "Your search results page had to be reloaded. Please try again."
×
44
    redirect_to request.referer
×
45
  end
46

47
  def get_manifold_alerts
1✔
48
    alert_url = "https://library.temple.edu/alerts.json"
264✔
49

50
    @manifold_alerts_thread ||= Thread.new {
264✔
51
      Rails.cache.fetch("manifold_alerts", expires_in: 5.minutes) do
263✔
52
        resp = begin
53
                 HTTParty.get(alert_url, timeout: 1)
263✔
54
               rescue => e
55
                 Honeybadger.notify(e)
×
56
                 Thread.new { sleep 0.25; Rails.cache.delete("manifold_alerts") }
×
57
                 {}
×
58
               end
59
        resp["data"] || []
263✔
60
      end
61
    }
62
  end
63

64
  protected
1✔
65

66
    def no_cache
1✔
67
      response.set_header("X-Robots-Tag", "noindex")
15✔
68
      response.set_header("Cache-Control", "private, no-store")
15✔
69
      response.headers["Pragma"] = "no-cache"
15✔
70
      response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT"
15✔
71
    end
72

73
    # ensure that rails treats request as xhr
74
    def xhr!
1✔
75
      request.headers["HTTP_X_REQUESTED_WITH"] = "XMLHttpRequest"
12✔
76
    end
77
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