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

uclibs / ucrate / b55db03c-843f-45a9-98b3-f75772ac783c

16 Apr 2025 05:43PM UTC coverage: 54.567% (-19.5%) from 74.06%
b55db03c-843f-45a9-98b3-f75772ac783c

push

circleci

web-flow
Add github workflow to trigger Teams webhook to notify for PR (#1179)

2103 of 3854 relevant lines covered (54.57%)

42.87 hits per line

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

0.0
/app/services/work_metadata_attribute_mapper.rb
1
# frozen_string_literal: true
2

3
class WorkMetadataAttributeMapper
×
4
  attr_reader :object_attributes
×
5

6
  def initialize(object, parent_id)
×
7
    @object_attributes = gather_object_attributes(object, parent_id)
×
8
  end
×
9

10
  private
×
11

12
  def gather_object_attributes(object, parent_id)
×
13
    metadata = {}
×
14
    metadata["parent_id"] = parent_id unless parent_id.nil?
×
15
    metadata["type"] = object.class.to_s
×
16
    attributes(object).each do |attribute|
×
17
      attribute = 'publisher' if attribute == 'etd_publisher'
×
18
      metadata[attribute] = object.send(attribute.to_sym)
×
19
    end
×
20
    metadata
×
21
  end
×
22

23
  def attributes(object)
×
24
    map = (YAML.load_stream Rails.root.join("config", "metadata_export_map.yml").read).first
×
25
    map[object.class.to_s]
×
26
  end
×
27
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

© 2026 Coveralls, Inc