Closed Xypus closed 6 years ago
I'd like to double up on this request for similar reasons. I'm going to be copying the code for this library into my application because I don't want to have a separate config file for it, but rather include the configuration information in other environment-specific configuration data.
In addition to @Xypus's suggestion, I would make configure_with_yaml(...)
and configure(...)
methods public so that the consumer could choose their method of configuration, and then only fall back to the default YAML file format if the library is used without being configured previously.
@rmorlok - We have addressed the two issues that you and @Xypus mentioned in v0.1.0 @Xypus - Thank you for the code.
@BhagirathGoud thank you!
The way you parse the
fs_analytics_config.yml
file makes it impossible to use environment variables to store the credentials. The quick fix would be switching theconfigure_with_yaml
method as follows:This way the credentials could be stored in environment variables and passed to the application like this:
With the current approach the credentials have to be submitted to the repository of any application that uses your library.