• 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/models/concerns/orangelight/document/export.rb
1
# frozen_string_literal: true
2

3
module Orangelight
×
4
  module Document
×
5
    module Export
×
6
      include ActiveSupport::Concern
×
7

8
      # Override will_export_as method in Blacklight::Document::Export.
9
      # Exclude certain export formats for records not in Alma.
10
      def will_export_as(short_name, content_type = nil)
×
11
        return if formats_to_exclude.include? short_name
×
12
        super
×
13
      end
×
14

15
      private
×
16

17
        def formats
×
18
          %i[marc marcxml refworks_marc_txt endnote openurl_ctx_kev]
×
19
        end
×
20

21
        def formats_to_exclude
×
22
          return [] if alma?
×
23
          formats
×
24
        end
×
25

26
        def holding_id
×
27
          @holding_id ||= begin
×
28
            holdings = JSON.parse(fetch(:holdings_1display, '{}')).first
×
29
            holdings.blank? ? nil : holdings[0]
×
30
          end
×
31
        end
×
32

33
        def alma?
×
34
          return false if fetch(:id, '').start_with?('SCSB')
×
35
          return false if %w[thesis numismatics visuals].include? holding_id
×
36
          true
×
37
        end
×
38
    end
×
39
  end
×
40
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