Created
June 21, 2013 05:33
-
-
Save chrisberkhout/5829090 to your computer and use it in GitHub Desktop.
Load credentials set by shell script into current Ruby environment - in one line
This file contains 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
require "json" | |
JSON.parse(`. /etc/credentials.sh; ruby -rjson -e'puts ENV.to_hash.to_json'`).each_pair { |k,v| ENV[k] = v } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment