guard 2.6.1 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +73 -58
  3. data/bin/guard +2 -2
  4. data/lib/guard.rb +64 -59
  5. data/lib/guard/cli.rb +66 -60
  6. data/lib/guard/cli.rb.orig +215 -0
  7. data/lib/guard/commander.rb +45 -69
  8. data/lib/guard/commands/all.rb +21 -19
  9. data/lib/guard/commands/change.rb +17 -22
  10. data/lib/guard/commands/notification.rb +15 -16
  11. data/lib/guard/commands/pause.rb +14 -15
  12. data/lib/guard/commands/reload.rb +19 -20
  13. data/lib/guard/commands/scope.rb +23 -19
  14. data/lib/guard/commands/show.rb +13 -16
  15. data/lib/guard/deprecated_methods.rb +6 -10
  16. data/lib/guard/deprecator.rb +52 -37
  17. data/lib/guard/dsl.rb +55 -33
  18. data/lib/guard/dsl_describer.rb +83 -31
  19. data/lib/guard/dsl_describer.rb.orig +184 -0
  20. data/lib/guard/group.rb +7 -6
  21. data/lib/guard/guard.rb +4 -4
  22. data/lib/guard/guard.rb.orig +42 -0
  23. data/lib/guard/guardfile.rb +12 -13
  24. data/lib/guard/guardfile/evaluator.rb +77 -55
  25. data/lib/guard/guardfile/evaluator.rb.orig +275 -0
  26. data/lib/guard/guardfile/generator.rb +25 -20
  27. data/lib/guard/interactor.rb +52 -293
  28. data/lib/guard/interactor.rb.orig +85 -0
  29. data/lib/guard/jobs/base.rb +21 -0
  30. data/lib/guard/jobs/pry_wrapper.rb +290 -0
  31. data/lib/guard/jobs/pry_wrapper.rb.orig +293 -0
  32. data/lib/guard/jobs/sleep.rb +25 -0
  33. data/lib/guard/notifier.rb +42 -39
  34. data/lib/guard/notifiers/base.rb +25 -24
  35. data/lib/guard/notifiers/emacs.rb +30 -24
  36. data/lib/guard/notifiers/file_notifier.rb +3 -7
  37. data/lib/guard/notifiers/gntp.rb +22 -22
  38. data/lib/guard/notifiers/growl.rb +16 -15
  39. data/lib/guard/notifiers/libnotify.rb +7 -10
  40. data/lib/guard/notifiers/notifysend.rb +15 -14
  41. data/lib/guard/notifiers/rb_notifu.rb +8 -10
  42. data/lib/guard/notifiers/terminal_notifier.rb +15 -11
  43. data/lib/guard/notifiers/terminal_title.rb +4 -8
  44. data/lib/guard/notifiers/tmux.rb +104 -71
  45. data/lib/guard/options.rb +1 -5
  46. data/lib/guard/plugin.rb +1 -3
  47. data/lib/guard/plugin/base.rb +12 -9
  48. data/lib/guard/plugin/hooker.rb +1 -5
  49. data/lib/guard/plugin_util.rb +46 -25
  50. data/lib/guard/plugin_util.rb.orig +178 -0
  51. data/lib/guard/rake_task.rb +4 -7
  52. data/lib/guard/reevaluator.rb +13 -0
  53. data/lib/guard/runner.rb +50 -78
  54. data/lib/guard/runner.rb.orig +200 -0
  55. data/lib/guard/setuper.rb +199 -130
  56. data/lib/guard/setuper.rb.orig +348 -0
  57. data/lib/guard/sheller.rb +107 -0
  58. data/lib/guard/tags +367 -0
  59. data/lib/guard/ui.rb +50 -38
  60. data/lib/guard/ui.rb.orig +254 -0
  61. data/lib/guard/ui/colors.rb +17 -21
  62. data/lib/guard/version.rb +1 -1
  63. data/lib/guard/version.rb.orig +3 -0
  64. data/lib/guard/watcher.rb +49 -62
  65. metadata +21 -4
  66. data/lib/guard/notifiers/growl_notify.rb +0 -93
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: 2.6.1
4
+ version: 2.7.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: 2014-05-07 00:00:00.000000000 Z
11
+ date: 2014-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -99,6 +99,7 @@ files:
99
99
  - images/success.png
100
100
  - lib/guard.rb
101
101
  - lib/guard/cli.rb
102
+ - lib/guard/cli.rb.orig
102
103
  - lib/guard/commander.rb
103
104
  - lib/guard/commands/all.rb
104
105
  - lib/guard/commands/change.rb
@@ -111,19 +112,26 @@ files:
111
112
  - lib/guard/deprecator.rb
112
113
  - lib/guard/dsl.rb
113
114
  - lib/guard/dsl_describer.rb
115
+ - lib/guard/dsl_describer.rb.orig
114
116
  - lib/guard/group.rb
115
117
  - lib/guard/guard.rb
118
+ - lib/guard/guard.rb.orig
116
119
  - lib/guard/guardfile.rb
117
120
  - lib/guard/guardfile/evaluator.rb
121
+ - lib/guard/guardfile/evaluator.rb.orig
118
122
  - lib/guard/guardfile/generator.rb
119
123
  - lib/guard/interactor.rb
