mandy 0.2.14 → 0.2.15
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/task.rb +5 -1
- metadata +1 -1
data/lib/task.rb
CHANGED
@@ -3,6 +3,7 @@ module Mandy
|
|
3
3
|
JSON_PAYLOAD_KEY = "json"
|
4
4
|
KEY_VALUE_SEPERATOR = "\t" unless defined?(KEY_VALUE_SEPERATOR)
|
5
5
|
NUMERIC_PADDING = 16
|
6
|
+
DEFAULT_COUNTER_GROUP = 'Mandy Counters'
|
6
7
|
|
7
8
|
attr_reader :input_format, :output_format
|
8
9
|
|
@@ -35,7 +36,10 @@ module Mandy
|
|
35
36
|
STDERR.puts("reporter:status:#{message}")
|
36
37
|
end
|
37
38
|
|
38
|
-
def
|
39
|
+
def increment_counter(group, counter=nil, count=1)
|
40
|
+
group, counter = DEFAULT_COUNTER_GROUP, group if counter.nil?
|
41
|
+
group, counter, count = DEFAULT_COUNTER_GROUP, group, counter if counter.is_a?(Numeric)
|
42
|
+
|
39
43
|
STDERR.puts("reporter:counter:#{group},#{counter},#{count}")
|
40
44
|
end
|
41
45
|
|