Sha256: a6d2181457b8e219b204f55842a60d65eb9a80d7b9bf027446c06e9bc1410c6c

Contents?: true

Size: 473 Bytes

Versions: 47

Compression:

Stored size: 473 Bytes

Contents

# frozen_string_literal: true

module Ridgepole
  class ConnectionAdapters
    def self.mysql?
      defined?(ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter) && ActiveRecord::Base.connection.is_a?(ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter)
    end

    def self.postgresql?
      defined?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter) && ActiveRecord::Base.connection.is_a?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter)
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
ridgepole-3.0.1 lib/ridgepole/connection_adapters.rb
ridgepole-3.0.0 lib/ridgepole/connection_adapters.rb
ridgepole-2.1.1 lib/ridgepole/connection_adapters.rb
ridgepole-2.1.0 lib/ridgepole/connection_adapters.rb
ridgepole-2.0.3 lib/ridgepole/connection_adapters.rb
ridgepole-2.0.2 lib/ridgepole/connection_adapters.rb
ridgepole-2.0.1 lib/ridgepole/connection_adapters.rb
ridgepole-2.0.0 lib/ridgepole/connection_adapters.rb
ridgepole-2.0.0.beta2 lib/ridgepole/connection_adapters.rb
ridgepole-2.0.0.beta lib/ridgepole/connection_adapters.rb
ridgepole-1.2.1 lib/ridgepole/connection_adapters.rb
ridgepole-1.2.0 lib/ridgepole/connection_adapters.rb
ridgepole-1.1.0 lib/ridgepole/connection_adapters.rb
ridgepole-1.0.7 lib/ridgepole/connection_adapters.rb
ridgepole-1.0.6 lib/ridgepole/connection_adapters.rb
ridgepole-1.0.5 lib/ridgepole/connection_adapters.rb
ridgepole-1.0.4 lib/ridgepole/connection_adapters.rb
ridgepole-1.0.3 lib/ridgepole/connection_adapters.rb
ridgepole-1.0.2 lib/ridgepole/connection_adapters.rb
ridgepole-1.0.2.beta lib/ridgepole/connection_adapters.rb