lib/replidog/proxy.rb in replidog-0.1.0 vs lib/replidog/proxy.rb in replidog-1.0.0

- old
+ new

@@ -170,15 +170,13 @@ @configuration = configuration.dup end def create spec = - if ActiveRecord::VERSION::MAJOR >= 4 - if ActiveRecord::VERSION::MINOR < 1 - ActiveRecord::ConnectionAdapters::ConnectionSpecification::Resolver.new(@configuration, {}).spec - else - ActiveRecord::ConnectionAdapters::ConnectionSpecification::Resolver.new({}).spec(@configuration) - end + if ActiveRecord::VERSION::MAJOR >= 5 || (ActiveRecord::VERSION::MAJOR == 4 && ActiveRecord::VERSION::MINOR >= 1) + ActiveRecord::ConnectionAdapters::ConnectionSpecification::Resolver.new({}).spec(@configuration) + elsif ActiveRecord::VERSION::MAJOR == 4 && ActiveRecord::VERSION::MINOR < 1 + ActiveRecord::ConnectionAdapters::ConnectionSpecification::Resolver.new(@configuration, {}).spec else ActiveRecord::Base::ConnectionSpecification::Resolver.new(@configuration, {}).spec end ActiveRecord::ConnectionAdapters::ConnectionPool.new(spec)