Created
July 15, 2016 18:29
-
-
Save coryodaniel/377e68f1aeeae5c61bd1d94962da1610 to your computer and use it in GitHub Desktop.
Find env variables
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
| env = Dir['myproject/**/*.rb']. | |
| map { |file| File.read(file).match(/ENV\[['"](.+?)(?=[\]'"])/) }. | |
| compact. | |
| map{|matchdata| matchdata[1]}.uniq.sort |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment