checker_jobs 0.1.1.pre → 0.1.2.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -0
- data/checker_jobs.gemspec +1 -1
- data/examples/user_checker.rb +2 -2
- data/lib/checker_jobs/checks/base.rb +4 -2
- data/lib/checker_jobs/configuration.rb +1 -1
- data/lib/checker_jobs/dsl.rb +1 -2
- data/lib/checker_jobs/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd7238a9e052db0d3953584be6cf3d082ae6b171
|
4
|
+
data.tar.gz: a4bf0b5505b76cbc4c23b195bdb9af6bc14c8f7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb9d91c1b2eacb5f86cc4304fdaf4bb7bee7f5addb90094e7f81df44fab5795f211f3e7891e654522313fd875ed0546951cd39cc0d2904ccf6f88c80113dcade
|
7
|
+
data.tar.gz: '0586d068670200ddf86e62f848bf5ed636992eb4b6de358653183b8cad61e3c519ce31c741933c43077d9839fdf3bc98e7aa736fc02690293ec06a98cb335a8e'
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
This gems provides a small DSL to check your data for inconsistencies.
|
4
4
|
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/checker_jobs.svg)](https://badge.fury.io/rb/checker_jobs)
|
5
6
|
[![Maintainability](https://api.codeclimate.com/v1/badges/7972bd0e4dc65329f5c6/maintainability)](https://codeclimate.com/github/drivy/checker_jobs/maintainability)
|
6
7
|
[![Test Coverage](https://api.codeclimate.com/v1/badges/7972bd0e4dc65329f5c6/test_coverage)](https://codeclimate.com/github/drivy/checker_jobs/test_coverage)
|
7
8
|
|
data/checker_jobs.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
|
11
11
|
spec.summary = "Asynchronous data consistency checks"
|
12
12
|
spec.description = ""
|
13
|
-
spec.homepage = "https://
|
13
|
+
spec.homepage = "https://github.com/drivy/checker_jobs"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
data/examples/user_checker.rb
CHANGED
@@ -24,9 +24,9 @@ CheckerJobs.configure do |config|
|
|
24
24
|
config.emails_backend = :action_mailer
|
25
25
|
config.emails_options = { from: "oss@drivy.com", reply_to: "no-reply@drivy.com" }
|
26
26
|
|
27
|
-
config.around_check = ->
|
27
|
+
config.around_check = -> {
|
28
28
|
puts "Starting check #{check.name}..."
|
29
|
-
|
29
|
+
yield
|
30
30
|
puts "Done #{check.name}!"
|
31
31
|
}
|
32
32
|
end
|
@@ -1,8 +1,10 @@
|
|
1
1
|
CheckerJobs::Checks::Base = Struct.new(:klass, :name, :options, :block) do
|
2
2
|
def perform
|
3
|
-
|
4
|
-
|
3
|
+
result = CheckerJobs.configuration.around_check.call do
|
4
|
+
klass.new.instance_exec(&block)
|
5
5
|
end
|
6
|
+
|
7
|
+
result.tap { |res| handle_result(res) }
|
6
8
|
end
|
7
9
|
|
8
10
|
private
|
@@ -17,7 +17,7 @@ class CheckerJobs::Configuration
|
|
17
17
|
config.emails_options = {}
|
18
18
|
config.emails_formatter_class = CheckerJobs::EmailsBackends::DefaultFormatter
|
19
19
|
config.time_between_checks = DEFAULT_TIME_BETWEEN_CHECKS
|
20
|
-
config.around_check = ->(
|
20
|
+
config.around_check = ->(&block) { block.call }
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
data/lib/checker_jobs/dsl.rb
CHANGED
data/lib/checker_jobs/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: checker_jobs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Drivy
|
@@ -216,7 +216,7 @@ files:
|
|
216
216
|
- lib/checker_jobs/jobs_processors.rb
|
217
217
|
- lib/checker_jobs/jobs_processors/sidekiq.rb
|
218
218
|
- lib/checker_jobs/version.rb
|
219
|
-
homepage: https://
|
219
|
+
homepage: https://github.com/drivy/checker_jobs
|
220
220
|
licenses:
|
221
221
|
- MIT
|
222
222
|
metadata: {}
|