Skip to content

Instantly share code, notes, and snippets.

@tkhduracell
Created March 8, 2017 19:49
Show Gist options
  • Save tkhduracell/1d0d407e92968fbfb4e1bd1a68f7b93a to your computer and use it in GitHub Desktop.
Save tkhduracell/1d0d407e92968fbfb4e1bd1a68f7b93a to your computer and use it in GitHub Desktop.
Oneline to read ENV / SECRETS file in Vagrant

Read env file

SECRETS=IO.read('./.env').split(/\n/).map{|s| s.split(/=/)}.to_h

Usage

token: SECRETS['MY_SECRET_TOKEN']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment