-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up load_configuration methods in *_database #946
base: master
Are you sure you want to change the base?
Conversation
This refactors load_configuration to return a simple hash and do the caching in the method configuration.
f94f236
to
2b6a059
Compare
@configuration['password'] = db_config['PASSWORD'] | ||
@configuration | ||
{ | ||
'adapter' => 'postgresql', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We never use this, so why do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be dropped, I guess
'ssl' => query['ssl']&.first == 'true', | ||
'sslfactory' => query['sslfactory']&.first, | ||
'driver_class' => full_config['jpa.config.hibernate.connection.driver_class'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We never use these, so why do we have these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pretty sure we don't need them and can drop 'em
This refactors
load_configuration
to return a simple hash and do the caching in the methodconfiguration
. It then also usesURI
andCGI
to parse the Candlepin DB URL instead of using regular expressions.