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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aaad8d6663e0f3a3cb2f01701423f5b6fe482122
4
- data.tar.gz: 608b8507b511e0fb7294e864003d9266419cc73e
3
+ metadata.gz: 55f8c84568425e122a485916dea1798f630bb600
4
+ data.tar.gz: df9ac73422a7819f4272e2a4877784cb2ce84fc4
5
5
  SHA512:
6
- metadata.gz: d9771c8673f62f390f5fe499bac932aaf89efdbb32f7435b8f56547868c1af0fbc2cf8c63fe3be0cf65cb5e203e96832efcb690d2e96bf282bd936da22d72c8d
7
- data.tar.gz: d9424c37124cbc75d86fe7284fe68b205750957d6c6c5ca01a4e27352f6e644480c08d56284c9eef3913080dd07502d87545ed4e49e49dea0e8e26bdfdb2ecc9
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
@@ -1,5 +1,5 @@
1
1
  module StatsD
2
2
  module Instrument
3
- VERSION = "2.0.2"
3
+ VERSION = "2.0.3"
4
4
  end
5
5
  end
@@ -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.2
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/IsZAEZFgdzaG9waWZ5MRMwEQYKCZImiZPyLGQBGRYDY29t
16
- MB4XDTE0MDUxNTIwMzM0OFoXDTE1MDUxNTIwMzM0OFowPzEPMA0GA1UEAwwGYWRt
17
- aW5zMRcwFQYKCZImiZPyLGQBGRYHc2hvcGlmeTETMBEGCgmSJomT8ixkARkWA2Nv
18
- bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL0/81O3e1vh5smcwp2G
19
- MpLQ6q0kejQLa65bPYPxdzWA1SYOKyGfw+yR9LdFzsuKpwWzKq6zX35lj1IckWS4
20
- bNBEQzxmufUxU0XPM02haFB8fOfDJzdXsWte9Ge4IFwahwn68gpMqN+BvxL+KMYz
21
- Iut9YmN44d4LZdsENEIO5vmybuG2vYDz7R56qB0PA+Q2P2CdhymsBad2DQs69FBo
22
- uico9V6VMYYctL9lCYdzu9IXrOYNTt88suKIVzzAlHOKeN0Ng5qdztFoTR8sfxDr
23
- Ydg3KHl5n47wlpgd8R0f/4b5gGxW+v9pyJCgQnLlRu7DedVSvv7+GMtj3g9r3nhJ
24
- KqECAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFI/o
25
- maf34HXbUOQsdoLHacEKQgunMB0GA1UdEQQWMBSBEmFkbWluc0BzaG9waWZ5LmNv
26
- bTAdBgNVHRIEFjAUgRJhZG1pbnNAc2hvcGlmeS5jb20wDQYJKoZIhvcNAQEFBQAD
27
- ggEBADkK9aj5T0HPExsov4EoMWFnO+G7RQ28C30VAfKxnL2UxG6i4XMHVs6Xi94h
28
- qXFw1ec9Y2eDUqaolT3bviOk9BB197+A8Vz/k7MC6ci2NE+yDDB7HAC8zU6LAx8Y
29
- Iqvw7B/PSZ/pz4bUVFlTATif4mi1vO3lidRkdHRtM7UePSn2rUpOi0gtXBP3bLu5
30
- YjHJN7wx5cugMEyroKITG5gL0Nxtu21qtOlHX4Hc4KdE2JqzCPOsS4zsZGhgwhPs
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
- - ".gitignore"
87
- - ".travis.yml"
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.2.0
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
@@ -1,2 +0,0 @@
1
- $&X�h4&�t!]|O����������n+�|Q��-�S)� ��I�6ő00�i�����$K��A (���@#~R�sHd]�%�$c�*����<`����XQ�Ʈ"��7����j�4F�3
2
- f`'~�fUb��N��Ȧ�����5X�:"Cd�ϼ9��<��W�<~��E�62���`�+q1���N��z
data.tar.gz.sig DELETED
@@ -1,2 +0,0 @@
1
- ���8�A\��-�x�4Ͷ��I���6&s\v�����M6��M �$�I�.��sSC���v��hCy���[۔4L��+@2x���cM�am�����`T���"V�k�.TJ���[�$����g�HD�v�b�MƎhy�x 15Ur�}��c-��9���.`����1�E��1�w��U����@��T~�R����q1��J��6;v���ob��vl���Ϻ����"&?��C�'�?lE��
2
- L��I�`���+V���S��,r���
metadata.gz.sig DELETED
Binary file