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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ce3551a978e09495d4bc49b782ff4752b9b51024
4
- data.tar.gz: 56a6f4803af58145ed22a7cbb8c861006388dcc9
3
+ metadata.gz: bd7238a9e052db0d3953584be6cf3d082ae6b171
4
+ data.tar.gz: a4bf0b5505b76cbc4c23b195bdb9af6bc14c8f7d
5
5
  SHA512:
6
- metadata.gz: b89b197beb6206ac0a7196e6878880cf1d9227f196ece1c7c750c4afbadeb3059ba35652990e89144b16f50013153197ffb83dcde2b92c23bef30770bdb14e01
7
- data.tar.gz: fbeb45f5e90e35a593d716b543200e9cf1915e02e61c7b4ef27dbeac4c58c3b811766fad584374982edfff61ce3c995a249c54a9ebb30557141840b54bf98a11
6
+ metadata.gz: fb9d91c1b2eacb5f86cc4304fdaf4bb7bee7f5addb90094e7f81df44fab5795f211f3e7891e654522313fd875ed0546951cd39cc0d2904ccf6f88c80113dcade
7
+ data.tar.gz: '0586d068670200ddf86e62f848bf5ed636992eb4b6de358653183b8cad61e3c519ce31c741933c43077d9839fdf3bc98e7aa736fc02690293ec06a98cb335a8e'
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /spec/reports/
7
7
  /tmp/
8
8
  .*.swp
9
+ *.gem
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- checker_jobs (0.1.0.pre)
4
+ checker_jobs (0.1.2.pre)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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://drivy.engineering/"
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|
@@ -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 = ->(check) {
27
+ config.around_check = -> {
28
28
  puts "Starting check #{check.name}..."
29
- check.perform
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
- klass.new.instance_exec(&block).tap do |result|
4
- handle_result(result)
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 = ->(check) { check.perform }
20
+ config.around_check = ->(&block) { block.call }
21
21
  end
22
22
  end
23
23
 
@@ -67,7 +67,6 @@ module CheckerJobs::DSL
67
67
  end
68
68
 
69
69
  def perform_check(check_name)
70
- check = checks.fetch(check_name.to_s)
71
- CheckerJobs.configuration.around_check.call(check)
70
+ checks.fetch(check_name.to_s).perform
72
71
  end
73
72
  end
@@ -1,3 +1,3 @@
1
1
  module CheckerJobs
2
- VERSION = "0.1.1.pre".freeze
2
+ VERSION = "0.1.2.pre".freeze
3
3
  end
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.1.pre
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://drivy.engineering/
219
+ homepage: https://github.com/drivy/checker_jobs
220
220
  licenses:
221
221
  - MIT
222
222
  metadata: {}