expri 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/expri/dumper.rb +1 -1
- data/lib/expri/metric_set.rb +8 -6
- metadata +1 -1
data/lib/expri/dumper.rb
CHANGED
data/lib/expri/metric_set.rb
CHANGED
@@ -10,7 +10,7 @@ module Expri
|
|
10
10
|
|
11
11
|
def run(&block)
|
12
12
|
puts "run options=#{@options}" if @options[:verbose]
|
13
|
-
cache_current
|
13
|
+
cache_current
|
14
14
|
|
15
15
|
@metrics = []
|
16
16
|
instance_eval(&block)
|
@@ -18,7 +18,7 @@ module Expri
|
|
18
18
|
metric.put
|
19
19
|
end
|
20
20
|
|
21
|
-
destroy_extras
|
21
|
+
destroy_extras
|
22
22
|
end
|
23
23
|
|
24
24
|
private
|
@@ -28,11 +28,13 @@ module Expri
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def destroy_extras
|
31
|
-
puts "check_extras" if @options[:verbose]
|
32
31
|
extra_metrics = @current_metrics - @metrics.map(&:name)
|
33
|
-
extra_metrics
|
34
|
-
|
35
|
-
metric
|
32
|
+
puts "check_extras extras=#{extra_metrics}" if @options[:verbose]
|
33
|
+
if @options[:destroy_extras]
|
34
|
+
extra_metrics.each do |metric|
|
35
|
+
metric = Metric.new(metric, {}, @options)
|
36
|
+
metric.destroy
|
37
|
+
end
|
36
38
|
end
|
37
39
|
end
|
38
40
|
end
|