lib/legion/data/connection.rb in legion-data-1.1.3 vs lib/legion/data/connection.rb in legion-data-1.1.4

- old
+ new

@@ -27,21 +27,18 @@ def shutdown @sequel&.disconnect Legion::Settings[:data][:connected] = false end - def creds_builder # rubocop:disable Metrics/AbcSize - final_creds = {} + def creds_builder(final_creds = {}) final_creds.merge! Legion::Data::Settings.creds final_creds.merge! Legion::Settings[:data][:creds] if Legion::Settings[:data][:creds].is_a? Hash if Legion::Settings[:data][:connection][:max_connections].is_a? Integer final_creds[:max_connections] = Legion::Settings[:data][:connection][:max_connections] end final_creds[:preconnect] = :concurrently if Legion::Settings[:data][:connection][:preconnect] - - Legion::Logging.unknown final_creds return final_creds if Legion::Settings[:vault].nil? if Legion::Settings[:vault][:connected] && ::Vault.sys.mounts.key?(:database) temp_vault_creds = Legion::Crypt.read('database/creds/legion')