datadog-notifications 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10fe24906ae47d9adc63c38b816c2a0037031a5b
|
4
|
+
data.tar.gz: d246fe0ea9503450f1a07877603912ccbb63604f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e59089271f9102c824bdf60774a71bc5addea3375d3267f43fc40f3f3b873148d06e5f9be9ae4ef9e9315f944c211ae724ab6136dbed335ab513098a413396f4
|
7
|
+
data.tar.gz: 8e62d04b05baba9d2476842b04e17a2d3354a6d639e304f6a4c246b82d744da0ece0c8e27fdb6bdd2deab4b1f7dab200249fdd99646d14b1ffddb936396b24d3
|
@@ -25,10 +25,11 @@ module Datadog::Notifications::Plugins
|
|
25
25
|
version = route.route_version
|
26
26
|
method = route.route_method
|
27
27
|
|
28
|
-
path = route.route_path
|
29
|
-
path.sub!(
|
28
|
+
path = route.route_path.dup
|
29
|
+
path.sub!(/\(\.\:format\)$/, '')
|
30
30
|
path.sub!(":version/", "") if version
|
31
|
-
path.gsub!(
|
31
|
+
path.gsub!(/:(\w+)/) {|m| m[1..-1].upcase }
|
32
|
+
path.gsub!(/[^\w\/\-]+/, '_')
|
32
33
|
|
33
34
|
tags = self.tags + %W|method:#{method} path:#{path} status:#{endpoint.status}|
|
34
35
|
tags.push "version:#{version}" if version
|
@@ -32,13 +32,13 @@ describe Datadog::Notifications::Plugins::Grape do
|
|
32
32
|
expect(last_response.body).to eq('1 1234')
|
33
33
|
|
34
34
|
expect(buffered).to eq([
|
35
|
-
"api.request:1|c|#custom:tag,env:test,host:test.host,more:tags,method:GET,path:/echo/
|
36
|
-
"api.request.time:333|ms|#custom:tag,env:test,host:test.host,more:tags,method:GET,path:/echo/
|
35
|
+
"api.request:1|c|#custom:tag,env:test,host:test.host,more:tags,method:GET,path:/echo/KEY1/KEY2,status:200",
|
36
|
+
"api.request.time:333|ms|#custom:tag,env:test,host:test.host,more:tags,method:GET,path:/echo/KEY1/KEY2,status:200",
|
37
37
|
])
|
38
38
|
end
|
39
39
|
|
40
40
|
it 'should support namespaces and versioning' do
|
41
|
-
get '/api/v1/sub/versioned'
|
41
|
+
get '/api/v1/sub/versioned.txt'
|
42
42
|
expect(last_response.status).to eq(200)
|
43
43
|
expect(last_response.body).to eq('OK')
|
44
44
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datadog-notifications
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dimitrij Denissenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|