database_consistency 0.7.4 → 0.7.5

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: 6c25aede5bcd2f9b5f9d004758af68d7f4a00526804553a42fd45b1c6c5a37db
4
- data.tar.gz: c1e86515492f83bb471a9c8d1ab730d781111274f2646d83cdbc4710ee78c29a
3
+ metadata.gz: 3a0bd9098639aa98ed190bc90d9334d7dbbeaf9fa368cf73d4e9c08d4778f0be
4
+ data.tar.gz: 1294d60591ae3bf21313cc88254e57e03225501601b6b5bbb33634e7cb0bfc19
5
5
  SHA512:
6
- metadata.gz: 0d3203c33fab6326e38a4ba0a976a34b790d733aa2db95cf00424b012e68cb09a82b78f08a162e8ca3d41540ec9eccc3f984d4d6526ff59a0559af503b8a5aaf
7
- data.tar.gz: e54a2fa09624f0d68808f1a9a2292b240f34c81bf43a93868b00ff93e1d10f71973d53ef263f0c89c624887f5030b5f241d635aa5bdf904a5a80da534b14faab
6
+ metadata.gz: ef673d307c963330307ca143b6176ba3211f6bc8799ed67b0a1b7d07e0eb1a2cf0a1460aa26a6626c1ac95103e4871aa29ec24f770ef33164ba41bfaf6d8a4df
7
+ data.tar.gz: c6b5469b5293f8445a6327ab4f65027e00cc5bc417058e688715fd1b7a3c16e5209670c69557388e09e0fb27a79ea109b8e7c5737af2f9ad055d8d2deed9d840
@@ -17,6 +17,8 @@ end
17
17
 
18
18
  # Load Rails models
19
19
  Rails.application.eager_load! if defined?(Rails)
20
+ # Rails 6 support
21
+ Zeitwerk::Loader.eager_load_all if defined?(Zeitwerk)
20
22
 
21
23
  # Require the gem
22
24
  $LOAD_PATH.unshift(File.expand_path('lib', __dir__))
@@ -7,7 +7,9 @@ module DatabaseConsistency
7
7
 
8
8
  # Returns list of models to check
9
9
  def models
10
- ActiveRecord::Base.descendants.delete_if(&:abstract_class?)
10
+ ActiveRecord::Base.descendants.delete_if(&:abstract_class?).delete_if do |klass|
11
+ !klass.connection.table_exists?(klass.table_name)
12
+ end
11
13
  end
12
14
 
13
15
  # Return list of not inherited models
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DatabaseConsistency
4
- VERSION = '0.7.4'
4
+ VERSION = '0.7.5'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: database_consistency
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeniy Demin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-18 00:00:00.000000000 Z
11
+ date: 2019-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord