Module: Satorix::CI::Test::Python::Safety

Extended by:
Safety
Includes:
Shared::Console
Included in:
Safety
Defined in:
lib/satorix/CI/test/python/safety.rb

Instance Method Summary collapse

Methods included from Shared::Console

#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

#goObject



14
15
16
17
18
# File 'lib/satorix/CI/test/python/safety.rb', line 14

def go
  log_bench('Displaying current Python version...') { run_command 'python --version' }
  log_bench('Installing Safety...') {run_command 'pip install safety'}
  log_bench('Auditing requirements.txt...') { run_scan }
end

#run_scanObject



21
22
23
# File 'lib/satorix/CI/test/python/safety.rb', line 21

def run_scan
  run_command "safety check -r requirements.txt"
end