guard 1.7.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -2
- data/README.md +41 -8
- data/bin/fsevent_watch_guard +0 -0
- data/lib/guard.rb +43 -40
- data/lib/guard/cli.rb +1 -1
- data/lib/guard/dsl.rb +2 -2
- data/lib/guard/interactor.rb +6 -0
- data/lib/guard/notifiers/file_notifier.rb +1 -4
- data/lib/guard/notifiers/tmux.rb +19 -10
- data/lib/guard/runner.rb +10 -6
- data/lib/guard/version.rb +1 -1
- metadata +5 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0de85bc26fc21a2ad3a06dc13ca89561c4c2d428
|
4
|
+
data.tar.gz: 38374af487597e7332a568ae647640b4cfd47a1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7275e29868fee3b25c54bdab3693376bc093278bf0424cc7cd3ff2bdeb7be004a82be2a7fd4394d0b1eca76c0ce7ad2effc42b1f29544cb7d4c6ff8393a06693
|
7
|
+
data.tar.gz: 0b8d5b8e1be413c4052de5619e874d20085f3a929660b76ed542d2c98c81a3b4bd34cf957a1bd88cbf3e207942e1ddd23cc09b06e834ce3f6fc291dbc16f39da
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,31 @@
|
|
1
|
+
## 1.8.0 - 20 April, 2013
|
2
|
+
|
3
|
+
### Improvements
|
4
|
+
|
5
|
+
- [#416][] Support .guardrc file on the folder from which Guard is executed as well. ([@Nerian][])
|
6
|
+
- Display an info message when a plugin throws `:task_has_failed`. ([@rymai][])
|
7
|
+
- Ensure compatibility with new Listen's API. ([@rymai][])
|
8
|
+
|
9
|
+
### Bug fixes
|
10
|
+
|
11
|
+
- [#413][], [#414][] NoMethodError exceptions raised by plugins are no longer silently discarded. ([@aspiers][])
|
12
|
+
- [#414][] Test suite now runs cleanly within a `tmux` session. ([@aspiers][])
|
13
|
+
- Specs and Travis builds no longer require `guard-rspec`. ([@aspiers][], [@rymai][])
|
14
|
+
- [#414][] Various minor issues with the test suite were fixed. ([@aspiers][])
|
15
|
+
- [#409][], [#410][] Fix some typos and broken URLs. ([@aspiers][], [@rymai][])
|
16
|
+
|
17
|
+
### Process changes
|
18
|
+
|
19
|
+
- Guard has an open commit bit policy: Anyone with an accepted pull
|
20
|
+
request gets added as a repository collaborator. ([@netzpirat][])
|
21
|
+
|
1
22
|
## 1.7.0 - 28 March, 2013
|
2
23
|
|
3
24
|
### Improvements
|
4
25
|
|
5
|
-
- [#
|
26
|
+
- [#407][], [#408][] Add file notifier to write notifications to a configured file. ([@amiel][])
|
6
27
|
- Change the current work dir to the `watchdir`. ([@netzpirat][])
|
7
|
-
-
|
28
|
+
- [#400][] Drop dependency on `terminal-table` and use `formatador` instead. ([@netzpirat][])
|
8
29
|
|
9
30
|
### Bug fixes
|
10
31
|
|
@@ -735,9 +756,18 @@ The Listen integration has been supervised by [@thibaudgg][] and executed by [@M
|
|
735
756
|
[#401]: https://github.com/guard/guard/issues/401
|
736
757
|
[#402]: https://github.com/guard/guard/issues/402
|
737
758
|
[#406]: https://github.com/guard/guard/issues/406
|
759
|
+
[#407]: https://github.com/guard/guard/issues/407
|
760
|
+
[#408]: https://github.com/guard/guard/issues/408
|
761
|
+
[#409]: https://github.com/guard/guard/issues/409
|
762
|
+
[#410]: https://github.com/guard/guard/issues/410
|
763
|
+
[#413]: https://github.com/guard/guard/issues/413
|
764
|
+
[#414]: https://github.com/guard/guard/issues/414
|
765
|
+
[#416]: https://github.com/guard/guard/issues/416
|
738
766
|
[@Gazer]: https://github.com/Gazer
|
739
767
|
[@Maher4Ever]: https://github.com/Maher4Ever
|
768
|
+
[@Nerian]: https://github.com/Nerian
|
740
769
|
[@alandipert]: https://github.com/alandipert
|
770
|
+
[@amiel]: https://github.com/amiel
|
741
771
|
[@anithri]: https://github.com/anithri
|
742
772
|
[@ashleyconnor]: https://github.com/ashleyconnor
|
743
773
|
[@aspiers]: https://github.com/aspiers
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Guard [![Gem Version](https://badge.fury.io/rb/guard.png)](http://badge.fury.io/rb/guard) [![Build Status](https://
|
1
|
+
Guard [![Gem Version](https://badge.fury.io/rb/guard.png)](http://badge.fury.io/rb/guard) [![Build Status](https://travis-ci.org/guard/guard.png?branch=master)](https://travis-ci.org/guard/guard) [![Dependency Status](https://gemnasium.com/guard/guard.png)](https://gemnasium.com/guard/guard) [![Code Climate](https://codeclimate.com/github/guard/guard.png)](https://codeclimate.com/github/guard/guard) [![Coverage Status](https://coveralls.io/repos/guard/guard/badge.png?branch=master)](https://coveralls.io/r/guard/guard)
|
2
2
|
=====
|
3
3
|
|
4
4
|
<img src="http://img515.imageshack.us/img515/1358/guardicon.png" alt="Guard Icon" align="right" />
|
@@ -24,14 +24,16 @@ Features
|
|
24
24
|
|
25
25
|
* File system changes handled by our awesome [Listen](https://github.com/guard/listen) gem.
|
26
26
|
* Support for visual system notifications.
|
27
|
-
* Huge eco-system with [more than
|
27
|
+
* Huge eco-system with [more than 190](https://rubygems.org/search?query=guard-) guard plugins.
|
28
28
|
* Tested against Ruby 1.8.7, 1.9.2, 1.9.3, 2.0.0, REE and the latest versions of JRuby & Rubinius.
|
29
29
|
|
30
30
|
Screencast
|
31
31
|
----------
|
32
32
|
|
33
|
-
|
34
|
-
|
33
|
+
Two nice introduction screen casts to Guard are available that helps you get started:
|
34
|
+
|
35
|
+
* [Guard is Your Best Friend](http://net.tutsplus.com/tutorials/tools-and-tips/guard-is-your-best-friend) on Net Tuts+
|
36
|
+
* [Guard](http://railscasts.com/episodes/264-guard) on RailsCast
|
35
37
|
|
36
38
|
Installation
|
37
39
|
------------
|
@@ -106,6 +108,11 @@ group :development do
|
|
106
108
|
end
|
107
109
|
```
|
108
110
|
|
111
|
+
## Interrupt handling
|
112
|
+
|
113
|
+
If the Pry interactor is used, then `Ctrl-C` is delegated to Pry to exit continuation and `Ctrl-D` to exit Guard.
|
114
|
+
Without interactor, `Ctrl-C` exits Guard and `Ctrl-D` is ignored.
|
115
|
+
|
109
116
|
## System notifications
|
110
117
|
|
111
118
|
You can configure Guard to make use of the following system notification libraries:
|
@@ -233,7 +240,7 @@ end
|
|
233
240
|
|
234
241
|
* Runs on any platform with Emacs + emacsclient (http://www.emacswiki.org/emacs/EmacsClient)
|
235
242
|
|
236
|
-
|
243
|
+
#### TMux
|
237
244
|
|
238
245
|
* To use TMux notifications, you have to start Guard within a [TMux](http://tmux.sourceforge.net/) session.
|
239
246
|
|
@@ -265,7 +272,7 @@ You can use nice powerline chars here if you have that configured.
|
|
265
272
|
|
266
273
|
You can get the message history by using `Ctrl+b ~` (where `Ctrl+b` is your key to activate TMux).
|
267
274
|
|
268
|
-
|
275
|
+
#### File
|
269
276
|
|
270
277
|
* You can also have Guard write notifications to a file. Each notification will
|
271
278
|
overwrite the file. This allows other commands to be run based on the status
|
@@ -690,6 +697,22 @@ $ guard -g specs
|
|
690
697
|
|
691
698
|
Guard plugins that don't belong to a group are considered global and are always run.
|
692
699
|
|
700
|
+
Another neat use of groups is to group dependant plugins and stop processing if one fails. In order
|
701
|
+
to make this work, the group needs to have the `halt_on_fail` option enabled and the Guard plugin
|
702
|
+
needs to throw `:task_has_failed` to indicate that the action was not successful.
|
703
|
+
|
704
|
+
```ruby
|
705
|
+
group :specs, :halt_on_fail => true do
|
706
|
+
guard :rspec do
|
707
|
+
watch(/.../)
|
708
|
+
end
|
709
|
+
|
710
|
+
guard :cucumber do
|
711
|
+
watch(/.../)
|
712
|
+
end
|
713
|
+
end
|
714
|
+
```
|
715
|
+
|
693
716
|
### scope
|
694
717
|
|
695
718
|
The `scope` method allows you to define the default plugin or group scope for Guard, if not
|
@@ -942,15 +965,25 @@ Development
|
|
942
965
|
Pull requests are very welcome! Please try to follow these simple rules if applicable:
|
943
966
|
|
944
967
|
* Please create a topic branch for every separate change you make.
|
945
|
-
* Make sure your patches are well tested. All specs
|
968
|
+
* Make sure your patches are well tested. All specs must pass on [Travis CI](https://travis-ci.org/guard/guard).
|
946
969
|
* Update the [Yard](http://yardoc.org/) documentation.
|
947
970
|
* Update the [README](https://github.com/guard/guard/blob/master/README.md).
|
948
|
-
* Update the [CHANGELOG](https://github.com/guard/guard/blob/master/CHANGELOG.md) for noteworthy changes
|
971
|
+
* Update the [CHANGELOG](https://github.com/guard/guard/blob/master/CHANGELOG.md) for noteworthy changes (don't forget to run `bundle exec pimpmychangelog` and watch the magic happen)!
|
949
972
|
* Please **do not change** the version number.
|
950
973
|
|
951
974
|
For questions please join us in our [Google group](http://groups.google.com/group/guard-dev) or on
|
952
975
|
`#guard` (irc.freenode.net).
|
953
976
|
|
977
|
+
### Open Commit Bit
|
978
|
+
|
979
|
+
Guard has an open commit bit policy: Anyone with an accepted pull request gets added as a repository collaborator.
|
980
|
+
Please try to follow these simple rules:
|
981
|
+
|
982
|
+
* Commit directly onto the master branch only for typos, improvements to the readme and documentation (please add
|
983
|
+
`[ci skip]` to the commit message).
|
984
|
+
* Create a feature branch and open a pull-request early for any new features to get feedback.
|
985
|
+
* Make sure you adhere to the general pull request rules above.
|
986
|
+
|
954
987
|
### Author
|
955
988
|
|
956
989
|
[Thibaud Guillaume-Gentil](https://github.com/thibaudgg) ([@thibaudgg](http://twitter.com/thibaudgg))
|
Binary file
|
data/lib/guard.rb
CHANGED
@@ -52,33 +52,18 @@ module Guard
|
|
52
52
|
@scope = { :plugins => [], :groups => [] }
|
53
53
|
|
54
54
|
Dir.chdir(@watchdir)
|
55
|
-
|
56
|
-
if options[:debug]
|
57
|
-
Thread.abort_on_exception = true
|
58
|
-
::Guard::UI.options[:level] = :debug
|
59
|
-
debug_command_execution
|
60
|
-
end
|
61
|
-
|
62
55
|
::Guard::UI.clear(:force => true)
|
56
|
+
setup_debug
|
63
57
|
deprecated_options_warning
|
64
58
|
|
65
59
|
setup_groups
|
66
60
|
setup_guards
|
67
61
|
setup_listener
|
68
62
|
setup_signal_traps
|
63
|
+
setup_from_guardfile
|
64
|
+
setup_scopes
|
69
65
|
|
70
|
-
|
71
|
-
::Guard::UI.error 'No guards found in Guardfile, please add at least one.' if @guards.empty?
|
72
|
-
|
73
|
-
if @options[:group]
|
74
|
-
@scope[:groups] = @options[:group].map { |g| ::Guard.groups(g) }
|
75
|
-
end
|
76
|
-
|
77
|
-
if @options[:plugin]
|
78
|
-
@scope[:plugins] = @options[:plugin].map { |p| ::Guard.guards(p) }
|
79
|
-
end
|
80
|
-
|
81
|
-
runner.deprecation_warning if @options[:show_deprecations]
|
66
|
+
runner.deprecation_warning if options[:show_deprecations]
|
82
67
|
|
83
68
|
setup_notifier
|
84
69
|
setup_interactor
|
@@ -86,6 +71,14 @@ module Guard
|
|
86
71
|
self
|
87
72
|
end
|
88
73
|
|
74
|
+
def setup_debug
|
75
|
+
if options[:debug]
|
76
|
+
Thread.abort_on_exception = true
|
77
|
+
::Guard::UI.options[:level] = :debug
|
78
|
+
debug_command_execution
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
89
82
|
# Initialize the groups array with the `:default` group.
|
90
83
|
#
|
91
84
|
# @see Guard.groups
|
@@ -102,6 +95,25 @@ module Guard
|
|
102
95
|
@guards = []
|
103
96
|
end
|
104
97
|
|
98
|
+
# Initializes the listener and registers a callback for changes.
|
99
|
+
#
|
100
|
+
def setup_listener
|
101
|
+
listener_callback = lambda do |modified, added, removed|
|
102
|
+
::Guard::Dsl.reevaluate_guardfile if ::Guard::Watcher.match_guardfile?(modified)
|
103
|
+
|
104
|
+
::Guard.within_preserved_state do
|
105
|
+
runner.run_on_changes(modified, added, removed)
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
listener_options = { :relative_paths => true }
|
110
|
+
%w[latency force_polling].each do |option|
|
111
|
+
listener_options[option.to_sym] = options[option] if options.key?(option)
|
112
|
+
end
|
113
|
+
|
114
|
+
@listener = Listen.to(@watchdir, listener_options).change(&listener_callback)
|
115
|
+
end
|
116
|
+
|
105
117
|
# Sets up traps to catch signals used to control Guard.
|
106
118
|
#
|
107
119
|
# Currently two signals are caught:
|
@@ -131,23 +143,14 @@ module Guard
|
|
131
143
|
end
|
132
144
|
end
|
133
145
|
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
::Guard::Dsl.reevaluate_guardfile if ::Guard::Watcher.match_guardfile?(modified)
|
139
|
-
|
140
|
-
::Guard.within_preserved_state do
|
141
|
-
runner.run_on_changes(modified, added, removed)
|
142
|
-
end
|
143
|
-
end
|
144
|
-
|
145
|
-
listener_options = { :relative_paths => true }
|
146
|
-
%w[latency force_polling].each do |option|
|
147
|
-
listener_options[option.to_sym] = options[option] if options.key?(option)
|
148
|
-
end
|
146
|
+
def setup_from_guardfile
|
147
|
+
::Guard::Dsl.evaluate_guardfile(options)
|
148
|
+
::Guard::UI.error 'No guards found in Guardfile, please add at least one.' if @guards.empty?
|
149
|
+
end
|
149
150
|
|
150
|
-
|
151
|
+
def setup_scopes
|
152
|
+
scope[:groups] = options[:group].map { |g| ::Guard.groups(g) } if options[:group]
|
153
|
+
scope[:plugins] = options[:plugin].map { |p| ::Guard.guards(p) } if options[:plugin]
|
151
154
|
end
|
152
155
|
|
153
156
|
# Enables or disables the notifier based on user's configurations.
|
@@ -188,7 +191,7 @@ module Guard
|
|
188
191
|
::Guard::UI.debug 'Guard starts all plugins'
|
189
192
|
runner.run(:start)
|
190
193
|
::Guard::UI.info "Guard is now watching at '#{ @watchdir }'"
|
191
|
-
listener.start
|
194
|
+
listener.start
|
192
195
|
end
|
193
196
|
end
|
194
197
|
|
@@ -201,7 +204,7 @@ module Guard
|
|
201
204
|
::Guard::Notifier.turn_off
|
202
205
|
::Guard::UI.info 'Bye bye...', :reset => true
|
203
206
|
listener.stop
|
204
|
-
|
207
|
+
@running = false
|
205
208
|
end
|
206
209
|
end
|
207
210
|
|
@@ -397,11 +400,11 @@ module Guard
|
|
397
400
|
require "guard/#{ name.downcase }" if try_require
|
398
401
|
self.const_get(self.constants.find { |c| c.to_s == const_name } || self.constants.find { |c| c.to_s.downcase == const_name.downcase })
|
399
402
|
rescue TypeError
|
400
|
-
|
403
|
+
if try_require
|
404
|
+
::Guard::UI.error "Could not find class Guard::#{ const_name.capitalize }"
|
405
|
+
else
|
401
406
|
try_require = true
|
402
407
|
retry
|
403
|
-
else
|
404
|
-
::Guard::UI.error "Could not find class Guard::#{ const_name.capitalize }"
|
405
408
|
end
|
406
409
|
rescue LoadError => loadError
|
407
410
|
unless fail_gracefully
|
data/lib/guard/cli.rb
CHANGED
@@ -163,7 +163,7 @@ module Guard
|
|
163
163
|
return if options[:bare]
|
164
164
|
|
165
165
|
if guard_names.empty?
|
166
|
-
::Guard::Guardfile
|
166
|
+
::Guard::Guardfile.initialize_all_templates
|
167
167
|
else
|
168
168
|
guard_names.each do |guard_name|
|
169
169
|
::Guard::Guardfile.initialize_template(guard_name)
|
data/lib/guard/dsl.rb
CHANGED
@@ -45,10 +45,10 @@ module Guard
|
|
45
45
|
Starting with Guard v1.1 the use of the 'ignore_paths' Guardfile DSL method is deprecated.
|
46
46
|
|
47
47
|
Please replace that method with the better 'ignore' or/and 'filter' methods.
|
48
|
-
Documentation on the README: https://github.com/guard/guard#
|
48
|
+
Documentation on the README: https://github.com/guard/guard#ignore
|
49
49
|
EOS
|
50
50
|
|
51
|
-
# Deprecation message for the `
|
51
|
+
# Deprecation message for the `interactor` method
|
52
52
|
INTERACTOR_DEPRECATION = <<-EOS.gsub(/^\s*/, '')
|
53
53
|
Starting with Guard v1.4 the use of the 'interactor' Guardfile DSL method is only used to
|
54
54
|
disable or pass options to the Pry interactor. All other usages are deprecated.
|
data/lib/guard/interactor.rb
CHANGED
@@ -103,6 +103,7 @@ module Guard
|
|
103
103
|
# Add Pry hooks:
|
104
104
|
#
|
105
105
|
# * Load `~/.guardrc` within each new Pry session.
|
106
|
+
# * Load project's `.guardrc` within each new Pry session.
|
106
107
|
# * Restore prompt after each evaluation.
|
107
108
|
#
|
108
109
|
def add_hooks
|
@@ -112,6 +113,11 @@ module Guard
|
|
112
113
|
end
|
113
114
|
end
|
114
115
|
|
116
|
+
Pry.config.hooks.add_hook :when_started, :load_project_guard_rc do
|
117
|
+
project_guard_rc = Dir.pwd + '/.guardrc'
|
118
|
+
load project_guard_rc if File.exist?(project_guard_rc)
|
119
|
+
end
|
120
|
+
|
115
121
|
if stty_exists?
|
116
122
|
Pry.config.hooks.add_hook :after_eval, :restore_visibility do
|
117
123
|
system('stty echo 2>/dev/null')
|
@@ -16,9 +16,6 @@ module Guard
|
|
16
16
|
|
17
17
|
# Test if the file notification option is available?
|
18
18
|
#
|
19
|
-
# REVIEW: This could test if there is a path provided in options, but
|
20
|
-
# we don't get options in available?.
|
21
|
-
#
|
22
19
|
# @param [Boolean] silent true if no error messages should be shown
|
23
20
|
# @param [Hash] options notifier options
|
24
21
|
# @return [Boolean] the availability status
|
@@ -27,7 +24,7 @@ module Guard
|
|
27
24
|
options.has_key?(:path)
|
28
25
|
end
|
29
26
|
|
30
|
-
# Write the notification to a file. By default it writes type,
|
27
|
+
# Write the notification to a file. By default it writes type, title, and
|
31
28
|
# message separated by newlines.
|
32
29
|
#
|
33
30
|
# @param [String] type the notification type. Either 'success', 'pending', 'failed' or 'notify'
|
data/lib/guard/notifiers/tmux.rb
CHANGED
@@ -65,7 +65,7 @@ module Guard
|
|
65
65
|
color = tmux_color(type, options)
|
66
66
|
color_location = options[:color_location] || DEFAULTS[:color_location]
|
67
67
|
|
68
|
-
|
68
|
+
run_client "set #{ color_location } #{ color }"
|
69
69
|
|
70
70
|
show_message = options[:display_message] || DEFAULTS[:display_message]
|
71
71
|
display_message(type, title, message, options) if show_message
|
@@ -98,10 +98,10 @@ module Guard
|
|
98
98
|
formatted_message = message.split("\n").join(separator)
|
99
99
|
display_message = message_format % [title, formatted_message]
|
100
100
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
101
|
+
run_client "set display-time #{ display_time * 1000 }"
|
102
|
+
run_client "set message-fg #{ message_color }"
|
103
|
+
run_client "set message-bg #{ color }"
|
104
|
+
run_client "display-message '#{ display_message }'"
|
105
105
|
end
|
106
106
|
|
107
107
|
# Get the Tmux color for the notification type.
|
@@ -138,31 +138,40 @@ module Guard
|
|
138
138
|
@options_stored = true
|
139
139
|
end
|
140
140
|
|
141
|
-
|
141
|
+
run_client "set quiet on"
|
142
142
|
end
|
143
143
|
|
144
144
|
# Notification stopping. Restore the previous Tmux state
|
145
145
|
# if available (existing options are restored, new options
|
146
|
-
# are unset) and
|
146
|
+
# are unset) and unquiet the Tmux output.
|
147
147
|
#
|
148
148
|
def turn_off(options = { })
|
149
149
|
if @options_stored
|
150
150
|
@options_store.each do |key, value|
|
151
151
|
if value
|
152
|
-
|
152
|
+
run_client "set #{ key } #{ value }"
|
153
153
|
else
|
154
|
-
|
154
|
+
run_client "set -u #{ key }"
|
155
155
|
end
|
156
156
|
end
|
157
157
|
|
158
158
|
reset_options_store
|
159
159
|
end
|
160
160
|
|
161
|
-
|
161
|
+
run_client 'set quiet off'
|
162
162
|
end
|
163
163
|
|
164
164
|
private
|
165
165
|
|
166
|
+
def system(args)
|
167
|
+
args += " >/dev/null 2>&1" if ENV['GUARD_ENV'] == 'test'
|
168
|
+
super
|
169
|
+
end
|
170
|
+
|
171
|
+
def run_client(args)
|
172
|
+
system("#{ DEFAULTS[:client] } #{args}")
|
173
|
+
end
|
174
|
+
|
166
175
|
# Reset the internal Tmux options store defaults.
|
167
176
|
#
|
168
177
|
def reset_options_store
|
data/lib/guard/runner.rb
CHANGED
@@ -50,8 +50,8 @@ module Guard
|
|
50
50
|
#
|
51
51
|
def run(task, scopes = {})
|
52
52
|
Lumberjack.unit_of_work do
|
53
|
-
|
54
|
-
run_supervised_task(guard, task)
|
53
|
+
scoped_guards(scopes) do |guard|
|
54
|
+
run_supervised_task(guard, task) if guard.respond_to?(task)
|
55
55
|
end
|
56
56
|
end
|
57
57
|
end
|
@@ -101,8 +101,6 @@ module Guard
|
|
101
101
|
result
|
102
102
|
end
|
103
103
|
|
104
|
-
rescue NoMethodError
|
105
|
-
# Do nothing
|
106
104
|
rescue Exception => ex
|
107
105
|
::Guard::UI.error("#{ guard.class.name } failed to achieve its <#{ task.to_s }>, exception was:" +
|
108
106
|
"\n#{ ex.class }: #{ ex.message }\n#{ ex.backtrace.join("\n") }")
|
@@ -128,7 +126,7 @@ module Guard
|
|
128
126
|
return :task_has_failed if guard.group.class != Symbol
|
129
127
|
|
130
128
|
group = ::Guard.groups(guard.group)
|
131
|
-
group.options
|
129
|
+
group.options.fetch(:halt_on_fail, false) ? :no_catch : :task_has_failed
|
132
130
|
end
|
133
131
|
|
134
132
|
private
|
@@ -170,11 +168,17 @@ module Guard
|
|
170
168
|
end
|
171
169
|
else
|
172
170
|
current_groups_scope(scopes).each do |group|
|
173
|
-
|
171
|
+
current_plugin = nil
|
172
|
+
block_return = catch :task_has_failed do
|
174
173
|
::Guard.guards(:group => group.name).each do |guard|
|
174
|
+
current_plugin = guard
|
175
175
|
yield(guard)
|
176
176
|
end
|
177
177
|
end
|
178
|
+
|
179
|
+
if block_return.nil?
|
180
|
+
::Guard::UI.info "#{ current_plugin.class.name } has failed, other group's plugins execution has been halted."
|
181
|
+
end
|
178
182
|
end
|
179
183
|
end
|
180
184
|
end
|
data/lib/guard/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thibaud Guillaume-Gentil
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 1.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 1.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pry
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,20 +108,6 @@ dependencies:
|
|
108
108
|
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 2.13.0
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: guard-rspec
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ~>
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 2.5.0
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ~>
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: 2.5.0
|
125
111
|
description: Guard is a command line tool to easily handle events on file system modifications.
|
126
112
|
email:
|
127
113
|
- thibaud@thibaud.me
|
@@ -130,6 +116,7 @@ executables:
|
|
130
116
|
extensions: []
|
131
117
|
extra_rdoc_files: []
|
132
118
|
files:
|
119
|
+
- bin/fsevent_watch_guard
|
133
120
|
- bin/guard
|
134
121
|
- images/failed.png
|
135
122
|
- images/guard.png
|
@@ -197,4 +184,3 @@ signing_key:
|
|
197
184
|
specification_version: 4
|
198
185
|
summary: Guard keeps an eye on your file modifications
|
199
186
|
test_files: []
|
200
|
-
has_rdoc:
|