guard 1.4.0 → 2.18.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.
- checksums.yaml +7 -0
- data/CHANGELOG.md +1 -677
- data/LICENSE +4 -2
- data/README.md +91 -753
- data/bin/_guard-core +11 -0
- data/bin/guard +108 -3
- data/lib/guard/aruba_adapter.rb +59 -0
- data/lib/guard/cli/environments/bundler.rb +22 -0
- data/lib/guard/cli/environments/evaluate_only.rb +35 -0
- data/lib/guard/cli/environments/valid.rb +69 -0
- data/lib/guard/cli.rb +129 -128
- data/lib/guard/commander.rb +104 -0
- data/lib/guard/commands/all.rb +37 -0
- data/lib/guard/commands/change.rb +31 -0
- data/lib/guard/commands/notification.rb +26 -0
- data/lib/guard/commands/pause.rb +29 -0
- data/lib/guard/commands/reload.rb +36 -0
- data/lib/guard/commands/scope.rb +38 -0
- data/lib/guard/commands/show.rb +24 -0
- data/lib/guard/config.rb +18 -0
- data/lib/guard/deprecated/dsl.rb +45 -0
- data/lib/guard/deprecated/evaluator.rb +39 -0
- data/lib/guard/deprecated/guard.rb +328 -0
- data/lib/guard/deprecated/guardfile.rb +84 -0
- data/lib/guard/deprecated/watcher.rb +27 -0
- data/lib/guard/dsl.rb +332 -363
- data/lib/guard/dsl_describer.rb +132 -122
- data/lib/guard/dsl_reader.rb +51 -0
- data/lib/guard/group.rb +34 -14
- data/lib/guard/guardfile/evaluator.rb +232 -0
- data/lib/guard/guardfile/generator.rb +128 -0
- data/lib/guard/guardfile.rb +24 -60
- data/lib/guard/interactor.rb +31 -255
- data/lib/guard/internals/debugging.rb +68 -0
- data/lib/guard/internals/groups.rb +40 -0
- data/lib/guard/internals/helpers.rb +13 -0
- data/lib/guard/internals/plugins.rb +53 -0
- data/lib/guard/internals/queue.rb +51 -0
- data/lib/guard/internals/scope.rb +121 -0
- data/lib/guard/internals/session.rb +180 -0
- data/lib/guard/internals/state.rb +25 -0
- data/lib/guard/internals/tracing.rb +33 -0
- data/lib/guard/internals/traps.rb +10 -0
- data/lib/guard/jobs/base.rb +21 -0
- data/lib/guard/jobs/pry_wrapper.rb +336 -0
- data/lib/guard/jobs/sleep.rb +26 -0
- data/lib/guard/notifier.rb +46 -212
- data/lib/guard/options.rb +22 -0
- data/lib/guard/plugin.rb +303 -0
- data/lib/guard/plugin_util.rb +191 -0
- data/lib/guard/rake_task.rb +42 -0
- data/lib/guard/runner.rb +80 -140
- data/lib/guard/templates/Guardfile +14 -0
- data/lib/guard/terminal.rb +13 -0
- data/lib/guard/ui/colors.rb +56 -0
- data/lib/guard/ui/config.rb +70 -0
- data/lib/guard/ui/logger.rb +30 -0
- data/lib/guard/ui.rb +163 -128
- data/lib/guard/version.rb +1 -2
- data/lib/guard/watcher/pattern/deprecated_regexp.rb +45 -0
- data/lib/guard/watcher/pattern/match_result.rb +18 -0
- data/lib/guard/watcher/pattern/matcher.rb +33 -0
- data/lib/guard/watcher/pattern/pathname_path.rb +15 -0
- data/lib/guard/watcher/pattern/simple_path.rb +23 -0
- data/lib/guard/watcher/pattern.rb +24 -0
- data/lib/guard/watcher.rb +52 -95
- data/lib/guard.rb +108 -376
- data/lib/tasks/releaser.rb +116 -0
- data/man/guard.1 +12 -9
- data/man/guard.1.html +18 -12
- metadata +148 -77
- data/images/guard.png +0 -0
- data/lib/guard/guard.rb +0 -156
- data/lib/guard/hook.rb +0 -120
- data/lib/guard/interactors/coolline.rb +0 -64
- data/lib/guard/interactors/helpers/completion.rb +0 -32
- data/lib/guard/interactors/helpers/terminal.rb +0 -46
- data/lib/guard/interactors/readline.rb +0 -94
- data/lib/guard/interactors/simple.rb +0 -19
- data/lib/guard/notifiers/emacs.rb +0 -69
- data/lib/guard/notifiers/gntp.rb +0 -118
- data/lib/guard/notifiers/growl.rb +0 -99
- data/lib/guard/notifiers/growl_notify.rb +0 -92
- data/lib/guard/notifiers/libnotify.rb +0 -96
- data/lib/guard/notifiers/notifysend.rb +0 -84
- data/lib/guard/notifiers/rb_notifu.rb +0 -102
- data/lib/guard/notifiers/terminal_notifier.rb +0 -66
- data/lib/guard/notifiers/tmux.rb +0 -69
- data/lib/guard/version.rbc +0 -130
data/man/guard.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "GUARD" "1" "
|
4
|
+
.TH "GUARD" "1" "November 2014" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBguard\fR \- Guard keeps an eye on your file modifications\.
|
@@ -27,10 +27,13 @@ The following options are available:
|
|
27
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\.
|
28
28
|
.
|
29
29
|
.P
|
30
|
-
\fB\-
|
30
|
+
\fB\-g\fR, \fB\-\-group\fR \fIGROUP1\fR \fIGROUP2\fR\.\.\. Scopes the Guard actions to the groups specified by GROUP1, GROUP2, etc\. Group names should be separated by spaces\. Plugins that don\'t belong to a group are considered global and are always run\.
|
31
31
|
.
|
32
32
|
.P
|
33
|
-
\fB\-
|
33
|
+
\fB\-P\fR, \fB\-\-plugin\fR \fIPLUGIN1\fR \fIPLUGIN2\fR\.\.\. Scopes the Guard actions to the plugins specified by PLUGIN1, PLUGIN2, etc\. Plugin names should be separated by spaces\.
|
34
|
+
.
|
35
|
+
.P
|
36
|
+
\fB\-d\fR, \fB\-\-debug\fR Runs Guard in debug mode\.
|
34
37
|
.
|
35
38
|
.P
|
36
39
|
\fB\-w\fR, \fB\-\-watchdir\fR \fIPATH\fR Tells Guard to watch PATH instead of \fB\./\fR\.
|
@@ -45,14 +48,14 @@ The following options are available:
|
|
45
48
|
\fB\-B\fR, \fB\-\-no\-bundler\-warning\fR Turn off warning when Bundler is not present\.
|
46
49
|
.
|
47
50
|
.P
|
48
|
-
\fB\-\-show\-deprecations\fR Turn on deprecation warnings\.
|
49
|
-
.
|
50
|
-
.P
|
51
51
|
\fB\-l\fR, \fB\-\-latency\fR Overwrite Listen\'s default latency\.
|
52
52
|
.
|
53
53
|
.P
|
54
54
|
\fB\-p\fR, \fB\-\-force\-polling\fR Force usage of the Listen polling listener\.
|
55
55
|
.
|
56
|
+
.P
|
57
|
+
\fB\-y\fR, \fB\-\-wait\-for\-delay\fR Overwrite Listen\'s default \fBwait_for_delay\fR, useful for kate\-like editors through ssh access\.
|
58
|
+
.
|
56
59
|
.SS "init [GUARDS]"
|
57
60
|
If no Guardfile is present in the current directory, creates an empty Guardfile\.
|
58
61
|
.
|
@@ -95,11 +98,11 @@ Thibaud Guillaume\-Gentil is the main author\.
|
|
95
98
|
.P
|
96
99
|
A list of contributors based on all commits can be found here: https://github\.com/guard/guard/contributors
|
97
100
|
.
|
98
|
-
.
|
99
|
-
|
101
|
+
.SH "CHANGELOG"
|
102
|
+
The changelog can be found at: https://github\.com/guard/guard/blob/master/CHANGELOG\.md
|
100
103
|
.
|
101
104
|
.P
|
102
105
|
This manual has been written by Remy Coutable\.
|
103
106
|
.
|
104
107
|
.SH "WWW"
|
105
|
-
|
108
|
+
http://guardgem\.org/
|
data/man/guard.1.html
CHANGED
@@ -59,6 +59,7 @@
|
|
59
59
|
<a href="#COMMANDS">COMMANDS</a>
|
60
60
|
<a href="#EXAMPLES">EXAMPLES</a>
|
61
61
|
<a href="#AUTHORS-CONTRIBUTORS">AUTHORS / CONTRIBUTORS</a>
|
62
|
+
<a href="#CHANGELOG">CHANGELOG</a>
|
62
63
|
<a href="#WWW">WWW</a>
|
63
64
|
</div>
|
64
65
|
|
@@ -97,14 +98,18 @@
|
|
97
98
|
Notifications can be disabled globally by setting a GUARD_NOTIFY environment variable to false.
|
98
99
|
FLAG can be <code>true</code>/<code>false</code> or <code>t</code>/<code>f</code>.</p>
|
99
100
|
|
101
|
+
<p><code>-g</code>, <code>--group</code> <var>GROUP1</var> <var>GROUP2</var>...
|
102
|
+
Scopes the Guard actions to the groups specified by GROUP1, GROUP2, etc.
|
103
|
+
Group names should be separated by spaces.
|
104
|
+
Plugins that don't belong to a group are considered global and are always run.</p>
|
105
|
+
|
106
|
+
<p><code>-P</code>, <code>--plugin</code> <var>PLUGIN1</var> <var>PLUGIN2</var>...
|
107
|
+
Scopes the Guard actions to the plugins specified by PLUGIN1, PLUGIN2, etc.
|
108
|
+
Plugin names should be separated by spaces.</p>
|
109
|
+
|
100
110
|
<p><code>-d</code>, <code>--debug</code>
|
101
111
|
Runs Guard in debug mode.</p>
|
102
112
|
|
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>
|
107
|
-
|
108
113
|
<p><code>-w</code>, <code>--watchdir</code> <var>PATH</var>
|
109
114
|
Tells Guard to watch PATH instead of <code>./</code>.</p>
|
110
115
|
|
@@ -117,15 +122,15 @@
|
|
117
122
|
<p><code>-B</code>, <code>--no-bundler-warning</code>
|
118
123
|
Turn off warning when Bundler is not present.</p>
|
119
124
|
|
120
|
-
<p><code>--show-deprecations</code>
|
121
|
-
Turn on deprecation warnings.</p>
|
122
|
-
|
123
125
|
<p><code>-l</code>, <code>--latency</code>
|
124
126
|
Overwrite Listen's default latency.</p>
|
125
127
|
|
126
128
|
<p><code>-p</code>, <code>--force-polling</code>
|
127
129
|
Force usage of the Listen polling listener.</p>
|
128
130
|
|
131
|
+
<p><code>-y</code>, <code>--wait-for-delay</code>
|
132
|
+
Overwrite Listen's default <code>wait_for_delay</code>, useful for kate-like editors through ssh access.</p>
|
133
|
+
|
129
134
|
<h3 id="init-GUARDS-">init [GUARDS]</h3>
|
130
135
|
|
131
136
|
<p>If no Guardfile is present in the current directory, creates an empty Guardfile.</p>
|
@@ -169,19 +174,20 @@ For instance to initialize guard-rspec, run <code>guard init rspec</code>.</p>
|
|
169
174
|
<p>A list of contributors based on all commits can be found here:
|
170
175
|
https://github.com/guard/guard/contributors</p>
|
171
176
|
|
172
|
-
<
|
173
|
-
|
177
|
+
<h2 id="CHANGELOG">CHANGELOG</h2>
|
178
|
+
|
179
|
+
<p>The changelog can be found at: https://github.com/guard/guard/blob/master/CHANGELOG.md</p>
|
174
180
|
|
175
181
|
<p>This manual has been written by Remy Coutable.</p>
|
176
182
|
|
177
183
|
<h2 id="WWW">WWW</h2>
|
178
184
|
|
179
|
-
<p>
|
185
|
+
<p>http://guardgem.org/</p>
|
180
186
|
|
181
187
|
|
182
188
|
<ol class='man-decor man-foot man foot'>
|
183
189
|
<li class='tl'></li>
|
184
|
-
<li class='tc'>
|
190
|
+
<li class='tc'>November 2014</li>
|
185
191
|
<li class='tr'>guard(1)</li>
|
186
192
|
</ol>
|
187
193
|
|
metadata
CHANGED
@@ -1,170 +1,241 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
prerelease:
|
4
|
+
version: 2.18.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Thibaud Guillaume-Gentil
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2021-07-19 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: thor
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
19
|
+
version: 0.18.1
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
26
|
+
version: 0.18.1
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: listen
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
33
|
+
version: '2.7'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '4.0'
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '2.7'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '4.0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: pry
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.13.0
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 0.13.0
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: lumberjack
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 1.0.12
|
68
|
+
- - "<"
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '2.0'
|
71
|
+
type: :runtime
|
72
|
+
prerelease: false
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 1.0.12
|
78
|
+
- - "<"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '2.0'
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: formatador
|
83
|
+
requirement: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: 0.2.4
|
38
88
|
type: :runtime
|
39
89
|
prerelease: false
|
40
90
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
91
|
requirements:
|
43
|
-
- -
|
92
|
+
- - ">="
|
44
93
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.4
|
94
|
+
version: 0.2.4
|
46
95
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
96
|
+
name: nenv
|
48
97
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
98
|
requirements:
|
51
|
-
- -
|
99
|
+
- - "~>"
|
52
100
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
54
|
-
type: :
|
101
|
+
version: '0.1'
|
102
|
+
type: :runtime
|
55
103
|
prerelease: false
|
56
104
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
105
|
requirements:
|
59
|
-
- -
|
106
|
+
- - "~>"
|
60
107
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
108
|
+
version: '0.1'
|
62
109
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
110
|
+
name: shellany
|
64
111
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
112
|
requirements:
|
67
|
-
- - ~>
|
113
|
+
- - "~>"
|
68
114
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
70
|
-
type: :
|
115
|
+
version: '0.0'
|
116
|
+
type: :runtime
|
71
117
|
prerelease: false
|
72
118
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
119
|
requirements:
|
75
|
-
- - ~>
|
120
|
+
- - "~>"
|
76
121
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
122
|
+
version: '0.0'
|
78
123
|
- !ruby/object:Gem::Dependency
|
79
|
-
name:
|
124
|
+
name: notiffany
|
80
125
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
126
|
requirements:
|
83
|
-
- - ~>
|
127
|
+
- - "~>"
|
84
128
|
- !ruby/object:Gem::Version
|
85
|
-
version:
|
86
|
-
type: :
|
129
|
+
version: '0.0'
|
130
|
+
type: :runtime
|
87
131
|
prerelease: false
|
88
132
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
133
|
requirements:
|
91
|
-
- - ~>
|
134
|
+
- - "~>"
|
92
135
|
- !ruby/object:Gem::Version
|
93
|
-
version:
|
136
|
+
version: '0.0'
|
94
137
|
description: Guard is a command line tool to easily handle events on file system modifications.
|
95
138
|
email:
|
96
|
-
- thibaud@thibaud.
|
139
|
+
- thibaud@thibaud.gg
|
97
140
|
executables:
|
98
141
|
- guard
|
142
|
+
- _guard-core
|
99
143
|
extensions: []
|
100
144
|
extra_rdoc_files: []
|
101
145
|
files:
|
146
|
+
- CHANGELOG.md
|
147
|
+
- LICENSE
|
148
|
+
- README.md
|
149
|
+
- bin/_guard-core
|
102
150
|
- bin/guard
|
103
151
|
- images/failed.png
|
104
|
-
- images/guard.png
|
105
152
|
- images/pending.png
|
106
153
|
- images/success.png
|
154
|
+
- lib/guard.rb
|
155
|
+
- lib/guard/aruba_adapter.rb
|
107
156
|
- lib/guard/cli.rb
|
157
|
+
- lib/guard/cli/environments/bundler.rb
|
158
|
+
- lib/guard/cli/environments/evaluate_only.rb
|
159
|
+
- lib/guard/cli/environments/valid.rb
|
160
|
+
- lib/guard/commander.rb
|
161
|
+
- lib/guard/commands/all.rb
|
162
|
+
- lib/guard/commands/change.rb
|
163
|
+
- lib/guard/commands/notification.rb
|
164
|
+
- lib/guard/commands/pause.rb
|
165
|
+
- lib/guard/commands/reload.rb
|
166
|
+
- lib/guard/commands/scope.rb
|
167
|
+
- lib/guard/commands/show.rb
|
168
|
+
- lib/guard/config.rb
|
169
|
+
- lib/guard/deprecated/dsl.rb
|
170
|
+
- lib/guard/deprecated/evaluator.rb
|
171
|
+
- lib/guard/deprecated/guard.rb
|
172
|
+
- lib/guard/deprecated/guardfile.rb
|
173
|
+
- lib/guard/deprecated/watcher.rb
|
108
174
|
- lib/guard/dsl.rb
|
109
175
|
- lib/guard/dsl_describer.rb
|
176
|
+
- lib/guard/dsl_reader.rb
|
110
177
|
- lib/guard/group.rb
|
111
|
-
- lib/guard/guard.rb
|
112
178
|
- lib/guard/guardfile.rb
|
113
|
-
- lib/guard/
|
179
|
+
- lib/guard/guardfile/evaluator.rb
|
180
|
+
- lib/guard/guardfile/generator.rb
|
114
181
|
- lib/guard/interactor.rb
|
115
|
-
- lib/guard/
|
116
|
-
- lib/guard/
|
117
|
-
- lib/guard/
|
118
|
-
- lib/guard/
|
119
|
-
- lib/guard/
|
182
|
+
- lib/guard/internals/debugging.rb
|
183
|
+
- lib/guard/internals/groups.rb
|
184
|
+
- lib/guard/internals/helpers.rb
|
185
|
+
- lib/guard/internals/plugins.rb
|
186
|
+
- lib/guard/internals/queue.rb
|
187
|
+
- lib/guard/internals/scope.rb
|
188
|
+
- lib/guard/internals/session.rb
|
189
|
+
- lib/guard/internals/state.rb
|
190
|
+
- lib/guard/internals/tracing.rb
|
191
|
+
- lib/guard/internals/traps.rb
|
192
|
+
- lib/guard/jobs/base.rb
|
193
|
+
- lib/guard/jobs/pry_wrapper.rb
|
194
|
+
- lib/guard/jobs/sleep.rb
|
120
195
|
- lib/guard/notifier.rb
|
121
|
-
- lib/guard/
|
122
|
-
- lib/guard/
|
123
|
-
- lib/guard/
|
124
|
-
- lib/guard/
|
125
|
-
- lib/guard/notifiers/libnotify.rb
|
126
|
-
- lib/guard/notifiers/notifysend.rb
|
127
|
-
- lib/guard/notifiers/rb_notifu.rb
|
128
|
-
- lib/guard/notifiers/terminal_notifier.rb
|
129
|
-
- lib/guard/notifiers/tmux.rb
|
196
|
+
- lib/guard/options.rb
|
197
|
+
- lib/guard/plugin.rb
|
198
|
+
- lib/guard/plugin_util.rb
|
199
|
+
- lib/guard/rake_task.rb
|
130
200
|
- lib/guard/runner.rb
|
131
201
|
- lib/guard/templates/Guardfile
|
202
|
+
- lib/guard/terminal.rb
|
132
203
|
- lib/guard/ui.rb
|
204
|
+
- lib/guard/ui/colors.rb
|
205
|
+
- lib/guard/ui/config.rb
|
206
|
+
- lib/guard/ui/logger.rb
|
133
207
|
- lib/guard/version.rb
|
134
|
-
- lib/guard/version.rbc
|
135
208
|
- lib/guard/watcher.rb
|
136
|
-
- lib/guard.rb
|
137
|
-
-
|
138
|
-
-
|
209
|
+
- lib/guard/watcher/pattern.rb
|
210
|
+
- lib/guard/watcher/pattern/deprecated_regexp.rb
|
211
|
+
- lib/guard/watcher/pattern/match_result.rb
|
212
|
+
- lib/guard/watcher/pattern/matcher.rb
|
213
|
+
- lib/guard/watcher/pattern/pathname_path.rb
|
214
|
+
- lib/guard/watcher/pattern/simple_path.rb
|
215
|
+
- lib/tasks/releaser.rb
|
139
216
|
- man/guard.1
|
140
217
|
- man/guard.1.html
|
141
|
-
|
142
|
-
|
143
|
-
|
218
|
+
homepage: http://guardgem.org
|
219
|
+
licenses:
|
220
|
+
- MIT
|
221
|
+
metadata: {}
|
144
222
|
post_install_message:
|
145
223
|
rdoc_options: []
|
146
224
|
require_paths:
|
147
225
|
- lib
|
148
226
|
required_ruby_version: !ruby/object:Gem::Requirement
|
149
|
-
none: false
|
150
227
|
requirements:
|
151
|
-
- -
|
228
|
+
- - ">="
|
152
229
|
- !ruby/object:Gem::Version
|
153
|
-
version:
|
154
|
-
segments:
|
155
|
-
- 0
|
156
|
-
hash: 1379407495203457243
|
230
|
+
version: 1.9.3
|
157
231
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
158
|
-
none: false
|
159
232
|
requirements:
|
160
|
-
- -
|
233
|
+
- - ">="
|
161
234
|
- !ruby/object:Gem::Version
|
162
|
-
version:
|
235
|
+
version: '0'
|
163
236
|
requirements: []
|
164
|
-
|
165
|
-
rubygems_version: 1.8.24
|
237
|
+
rubygems_version: 3.1.4
|
166
238
|
signing_key:
|
167
|
-
specification_version:
|
239
|
+
specification_version: 4
|
168
240
|
summary: Guard keeps an eye on your file modifications
|
169
241
|
test_files: []
|
170
|
-
has_rdoc:
|
data/images/guard.png
DELETED
Binary file
|
data/lib/guard/guard.rb
DELETED
@@ -1,156 +0,0 @@
|
|
1
|
-
module Guard
|
2
|
-
|
3
|
-
# Base class that every Guard plugin implementation must inherit from.
|
4
|
-
#
|
5
|
-
# Guard will trigger the `start`, `stop`, `reload`, `run_all` and `run_on_changes`
|
6
|
-
# (`run_on_additions`, `run_on_modifications` and `run_on_removals`) task methods
|
7
|
-
# depending on user interaction and file modification.
|
8
|
-
#
|
9
|
-
# `run_on_changes` could be implemented to handle all the changes task case (additions,
|
10
|
-
# modifications, removals) in once, or each task can be implemented separatly with a
|
11
|
-
# specific behavior.
|
12
|
-
#
|
13
|
-
# In each of these Guard task methods you have to implement some work when you want to
|
14
|
-
# support this kind of task. The return value of each Guard task method is not evaluated
|
15
|
-
# by Guard, but I'll be passed to the "_end" hook for further evaluation. You can
|
16
|
-
# throw `:task_has_failed` to indicate that your Guard plugin method was not successful,
|
17
|
-
# and successive Guard plugin tasks will be aborted when the group has set the `:halt_on_fail`
|
18
|
-
# option.
|
19
|
-
#
|
20
|
-
# @see Guard::Hook
|
21
|
-
# @see Guard::Group
|
22
|
-
#
|
23
|
-
# @example Throw :task_has_failed
|
24
|
-
#
|
25
|
-
# def run_all
|
26
|
-
# if !runner.run(['all'])
|
27
|
-
# throw :task_has_failed
|
28
|
-
# end
|
29
|
-
# end
|
30
|
-
#
|
31
|
-
# Each Guard plugin should provide a template Guardfile located within the Gem
|
32
|
-
# at `lib/guard/guard-name/templates/Guardfile`.
|
33
|
-
#
|
34
|
-
# By default all watchers for a Guard plugin have to return strings of paths to the
|
35
|
-
# Guard, but if your Guard plugin wants to allow any return value from a watcher,
|
36
|
-
# you can set the `any_return` option to true.
|
37
|
-
#
|
38
|
-
# If one of those methods raise an exception other than `:task_has_failed`,
|
39
|
-
# the Guard::GuardName instance will be removed from the active guards.
|
40
|
-
#
|
41
|
-
class Guard
|
42
|
-
require 'guard/hook'
|
43
|
-
require 'guard/ui'
|
44
|
-
|
45
|
-
include ::Guard::Hook
|
46
|
-
|
47
|
-
attr_accessor :watchers, :options, :group
|
48
|
-
|
49
|
-
# Initializes a Guard plugin.
|
50
|
-
#
|
51
|
-
# @param [Array<Guard::Watcher>] watchers the Guard plugin file watchers
|
52
|
-
# @param [Hash] options the custom Guard plugin options
|
53
|
-
# @option options [Symbol] group the group this Guard plugin belongs to
|
54
|
-
# @option options [Boolean] any_return allow any object to be returned from a watcher
|
55
|
-
#
|
56
|
-
def initialize(watchers = [], options = {})
|
57
|
-
@group = options[:group] ? options.delete(:group).to_sym : :default
|
58
|
-
@watchers, @options = watchers, options
|
59
|
-
end
|
60
|
-
|
61
|
-
# Initialize the Guard plugin. This will copy the Guardfile template inside the Guard plugin gem.
|
62
|
-
# The template Guardfile must be located within the Gem at `lib/guard/guard-name/templates/Guardfile`.
|
63
|
-
#
|
64
|
-
# @param [String] name the name of the Guard plugin
|
65
|
-
#
|
66
|
-
def self.init(name)
|
67
|
-
if ::Guard::Dsl.guardfile_include?(name)
|
68
|
-
::Guard::UI.info "Guardfile already includes #{ name } guard"
|
69
|
-
else
|
70
|
-
content = File.read('Guardfile')
|
71
|
-
guard = File.read("#{ ::Guard.locate_guard(name) }/lib/guard/#{ name }/templates/Guardfile")
|
72
|
-
|
73
|
-
File.open('Guardfile', 'wb') do |f|
|
74
|
-
f.puts(content)
|
75
|
-
f.puts("")
|
76
|
-
f.puts(guard)
|
77
|
-
end
|
78
|
-
|
79
|
-
::Guard::UI.info "#{ name } guard added to Guardfile, feel free to edit it"
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
# Call once when Guard starts. Please override initialize method to init stuff.
|
84
|
-
#
|
85
|
-
# @raise [:task_has_failed] when start has failed
|
86
|
-
# @return [Object] the task result
|
87
|
-
#
|
88
|
-
# @!method start
|
89
|
-
|
90
|
-
# Called when `stop|quit|exit|s|q|e + enter` is pressed (when Guard quits).
|
91
|
-
#
|
92
|
-
# @raise [:task_has_failed] when stop has failed
|
93
|
-
# @return [Object] the task result
|
94
|
-
#
|
95
|
-
# @!method stop
|
96
|
-
|
97
|
-
# Called when `reload|r|z + enter` is pressed.
|
98
|
-
# This method should be mainly used for "reload" (really!) actions like reloading passenger/spork/bundler/...
|
99
|
-
#
|
100
|
-
# @raise [:task_has_failed] when reload has failed
|
101
|
-
# @return [Object] the task result
|
102
|
-
#
|
103
|
-
# @!method reload
|
104
|
-
|
105
|
-
# Called when just `enter` is pressed
|
106
|
-
# This method should be principally used for long action like running all specs/tests/...
|
107
|
-
#
|
108
|
-
# @raise [:task_has_failed] when run_all has failed
|
109
|
-
# @return [Object] the task result
|
110
|
-
#
|
111
|
-
# @!method run_all
|
112
|
-
|
113
|
-
# Default behaviour on file(s) changes that the Guard plugin watches.
|
114
|
-
#
|
115
|
-
# @param [Array<String>] paths the changes files or paths
|
116
|
-
# @raise [:task_has_failed] when run_on_changes has failed
|
117
|
-
# @return [Object] the task result
|
118
|
-
#
|
119
|
-
# @!method run_on_changes(paths)
|
120
|
-
|
121
|
-
# Called on file(s) additions that the Guard plugin watches.
|
122
|
-
#
|
123
|
-
# @param [Array<String>] paths the changes files or paths
|
124
|
-
# @raise [:task_has_failed] when run_on_additions has failed
|
125
|
-
# @return [Object] the task result
|
126
|
-
#
|
127
|
-
# @!method run_on_additions(paths)
|
128
|
-
|
129
|
-
# Called on file(s) modifications that the Guard plugin watches.
|
130
|
-
#
|
131
|
-
# @param [Array<String>] paths the changes files or paths
|
132
|
-
# @raise [:task_has_failed] when run_on_modifications has failed
|
133
|
-
# @return [Object] the task result
|
134
|
-
#
|
135
|
-
# @!method run_on_modifications(paths)
|
136
|
-
|
137
|
-
# Called on file(s) removals that the Guard plugin watches.
|
138
|
-
#
|
139
|
-
# @param [Array<String>] paths the changes files or paths
|
140
|
-
# @raise [:task_has_failed] when run_on_removals has failed
|
141
|
-
# @return [Object] the task result
|
142
|
-
#
|
143
|
-
# @!method run_on_removals(paths)
|
144
|
-
|
145
|
-
# Convert plugin to string representation. The
|
146
|
-
# default just uses the plugin class name.
|
147
|
-
#
|
148
|
-
# @return [String] the string representation
|
149
|
-
#
|
150
|
-
def to_s
|
151
|
-
self.class.to_s
|
152
|
-
end
|
153
|
-
|
154
|
-
end
|
155
|
-
|
156
|
-
end
|