muesli / beehive

A flexible event/agent & automation system with lots of bees 🐝
GNU Affero General Public License v3.0
6.3k stars 324 forks source link

Improve the configuration system #292

Closed rubiojr closed 4 years ago

rubiojr commented 4 years ago

New config path defaults

Builds on top and supersedes https://github.com/muesli/beehive/pull/286

Load and write config from/to standard paths, changing Beehive's default behaviour.

This is a breaking change: when writing the config file for the first time (i.e. if beehive was run without a config), the file will be written to ~/.config/beehive/beehive.conf (OS dependant) instead of the current directory.

Loading the config from the current directory, if available, is still preferred, so that doesn't change.

Fixes #283

New config backend abstraction

This PR also adds support for multiple config file backends to make it easier to implement other backends (encrypted, networked, etc).

Implements a filesystem and a memory backend to start with.

Fixes #291

rubiojr commented 4 years ago

Ready for :eyes:

rubiojr commented 4 years ago

Thanks for the review @muesli!

muesli commented 4 years ago

Hah, a much bigger thanks for your continuous support and contributions, @rubiojr! Can't express how much I appreciate all your support :rocket: