Class: Mrsk::Commands::Auditor

Inherits:
Base
  • Object
show all
Defined in:
lib/mrsk/commands/auditor.rb

Constant Summary

Constants inherited from Base

Base::DOCKER_HEALTH_LOG_FORMAT, Base::DOCKER_HEALTH_STATUS_FORMAT

Instance Attribute Summary collapse

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Base

#container_id_for, #run_over_ssh

Constructor Details

#initialize(config, **details) ⇒ Auditor

Returns a new instance of Auditor.



4
5
6
7
# File 'lib/mrsk/commands/auditor.rb', line 4

def initialize(config, **details)
  super(config)
  @details = details
end

Instance Attribute Details

#detailsObject (readonly)

Returns the value of attribute details.



2
3
4
# File 'lib/mrsk/commands/auditor.rb', line 2

def details
  @details
end

Instance Method Details

#record(line, **details) ⇒ Object

Runs remotely



10
11
12
13
14
# File 'lib/mrsk/commands/auditor.rb', line 10

def record(line, **details)
  append \
    [ :echo, audit_tags(**details).except(:version, :service_version).to_s, line ],
    audit_log_file
end

#revealObject



16
17
18
# File 'lib/mrsk/commands/auditor.rb', line 16

def reveal
  [ :tail, "-n", 50, audit_log_file ]
end