guard-annotate 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,12 +34,17 @@ Please read the {Guard usage docs}[https://github.com/guard/guard#readme]
34
34
 
35
35
  == Options
36
36
 
37
- You can disable desktop notifications with:
37
+ You can disable desktop notifications with (default is notifications are enabled):
38
38
 
39
39
  guard 'annotate', :notify => false do
40
40
  ...
41
41
  end
42
42
 
43
+ You can customize the placement of the annotations with (default is 'before'):
44
+
45
+ guard 'annotate', :position => 'before|after' do
46
+ ...
47
+ end
43
48
 
44
49
  == Development
45
50
 
@@ -11,6 +11,7 @@ module Guard
11
11
  super
12
12
 
13
13
  options[:notify] = true if options[:notify].nil?
14
+ options[:position] = 'before' if options[:position].nil?
14
15
  end
15
16
 
16
17
  def start
@@ -39,10 +40,14 @@ module Guard
39
40
  !!options[:notify]
40
41
  end
41
42
 
43
+ def annotation_position
44
+ options[:position]
45
+ end
46
+
42
47
  def run_annotate
43
48
  UI.info 'Running annotate', :reset => true
44
49
  started_at = Time.now
45
- @result = system('annotate --exclude tests,fixtures -p before')
50
+ @result = system("annotate --exclude tests,fixtures -p #{annotation_position}")
46
51
  Notifier::notify( @result, Time.now - started_at ) if notify?
47
52
  @result
48
53
  end
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  module Guard
3
3
  module AnnotateVersion
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
6
6
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: guard-annotate
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.2.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Craig P Jolicoeur