Class: AnalyticsOps::Governance::Auditor

Inherits:
Object
  • Object
show all
Defined in:
lib/analytics_ops/governance.rb,
sig/analytics_ops.rbs

Overview

Compares a governance snapshot with strict local expectations.

Constant Summary collapse

EXPECTED_COLLECTIONS =
{
  "expected_channel_groups" => %w[channel_groups display_name],
  "expected_calculated_metrics" => %w[calculated_metrics display_name],
  "expected_event_create_rules" => %w[event_create_rules destination_event],
  "expected_event_edit_rules" => %w[event_edit_rules display_name]
}.freeze

Instance Method Summary collapse

Constructor Details

#initialize(snapshot:, settings:) ⇒ Auditor

Returns a new instance of Auditor.

Parameters:

  • snapshot: (Snapshot)
  • settings: (record, nil)


275
276
277
278
# File 'lib/analytics_ops/governance.rb', line 275

def initialize(snapshot:, settings:)
  @snapshot = snapshot
  @settings = settings || {}
end

Instance Method Details

#callResult

Returns:



280
281
282
283
284
285
286
# File 'lib/analytics_ops/governance.rb', line 280

def call
  findings = []
  findings.concat(stream_findings)
  findings.concat(identity_findings)
  findings.concat(collection_findings)
  Result.new(snapshot: @snapshot, findings:)
end