Skip to content

Instantly share code, notes, and snippets.

@djanowski
Created April 14, 2014 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djanowski/10676971 to your computer and use it in GitHub Desktop.
Save djanowski/10676971 to your computer and use it in GitHub Desktop.
Find your missing requires in shotgun.rb
everywhere=$(ag '^\s*require' -w --ruby --no-numbers --ignore=test/ --ignore=tasks/ --ignore=scripts/ | awk -F: '{gsub(/^ */, "", $2); print $2}' | sort | uniq)
shotgun=$(ag '^\s*require' -w --no-numbers shotgun.rb)
echo "$everywhere" | grep -v -f <(echo "$shotgun")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment