bkeepers / dotenv

A Ruby gem to load environment variables from `.env`.
MIT License
6.61k stars 505 forks source link

Log all changes to ENV #473

Closed bkeepers closed 10 months ago

bkeepers commented 10 months ago

This adds logging in Rails to any ENV changes performed by dotenv.

On app boot

$ rails console
…
$ tail log/development.rb
image

Save / Restore

$ rails console
> Dotenv.save
…
> ENV.update("PWD" => "/tmp", "NEW_VAR" => "foo")
…
> Dotenv.restore
…
$ tail log/development.rb
image

cc #472

feliperaul commented 9 months ago

Amazing.