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

pulibrary / tigerdata-app / 2e85105d-f9c8-41e9-8b05-fe438b698516

26 Nov 2025 12:16PM UTC coverage: 71.597% (-8.0%) from 79.623%
2e85105d-f9c8-41e9-8b05-fe438b698516

push

circleci

web-flow
Display the data sponsor and data manager in the dashboard listing (#2247)

Closes #2236 

<img width="1036" height="675" alt="Screenshot 2025-11-25 at 3 07 41 PM"
src="https://github.com/user-attachments/assets/3b6a2189-7f71-4b17-97e5-e66c8fed3cb3"
/>

1 of 3 new or added lines in 1 file covered. (33.33%)

346 existing lines in 26 files now uncovered.

2367 of 3306 relevant lines covered (71.6%)

147.24 hits per line

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

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

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

UNCOV
7
def xml_node_to_hash(node)
×
8
  # Based on https://stackoverflow.com/a/10144623
UNCOV
9
  h = {}
×
UNCOV
10
  h[:name] = node.name
×
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
×
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?
×
UNCOV
21
  h[:attributes] = node.attribute_nodes.map { |attr_node| xml_node_to_hash(attr_node) } if node.element? && !node.attribute_nodes.empty?
×
UNCOV
22
  h[:subelements] = node.children.map { |child_node| xml_node_to_hash(child_node) } if node.element? && !node.children.empty?
×
UNCOV
23
  h
×
UNCOV
24
end
×
25

UNCOV
26
def xml_doc_to_hash(document)
×
UNCOV
27
  xml_node_to_hash(document.root)
×
UNCOV
28
end
×
29

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