sensu-plugin 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,7 +15,7 @@ module Sensu
15
15
 
16
16
  def filter
17
17
  filter_disabled
18
- filter_repeated
18
+ filter_repeated unless @event['action'] == 'resolve'
19
19
  filter_silenced
20
20
  end
21
21
 
@@ -111,13 +111,18 @@ module Sensu
111
111
  end
112
112
  end
113
113
 
114
- # Copied from Sensu (0.8.19)
114
+ # Copied from Sensu (0.9.3)
115
115
 
116
+ class Array
117
+ def deep_merge(other_array, &merger)
118
+ concat(other_array).uniq
119
+ end
120
+ end
116
121
  class Hash
117
- def deep_merge(hash)
118
- merger = proc do |key, value1, value2|
119
- value1.is_a?(Hash) && value2.is_a?(Hash) ? value1.merge(value2, &merger) : value2
122
+ def deep_merge(other_hash, &merger)
123
+ merger ||= proc do |k, oldval, newval|
124
+ oldval.deep_merge(newval, &merger) rescue newval
120
125
  end
121
- self.merge(hash, &merger)
126
+ merge(other_hash, &merger)
122
127
  end
123
128
  end
@@ -1,6 +1,6 @@
1
1
  module Sensu
2
2
  module Plugin
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  EXIT_CODES = {
5
5
  'OK' => 0,
6
6
  'WARNING' => 1,
@@ -12,6 +12,7 @@ module Sensu
12
12
  # output for their handler.
13
13
 
14
14
  def output(*args)
15
+ puts "Sensu::Plugin::CLI: #{args}"
15
16
  end
16
17
 
17
18
  # This will define 'ok', 'warning', 'critical', and 'unknown'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-09 00:00:00.000000000 Z
12
+ date: 2012-01-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- requirement: &70294828191900 !ruby/object:Gem::Requirement
16
+ requirement: &70202734882620 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70294828191900
24
+ version_requirements: *70202734882620
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: mixlib-cli
27
- requirement: &70294828189640 !ruby/object:Gem::Requirement
27
+ requirement: &70202734881980 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 1.1.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70294828189640
35
+ version_requirements: *70202734881980
36
36
  description: Plugins and helper libraries for Sensu, a monitoring framework
37
37
  email:
38
38
  - decklin@red-bean.com