deputy 0.1.26 → 0.1.27

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.26
1
+ 0.1.27
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.26"
8
+ s.version = "0.1.27"
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
@@ -113,9 +113,9 @@ module Deputy
113
113
  raise e
114
114
  end
115
115
 
116
- def self.send_report(metric, value)
117
- raise "separate #{metric} with a ." unless metric.split('.',2).size == 2
118
- get "/report/#{CGI.escape metric}?value=#{CGI.escape value.to_s}"
116
+ def self.send_report(group, value)
117
+ raise "separate #{group} with a ." unless group.split('.',2).size == 2
118
+ get "/report?group=#{CGI.escape group}&value=#{CGI.escape value.to_s}"
119
119
  end
120
120
 
121
121
  def self.get(path)
data/spec/deputy_spec.rb CHANGED
@@ -143,7 +143,7 @@ describe Deputy do
143
143
  $notify = 0
144
144
  Deputy.stub!(:sheriff_url).and_return 'http://sheri.ff'
145
145
  FakeWeb.register_uri(:get, "http://sheri.ff/plugins.rb", :body => klass('C', :code => '$notify=1'))
146
- FakeWeb.register_uri(:get, "http://sheri.ff/report/Deputies.finished?value=1", :body => 'OK')
146
+ FakeWeb.register_uri(:get, "http://sheri.ff/report?group=Deputies.finished&value=1", :body => 'OK')
147
147
  Deputy.run_plugins
148
148
  $notify.should == 1
149
149
  end
@@ -152,13 +152,13 @@ describe Deputy do
152
152
  describe :send_report do
153
153
  it "sends a report" do
154
154
  Deputy.stub!(:sheriff_url).and_return 'http://sheri.ff'
155
- FakeWeb.register_uri(:get, "http://sheri.ff/report/Xxx.yyy?value=123", :body => 'OK')
155
+ FakeWeb.register_uri(:get, "http://sheri.ff/report?group=Xxx.yyy&value=123", :body => 'OK')
156
156
  Deputy.send_report('Xxx.yyy', '123').should == 'OK'
157
157
  end
158
158
 
159
159
  it "escapes metric names" do
160
160
  Deputy.stub!(:sheriff_url).and_return 'http://sheri.ff'
161
- FakeWeb.register_uri(:get, "http://sheri.ff/report/Xxx.yy%3Fy?value=123", :body => 'OK')
161
+ FakeWeb.register_uri(:get, "http://sheri.ff/report?group=Xxx.yy%3Fy&value=123", :body => 'OK')
162
162
  Deputy.send_report('Xxx.yy?y', '123').should == 'OK'
163
163
  end
164
164
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 26
9
- version: 0.1.26
8
+ - 27
9
+ version: 0.1.27
10
10
  platform: ruby
11
11
  authors:
12
12
  - Michael Grosser