Module: Satorix::CI::Test::Ruby::BundlerAudit

Extended by:
BundlerAudit
Includes:
Shared::Console
Included in:
BundlerAudit
Defined in:
lib/satorix/CI/test/ruby/bundler_audit.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/ruby/bundler_audit.rb', line 14

def go
  log_bench('Displaying current Ruby version...') { run_command 'ruby -v' }
  log_bench('Installing bundler-audit...') { install_gem }
  log_bench('Auditing Gemfile.lock...') { run_scan }
end

#install_gemObject



21
22
23
# File 'lib/satorix/CI/test/ruby/bundler_audit.rb', line 21

def install_gem
  run_command "gem install bundler-audit --no-document --bindir #{ Satorix.bin_dir }"
end

#run_scanObject



26
27
28
# File 'lib/satorix/CI/test/ruby/bundler_audit.rb', line 26

def run_scan
  run_command 'bundle-audit check --update'
end