palkan / anyway_config

Configuration library for Ruby gems and applications
MIT License
778 stars 52 forks source link

Introduce loaders #46

Closed palkan closed 4 years ago

palkan commented 5 years ago

What is the purpose of this pull request?

Make library architecture composable and extensible.

What changes did you make? (overview)

Introduced the concept of loader and refactored load_from_sources to use Anyway.loaders—the registry of available data loaders. Each loader is responsible for one particular data type (YML, env, credentials).

The Loaders API allows to add custom sources and change the order and/or behaviour of the existing ones.

Checklist