statsd-instrument 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/statsd/instrument/assertions.rb +2 -2
- data/lib/statsd/instrument/version.rb +1 -1
- data/test/assertions_test.rb +14 -0
- metadata +15 -36
- checksums.yaml.gz.sig +0 -2
- data.tar.gz.sig +0 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55f8c84568425e122a485916dea1798f630bb600
|
4
|
+
data.tar.gz: df9ac73422a7819f4272e2a4877784cb2ce84fc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ac8ca36a860f3c1bbc5d3268ef5714ac536e1fbbf4e424b310e5167cc001d6ba8b40cb7281a72b0528eae1f424b4e8e83a3b9f865206f5639bd0cd841f48ec9
|
7
|
+
data.tar.gz: 23c2375c9c3bd8ed1fc249498b87f4465dc04a2ad91f70f5531336799b7ae3b971cd9c3f3d39568d0240a0f740fe53e8c555b2020461263d11f9b4f4cd15acc7
|
@@ -46,12 +46,12 @@ module StatsD::Instrument::Assertions
|
|
46
46
|
metrics = capture_statsd_calls(&block)
|
47
47
|
metrics = metrics.select { |m| m.type == metric_type && m.name == metric_name }
|
48
48
|
assert metrics.length > 0, "No StatsD calls for metric #{metric_name} were made."
|
49
|
-
assert options[:times] === metrics.length, "The amount of StatsD calls for metric #{metric_name} was unexpected"
|
49
|
+
assert options[:times] === metrics.length, "The amount of StatsD calls for metric #{metric_name} was unexpected. Expected #{options[:times].inspect}, found #{metrics.length}"
|
50
50
|
metric = metrics.first
|
51
51
|
|
52
52
|
assert_equal options[:sample_rate], metric.sample_rate, "Unexpected value submitted for StatsD metric #{metric_name}" if options[:sample_rate]
|
53
53
|
assert_equal options[:value], metric.value, "Unexpected StatsD sample rate for metric #{metric_name}" if options[:value]
|
54
|
-
assert_equal Set.new(options[:tags]), Set.new(metric.tags), "Unexpected StatsD tags for metric #{metric_name}" if options[:tags]
|
54
|
+
assert_equal Set.new(StatsD::Instrument::Metric.normalize_tags(options[:tags])), Set.new(metric.tags), "Unexpected StatsD tags for metric #{metric_name}" if options[:tags]
|
55
55
|
|
56
56
|
metric
|
57
57
|
end
|
data/test/assertions_test.rb
CHANGED
@@ -101,6 +101,20 @@ class AssertionsTest < Minitest::Test
|
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
104
|
+
def test_assert_statsd_call_with_tags
|
105
|
+
assert_no_assertion_triggered do
|
106
|
+
@test_case.assert_statsd_increment('counter', tags: ['a:b', 'c:d']) do
|
107
|
+
StatsD.increment('counter', tags: { a: 'b', c: 'd' })
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
assert_no_assertion_triggered do
|
112
|
+
@test_case.assert_statsd_increment('counter', tags: { a: 'b', c: 'd' }) do
|
113
|
+
StatsD.increment('counter', tags: ['a:b', 'c:d'])
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
104
118
|
private
|
105
119
|
|
106
120
|
def assert_no_assertion_triggered(&block)
|
metadata
CHANGED
@@ -1,78 +1,56 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: statsd-instrument
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesse Storimer
|
8
8
|
- Tobias Lutke
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
|
-
cert_chain:
|
12
|
-
-
|
13
|
-
-----BEGIN CERTIFICATE-----
|
14
|
-
MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MQ8wDQYDVQQDDAZhZG1p
|
15
|
-
bnMxFzAVBgoJkiaJk/IsZAEZFgdzaG9waWZ5MRMwEQYKCZImiZ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tu21qtOlHX4Hc4KdE2JqzCPOsS4zsZGhgwhPs
|
31
|
-
fl3hbtVFTqbOlwL9vy1fudXcolIE/ZTcxQ+er07ZFZdKCXayR9PPs64heamfn0fp
|
32
|
-
TConQSX2BnZdhIEYW+cKzEC/bLc=
|
33
|
-
-----END CERTIFICATE-----
|
34
|
-
date: 2014-05-20 00:00:00.000000000 Z
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-05-22 00:00:00.000000000 Z
|
35
13
|
dependencies:
|
36
14
|
- !ruby/object:Gem::Dependency
|
37
15
|
name: rake
|
38
16
|
requirement: !ruby/object:Gem::Requirement
|
39
17
|
requirements:
|
40
|
-
- -
|
18
|
+
- - '>='
|
41
19
|
- !ruby/object:Gem::Version
|
42
20
|
version: '0'
|
43
21
|
type: :development
|
44
22
|
prerelease: false
|
45
23
|
version_requirements: !ruby/object:Gem::Requirement
|
46
24
|
requirements:
|
47
|
-
- -
|
25
|
+
- - '>='
|
48
26
|
- !ruby/object:Gem::Version
|
49
27
|
version: '0'
|
50
28
|
- !ruby/object:Gem::Dependency
|
51
29
|
name: minitest
|
52
30
|
requirement: !ruby/object:Gem::Requirement
|
53
31
|
requirements:
|
54
|
-
- -
|
32
|
+
- - '>='
|
55
33
|
- !ruby/object:Gem::Version
|
56
34
|
version: '0'
|
57
35
|
type: :development
|
58
36
|
prerelease: false
|
59
37
|
version_requirements: !ruby/object:Gem::Requirement
|
60
38
|
requirements:
|
61
|
-
- -
|
39
|
+
- - '>='
|
62
40
|
- !ruby/object:Gem::Version
|
63
41
|
version: '0'
|
64
42
|
- !ruby/object:Gem::Dependency
|
65
43
|
name: mocha
|
66
44
|
requirement: !ruby/object:Gem::Requirement
|
67
45
|
requirements:
|
68
|
-
- -
|
46
|
+
- - '>='
|
69
47
|
- !ruby/object:Gem::Version
|
70
48
|
version: '0'
|
71
49
|
type: :development
|
72
50
|
prerelease: false
|
73
51
|
version_requirements: !ruby/object:Gem::Requirement
|
74
52
|
requirements:
|
75
|
-
- -
|
53
|
+
- - '>='
|
76
54
|
- !ruby/object:Gem::Version
|
77
55
|
version: '0'
|
78
56
|
description: A StatsD client for Ruby appspec. Provides metaprogramming methods to
|
@@ -83,8 +61,8 @@ executables: []
|
|
83
61
|
extensions: []
|
84
62
|
extra_rdoc_files: []
|
85
63
|
files:
|
86
|
-
-
|
87
|
-
-
|
64
|
+
- .gitignore
|
65
|
+
- .travis.yml
|
88
66
|
- Gemfile
|
89
67
|
- LICENSE
|
90
68
|
- README.md
|
@@ -122,17 +100,17 @@ require_paths:
|
|
122
100
|
- lib
|
123
101
|
required_ruby_version: !ruby/object:Gem::Requirement
|
124
102
|
requirements:
|
125
|
-
- -
|
103
|
+
- - '>='
|
126
104
|
- !ruby/object:Gem::Version
|
127
105
|
version: '0'
|
128
106
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
107
|
requirements:
|
130
|
-
- -
|
108
|
+
- - '>='
|
131
109
|
- !ruby/object:Gem::Version
|
132
110
|
version: '0'
|
133
111
|
requirements: []
|
134
112
|
rubyforge_project:
|
135
|
-
rubygems_version: 2.
|
113
|
+
rubygems_version: 2.0.14
|
136
114
|
signing_key:
|
137
115
|
specification_version: 4
|
138
116
|
summary: A StatsD client for Ruby apps
|
@@ -147,3 +125,4 @@ test_files:
|
|
147
125
|
- test/statsd_test.rb
|
148
126
|
- test/test_helper.rb
|
149
127
|
- test/udp_backend_test.rb
|
128
|
+
has_rdoc:
|
checksums.yaml.gz.sig
DELETED
data.tar.gz.sig
DELETED
metadata.gz.sig
DELETED
Binary file
|