Sha256: 6670456bbf9db985b7504d5e291248ba64ea92a1137b1be004b2a536a50cb8f5
Contents?: true
Size: 783 Bytes
Versions: 4
Compression:
Stored size: 783 Bytes
Contents
# frozen_string_literal: true module FreshConnection class ConnectionSpecification module Rails60 def spec ActiveRecord::ConnectionAdapters::ConnectionSpecification::Resolver.new(config_with_spec_name).spec(@spec_name.to_sym) end private def config_with_spec_name if defined?(ActiveRecord::DatabaseConfigurations) ActiveRecord::DatabaseConfigurations.new(@spec_name => build_config) else { @spec_name => build_config } end end def config_from_url ActiveRecord::ConnectionAdapters::ConnectionSpecification::ConnectionUrlResolver.new(database_group_url).to_hash end def base_config ActiveRecord::Base.connection_pool.spec.config end end end end
Version data entries
4 entries across 4 versions & 1 rubygems