Created
April 26, 2012 15:14
-
-
Save pcalcado/2500286 to your computer and use it in GitHub Desktop.
pre checkin for legacy/slow rails apps
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
#!/bin/bash | |
function specs_to_run(){ | |
git status | grep rb$ | awk '{print $3}' | sed -e "s/^[a-z][a-z]*/spec/g" | sed -e "s/[a-z_]*.rb$/\*/g" | sort | uniq | |
} | |
echo "Need to run these before checking-in:" | |
specs_to_run | |
bundle exec spec `specs_to_run | xargs -L 1000 echo` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment