#!/bin/bash

source ~/.zshrc

bundle exec rubocop -c .rubocop.yml
if [ ! $? -eq 0 ]; then
echo 'rubocop detected issues!'
exit 1
fi

bundle exec rake spec
if [ ! $? -eq 0 ]; then
echo 'rspec did not run successfully, commit aborted'
exit 1
fi