guard-annotate 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +6 -0
- data/lib/guard/annotate.rb +9 -2
- data/lib/guard/annotate/version.rb +1 -1
- metadata +10 -10
data/README.rdoc
CHANGED
@@ -67,6 +67,12 @@ You can disable run at start with (default is true):
|
|
67
67
|
...
|
68
68
|
end
|
69
69
|
|
70
|
+
You can annotate indexes on your models with (default is false):
|
71
|
+
|
72
|
+
guard 'annotate', :show_indexes => true
|
73
|
+
...
|
74
|
+
end
|
75
|
+
|
70
76
|
== Development
|
71
77
|
|
72
78
|
- Source hosed at {GitHub}[https://github.com/cpjolicoeur/guard-annotate]
|
data/lib/guard/annotate.rb
CHANGED
@@ -15,6 +15,7 @@ module Guard
|
|
15
15
|
options[:tests] = false if options[:tests].nil?
|
16
16
|
options[:routes] = false if options[:routes].nil?
|
17
17
|
options[:run_at_start] = true if options[:run_at_start].nil?
|
18
|
+
options[:show_indexes] = false if options[:show_indexes].nil?
|
18
19
|
end
|
19
20
|
|
20
21
|
def start
|
@@ -55,15 +56,21 @@ module Guard
|
|
55
56
|
options[:tests] ? "" : "--exclude tests,fixtures"
|
56
57
|
end
|
57
58
|
|
59
|
+
def show_indexes?
|
60
|
+
options[:show_indexes]
|
61
|
+
end
|
62
|
+
|
58
63
|
def run_annotate
|
59
64
|
UI.info 'Running annotate', :reset => true
|
60
65
|
started_at = Time.now
|
61
|
-
|
66
|
+
annotate_models_command = "bundle exec annotate #{annotate_tests_flags} -p #{annotation_position}"
|
67
|
+
annotate_models_command += " --show-indexes" if show_indexes?
|
68
|
+
@result = system(annotate_models_command)
|
62
69
|
Notifier::notify( @result, Time.now - started_at ) if notify?
|
63
70
|
|
64
71
|
if annotate_routes?
|
65
72
|
started_at = Time.now
|
66
|
-
@result = system("bundle exec annotate -r")
|
73
|
+
@result = system("bundle exec annotate -r -p #{annotation_position}")
|
67
74
|
Notifier::notify( @result, Time.now - started_at ) if notify?
|
68
75
|
end
|
69
76
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-annotate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-03-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: guard
|
16
|
-
requirement: &
|
16
|
+
requirement: &70356167575420 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.2.2
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70356167575420
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: annotate
|
27
|
-
requirement: &
|
27
|
+
requirement: &70356167574940 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 2.4.0
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70356167574940
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70356167574480 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 2.6.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70356167574480
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: guard-rspec
|
49
|
-
requirement: &
|
49
|
+
requirement: &70356167574020 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: 0.3.1
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70356167574020
|
58
58
|
description: Guard::Annotate automatically runs the annotate gem when needed
|
59
59
|
email:
|
60
60
|
- cpjolicoeur@gmail.com
|