Skip to content

Instantly share code, notes, and snippets.

@IanVaughan
Last active June 25, 2021 15:04
Show Gist options
  • Select an option

  • Save IanVaughan/3aedee4a75d88ed0b9bbb2f428652805 to your computer and use it in GitHub Desktop.

Select an option

Save IanVaughan/3aedee4a75d88ed0b9bbb2f428652805 to your computer and use it in GitHub Desktop.

Revisions

  1. Ian Vaughan revised this gist Jun 25, 2021. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion diff-creds
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,14 @@
    #!/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
    diff /tmp/prod /tmp/yours
    echo
    diff -C5 /tmp/prod /tmp/yours
    rm /tmp/prod /tmp/yours
  2. Ian Vaughan revised this gist Jun 25, 2021. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions diff-creds
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # Usage:
    # diff-creds production
    git checkout master --quiet
    rails credentials:show --environment $1 > /tmp/prod
    git checkout - --quiet
  3. Ian Vaughan created this gist Jun 25, 2021.
    6 changes: 6 additions & 0 deletions diff-creds
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    git checkout master --quiet
    rails credentials:show --environment $1 > /tmp/prod
    git checkout - --quiet
    rails credentials:show --environment $1 > /tmp/yours
    diff /tmp/prod /tmp/yours
    rm /tmp/prod /tmp/yours