metrics 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/metrics/backend/test.rb +7 -7
- data/lib/metrics/provider.rb +1 -0
- data/lib/metrics/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b26074298faafd29789b9d427673f76c593a069c4e856f3fe2b9f9d8d10f5e43
|
4
|
+
data.tar.gz: a8f90e0e6cb4c6149be3862c76d5c42d52cada561c98c638cf3e3d8bb83ed7f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d19300ba3d4fffcac5d3d5c988e2b57e28ed54ae8904215bb58ed7a3ff9d17cabbf64fb14f1dcdab6721f78eff6ee95fff012dbb4b0b7982ca6f11051390ba84
|
7
|
+
data.tar.gz: 9732393526909a7b3231fc7cb1601e045978cfc31452ecdb8fcb7bc7c78d16207bdada5d31b5e26f7f38bc3b060cc37283672d128c4747172bbb8106cd07c539
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/metrics/backend/test.rb
CHANGED
@@ -36,10 +36,10 @@ module Metrics
|
|
36
36
|
end
|
37
37
|
|
38
38
|
tags&.each do |tag|
|
39
|
-
raise ArgumentError, "Invalid tag
|
39
|
+
raise ArgumentError, "Invalid tag (must be String): #{tag.inspect}!" unless tag.is_a?(String)
|
40
40
|
|
41
41
|
unless tag =~ VALID_TAG
|
42
|
-
raise ArgumentError, "Invalid tag
|
42
|
+
raise ArgumentError, "Invalid tag (must match #{VALID_TAG}): #{tag.inspect}!"
|
43
43
|
end
|
44
44
|
end
|
45
45
|
end
|
@@ -48,28 +48,28 @@ module Metrics
|
|
48
48
|
module Interface
|
49
49
|
def metric(name, type, description: nil, unit: nil, &block)
|
50
50
|
unless name.is_a?(String)
|
51
|
-
raise ArgumentError, "Invalid name
|
51
|
+
raise ArgumentError, "Invalid name (must be String): #{name.inspect}!"
|
52
52
|
end
|
53
53
|
|
54
54
|
unless name =~ VALID_METRIC_NAME
|
55
|
-
raise ArgumentError, "Invalid name
|
55
|
+
raise ArgumentError, "Invalid name (must match #{VALID_METRIC_NAME}): #{name.inspect}!"
|
56
56
|
end
|
57
57
|
|
58
58
|
unless type.is_a?(Symbol)
|
59
|
-
raise ArgumentError, "Invalid type
|
59
|
+
raise ArgumentError, "Invalid type (must be Symbol): #{type.inspect}!"
|
60
60
|
end
|
61
61
|
|
62
62
|
# Description is optional but must be string if given:
|
63
63
|
if description
|
64
64
|
unless description.is_a?(String)
|
65
|
-
raise ArgumentError, "Invalid description
|
65
|
+
raise ArgumentError, "Invalid description (must be String): #{description.inspect}!"
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
69
|
# Unit is optional but must be string if given:
|
70
70
|
if unit
|
71
71
|
unless unit.is_a?(String)
|
72
|
-
raise ArgumentError, "Invalid unit
|
72
|
+
raise ArgumentError, "Invalid unit (must be String): #{unit.inspect}!"
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
data/lib/metrics/provider.rb
CHANGED
data/lib/metrics/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
RAOsIl+HOBTb252nx1kIRN5hqQx272AJCbCjKx8egcUQKffFVVCI0nye09v5CK+a
|
37
37
|
HiLJ8VOFx6w=
|
38
38
|
-----END CERTIFICATE-----
|
39
|
-
date:
|
39
|
+
date: 2022-01-27 00:00:00.000000000 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
metadata.gz.sig
CHANGED
Binary file
|