guard 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,10 @@
1
+ ## 0.6.1 - August 15, 2011
2
+
3
+ ### Bugs fixes:
4
+
5
+ - Pull request [#120](https://github.com/guard/guard/pull/120): remove guardfile_contents when re-evaluating so that the Guardfile gets reloaded correctly. ([@mordaroso][])
6
+ - Pull request [#119](https://github.com/guard/guard/pull/119): Dsl.evaluate_guardfile uses all groups if none specified. ([@ches][])
7
+
1
8
  ## 0.6.0 - August 13, 2011
2
9
 
3
10
  ### Bugs fixes:
@@ -194,8 +201,10 @@
194
201
  [@brainopia]: https://github.com/brainopia
195
202
  [@bronson]: https://github.com/bronson
196
203
  [@capotej]: https://github.com/capotej
204
+ [@ches]: https://github.com/ches
197
205
  [@chrisberkhout]: https://github.com/chrisberkhout
198
206
  [@dnagir]: https://github.com/dnagir
207
+ [@docwhat]: https://github.com/docwhat
199
208
  [@etehtsea]: https://github.com/etehtsea
200
209
  [@fnichol]: https://github.com/fnichol
201
210
  [@Gazer]: https://github.com/Gazer
@@ -208,6 +217,7 @@
208
217
  [@koshigoe]: https://github.com/koshigoe
209
218
  [@mcmire]: https://github.com/mcmire
210
219
  [@mislav]: https://github.com/mislav
220
+ [@mordaroso]: https://github.com/mordaroso
211
221
  [@nestegg]: https://github.com/nestegg
212
222
  [@netzpirat]: https://github.com/netzpirat
213
223
  [@nicksieger]: https://github.com/nicksieger
data/README.md CHANGED
@@ -15,7 +15,12 @@ Features
15
15
  * Automatic & Super fast (when polling is not used) files modifications detection (even new files are detected).
16
16
  * Growl notifications ([growlnotify](http://growl.info/documentation/growlnotify.php) & [growl gem](https://rubygems.org/gems/growl) required).
17
17
  * Libnotify notifications ([libnotify gem](https://rubygems.org/gems/libnotify) required).
18
- * Tested on Ruby 1.8.7, 1.9.2 && ree.
18
+ * Tested against Ruby 1.8.7, 1.9.2 and REE.
19
+
20
+ Screencast
21
+ ----------
22
+
23
+ Ryan Bates made a screencast on Guard, you can view it here: http://railscasts.com/episodes/264-guard
19
24
 
20
25
  Install
21
26
  -------
@@ -243,7 +248,7 @@ Required:
243
248
  Optional:
244
249
 
245
250
  * The `#watch` method allows you to define which files are supervised by this guard. An optional block can be added to overwrite the paths sent to the guard's `#run_on_change` method or to launch any arbitrary command.
246
- * The `#group` method allows you to group several guards together. Groups to be run can be specified with the Guard DSL option `--group` (or `-g`). This comes in handy especially when you have a huge Guardfile and want to focus your development on a certain part.
251
+ * The `#group` method allows you to group several guards together. Groups to be run can be specified with the Guard DSL option `--group` (or `-g`). This comes in handy especially when you have a huge Guardfile and want to focus your development on a certain part. Guards that don't belong to a group are considered global and are always run.
247
252
 
248
253
  Example:
249
254
 
@@ -14,6 +14,7 @@ module Guard
14
14
 
15
15
  def reevaluate_guardfile
16
16
  ::Guard.guards.clear
17
+ @@options.delete(:guardfile_contents)
17
18
  Dsl.evaluate_guardfile(@@options)
18
19
  msg = "Guardfile has been re-evaluated."
19
20
  UI.info(msg)
@@ -104,7 +105,8 @@ module Guard
104
105
  end
105
106
 
106
107
  def group(name, &guard_definition)
107
- guard_definition.call if guard_definition && (@@options[:group].empty? || @@options[:group].include?(name.to_s))
108
+ @groups = @@options[:group] || []
109
+ guard_definition.call if guard_definition && (@groups.empty? || @groups.include?(name.to_s))
108
110
  end
109
111
 
110
112
  def guard(name, options = {}, &watch_definition)
@@ -1,3 +1,3 @@
1
1
  module Guard
2
- VERSION = "0.6.0" unless defined? Guard::VERSION
2
+ VERSION = "0.6.1" unless defined? Guard::VERSION
3
3
  end
@@ -10,7 +10,7 @@
10
10
  Guard is a command line tool that easily handle events on files modifications\.
11
11
  .
12
12
  .SH "SYNOPSIS"
13
- guard \fIcommand\fR \fIoptions\fR
13
+ \fBguard <COMMAND> <OPTIONS>\fR
14
14
  .
15
15
  .SH "COMMANDS"
16
16
  .
@@ -21,103 +21,54 @@ Starts Guard\. This is the default command if none is provided\.
21
21
  The following options are available:
22
22
  .
23
23
  .P
24
- \fB\-c\fR/\fB\-\-clear\fR
25
- .
26
- .IP "" 4
27
- .
28
- .nf
29
-
30
- Clears the Shell after each change\.
31
- .
32
- .fi
33
- .
34
- .IP "" 0
24
+ \fB\-c\fR, \fB\-\-clear\fR Clears the Shell after each change\.
35
25
  .
36
26
  .P
37
- \fB\-n\fR/\fB\-\-notify\fR \fIflag\fR
38
- .
39
- .IP "" 4
40
- .
41
- .nf
42
-
43
- Disable notifications (Growl or Libnotify depending on your system)\.
44
- Note that notifications can also be disabled globally by setting a GUARD_NOTIFY environment variable to false\.
45
- The <flag> part can be passed to guard using true/false or t/f\.
46
- .
47
- .fi
48
- .
49
- .IP "" 0
27
+ \fB\-n\fR, \fB\-\-notify\fR \fIFLAG\fR Disable notifications (Growl or Libnotify depending on your system)\. Notifications can be disabled globally by setting a GUARD_NOTIFY environment variable to false\. FLAG can be \fBtrue\fR/\fBfalse\fR or \fBt\fR/\fBf\fR\.
50
28
  .
51
29
  .P
52
- \fB\-d\fR/\fB\-\-debug\fR
53
- .
54
- .IP "" 4
55
- .
56
- .nf
57
-
58
- Runs Guard in debug mode\.
59
- .
60
- .fi
61
- .
62
- .IP "" 0
30
+ \fB\-d\fR, \fB\-\-debug\fR Runs Guard in debug mode\.
63
31
  .
64
32
  .P
65
- \fB\-g\fR/\fB\-\-group\fR \fIgroup\fR \.\.\.
66
- .
67
- .IP "" 4
68
- .
69
- .nf
70
-
71
- Runs only the groups specified\.
72
- .
73
- .fi
74
- .
75
- .IP "" 0
33
+ \fB\-g\fR, \fB\-\-group\fR \fIGROUP1\fR \fIGROUP2\fR\.\.\. Runs only the groups specified by GROUP1, GROUP2 etc\. Groups name should be separated by spaces\. Guards that don\'t belong to a group are considered global and are always run\.
76
34
  .
77
35
  .P
78
- \fB\-w\fR/\fB\-\-watchdir\fR \fIfolder\fR
79
- .
80
- .IP "" 4
81
- .
82
- .nf
83
-
84
- Specify the directory to watch\.
85
- .
86
- .fi
87
- .
88
- .IP "" 0
36
+ \fB\-w\fR, \fB\-\-watchdir\fR \fIPATH\fR
89
37
  .
90
38
  .P
91
- \fB\-G\fR/\fB\-\-guardfile\fR \fIfile\fR
92
- .
93
- .IP "" 4
39
+ Tells Guard to watch PATH instead of \fB\./\fR\.
94
40
  .
95
- .nf
96
-
97
- Specify a Guardfile by giving its path\.
98
- .
99
- .fi
41
+ .P
42
+ \fB\-G\fR, \fB\-\-guardfile\fR \fIFILE\fR Tells Guard to use FILE as its Guardfile instead of \fB\./Guardfile\fR or \fB~/\.Guardfile\fR\.
100
43
  .
101
- .IP "" 0
44
+ .SS "init [GUARD]"
45
+ If no Guardfile is present in the current directory, creates an empty Guardfile\.
102
46
  .
103
- .SS "init [guard]"
104
- Add the requested guard\'s default Guardfile configuration to the current Guardfile\.
47
+ .P
48
+ If \fIGUARD\fR is present, add its default Guardfile configuration to the current Guardfile\. Note that \fIGUARD\fR is the guard\'s name without the \fBguard\-\fR prefix\. For instance to initialize guard\-rspec, run \fBguard init rspec\fR\.
105
49
  .
106
50
  .SS "list"
107
51
  Lists guards that can be used with the \fBinit\fR command\.
108
52
  .
109
- .SS "\-T/show"
53
+ .SS "\-T, show"
110
54
  List defined groups and guards for the current Guardfile\.
111
55
  .
112
- .SH "OPTIONS"
113
- .
114
- .TP
115
- \fB\-h\fR
56
+ .SS "\-h, help [COMMAND]"
116
57
  List all of Guard\'s available commands\.
117
58
  .
118
- .SS "start"
59
+ .P
60
+ If \fICOMMAND\fR is given, displays a specific help for \fITASK\fR\.
119
61
  .
120
62
  .SH "EXAMPLES"
63
+ Initialize Guard and a specific guard at the same time:
64
+ .
65
+ .P
66
+ \fB[bundle exec] guard init [rspec]\fR
67
+ .
68
+ .P
69
+ Run Guard:
70
+ .
71
+ .P
121
72
  \fB[bundle exec] guard [start] \-\-watchdir ~/dev \-\-guardfile ~/env/Guardfile \-\-clear \-\-group backend frontend \-\-notify false \-\-debug\fR
122
73
  .
123
74
  .P
@@ -57,7 +57,6 @@
57
57
  <a href="#DESCRIPTION">DESCRIPTION</a>
58
58
  <a href="#SYNOPSIS">SYNOPSIS</a>
59
59
  <a href="#COMMANDS">COMMANDS</a>
60
- <a href="#OPTIONS">OPTIONS</a>
61
60
  <a href="#EXAMPLES">EXAMPLES</a>
62
61
  <a href="#AUTHORS-CONTRIBUTORS">AUTHORS / CONTRIBUTORS</a>
63
62
  <a href="#WWW">WWW</a>
@@ -80,70 +79,68 @@
80
79
 
81
80
  <h2 id="SYNOPSIS">SYNOPSIS</h2>
82
81
 
83
- <p>guard <var>command</var> <var>options</var></p>
82
+ <p><code>guard &lt;COMMAND> &lt;OPTIONS></code></p>
84
83
 
85
84
  <h2 id="COMMANDS">COMMANDS</h2>
86
85
 
87
86
  <h3 id="start">start</h3>
88
87
 
89
- <p> Starts Guard. This is the default command if none is provided.</p>
88
+ <p>Starts Guard. This is the default command if none is provided.</p>
90
89
 
91
90
  <p>The following options are available:</p>
92
91
 
93
- <p> <code>-c</code>/<code>--clear</code></p>
92
+ <p><code>-c</code>, <code>--clear</code>
93
+ Clears the Shell after each change.</p>
94
94
 
95
- <pre><code> Clears the Shell after each change.
96
- </code></pre>
95
+ <p><code>-n</code>, <code>--notify</code> <var>FLAG</var>
96
+ Disable notifications (Growl or Libnotify depending on your system).
97
+ Notifications can be disabled globally by setting a GUARD_NOTIFY environment variable to false.
98
+ FLAG can be <code>true</code>/<code>false</code> or <code>t</code>/<code>f</code>.</p>
97
99
 
98
- <p> <code>-n</code>/<code>--notify</code> <var>flag</var></p>
100
+ <p><code>-d</code>, <code>--debug</code>
101
+ Runs Guard in debug mode.</p>
99
102
 
100
- <pre><code> Disable notifications (Growl or Libnotify depending on your system).
101
- Note that notifications can also be disabled globally by setting a GUARD_NOTIFY environment variable to false.
102
- The &lt;flag> part can be passed to guard using true/false or t/f.
103
- </code></pre>
103
+ <p><code>-g</code>, <code>--group</code> <var>GROUP1</var> <var>GROUP2</var>...
104
+ Runs only the groups specified by GROUP1, GROUP2 etc.
105
+ Groups name should be separated by spaces.
106
+ Guards that don't belong to a group are considered global and are always run.</p>
104
107
 
105
- <p> <code>-d</code>/<code>--debug</code></p>
108
+ <p><code>-w</code>, <code>--watchdir</code> <var>PATH</var></p>
106
109
 
107
- <pre><code> Runs Guard in debug mode.
108
- </code></pre>
110
+ <p>Tells Guard to watch PATH instead of <code>./</code>.</p>
109
111
 
110
- <p> <code>-g</code>/<code>--group</code> <var>group</var> ...</p>
112
+ <p><code>-G</code>, <code>--guardfile</code> <var>FILE</var>
113
+ Tells Guard to use FILE as its Guardfile instead of <code>./Guardfile</code> or <code>~/.Guardfile</code>.</p>
111
114
 
112
- <pre><code> Runs only the groups specified.
113
- </code></pre>
115
+ <h3 id="init-GUARD-">init [GUARD]</h3>
114
116
 
115
- <p> <code>-w</code>/<code>--watchdir</code> <var>folder</var></p>
117
+ <p>If no Guardfile is present in the current directory, creates an empty Guardfile.</p>
116
118
 
117
- <pre><code> Specify the directory to watch.
118
- </code></pre>
119
+ <p>If <var>GUARD</var> is present, add its default Guardfile configuration to the current Guardfile.
120
+ Note that <var>GUARD</var> is the guard's name without the <code>guard-</code> prefix.
121
+ For instance to initialize guard-rspec, run <code>guard init rspec</code>.</p>
119
122
 
120
- <p> <code>-G</code>/<code>--guardfile</code> <var>file</var></p>
121
-
122
- <pre><code> Specify a Guardfile by giving its path.
123
- </code></pre>
124
-
125
- <h3 id="init-guard-">init [guard]</h3>
123
+ <h3 id="list">list</h3>
126
124
 
127
- <p> Add the requested guard's default Guardfile configuration to the current Guardfile.</p>
125
+ <p>Lists guards that can be used with the <code>init</code> command.</p>
128
126
 
129
- <h3 id="list">list</h3>
127
+ <h3 id="-T-show">-T, show</h3>
130
128
 
131
- <p> Lists guards that can be used with the <code>init</code> command.</p>
129
+ <p>List defined groups and guards for the current Guardfile.</p>
132
130
 
133
- <h3 id="-T-show">-T/show</h3>
131
+ <h3 id="-h-help-COMMAND-">-h, help [COMMAND]</h3>
134
132
 
135
- <p> List defined groups and guards for the current Guardfile.</p>
133
+ <p>List all of Guard's available commands.</p>
136
134
 
137
- <h2 id="OPTIONS">OPTIONS</h2>
135
+ <p>If <var>COMMAND</var> is given, displays a specific help for <var>TASK</var>.</p>
138
136
 
139
- <dl>
140
- <dt class="flush"><code>-h</code></dt><dd>List all of Guard's available commands.</dd>
141
- </dl>
137
+ <h2 id="EXAMPLES">EXAMPLES</h2>
142
138
 
139
+ <p>Initialize Guard and a specific guard at the same time:</p>
143
140
 
144
- <h3 id="start">start</h3>
141
+ <p><code>[bundle exec] guard init [rspec]</code></p>
145
142
 
146
- <h2 id="EXAMPLES">EXAMPLES</h2>
143
+ <p>Run Guard:</p>
147
144
 
148
145
  <p><code>[bundle exec] guard [start] --watchdir ~/dev --guardfile ~/env/Guardfile --clear --group backend frontend --notify false --debug</code></p>
149
146
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-13 00:00:00.000000000 +02:00
13
- default_executable:
12
+ date: 2011-08-15 00:00:00.000000000Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: bundler
17
- requirement: &2151817180 !ruby/object:Gem::Requirement
16
+ requirement: &70208916582320 !ruby/object:Gem::Requirement
18
17
  none: false
19
18
  requirements:
20
19
  - - ! '>='
@@ -22,10 +21,10 @@ dependencies:
22
21
  version: '0'
23
22
  type: :development
24
23
  prerelease: false
25
- version_requirements: *2151817180
24
+ version_requirements: *70208916582320
26
25
  - !ruby/object:Gem::Dependency
27
26
  name: rspec
28
- requirement: &2151815560 !ruby/object:Gem::Requirement
27
+ requirement: &70208916581740 !ruby/object:Gem::Requirement
29
28
  none: false
30
29
  requirements:
31
30
  - - ~>
@@ -33,10 +32,10 @@ dependencies:
33
32
  version: 2.6.0
34
33
  type: :development
35
34
  prerelease: false
36
- version_requirements: *2151815560
35
+ version_requirements: *70208916581740
37
36
  - !ruby/object:Gem::Dependency
38
37
  name: guard-rspec
39
- requirement: &2151813940 !ruby/object:Gem::Requirement
38
+ requirement: &70208916581220 !ruby/object:Gem::Requirement
40
39
  none: false
41
40
  requirements:
42
41
  - - ~>
@@ -44,10 +43,10 @@ dependencies:
44
43
  version: 0.3.1
45
44
  type: :development
46
45
  prerelease: false
47
- version_requirements: *2151813940
46
+ version_requirements: *70208916581220
48
47
  - !ruby/object:Gem::Dependency
49
48
  name: thor
50
- requirement: &2151811280 !ruby/object:Gem::Requirement
49
+ requirement: &70208916580720 !ruby/object:Gem::Requirement
51
50
  none: false
52
51
  requirements:
53
52
  - - ~>
@@ -55,7 +54,7 @@ dependencies:
55
54
  version: 0.14.6
56
55
  type: :runtime
57
56
  prerelease: false
58
- version_requirements: *2151811280
57
+ version_requirements: *70208916580720
59
58
  description: Guard is a command line tool to easily handle events on file system modifications.
60
59
  email:
61
60
  - thibaud@thibaud.me
@@ -89,7 +88,6 @@ files:
89
88
  - man/guard.1
90
89
  - man/guard.1.html
91
90
  - README.md
92
- has_rdoc: true
93
91
  homepage: https://github.com/guard/guard
94
92
  licenses: []
95
93
  post_install_message:
@@ -110,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
108
  version: 1.3.6
111
109
  requirements: []
112
110
  rubyforge_project: guard
113
- rubygems_version: 1.6.2
111
+ rubygems_version: 1.8.7
114
112
  signing_key:
115
113
  specification_version: 3
116
114
  summary: Guard keeps an eye on your file modifications