guard-annotate 0.9.2 → 0.9.3

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.
@@ -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]
@@ -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
- @result = system("bundle exec annotate #{annotate_tests_flags} -p #{annotation_position}")
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
 
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  module Guard
3
3
  module AnnotateVersion
4
- VERSION = "0.9.2"
4
+ VERSION = "0.9.3"
5
5
  end
6
6
  end
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.2
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-01-03 00:00:00.000000000 Z
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: &2153258740 !ruby/object:Gem::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: *2153258740
24
+ version_requirements: *70356167575420
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: annotate
27
- requirement: &2153258000 !ruby/object:Gem::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: *2153258000
35
+ version_requirements: *70356167574940
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &2153251220 !ruby/object:Gem::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: *2153251220
46
+ version_requirements: *70356167574480
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: guard-rspec
49
- requirement: &2153250320 !ruby/object:Gem::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: *2153250320
57
+ version_requirements: *70356167574020
58
58
  description: Guard::Annotate automatically runs the annotate gem when needed
59
59
  email:
60
60
  - cpjolicoeur@gmail.com