database_consistency 0.2.3 → 0.2.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: 6296221a3f6a0566aa3292762fbfb1c83673c9498e386a465049d08bb7fc6946
4
- data.tar.gz: 8cfe97970a2eb4e4e579ac71fe4e3ba2b9169ca5e4b61a1473c45ab80d579b70
3
+ metadata.gz: 0a43478b4a614d4a9325bacc5c41b5ffe37d6a0ec2790dc6a5c6ba54b8ef15bd
4
+ data.tar.gz: 34ec52ffc37e44c618d3b71d9d22c31fd4494d2f8258163fb99fbf12484c98bf
5
5
  SHA512:
6
- metadata.gz: 98314ca48f11a5ccb709d887d2ea28f29ce0c9100ba9489257195de86badcdf0a5bf145c2074ac679b99feb07105fcffc4f5f4ad1d8a3dacb1a58d7106136494
7
- data.tar.gz: f5955ef7e7aaf2090f661c0165e3c2cdb09386a1463db92c0c716350875de1f324d0102ab7e8c247ae15f64d912a176ecb2cdfd682bccd6a9a60d171e35a724d
6
+ metadata.gz: 1566a33ef13d6d4495b89cd7d42b81de04977b1a49e92f8e760a91cd5dbb30dd0dbb00270923d092d655ecb63e4bd915b2c0839a5b34ead6dd30e96e492e90d7
7
+ data.tar.gz: 40b9869bac6a7cd319eaa0aba4c055e1e5cadf3091e9219becf3baad63d1b777728dce4ae0830696009a7b07b62e5dd63bd99845df079cf23a37d28b0428ce23
@@ -17,4 +17,5 @@ end
17
17
  $LOAD_PATH.unshift(File.expand_path('lib', __dir__))
18
18
  require 'database_consistency'
19
19
 
20
- DatabaseConsistency.run
20
+ result = DatabaseConsistency.run
21
+ exit result
@@ -33,14 +33,16 @@ module DatabaseConsistency
33
33
  reports,
34
34
  ENV['LOG_LEVEL'] || 'INFO'
35
35
  )
36
+
37
+ reports.empty? ? 0 : 1
36
38
  end
37
39
 
38
40
  def enabled_processors
39
- PROCESSORS.select { |processor| configuration.enabled?(processor) }
41
+ @enabled_processors ||= PROCESSORS.select { |processor| configuration.enabled?(processor) }
40
42
  end
41
43
 
42
44
  def reports
43
- enabled_processors.map(&:new).flat_map(&:reports)
45
+ @reports ||= enabled_processors.map(&:new).flat_map(&:reports)
44
46
  end
45
47
 
46
48
  def configuration
@@ -1,3 +1,3 @@
1
1
  module DatabaseConsistency
2
- VERSION = '0.2.3'.freeze
2
+ VERSION = '0.2.4'.freeze
3
3
  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.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeniy Demin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-14 00:00:00.000000000 Z
11
+ date: 2018-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord