Created
July 13, 2010 17:33
-
-
Save jim/474211 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# see http://www.aeonscope.net/2010/02/22/managing-multiple-heroku-accounts/ | |
# INTRODUCTION | |
# This script echos the active Heroku credentials (useful when switching between multiple Heroku accounts | |
# and remembering which one is active). | |
# USAGE | |
# ruby credentials.rb | |
# CONFIGURATION | |
HEROKU_HOME = File.join ENV["HOME"], ".heroku" | |
CREDENTIALS_FILE = "credentials" | |
# EXECUTION | |
credentials_path = File.join HEROKU_HOME, CREDENTIALS_FILE | |
if File.exists? credentials_path | |
credentials = `cat #{credentials_path}`.split("\n") | |
puts "\nYour active Heroku credentials are:\n\n" | |
puts credentials.first | |
puts "*" * credentials.last.size | |
puts "\nSource: #{credentials_path}\n\n" | |
else | |
puts "ERROR: Heroku credentials not found!" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment