task :brakeman do
  sh <<END
(brakeman --no-progress --quiet --output tmp/brakeman.out --exit-on-warn && \
echo "No warnings or errors") || \
(cat tmp/brakeman.out; exit 1)
END
end

if %w[development test].include? Rails.env
  task(:default).prerequisites << task(:brakeman)
end

task :brakeman do
  sh <<END
mkdir -p tmp && \
(brakeman --no-progress --quiet --output tmp/brakeman.out --exit-on-warn && \
echo "No warnings or errors") || \
(cat tmp/brakeman.out; exit 1)
END
end

if %w[development test].include? Rails.env
  task(:default).prerequisites << task(:brakeman)
end

Create tmp dir for Brakeman output
Create tmp dir for Brakeman output
