sidekiq_snitch 0.0.1 → 0.0.2

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: 63f287357fc6127c55eb4889e61b12ce0c594775
4
- data.tar.gz: 80d00a4dab63d77bf649504277e91d092b2ab0f8
3
+ metadata.gz: a22896d0e27c123e3b81818b5c5f40b1750bcfd3
4
+ data.tar.gz: ad047bfc31228b0e038c649c5f61c942e22124d7
5
5
  SHA512:
6
- metadata.gz: b9d3eb198f5b0d2018e706829ed0df7c07d1d5048e202cbe28f5c9c358606e910b6f5ee073b9202e5402787a6d5e83e23979af433767c59dc3ac2afa02854e1c
7
- data.tar.gz: 660c403aa0bf5ad46e4975ea4f8af9365255622cfebb2390181d61c1808e891c3cde130d754fcfa043e47c3b6a38930a14aa0f5609d016b397e82c1aff071487
6
+ metadata.gz: d441ca225c3cc42fba15a068046b9601925c6722d7b551c6e0dc07bdd3ce77891a35db6b92f69dae4502619ffa22b9305cd9d459d65f07c770842265a333f776
7
+ data.tar.gz: 69ce8802a378165b71d02d37a363ffe24c96487d6cef45a2be42c0ead7a9b88095c378dab35eea8233d8067adcd0094c4895cbb291afa4ce80334c273a93c905
@@ -0,0 +1,14 @@
1
+ require 'sidekiq/api'
2
+
3
+ # This initializer inspects the currently scheduled Sidekiq workers,
4
+ # of which the Sidekiq::Snitch must always be one in a properly
5
+ # configured application.
6
+ #
7
+ # When none are found, schedule one to run immediately. The worker
8
+ # will then take care of rescheduling itself.
9
+ set = Sidekiq::ScheduledSet.new
10
+ length = set.select {|job| job.klass == "Sidekiq::Snitch" }.length
11
+
12
+ unless length > 0
13
+ Sidekiq::Snitch.perform_async
14
+ end
@@ -1,3 +1,3 @@
1
1
  module SidekiqSnitch
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq_snitch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joost Baaij
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-19 00:00:00.000000000 Z
11
+ date: 2014-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">"
17
+ - - '>'
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">"
24
+ - - '>'
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sidekiq
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: A Rails engine that monitors your Sidekiq install using Dead Man's Snitch
@@ -46,21 +46,20 @@ executables: []
46
46
  extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
- - MIT-LICENSE
50
- - README.rdoc
51
- - Rakefile
52
49
  - app/assets/stylesheets/sidekiq_snitch/application.css
53
50
  - app/controllers/sidekiq_snitch/application_controller.rb
54
51
  - app/helpers/sidekiq_snitch/application_helper.rb
55
52
  - app/views/layouts/sidekiq_snitch/application.html.erb
56
53
  - app/workers/sidekiq/snitch.rb
54
+ - config/initializers/perform.rb
57
55
  - config/routes.rb
58
- - lib/sidekiq_snitch.rb
59
56
  - lib/sidekiq_snitch/engine.rb
60
57
  - lib/sidekiq_snitch/version.rb
58
+ - lib/sidekiq_snitch.rb
61
59
  - lib/tasks/sidekiq_snitch_tasks.rake
62
- - test/dummy/README.rdoc
63
- - test/dummy/Rakefile
60
+ - MIT-LICENSE
61
+ - Rakefile
62
+ - README.rdoc
64
63
  - test/dummy/app/assets/javascripts/application.js
65
64
  - test/dummy/app/assets/stylesheets/application.css
66
65
  - test/dummy/app/controllers/application_controller.rb
@@ -69,7 +68,6 @@ files:
69
68
  - test/dummy/bin/bundle
70
69
  - test/dummy/bin/rails
71
70
  - test/dummy/bin/rake
72
- - test/dummy/config.ru
73
71
  - test/dummy/config/application.rb
74
72
  - test/dummy/config/boot.rb
75
73
  - test/dummy/config/environment.rb
@@ -86,11 +84,13 @@ files:
86
84
  - test/dummy/config/locales/en.yml
87
85
  - test/dummy/config/routes.rb
88
86
  - test/dummy/config/secrets.yml
89
- - test/dummy/log/test.log
87
+ - test/dummy/config.ru
90
88
  - test/dummy/public/404.html
91
89
  - test/dummy/public/422.html
92
90
  - test/dummy/public/500.html
93
91
  - test/dummy/public/favicon.ico
92
+ - test/dummy/Rakefile
93
+ - test/dummy/README.rdoc
94
94
  - test/integration/navigation_test.rb
95
95
  - test/sidekiq_snitch_test.rb
96
96
  - test/test_helper.rb
@@ -104,17 +104,17 @@ require_paths:
104
104
  - lib
105
105
  required_ruby_version: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - ">="
107
+ - - '>='
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  requirements:
112
- - - ">="
112
+ - - '>='
113
113
  - !ruby/object:Gem::Version
114
114
  version: '0'
115
115
  requirements: []
116
116
  rubyforge_project:
117
- rubygems_version: 2.2.2
117
+ rubygems_version: 2.0.14
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: Monitor Sidekiq using Dead Mans's Snitch
@@ -144,7 +144,6 @@ test_files:
144
144
  - test/dummy/config/routes.rb
145
145
  - test/dummy/config/secrets.yml
146
146
  - test/dummy/config.ru
147
- - test/dummy/log/test.log
148
147
  - test/dummy/public/404.html
149
148
  - test/dummy/public/422.html
150
149
  - test/dummy/public/500.html
@@ -1,3 +0,0 @@
1
- -----------------------------
2
- SidekiqSnitchTest: test_truth
3
- -----------------------------