Created
June 2, 2021 18:26
-
-
Save matti/f535e362adcad6929155638c2accb388 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
| require "json" | |
| skipenvs = %w( | |
| _ | |
| SHLVL | |
| PATH | |
| TERM | |
| HEROKU_RELEASE_CREATED_AT | |
| HEROKU_DYNO_ID | |
| HEROKU_APP_NAME | |
| DYNO | |
| GEM_HOME | |
| ) | |
| input = $stdin.read | |
| lines = input.split("\n") | |
| envs = {} | |
| lines.each do |line| | |
| key, value = line.split("=", 2) | |
| next if skipenvs.include? key | |
| envs[key] = value | |
| end | |
| puts envs.to_json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment