mandy 0.2.14 → 0.2.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/task.rb +5 -1
  2. metadata +1 -1
@@ -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 update_counter(group, counter, count)
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mandy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.14
4
+ version: 0.2.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Kent