Class: Route500Check::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/route_500_check/cli.rb

Constant Summary collapse

EXIT_OK =
0
EXIT_500 =
2

Instance Method Summary collapse

Instance Method Details

#run ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/route_500_check/cli.rb', line 8

def run
  config = DSL.load!
  DSL::Validator.validate!(config)

  Runner.run
rescue Route500Check::Errors::RouteLimitExceeded => e
  warn "[route_500_check][CONFIG] #{e.message}"
  exit 1
rescue => e
  warn "[route_500_check][FATAL] #{e.class}: #{e.message}"
  exit 2
end