Skip to content

Instantly share code, notes, and snippets.

@ipoval
Last active August 29, 2015 14:03
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 ipoval/7fca28dff0ef25bf4f00 to your computer and use it in GitHub Desktop.
Save ipoval/7fca28dff0ef25bf4f00 to your computer and use it in GitHub Desktop.
find_unused_rails_endpoints.sh
grep "^Started " api-310?.log | \
egrep -o "\"/\w+/\w+[/\"]" | \
sed -E "s/^\"|[\"\/]$//g" | \
sort | \
uniq > api_routes.txt
be rake routes > /tmp/api/rails_routes.txt
\grep -v -h -F -f api_routes.txt rails_routes.txt | grep api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment