Feature #9789
openAs a developer, plugin's should be split into a definition and initialization/boot phase.
Description
This is something that has bit me a few times when trying to make simple tasks that a plugin can make use. Currently, the configuration that defines a plugin is coupled with the plugin being initialized and loaded into the running environment and database. This means, for example, if I want to request the list of current plugins to find configuration values related to them I have to have a fully loaded and configured environment. For example, the plugin:apipie:cache rake task requires a database and migrations in order to access a configuration property of a plugin. I can see this working in one of two ways:
1) Move all configuration to a plugin.yaml file that is loaded into SETTTINGS
2) Split Foreman::Plugin such that plugin definitions can be gathered and loaded, and then separately initialized by the Application on boot