Created
September 24, 2013 08:53
-
-
Save gillien/6682111 to your computer and use it in GitHub Desktop.
Pre commit hook to avoid pushing a focus nor binding.pry http://git-scm.com/book/en/Customizing-Git-Git-Hooks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -rE ',.*:focus' spec/ | |
focus_clean=$? | |
grep -rE '^ *(binding\.pry|debugger)' spec/ lib/ app/ | |
pry_clean=$? | |
if [[ $focus_clean == "1" && $pry_clean == "1" ]]; then | |
exit 0; | |
else | |
exit 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment