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

pulibrary / orangelight / 00dbc10b-d747-4ad7-b211-7b26d753abbb

14 Aug 2025 01:25PM UTC coverage: 0.483% (-94.9%) from 95.343%
00dbc10b-d747-4ad7-b211-7b26d753abbb

push

circleci

web-flow
Merge pull request #5181 from pulibrary/dependabot/bundler/activestorage-7.2.2.2

Bump activestorage from 7.2.2.1 to 7.2.2.2

47 of 9721 relevant lines covered (0.48%)

0.01 hits per line

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

0.0
/app/services/requests/bibdata_service.rb
1
# frozen_string_literal: true
2
module Requests
×
3
  class BibdataService
×
4
    def self.connection
×
5
      Faraday.new(url: Requests.config[:bibdata_base]) do |faraday|
×
6
        faraday.request :url_encoded # form-encode POST params
×
7
        faraday.response :logger unless Rails.env.test?
×
8
        faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
×
9
      end
×
10
    end
×
11

12
    def self.delivery_locations
×
13
      # check cache; return unless nil
14
      locations = Rails.cache.fetch('delivery_locations', expires_in: 24.hours)
×
15
      return locations unless locations.nil?
×
16

17
      # don't cache if we didn't get a success
18
      locations = {}.with_indifferent_access
×
19

20
      response = connection.get "/locations/delivery_locations.json"
×
21
      return locations unless response.status == 200
×
22

23
      JSON.parse(response.body).each do |location|
×
24
        locations[location['gfa_pickup']] = location.with_indifferent_access
×
25
      end
×
26

27
      Rails.cache.write('delivery_locations', locations, expires_in: 24.hours)
×
28
      locations
×
29
    end
×
30
  end
×
31
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