rubyconfig / config

Easiest way to add multi-environment yaml settings to Rails, Sinatra, Padrino and other Ruby projects.
Other
2.1k stars 230 forks source link

Allow to use custom filename && directory name to store configs #340

Closed feruzoripov closed 6 months ago

feruzoripov commented 1 year ago

Problem

The current solution of hardcoding the filename and directory name to settings.yml and settings folder is not ideal, as it can lead to conflicts if the same filename or directory name is already being used by other logics.

A better solution is to add two configuration fields, Config.file_name and Config.dir_name, which will allow users to specify their own filename and directory name. This will make it possible to avoid conflicts and it will also give users more flexibility in how they store their data.

Solution

Added two configuration fields:

feruzoripov commented 1 year ago

PR: https://github.com/rubyconfig/config/pull/341

pkuczynski commented 1 year ago

Sounds reasonable. @cjlarose what do you think?