Skip to content

Instantly share code, notes, and snippets.

@IanVaughan
Last active June 25, 2021 15:04
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 IanVaughan/3aedee4a75d88ed0b9bbb2f428652805 to your computer and use it in GitHub Desktop.
Save IanVaughan/3aedee4a75d88ed0b9bbb2f428652805 to your computer and use it in GitHub Desktop.
Show difference in rails creditials
#!/usr/bin/env bash
# Usage:
# diff-creds production
git checkout master --quiet
printf .
rails credentials:show --environment $1 > /tmp/prod
printf .
git checkout - --quiet
printf .
rails credentials:show --environment $1 > /tmp/yours
echo
diff -C5 /tmp/prod /tmp/yours
rm /tmp/prod /tmp/yours
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment