Class: EasyCaddy::Commands::Audit
- Inherits:
-
Object
- Object
- EasyCaddy::Commands::Audit
- Defined in:
- lib/easy_caddy/commands/audit.rb
Overview
Prints a full system + TLS + site snapshot with per-domain TLS handshake probes. With fix: true, prompts to apply a remedy for each actionable finding, with automatic escalation to a chained next_fix when the primary fix doesn’t resolve it. rubocop:disable Metrics/ClassLength
Defined Under Namespace
Classes: Fix
Constant Summary collapse
- RED =
ANSI colours — fall back gracefully if $stdout is not a TTY.
"\e[31m"- GREEN =
"\e[32m"- YELLW =
"\e[33m"- RESET =
"\e[0m"
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(site: nil, fix: false) ⇒ Audit
constructor
A new instance of Audit.
Constructor Details
#initialize(site: nil, fix: false) ⇒ Audit
Returns a new instance of Audit.
29 30 31 32 33 |
# File 'lib/easy_caddy/commands/audit.rb', line 29 def initialize(site: nil, fix: false) @site_filter = site @fix_mode = fix @fixes = [] end |
Instance Method Details
#call ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/easy_caddy/commands/audit.rb', line 35 def call section('SYSTEM') print_system section('TLS READINESS') print_tls_readiness section('SITES') print_sites section('CONFLICTS') print_conflicts run_fixes if @fix_mode end |