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

pulibrary / orangelight / 0e37073d-109c-440c-949f-49d2aa86311b

18 Aug 2025 09:05PM UTC coverage: 0.482% (-94.9%) from 95.343%
0e37073d-109c-440c-949f-49d2aa86311b

push

circleci

web-flow
Replace per_page_options_for_select with custom component to avoid deprecation issue (#5186)

* Start creating new component to address deprecaton warning

* Replace per_page_options_for_select with custom component to avoid deprecation issue

Co-authored-by: Jane Sandberg <sandbergja@users.noreply.github.com>

---------

Co-authored-by: Ryan Jensen <rj1044@princeton.edu>
Co-authored-by: Jane Sandberg <sandbergja@users.noreply.github.com>

0 of 33 new or added lines in 1 file covered. (0.0%)

9374 existing lines in 213 files now uncovered.

47 of 9753 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/holding_requests_builder.rb
1
# frozen_string_literal: true
2

UNCOV
3
class HoldingRequestsBuilder
×
UNCOV
4
  extend ActionView::Helpers::TagHelper
×
UNCOV
5
  extend ActionView::Helpers::UrlHelper
×
6

7
  # Generate <div> container for a holding block
8
  # @param children [String] the children for the holding block
9
  # @return [String] the markup
UNCOV
10
  def self.holding_block(children)
×
UNCOV
11
    content_tag(:tr, children.html_safe, class: 'holding-block') unless children.empty?
×
UNCOV
12
  end
×
13

14
  # Generate <div> container for holding details
15
  # @param children [String] the children for the holding details
16
  # @return [String] the markup
UNCOV
17
  def self.holding_details(children)
×
18
    content_tag(:td, children.html_safe, class: 'holding-details') unless children.empty?
×
UNCOV
19
  end
×
20

21
  # Generate <div> container for missing item holdings
22
  # @return [String] the markup
UNCOV
23
  def self.missing_holdings
×
UNCOV
24
    holding_block(I18n.t('blacklight.holdings.missing'))
×
UNCOV
25
  end
×
26

27
  # Constructor
28
  # @param adapter [HoldingRequestsAdapter] adapter for the SolrDocument and Bibdata API
29
  # @param online_markup_builder [Class] the builder class for online holdings blocks
30
  # @param physical_markup_builder [Class] the builder class for physical holdings blocks
31
  # @param params [ActionController::Parameters]
UNCOV
32
  def initialize(adapter:, online_markup_builder:, physical_markup_builder:, params:)
×
UNCOV
33
    @adapter = adapter
×
UNCOV
34
    @online_markup_builder = online_markup_builder
×
UNCOV
35
    @physical_markup_builder = physical_markup_builder
×
UNCOV
36
    @params = params
×
UNCOV
37
  end
×
38

39
  # Builds the markup for online and physical holdings for a given record
40
  # @return [Array<String>] the markup for the online and physical holdings
UNCOV
41
  def build
×
UNCOV
42
    online_builder = @online_markup_builder.new(@adapter)
×
UNCOV
43
    online_markup = online_builder.build
×
44

UNCOV
45
    physical_builder = @physical_markup_builder.new(@adapter, params)
×
UNCOV
46
    physical_markup = physical_builder.build
×
47

UNCOV
48
    physical_markup = self.class.missing_holdings if physical_markup.blank? && online_markup.blank?
×
49

UNCOV
50
    [online_markup, physical_markup]
×
UNCOV
51
  end
×
52

UNCOV
53
  private
×
54

UNCOV
55
    attr_reader :params
×
UNCOV
56
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