This will allow reloading of the files in the future (not enabled in this commit). This also found a couple pieces of uncovered code in ResourceMethods, that were hidden because model.rb is excluded from coverage, so add specs for them.
16 lines
432 B
Ruby
16 lines
432 B
Ruby
# frozen_string_literal: true
|
|
|
|
module HealthMonitorMethods
|
|
def aggregate_readings(previous_pulse:, reading:, data: {})
|
|
{
|
|
reading: reading,
|
|
reading_rpt: (previous_pulse[:reading] == reading) ? previous_pulse[:reading_rpt] + 1 : 1,
|
|
reading_chg: (previous_pulse[:reading] == reading) ? previous_pulse[:reading_chg] : Time.now
|
|
}.merge(data)
|
|
end
|
|
|
|
def needs_event_loop_for_pulse_check?
|
|
false
|
|
end
|
|
end
|