No commit activity in last 3 years
No release in over 3 years
Tiny extension for dotenv to notify you if you are missing any environment variables listed in your example file.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.1
~> 13.0
~> 3.9

Runtime

 Project Readme

dotenv-missing_variable_notifier

dotenv-missing_variable_notifier is a tiny (literally 6 lines of code) extension for dotenv to notify you if your development environment is missing any environment variables listed in the example dotenv file in your Rails application. This is useful for projects that use an example file for their environment variables (usually .env.template or .env.example), which is most projects that use dotenv. Now you won't need to check for new environment variables after you do a git pull!

Installation

Add the gem to your Gemfile after dotenv-rails.

group :development, :test do
  gem 'dotenv-rails'
  gem 'dotenv-missing_variable_notifier', '~> 1.0'
end

And then install:

bundle install

Load order

dotenv-missing_variable_notifier is basically a tiny Railtie that runs in a before_configuration callback while your application is booting. If it runs before dotenv does then it will complain that every environment variable is missing, and it would be right! This means that you must list dotenv-missing_variable_notifier in your Gemfile after dotenv-rails.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/GlenCrawford/dotenv-missing_variable_notifier.

Acknowledgements

A huge thanks to the author(s) of dotenv for their amazing gem.

License

The gem is available as open source under the terms of the MIT License.