formatted-metrics 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/metrics/configuration.rb +2 -1
- data/lib/metrics/formatters/l2met.rb +5 -5
- data/lib/metrics/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c3d04bf2c7178e37e3289af6ddcdeb0962b54d6
|
4
|
+
data.tar.gz: 53c8792c4c4ba882b9a6e1293ccbad8285542504
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56b3c01345d6928e6c3d1192c2ad54de27cb77e8efa15f2bb0d6fa1e7ccdf49cbd98509fb61c074518287916c70defc920997d997f6a1a8d8617211f81ba7010
|
7
|
+
data.tar.gz: ef0bab7a3c46565b26c6726bfff7ac06dfff6dd9e553aaa46664cf31b5579f41075eeb01494fb49933d252c92a6229e0d61818dfd42261784c01d79302af3c6b
|
@@ -22,11 +22,7 @@ module Metrics::Formatters
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def full_source(source=nil)
|
25
|
-
|
26
|
-
[configuration.source, source].join('.')
|
27
|
-
else
|
28
|
-
configuration.source
|
29
|
-
end
|
25
|
+
[configuration.source, source].reject { |s| blank?(s) }.join('.')
|
30
26
|
end
|
31
27
|
|
32
28
|
def measurement(instrumenter)
|
@@ -34,5 +30,9 @@ module Metrics::Formatters
|
|
34
30
|
value = value.round(PRECISION) if value.is_a?(Float)
|
35
31
|
"#{instrumenter.type}##{instrumenter.metric}=#{value}#{instrumenter.units}"
|
36
32
|
end
|
33
|
+
|
34
|
+
def blank?(string)
|
35
|
+
string.nil? || string.empty?
|
36
|
+
end
|
37
37
|
end
|
38
38
|
end
|
data/lib/metrics/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: formatted-metrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric J. Holmes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|