care_bert 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/care_bert/sniffer.rb +9 -3
- data/lib/care_bert/version.rb +1 -1
- data/lib/tasks/care_bert_tasks.rake +14 -0
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 025907a2acbc643e76e7466fb368e56838ae8ede
|
4
|
+
data.tar.gz: 9e626acd9dfd0bbd65329d0fe57088d987c24f28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd86b1d6edecbc6ec9187db23de71172b429994318945fbdcb86465d912b3a2daa7d028c5150fa4371923618a5aff81503184762facafa77ccdceaeb4ae6a392
|
7
|
+
data.tar.gz: e7c5941b54edfb81a98fddba088fca19751788e8f7bf975215705c9ee0f2c9f521185d8b1b126859cfd852e0b2c3fc94433d27b6bfce54163ab549b5f1fab91e
|
data/lib/care_bert/sniffer.rb
CHANGED
@@ -6,7 +6,9 @@ module CareBert
|
|
6
6
|
|
7
7
|
chunk_size = CareBert::Configuration::CHUNK_SIZE
|
8
8
|
|
9
|
-
|
9
|
+
# Load Model definitions
|
10
|
+
Rails.application.eager_load!
|
11
|
+
|
10
12
|
ActiveRecord::Base.descendants.select { |c| c.base_class == c }.sort_by(&:name).each do |klass|
|
11
13
|
total = klass.count
|
12
14
|
|
@@ -36,7 +38,9 @@ module CareBert
|
|
36
38
|
|
37
39
|
chunk_size = CareBert::Configuration::CHUNK_SIZE
|
38
40
|
|
39
|
-
|
41
|
+
# Load Model definitions
|
42
|
+
Rails.application.eager_load!
|
43
|
+
|
40
44
|
ActiveRecord::Base.descendants.select { |c| c.base_class == c }.sort_by(&:name).each do |klass|
|
41
45
|
result[klass.name] = {
|
42
46
|
total: klass.count,
|
@@ -70,7 +74,9 @@ module CareBert
|
|
70
74
|
|
71
75
|
chunk_size = CareBert::Configuration::CHUNK_SIZE
|
72
76
|
|
73
|
-
|
77
|
+
# Load Model definitions
|
78
|
+
Rails.application.eager_load!
|
79
|
+
|
74
80
|
ActiveRecord::Base.descendants.select { |c| c.base_class == c }.sort_by(&:name).each do |klass|
|
75
81
|
result[klass.name] = {
|
76
82
|
total: klass.count,
|
data/lib/care_bert/version.rb
CHANGED
@@ -9,6 +9,9 @@ require 'care_bert'
|
|
9
9
|
# file: validate_models.rake
|
10
10
|
# task: rake db:validate_models
|
11
11
|
namespace :care_bert do
|
12
|
+
|
13
|
+
|
14
|
+
|
12
15
|
desc 'Run model validations on all model records in database'
|
13
16
|
task validate_models: :environment do
|
14
17
|
# ANALYZE all
|
@@ -29,3 +32,14 @@ namespace :care_bert do
|
|
29
32
|
end
|
30
33
|
|
31
34
|
end
|
35
|
+
|
36
|
+
task :care_bert do
|
37
|
+
require 'spinner.rb'
|
38
|
+
|
39
|
+
spinner = Spinner.new
|
40
|
+
spinner.task('Checking table integrity', 'care_bert:table_integrity')
|
41
|
+
spinner.task('Validating all models', 'care_bert:validate_models')
|
42
|
+
spinner.task('Checking presence of all associations', 'care_bert:missing_assocs')
|
43
|
+
# TODO print out catched outputs
|
44
|
+
spinner.spin!
|
45
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: care_bert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Loy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: spinner.rb
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.3'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.3'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: sqlite3
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -132,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
146
|
version: '0'
|
133
147
|
requirements: []
|
134
148
|
rubyforge_project:
|
135
|
-
rubygems_version: 2.4.
|
149
|
+
rubygems_version: 2.4.5
|
136
150
|
signing_key:
|
137
151
|
specification_version: 4
|
138
152
|
summary: CareBert takes care of the validation state of your current database items
|
@@ -174,3 +188,4 @@ test_files:
|
|
174
188
|
- test/dummy/Rakefile
|
175
189
|
- test/dummy/README.rdoc
|
176
190
|
- test/test_helper.rb
|
191
|
+
has_rdoc:
|