fastruby / dotenv_validator

This gem check if required env variables are present and its format using the .env and .env.sample files from Dotenv.
https://www.fastruby.io/blog/open-source/introducing-dotenv-validator.html
MIT License
50 stars 4 forks source link

Support .env.template if no .env.sample #65

Closed arielj closed 1 year ago

arielj commented 1 year ago

Description:

This PRs adds a fallback to also support .env.template if .env.sample is not present. The .env.template file is created by dotenv itself when using the dotenv -t .env command, so it's important to support it since many users of dotenv could be using that instead of .env.sample. https://github.com/bkeepers/dotenv/tree/master#should-i-commit-my-env-file

This fixes https://github.com/fastruby/dotenv_validator/issues/63

I had to refactor the tests a big to be able to test this better.

I will abide by the code of conduct.