aha-oida / aha-secret

GNU General Public License v3.0
3 stars 0 forks source link

Implement configuration files #23

Open arusa opened 5 months ago

arusa commented 5 months ago

The max length of secrets (validation in Bin model) should be configurable.

We need a way to allow configuration files like initializers in rails.

mrusa commented 5 months ago

Besides the secrets max-length, the following values could also be stored in some kind of config var:

I would store this vars in a yaml file, just like database.yml. Maybe also overridable via ENV?

I'm not sure if there really is a need for rails like initializers, but here is an archived github project to get some inspration how this could be archived: https://github.com/chadwpry/sinatra-initializers

mrusa commented 5 months ago

Oh and https://sinatrarb.com/contrib/ also looks interesting.

It has https://sinatrarb.com/contrib/config_file to load YAML files. And there are other helpful things like https://sinatrarb.com/contrib/required_params included as well.

whotwagner commented 4 months ago

I implemented sinatra/config_files with the last PR. So now it's just a matter of using the config_file