sensu-plugin 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -109,10 +109,11 @@ module Sensu
109
109
  def filter_dependencies
110
110
  if @event['check'].has_key?('dependencies')
111
111
  if @event['check']['dependencies'].is_a?(Array)
112
- @event['check']['dependencies'].each do |check|
112
+ @event['check']['dependencies'].each do |dependency|
113
113
  begin
114
114
  timeout(2) do
115
- if event_exists?(@event['client']['name'], check)
115
+ check, client = dependency.split('/').reverse
116
+ if event_exists?(client || @event['client']['name'], check)
116
117
  bail 'check dependency event exists'
117
118
  end
118
119
  end
@@ -1,6 +1,6 @@
1
1
  module Sensu
2
2
  module Plugin
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  EXIT_CODES = {
5
5
  'OK' => 0,
6
6
  'WARNING' => 1,
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Decklin Foster
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2013-10-01 00:00:00 -07:00
19
+ date: 2013-11-19 00:00:00 -08:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency