deputy 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/deputy.gemspec +1 -1
- data/lib/deputy.rb +2 -1
- data/spec/deputy_spec.rb +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.16
|
data/deputy.gemspec
CHANGED
data/lib/deputy.rb
CHANGED
@@ -97,13 +97,14 @@ module Deputy
|
|
97
97
|
puts "#{plugin.clean_class_name}: waiting another #{minutes_to_wait} minutes"
|
98
98
|
end
|
99
99
|
end
|
100
|
-
send_report 'Deputies',
|
100
|
+
send_report 'Deputies.finished', 1
|
101
101
|
rescue Exception => e
|
102
102
|
send_report "Deputies.Error", e.message
|
103
103
|
raise e
|
104
104
|
end
|
105
105
|
|
106
106
|
def self.send_report(metric, value)
|
107
|
+
raise "Use with dot e.g. Mysql.status" if metric.split('.',2).size != 2
|
107
108
|
get "/report/#{CGI.escape metric}?value=#{CGI.escape value.to_s}"
|
108
109
|
end
|
109
110
|
|
data/spec/deputy_spec.rb
CHANGED
@@ -123,7 +123,7 @@ describe Deputy do
|
|
123
123
|
$notify = 0
|
124
124
|
Deputy.stub!(:sheriff_url).and_return 'http://sheri.ff'
|
125
125
|
FakeWeb.register_uri(:get, "http://sheri.ff/plugins.rb", :body => klass('C', :code => '$notify=1'))
|
126
|
-
FakeWeb.register_uri(:get, "http://sheri.ff/report/Deputies?value=
|
126
|
+
FakeWeb.register_uri(:get, "http://sheri.ff/report/Deputies.finished?value=1", :body => 'OK')
|
127
127
|
Deputy.run_plugins
|
128
128
|
$notify.should == 1
|
129
129
|
end
|