Module: Satorix::CI::Test::Python::Safety
Instance Method Summary
collapse
#colorize, #colors, #humanize_time, #log, #log_bench, #log_command, #log_duration, #log_error, #log_error_and_abort, #log_header, #run_command, #source_env_from
Instance Method Details
#go ⇒ Object
12
13
14
15
16
|
# File 'lib/satorix/CI/test/python/safety.rb', line 12
def go
log_bench('Displaying current Python version...') { run_command(%w[python --version]) }
log_bench('Installing Safety...') { run_command(%w[pip install safety]) }
log_bench('Auditing requirements.txt...') { run_scan }
end
|
#run_scan ⇒ Object
19
20
21
|
# File 'lib/satorix/CI/test/python/safety.rb', line 19
def run_scan
run_command(%w[safety check -r requirements.txt])
end
|