librato-metrics 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +3 -0
- data/Gemfile +1 -1
- data/lib/librato/metrics/processor.rb +1 -0
- data/lib/librato/metrics/version.rb +1 -1
- data/spec/unit/metrics/queue_spec.rb +18 -0
- metadata +3 -3
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -82,6 +82,24 @@ module Librato
|
|
82
82
|
subject.queued.should equal_unordered(expected)
|
83
83
|
end
|
84
84
|
end
|
85
|
+
|
86
|
+
context "when dynamically changing prefix" do
|
87
|
+
it "should auto-append names" do
|
88
|
+
subject.add :bar => 12
|
89
|
+
subject.prefix = 'foo' # with string
|
90
|
+
subject.add :bar => 23
|
91
|
+
subject.prefix = :foo # with symbol
|
92
|
+
subject.add :bar => 34
|
93
|
+
subject.prefix = nil # unsetting
|
94
|
+
subject.add :bar => 45
|
95
|
+
expected = {:gauges => [
|
96
|
+
{:name => 'bar', :value => 12, :measure_time => @time},
|
97
|
+
{:name => 'foo.bar', :value => 23, :measure_time => @time},
|
98
|
+
{:name => 'foo.bar', :value => 34, :measure_time => @time},
|
99
|
+
{:name => 'bar', :value => 45, :measure_time => @time}]}
|
100
|
+
subject.queued.should equal_unordered(expected)
|
101
|
+
end
|
102
|
+
end
|
85
103
|
end
|
86
104
|
|
87
105
|
context "with multiple metrics" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: librato-metrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -215,7 +215,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
215
215
|
version: '0'
|
216
216
|
segments:
|
217
217
|
- 0
|
218
|
-
hash:
|
218
|
+
hash: -3606609391443233543
|
219
219
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
220
220
|
none: false
|
221
221
|
requirements:
|