guard-annotate 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +6 -1
- data/lib/guard/annotate.rb +6 -1
- data/lib/guard/annotate/version.rb +1 -1
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -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
|
|
data/lib/guard/annotate.rb
CHANGED
@@ -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(
|
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
|