sensu-extension 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sensu/extension.rb +6 -3
- data/sensu-extension.gemspec +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: 4c11409ffdd49e64a6348dbbc53c764214687397
|
4
|
+
data.tar.gz: f59c3de82957e6223a1a8ada73a9b885befd2e4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8ab0b42e9cb297e512a8defa33d63d942449cf1c69b521fa8b7b64a465c8a1c9daf2ebd1ba5506c2cbded15cc8f9d6b42388def992883decf7a50cf6fb27fba
|
7
|
+
data.tar.gz: 82aa66236e4b70e16a706526b57ff6ce82e994e837463effddb744b32c07906c6ea4ee11604abfa7ae81f7290540ba84d115e0c8bc8dd9c2c5235daab578777c
|
data/lib/sensu/extension.rb
CHANGED
@@ -95,12 +95,15 @@ module Sensu
|
|
95
95
|
# not override this method!
|
96
96
|
#
|
97
97
|
# @param data [Object, nil) to dup() and pass to run().
|
98
|
-
# @param options [Hash] to pass to run().
|
98
|
+
# @param options [Hash] to pass to run() if it has an arity of 2.
|
99
99
|
# @param callback [Proc] to pass to run().
|
100
100
|
def safe_run(data=nil, options={}, &callback)
|
101
101
|
begin
|
102
|
-
|
103
|
-
run
|
102
|
+
arguments = [data ? data.dup : data]
|
103
|
+
if method(:run).arity.abs == 2
|
104
|
+
arguments << options
|
105
|
+
end
|
106
|
+
run(*arguments, &callback)
|
104
107
|
rescue => error
|
105
108
|
klass = error.class.name
|
106
109
|
backtrace = error.backtrace.map { |line| "\s\s#{line}" }.join("\n")
|
data/sensu-extension.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Porter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-em
|