database_consistency 1.7.4 → 1.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: b620d27a76af3af281a6d433f5d8383ad7b9ba33811785b55a80d33bd6fb8ce6
4
- data.tar.gz: 378a82e286fea3e482c07e30aa02900441f47e44f7a4402b19ed7c0a6edbf6f1
3
+ metadata.gz: c2d7b47374ed7eb17980a23c56cda142a19c6d3e796f70d9c0fbc737da3e7b6d
4
+ data.tar.gz: 369df7a14b6f5550b598162177c8915a1615e0df63eed590d74be43eb3145f7d
5
5
  SHA512:
6
- metadata.gz: c756fa1d604909c62a56c51eef6d3f5140debcd5edff683dea4e5fd9f7e1f1ca421d984912b8efb5c7eacc1056bbc87fb1c5a084dda0b4a8c808e32c8df7398d
7
- data.tar.gz: 11d4f560939e6e82f30cab8a479dfbd14e34b80ec67d62f7cc43788466bf7549d3c6841b0367745b257012975f6a89a32c7e3972ed4aff9ef47a4c260ca8bd8b
6
+ metadata.gz: a7b0139cf11940e9ce879fe06d788e15e5c6a7c8f3bcd8a9483267a656e3f14977f7cf1e1f8586ca8ce70482d5a2f325214c457b2c055e5d8a590c0e9ea66031
7
+ data.tar.gz: 103e78babcc811497dcfa70cac0f3285e430e79611efa44dec94070c9b5601c9dbf461e560002f723bde1c7e26ae2d7e2641840f1ecca23dc6c8e7e70f153e75
@@ -36,8 +36,8 @@ module DatabaseConsistency
36
36
 
37
37
  # Return list of not inherited models
38
38
  def parent_models
39
- models.group_by(&:table_name).each_value.map do |models|
40
- models.min_by { |model| models.include?(model.superclass) ? 1 : 0 }
39
+ models.group_by(&:table_name).each_value.flat_map do |models|
40
+ models.reject { |model| models.include?(model.superclass) }
41
41
  end
42
42
  end
43
43
 
@@ -16,7 +16,7 @@ module DatabaseConsistency
16
16
  end
17
17
 
18
18
  def initialize
19
- puts 'Hey, some of checks fail with an error, please open an issue on github at https://github.com/djezzzl/database_consistency.'
19
+ puts 'Hey, some checks fail with an error, please open an issue on github at https://github.com/djezzzl/database_consistency.'
20
20
  puts "Attach the created file: #{filename}"
21
21
  puts 'Thank you, for your contribution!'
22
22
  puts '(c) Evgeniy Demin <lawliet.djez@gmail.com>'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DatabaseConsistency
4
- VERSION = '1.7.4'
4
+ VERSION = '1.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: 1.7.4
4
+ version: 1.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: 2023-01-20 00:00:00.000000000 Z
11
+ date: 2023-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -262,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
262
262
  - !ruby/object:Gem::Version
263
263
  version: '0'
264
264
  requirements: []
265
- rubygems_version: 3.2.33
265
+ rubygems_version: 3.1.6
266
266
  signing_key:
267
267
  specification_version: 4
268
268
  summary: Provide an easy way to check the consistency of the database constraints