active_record-postgres-constraints 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 590c9903ba5ee75b0ee276ced8118f89b9c0d20d8e29953afa0b5e2c596a7998
4
- data.tar.gz: 880f0d33689a35515e3a56c6a847d3766da94d21fee5a16e2b64ab1d3f1e1c76
3
+ metadata.gz: 6aeacf5cb93d55fa32a6b5465690a9358f0be891180d2ff27f65a52652d78f1e
4
+ data.tar.gz: afbc4076848545568c6cd6d98fd6092d61fa426a22978b13c338bb5b3c7bc07a
5
5
  SHA512:
6
- metadata.gz: 9f8aa9f3635049259ff5cd216f96a76f080e1d7cd3c49c2bc0089716cb765457f329e467fbd2a072299f11847375fbcb94236e57fdcd5515b5e07d70c209bdc4
7
- data.tar.gz: 9fae7cacb9bd526a05acd2b59e9b073c9e9834e9b6b5e9b4eaefa7193f9d9b4ae08cb3c9ed12c8c7df6453d42e5ac6b73d41413256601692d0c3e4e6c4da3c08
6
+ metadata.gz: c2c3d16541ed93f4b2ec66ef4cca8e1286ba7fc2c1a85cd9f3323026e1ad922ff6882c30aa67a790c90792943aea1d0683981c03747938e0ccac872a64198c42
7
+ data.tar.gz: 30fa7b3dd99e4904a4ee832eb32c2a06246359427f83940b18124e56475063745ae43a9a7e62208ee99da5d073691957e5456c6464316e0415b079b2dcc500ea
@@ -26,18 +26,8 @@ module ActiveRecord
26
26
  end
27
27
 
28
28
  def pg?
29
- begin
30
- connection = ActiveRecord::Base.connection
31
- rescue ActiveRecord::NoDatabaseError
32
- Rails.logger.warn do
33
- 'Not applying Postgres Constraints patches to ActiveRecord ' \
34
- 'since the database does not exist'
35
- end
36
- return false
37
- end
38
-
39
- pg = connection.class.to_s == "#{AR_CAS}::PostgreSQLAdapter"
40
- return true if pg
29
+ config = ActiveRecord::Base.connection_config
30
+ return true if config && 'postgresql' == config[:adapter]
41
31
 
42
32
  Rails.logger.warn do
43
33
  'Not applying Postgres Constraints patches to ActiveRecord ' \
@@ -3,7 +3,7 @@
3
3
  module ActiveRecord
4
4
  module Postgres
5
5
  module Constraints
6
- VERSION = '0.1.3'
6
+ VERSION = '0.1.4'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record-postgres-constraints
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Isaac Betesh