inst_statsd 3.0.4 → 3.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/inst_statsd/event.rb +1 -1
- data/lib/inst_statsd/statsd.rb +4 -0
- data/lib/inst_statsd/version.rb +1 -1
- data/spec/inst_statsd/event_spec.rb +14 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f7ff23c72ad7a2d4055a5b511bc358d452d596b5a70b91b48dbab2837b57789
|
4
|
+
data.tar.gz: e90e0dafba21a6cd519ab4341963007132be3e7722bc81d8d013f250c3794cc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 721e8a6e1805deb8c63a2ccc9a69d29621e99d4e699f7faf9fac7d96e86396a358da68f49d391586bbda59414ce61143139f6bc551fdc8a85987c2fb7d579ec6
|
7
|
+
data.tar.gz: 57eabc93c85a1e6f2bd92632d8e1aa78ec365236c4d54f3ad3feffd934fba500f6357f4661b4172064376c825ff720bfde4f9428442858fa19d22f1e9350cad2
|
data/lib/inst_statsd/event.rb
CHANGED
@@ -57,7 +57,7 @@ module InstStatsd
|
|
57
57
|
|
58
58
|
def tags_from_opts(tags, type, dd_tags)
|
59
59
|
custom_tags = tags.merge(dd_tags)
|
60
|
-
custom_tags[:type] = type if SUPPORTED_TYPES.include? type
|
60
|
+
custom_tags[:type] = type.to_sym if SUPPORTED_TYPES.include? type&.to_sym
|
61
61
|
custom_tags.compact
|
62
62
|
end
|
63
63
|
end
|
data/lib/inst_statsd/statsd.rb
CHANGED
data/lib/inst_statsd/version.rb
CHANGED
@@ -105,6 +105,20 @@ RSpec.describe InstStatsd::Event do
|
|
105
105
|
end
|
106
106
|
end
|
107
107
|
|
108
|
+
context "with a valid type set as a string" do
|
109
|
+
let(:opts) { { type: "deploy" } }
|
110
|
+
|
111
|
+
it "sets the valid aggregation key" do
|
112
|
+
expect(instance).to receive(:event).with(
|
113
|
+
title,
|
114
|
+
text,
|
115
|
+
tags: { type: :deploy }
|
116
|
+
)
|
117
|
+
|
118
|
+
subject
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
108
122
|
context "with custom tags" do
|
109
123
|
let(:opts) { { tags: { project: "cool-project" } } }
|
110
124
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inst_statsd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Cloward
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-11-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aroi
|