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

pulibrary / tigerdata-app / 8306569a-4f72-444d-ba8a-d69ed227106c

05 Nov 2025 07:43PM UTC coverage: 91.527% (+0.03%) from 91.5%
8306569a-4f72-444d-ba8a-d69ed227106c

push

circleci

web-flow
Set the displayed value to the entire name (#2151)

Centralize the view and javascript for data manager and sponsor
Set the displayed value to the entire name and have a hidden field with
the uid

fix spec error "not to search for nil"
<img width="1707" height="1085" alt="Screenshot 2025-11-05 at 2 38
43 PM"
src="https://github.com/user-attachments/assets/82278712-d16d-4b58-8b9c-5c33587a7810"
/>

6 of 10 new or added lines in 1 file covered. (60.0%)

1010 existing lines in 37 files now uncovered.

2841 of 3104 relevant lines covered (91.53%)

792.96 hits per line

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

100.0
/app/services/xml_tree_builder.rb
1
# frozen_string_literal: true
2

UNCOV
3
class XmlTreeBuilder < XmlNodeBuilder
4✔
UNCOV
4
  attr_reader :children, :root_builder_options
4✔
5

UNCOV
6
  def null_builder
4✔
UNCOV
7
    @null_builder ||= XmlNullBuilder.new(**root_builder_options)
1,292✔
UNCOV
8
  end
9

UNCOV
10
  def root_builder
4✔
UNCOV
11
    @root_builder ||= begin
15,974✔
UNCOV
12
                        default_builder = XmlElementBuilder.new(**root_builder_options)
3,196✔
UNCOV
13
                        null_builder if default_builder.blank?
3,196✔
UNCOV
14
                        default_builder
3,196✔
UNCOV
15
                      end
UNCOV
16
  end
17

UNCOV
18
  delegate :node, :document, to: :root_builder
4✔
19

20
  # @return [Nokogiri::XML::Element]
UNCOV
21
  def build
4✔
UNCOV
22
    nodes = children.map(&:build)
3,196✔
UNCOV
23
    nodes.each do |child|
3,196✔
UNCOV
24
      root_builder.add_child(child)
3,108✔
UNCOV
25
    end
26

UNCOV
27
    node
3,196✔
UNCOV
28
  end
29

30
  # rubocop:disable Metrics/AbcSize
31
  # rubocop:disable Metrics/MethodLength
32
  #
33
  # @param [Array<Hash>] entries options for constructing each child node
34
  # @return [Array<Nokogiri::XML::Node>] an array of XML child nodes
UNCOV
35
  def parse_child_entries(entries)
4✔
UNCOV
36
    instances = [:default]
3,196✔
UNCOV
37
    builders = entries.map do |child_entry|
3,196✔
UNCOV
38
      child_entry.values.map do |child_args|
1,634✔
UNCOV
39
        multiple_children = child_args[:multiple] || false
3,096✔
40

UNCOV
41
        if multiple_children
3,096✔
UNCOV
42
          message = child_args[:object_method]
258✔
43

UNCOV
44
          method_args = child_args[:args] || []
258✔
UNCOV
45
          instances = root_builder.presenter.send(message, *method_args)
258✔
UNCOV
46
        end
47

UNCOV
48
        instances.each_with_index.map do |_instance, i|
3,096✔
UNCOV
49
          builder_args = child_args.dup
3,108✔
UNCOV
50
          builder_args[:presenter] = root_builder.presenter
3,108✔
UNCOV
51
          builder_args[:document] = document
3,108✔
52

UNCOV
53
          if multiple_children
3,108✔
UNCOV
54
            builder_args[:index] = i
270✔
UNCOV
55
            builder_args.delete(:multiple)
270✔
UNCOV
56
          end
UNCOV
57
          builder_args.delete(:object_method)
3,108✔
UNCOV
58
          builder_args.delete(:args)
3,108✔
UNCOV
59
          self.class.new(**builder_args)
3,108✔
UNCOV
60
        end
UNCOV
61
      end
UNCOV
62
    end
UNCOV
63
    builders.flatten
3,196✔
UNCOV
64
  end
65
  # rubocop:enable Metrics/MethodLength
66
  # rubocop:enable Metrics/AbcSize
67

68
  # @param children [Array<XmlNodeBuilder>] XmlNodeBuilder objects for the child nodes in the XML tree
69
  # @param options [Hash] arguments for the root XmlElementBuilder
UNCOV
70
  def initialize(children: [], **options)
4✔
UNCOV
71
    @root_builder_options = options.dup
3,196✔
UNCOV
72
    @children = parse_child_entries(children)
3,196✔
73

UNCOV
74
    super(document: document)
3,196✔
UNCOV
75
  end
UNCOV
76
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