• 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

88.89
/lib/xml_utilities.rb
1
# frozen_string_literal: true
UNCOV
2
require "yaml"
2✔
3

4
# frozen_string_literal: true
UNCOV
5
TYPENAMES = { 1 => "element", 2 => "attribute", 3 => "text", 4 => "cdata", 8 => "comment" }.freeze
2✔
6

UNCOV
7
def xml_node_to_hash(node)
2✔
8
  # Based on https://stackoverflow.com/a/10144623
UNCOV
9
  h = {}
12✔
UNCOV
10
  h[:name] = node.name
12✔
11
  # For our needs, I think the type name clear from context.
12
  # node_type_name = TYPENAMES[node.node_type]
13
  # if node_type_name != "element"
14
  #   h[:name] += " (#{node_type_name})"
15
  # end
UNCOV
16
  if node.namespace
12✔
17
    h[:nshref] = node.namespace.href
×
18
    h[:nsprefix] = node.namespace.prefix
×
UNCOV
19
  end
UNCOV
20
  h[:text] = node.text unless node.text.empty?
12✔
UNCOV
21
  h[:attributes] = node.attribute_nodes.map { |attr_node| xml_node_to_hash(attr_node) } if node.element? && !node.attribute_nodes.empty?
16✔
UNCOV
22
  h[:subelements] = node.children.map { |child_node| xml_node_to_hash(child_node) } if node.element? && !node.children.empty?
14✔
UNCOV
23
  h
12✔
UNCOV
24
end
25

UNCOV
26
def xml_doc_to_hash(document)
2✔
UNCOV
27
  xml_node_to_hash(document.root)
6✔
UNCOV
28
end
29

UNCOV
30
def xml_doc_to_html(document)
2✔
UNCOV
31
  as_hash = xml_doc_to_hash(document)
4✔
UNCOV
32
  as_yaml = YAML.dump(as_hash).gsub(/\A---\n/, "")
4✔
UNCOV
33
  "<pre>#{CGI.escapeHTML(as_yaml)}</pre>"
4✔
UNCOV
34
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