statsd-instrument 3.6.0 → 3.6.1

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
  SHA256:
3
- metadata.gz: 0575c6d7547ea1494ba62807fa7ffd10a0d04b58a762eddf3eac56c47cd2c21e
4
- data.tar.gz: 8370611d71ed66a31e67e150646df41f94f393cdb0bc953e23624113e99ffbd5
3
+ metadata.gz: a5e3cda783c5f0c7de2c30175ab001cef492c3ad0e0923af3d3a4840df7d6005
4
+ data.tar.gz: b31685696c6e1ad8e5cd36a8115eca2363ed9a732a483534004b2163453b323a
5
5
  SHA512:
6
- metadata.gz: 41fe6f71cd25a79fdfa73f1e53e0976333af4cd2ea7387832564b6991014d432e135c7e9e5a770f4d436ce23770811e21048d4ccf28f2a8d1b77debc3137d59a
7
- data.tar.gz: 4db9fb5d52dd7258e8a018de3fcdd90a93ecfa01fea3142f47fb3ef0150de30998a7a422dde012ffc8de9e95eded01c41896f78886df07fc8163dc530e0e2e22
6
+ metadata.gz: 658663a99a273170ad72436eae0142d707e35a8cc2bbf5befd89a7cd225db5673c5ec676e8f96a168411f443fa7d3e6b73f60c6f081067082b2003920cef264b
7
+ data.tar.gz: bc8930e083ec158ca6a945186c2156a0890ebe74edb63080dc6ced9ca691498edc9d81ae746ec80477471c3b2f09d3abb95042002c0c8e7d72afeb9ab360526c
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ section below.
6
6
 
7
7
  ## Unreleased changes
8
8
 
9
+ ## Version 3.6.1
10
+
11
+ - Fix `ArgumentError` when passing an empty Hash as tags.
12
+
9
13
  ## Version 3.6.0
10
14
 
11
15
  - Optimized datagram building.
@@ -79,7 +79,7 @@ module StatsD
79
79
  datagram << @default_tags
80
80
  end
81
81
 
82
- unless tags.nil?
82
+ unless tags.nil? || tags.empty?
83
83
  datagram << (@default_tags.nil? ? "|#" : ",")
84
84
  compile_tags(tags, datagram)
85
85
  end
@@ -49,7 +49,7 @@ module StatsD
49
49
  datagram << @default_tags
50
50
  end
51
51
 
52
- unless tags.nil?
52
+ unless tags.nil? || tags.empty?
53
53
  datagram << (@default_tags.nil? ? "|#" : ",")
54
54
  compile_tags(tags, datagram)
55
55
  end
@@ -80,7 +80,7 @@ module StatsD
80
80
  datagram << @default_tags
81
81
  end
82
82
 
83
- unless tags.nil?
83
+ unless tags.nil? || tags.empty?
84
84
  datagram << (@default_tags.nil? ? "|#" : ",")
85
85
  compile_tags(tags, datagram)
86
86
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module StatsD
4
4
  module Instrument
5
- VERSION = "3.6.0"
5
+ VERSION = "3.6.1"
6
6
  end
7
7
  end
@@ -76,6 +76,12 @@ class DatagramBuilderTest < Minitest::Test
76
76
  end
77
77
 
78
78
  def test_tags
79
+ datagram = @datagram_builder.d("foo", 10, nil, {})
80
+ assert_equal("foo:10|d", datagram)
81
+
82
+ datagram = @datagram_builder.d("foo", 10, nil, [])
83
+ assert_equal("foo:10|d", datagram)
84
+
79
85
  datagram = @datagram_builder.d("foo", 10, nil, ["foo", "bar"])
80
86
  assert_equal("foo:10|d|#foo,bar", datagram)
81
87
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statsd-instrument
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0
4
+ version: 3.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse Storimer
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-11-03 00:00:00.000000000 Z
13
+ date: 2023-11-06 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: A StatsD client for Ruby apps. Provides metaprogramming methods to inject
16
16
  StatsD instrumentation into your code.