Skip to content

Instantly share code, notes, and snippets.

@jbrown
Created January 28, 2011 02:03
Show Gist options
  • Save jbrown/799683 to your computer and use it in GitHub Desktop.
Save jbrown/799683 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Check Ruby syntax and run the test suites
files=`git diff --cached --name-only`
for file in $files; do
if [[ ${file##*.} = 'rb' ]]; then
ruby -c $file
elif head -1 $file | grep 'ruby$'; then
ruby -c $file
fi
done
rake ci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment