deputy 0.1.25 → 0.1.26

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.25
1
+ 0.1.26
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{deputy}
8
- s.version = "0.1.25"
8
+ s.version = "0.1.26"
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"]
@@ -114,10 +114,8 @@ module Deputy
114
114
  end
115
115
 
116
116
  def self.send_report(metric, value)
117
- # TODO sheriff does not accept anything else, fix it...
118
- metric = metric.split('.',2)
119
- metric = metric.map{|m| m.gsub(/[^-_a-zA-Z]/, '_') } * '.'
120
- get "/report/#{metric}?value=#{CGI.escape value.to_s}"
117
+ raise "separate #{metric} with a ." unless metric.split('.',2).size == 2
118
+ get "/report/#{CGI.escape metric}?value=#{CGI.escape value.to_s}"
121
119
  end
122
120
 
123
121
  def self.get(path)
@@ -158,8 +158,8 @@ describe Deputy do
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/X_xx.yy___y?value=123", :body => 'OK')
162
- Deputy.send_report('X/xx.yy/./y', '123').should == 'OK'
161
+ FakeWeb.register_uri(:get, "http://sheri.ff/report/Xxx.yy%3Fy?value=123", :body => 'OK')
162
+ Deputy.send_report('Xxx.yy?y', '123').should == 'OK'
163
163
  end
164
164
  end
165
165
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 25
9
- version: 0.1.25
8
+ - 26
9
+ version: 0.1.26
10
10
  platform: ruby
11
11
  authors:
12
12
  - Michael Grosser