124
+ - lib/guard/interactor.rb.orig
125
+ - lib/guard/jobs/base.rb
126
+ - lib/guard/jobs/pry_wrapper.rb
127
+ - lib/guard/jobs/pry_wrapper.rb.orig
128
+ - lib/guard/jobs/sleep.rb
120
129
  - lib/guard/notifier.rb
121
130
  - lib/guard/notifiers/base.rb
122
131
  - lib/guard/notifiers/emacs.rb
123
132
  - lib/guard/notifiers/file_notifier.rb
124
133
  - lib/guard/notifiers/gntp.rb
125
134
  - lib/guard/notifiers/growl.rb
126
- - lib/guard/notifiers/growl_notify.rb
127
135
  - lib/guard/notifiers/libnotify.rb
128
136
  - lib/guard/notifiers/notifysend.rb
129
137
  - lib/guard/notifiers/rb_notifu.rb
@@ -135,13 +143,21 @@ files:
135
143
  - lib/guard/plugin/base.rb
136
144
  - lib/guard/plugin/hooker.rb
137
145
  - lib/guard/plugin_util.rb
146
+ - lib/guard/plugin_util.rb.orig
138
147
  - lib/guard/rake_task.rb
148
+ - lib/guard/reevaluator.rb
139
149
  - lib/guard/runner.rb
150
+ - lib/guard/runner.rb.orig
140
151
  - lib/guard/setuper.rb
152
+ - lib/guard/setuper.rb.orig
153
+ - lib/guard/sheller.rb
154
+ - lib/guard/tags
141
155
  - lib/guard/templates/Guardfile
142
156
  - lib/guard/ui.rb
157
+ - lib/guard/ui.rb.orig
143
158
  - lib/guard/ui/colors.rb
144
159
  - lib/guard/version.rb
160
+ - lib/guard/version.rb.orig
145
161
  - lib/guard/watcher.rb
146
162
  - man/guard.1
147
163
  - man/guard.1.html
@@ -165,8 +181,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
181
  version: '0'
166
182
  requirements: []
167
183
  rubyforge_project:
168
- rubygems_version: 2.2.2
184
+ rubygems_version: 2.4.2
169
185
  signing_key:
170
186
  specification_version: 4
171
187
  summary: Guard keeps an eye on your file modifications
172
188
  test_files: []
189
+ has_rdoc:
@@ -1,93 +0,0 @@
1
- require 'guard/notifiers/base'
2
-
3
- module Guard
4
- module Notifier
5
-
6
- # System notifications using the [GrowlNotify](https://github.com/scottdavis/growl_notify) gem.
7
- #
8
- # This gem is available for OS X and sends system notifications to
9
- # [Growl](http://growl.info) through AppleScript.
10
- #
11
- # @example Add the `growl_notify` gem to your `Gemfile`
12
- # group :development
13
- # gem 'growl_notify'
14
- # end
15
- #
16
- # @example Add the `:growl_notify` notifier to your `Guardfile`
17
- # notification :growl_notify
18
- #
19
- # @example Add the `:growl_notify` notifier with configuration options to your `Guardfile`
20
- # notification :growl_notify, sticky: true
21
- #
22
- class GrowlNotify < Base
23
-
24
- # Default options for the growl_notify notifications.
25
- DEFAULTS = {
26
- sticky: false,
27
- priority: 0
28
- }
29
-
30
- def self.supported_hosts
31
- %w[darwin]
32
- end
33
-
34
- def self.available?(opts = {})
35
- super and require_gem_safely(opts) and _register!(opts)
36
- end
37
-
38
- # @private
39
- #
40
- # Detects if the GrowlNotify gem is available and if not, displays an
41
- # error message unless `opts[:silent]` is true. If it's available,
42
- # GrowlNotify is configured for Guard.
43
- #
44
- # @return [Boolean] whether or not GrowlNotify is available
45
- #
46
- def self._register!(options)
47
- if ::GrowlNotify.application_name != 'Guard'
48
- ::GrowlNotify.config do |c|
49
- c.notifications = %w(success pending failed notify)
50
- c.default_notifications = 'notify'
51
- c.application_name = 'Guard'
52
- end
53
- end
54
-
55
- true
56
-
57
- rescue ::GrowlNotify::GrowlNotFound
58
- unless options[:silent]
59
- ::Guard::UI.error 'Please install Growl from http://growl.info'
60
- end
61
- false
62
- end
63
-
64
- # Shows a system notification.
65
- #
66
- # @param [String] message the notification message body
67
- # @param [Hash] opts additional notification library options
68
- # @option opts [String] type the notification type. Either 'success',
69
- # 'pending', 'failed' or 'notify'
70
- # @option opts [String] title the notification title
71
- # @option opts [String] image the path to the notification image
72
- # @option opts [Boolean] sticky if the message should stick to the screen
73
- # @option opts [Integer] priority the importance of message from -2 (very
74
- # low) to 2 (emergency)
75
- #
76
- def notify(message, opts = {})
77
- super
78
- self.class.require_gem_safely
79
-
80
- opts = DEFAULTS.merge(
81
- application_name: 'Guard',
82
- with_name: opts.delete(:type).to_s,
83
- description: message,
84
- icon: opts.delete(:image)
85
- ).merge(opts)
86
-
87
- ::GrowlNotify.send_notification(opts)
88
- end
89
-
90
- end
91
-
92
- end
93
- end