Class: Textus::Doctor::Check::AuditLog

Inherits:
Textus::Doctor::Check show all
Defined in:
lib/textus/doctor/check/audit_log.rb

Instance Method Summary collapse

Methods inherited from Textus::Doctor::Check

#initialize, name_key

Constructor Details

This class inherits a constructor from Textus::Doctor::Check

Instance Method Details

#callObject



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/textus/doctor/check/audit_log.rb', line 5

def call
  path = File.join(store.root, "audit.log")
  Textus::Store::AuditLog.new(store.root).verify_integrity.map do |v|
    {
      "code" => "audit.parse_error",
      "level" => "warning",
      "subject" => "#{path}:#{v["lineno"]}",
      "message" => violation_message(v),
      "fix" => "inspect #{path} at line #{v["lineno"]} and remove the corrupted row",
    }
  end
end