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

Drop dependency on `dotenv`? #23

Closed etagwerker closed 3 years ago

etagwerker commented 3 years ago

Before we start...:

Branch/Commit:

main branch.

Describe the feature:

Maybe we don't need to have that dependency? At the end of the day, we use ENV to check the values associated with the environment variables. Someone could be using something else (another gem or a snippet of code) to load their env variables...

Problem:

I don't see any references to classes from the dotenv library, which leads me to believe that that dependency is not needed at all. But the gemspec file lists dotenv as a dependency.

I will abide by the code of conduct

arielj commented 3 years ago

I think it's a good idea to drop the dependency since... yeah, we don't really depend on Dotenv (we could also rename the gem to be EnvValidator in that case?). That will make this more generic.

Maybe we can have the option to configure the name of the file used for the configuration? Like defaulting to .env.sample but give users the option to use any file name with some configuration param in the check methods if they are using another method and a different file name makes more sense.

cleicar commented 3 years ago

@etagwerker @arielj sounds like a very good idea. I am all favor in always remove any unnecessary dependency.

I sadly do not have time to send a PR soon, but I can help reviewing in case you guys have it. I'm holding the announcement blogpost until we have this decided.

etagwerker commented 3 years ago

@cleicar @arielj After a quick poll in our internal slack, we decided to stick with dotenv_validator for now.

Screen Shot 2021-09-01 at 3 56 05 PM