Last Updated: February 25, 2016
·
840
· artemeff

Brakeman integration with deploy tools

Shell:

#!/usr/bin/env bash

bundle exec brakeman -q -z > /dev/null

OUT=$?

if [ $OUT -eq 0 ]; then
  echo "Ok"
else
  echo "Error"
fi

Ruby:

# exec
%x[bundle exec brakeman -q -z > /dev/null]

# output
if $?.exitstatus == 0
  puts "Ok"
else
  puts "Error"
end

Code at gist