24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/saddler/cli.rb', line 24
def report
if options[:debug]
logger.level = Logger::DEBUG
elsif options[:verbose]
logger.level = Logger::INFO
end
logger.debug(options)
data = fetch_data(options)
Validator.valid?(data)
require options[:require] if options[:require]
reporter = add_reporter(options)
reporter.report(data, options[:options])
rescue StandardError => e
logger.error('options')
logger.error(options)
logger.error('input data')
logger.error(data)
logger.error('reporter')
logger.error(reporter)
raise e
end
|