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 CHANGED
@@ -1 +1 @@
1
- 0.1.15
1
+ 0.1.16
data/deputy.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{deputy}
8
- s.version = "0.1.15"
8
+ s.version = "0.1.16"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Grosser"]
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', 'finished'
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=finished", :body => 'OK')
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
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 15
9
- version: 0.1.15
8
+ - 16
9
+ version: 0.1.16
10
10
  platform: ruby
11
11
  authors:
12
12
  - Michael Grosser