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

pulibrary / orangelight / 62bad3f1-d46d-40af-822c-403d653da2a8

17 Jun 2025 05:30PM UTC coverage: 0.447% (-94.9%) from 95.337%
62bad3f1-d46d-40af-822c-403d653da2a8

push

circleci

maxkadel
Install chrome & chromedriver for smoke specs

43 of 9610 relevant lines covered (0.45%)

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