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

pulibrary / orangelight / bf5872b8-3483-43c4-a6ea-33f225f89de4

29 Aug 2025 01:26PM UTC coverage: 95.362% (-0.01%) from 95.376%
bf5872b8-3483-43c4-a6ea-33f225f89de4

push

circleci

web-flow
[Show page] Render the thumbnail component for the ephemera born digital resources (#5205)

1 of 2 new or added lines in 1 file covered. (50.0%)

6230 of 6533 relevant lines covered (95.36%)

1493.06 hits per line

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

91.67
/app/components/thumbnail_component.rb
1
# frozen_string_literal: true
2

3
# This component renders the necessary HTML markup
4
# to provide thumbnails in the search result and
5
# show pages from 3 different sources:
6
#   * default format-based thumbnails (added via CSS)
7
#   * Google Books thumbnails (added via JS)
8
#   * Figgy thumbnails (added via JS)
9
class ThumbnailComponent < ViewComponent::Base
3✔
10
  def initialize(document:)
3✔
11
    @document = document
938✔
12
  end
13

14
  private
3✔
15

16
    attr_accessor :document
3✔
17

18
    def identifier_data
3✔
19
      all_identifiers = document.identifier_data
937✔
20
      if document.in_a_special_collection?
937✔
21
        all_identifiers.slice(:'bib-id')
358✔
22
      else
23
        all_identifiers
579✔
24
      end
25
    end
26

27
    def thumbnail_display
3✔
NEW
28
      document.thumbnail_display
×
29
    end
30
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