guard-srb 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop.yml +37 -0
  3. data/.tool-versions +1 -0
  4. data/CHANGELOG.md +5 -0
  5. data/CODE_OF_CONDUCT.md +84 -0
  6. data/Gemfile +14 -0
  7. data/Gemfile.lock +125 -0
  8. data/Guardfile +16 -0
  9. data/LICENSE.txt +21 -0
  10. data/README.md +92 -0
  11. data/Rakefile +18 -0
  12. data/lib/guard/srb/runner.rb +70 -0
  13. data/lib/guard/srb/templates/Guardfile +3 -0
  14. data/lib/guard/srb/version.rb +8 -0
  15. data/lib/guard/srb.rb +105 -0
  16. data/sorbet/config +5 -0
  17. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  18. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  19. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3437 -0
  20. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1079 -0
  21. data/sorbet/rbi/gems/ffi@1.15.5.rbi +8 -0
  22. data/sorbet/rbi/gems/formatador@1.1.0.rbi +8 -0
  23. data/sorbet/rbi/gems/guard-compat@1.2.1.rbi +103 -0
  24. data/sorbet/rbi/gems/guard-minitest@2.4.6.rbi +299 -0
  25. data/sorbet/rbi/gems/guard@2.16.2.rbi +2286 -0
  26. data/sorbet/rbi/gems/json@2.6.3.rbi +1541 -0
  27. data/sorbet/rbi/gems/listen@3.8.0.rbi +1181 -0
  28. data/sorbet/rbi/gems/lumberjack@1.2.8.rbi +1501 -0
  29. data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
  30. data/sorbet/rbi/gems/minitest@5.18.0.rbi +2354 -0
  31. data/sorbet/rbi/gems/mocha@2.0.2.rbi +3934 -0
  32. data/sorbet/rbi/gems/nenv@0.3.0.rbi +146 -0
  33. data/sorbet/rbi/gems/netrc@0.11.0.rbi +161 -0
  34. data/sorbet/rbi/gems/notiffany@0.1.3.rbi +1078 -0
  35. data/sorbet/rbi/gems/parallel@1.23.0.rbi +273 -0
  36. data/sorbet/rbi/gems/parser@3.2.2.1.rbi +9454 -0
  37. data/sorbet/rbi/gems/pry@0.14.2.rbi +10079 -0
  38. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
  39. data/sorbet/rbi/gems/rake@13.0.6.rbi +3119 -0
  40. data/sorbet/rbi/gems/rb-fsevent@0.11.2.rbi +8 -0
  41. data/sorbet/rbi/gems/rb-inotify@0.10.1.rbi +8 -0
  42. data/sorbet/rbi/gems/rbi@0.0.16.rbi +3049 -0
  43. data/sorbet/rbi/gems/regexp_parser@2.8.0.rbi +3765 -0
  44. data/sorbet/rbi/gems/rexml@3.2.5.rbi +4717 -0
  45. data/sorbet/rbi/gems/rubocop-ast@1.28.1.rbi +6967 -0
  46. data/sorbet/rbi/gems/rubocop@1.50.2.rbi +55367 -0
  47. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
  48. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +8 -0
  49. data/sorbet/rbi/gems/shellany@0.0.1.rbi +101 -0
  50. data/sorbet/rbi/gems/spoom@1.2.1.rbi +2536 -0
  51. data/sorbet/rbi/gems/tapioca@0.11.6.rbi +3246 -0
  52. data/sorbet/rbi/gems/thor@1.2.2.rbi +3965 -0
  53. data/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi +65 -0
  54. data/sorbet/rbi/gems/unparser@0.6.7.rbi +4515 -0
  55. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +426 -0
  56. data/sorbet/rbi/gems/yard@0.9.34.rbi +17907 -0
  57. data/sorbet/rbi/todo.rbi +7 -0
  58. data/sorbet/tapioca/config.yml +13 -0
  59. data/sorbet/tapioca/require.rb +14 -0
  60. metadata +155 -0
@@ -0,0 +1,2286 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `guard` gem.
5
+ # Please instead update this file by running `bin/tapioca gem guard`.
6
+
7
+ # TODO: rework this class from the bottom-up
8
+ # - remove dependency on Session and Scope
9
+ # - extract into a separate gem
10
+ # - change UI to class
11
+ #
12
+ # source://guard//lib/guard/config.rb#3
13
+ module Guard
14
+ extend ::Guard::Deprecated::Guard::ClassMethods
15
+ extend ::Guard::Internals::Helpers
16
+
17
+ class << self
18
+ # Asynchronously trigger changes
19
+ #
20
+ # Currently supported args:
21
+ #
22
+ # @example Old style hash:
23
+ # async_queue_add(modified: ['foo'], added: ['bar'], removed: [])
24
+ #
25
+ # @example New style signals with args:
26
+ # async_queue_add([:guard_pause, :unpaused ])
27
+ #
28
+ # source://guard//lib/guard.rb#87
29
+ def async_queue_add(changes); end
30
+
31
+ # source://guard//lib/guard.rb#73
32
+ def init(cmdline_options); end
33
+
34
+ # Returns the value of attribute interactor.
35
+ #
36
+ # source://guard//lib/guard.rb#24
37
+ def interactor; end
38
+
39
+ # Returns the value of attribute listener.
40
+ #
41
+ # source://guard//lib/guard.rb#23
42
+ def listener; end
43
+
44
+ # Returns the value of attribute queue.
45
+ #
46
+ # source://guard//lib/guard.rb#22
47
+ def queue; end
48
+
49
+ # Initializes the Guard singleton:
50
+ #
51
+ # * Initialize the internal Guard state;
52
+ # * Create the interactor
53
+ # * Select and initialize the file change listener.
54
+ #
55
+ # @option options
56
+ # @option options
57
+ # @option options
58
+ # @option options
59
+ # @option options
60
+ # @option options
61
+ # @param options [Hash] a customizable set of options
62
+ # @return [Guard] the Guard singleton
63
+ #
64
+ # source://guard//lib/guard.rb#44
65
+ def setup(cmdline_options = T.unsafe(nil)); end
66
+
67
+ # Returns the value of attribute state.
68
+ #
69
+ # source://guard//lib/guard.rb#21
70
+ def state; end
71
+
72
+ private
73
+
74
+ # source://guard//lib/guard.rb#132
75
+ def _evaluate(options); end
76
+
77
+ # TODO: remove at some point
78
+ # TODO: not tested because collides with ongoing refactoring
79
+ #
80
+ # source://guard//lib/guard.rb#152
81
+ def _guardfile_deprecated_check(modified); end
82
+
83
+ # source://guard//lib/guard.rb#113
84
+ def _listener_callback; end
85
+
86
+ # TODO: obsoleted? (move to Dsl?)
87
+ #
88
+ # @return [Boolean]
89
+ #
90
+ # source://guard//lib/guard.rb#128
91
+ def _pluginless_guardfile?; end
92
+
93
+ # source://guard//lib/guard.rb#109
94
+ def _relative_pathnames(paths); end
95
+
96
+ # Check if any of the changes are actually watched for
97
+ # TODO: why iterate twice? reuse this info when running tasks
98
+ #
99
+ # @return [Boolean]
100
+ #
101
+ # source://guard//lib/guard.rb#99
102
+ def _relevant_changes?(changes); end
103
+ end
104
+ end
105
+
106
+ # source://guard//lib/guard/config.rb#9
107
+ class Guard::Config < ::Nenv::Environment
108
+ # @return [Config] a new instance of Config
109
+ #
110
+ # source://guard//lib/guard/config.rb#10
111
+ def initialize; end
112
+
113
+ # @return [Boolean]
114
+ #
115
+ # source://guard//lib/guard/config.rb#14
116
+ def silence_deprecations?; end
117
+ end
118
+
119
+ # @deprecated Every method in this module is deprecated
120
+ #
121
+ # source://guard//lib/guard/deprecated/watcher.rb#5
122
+ module Guard::Deprecated; end
123
+
124
+ # source://guard//lib/guard/deprecated/dsl.rb#6
125
+ module Guard::Deprecated::Dsl
126
+ class << self
127
+ # source://guard//lib/guard/deprecated/dsl.rb#7
128
+ def add_deprecated(dsl_klass); end
129
+ end
130
+ end
131
+
132
+ # source://guard//lib/guard/deprecated/dsl.rb#16
133
+ module Guard::Deprecated::Dsl::ClassMethods
134
+ # source://guard//lib/guard/deprecated/dsl.rb#35
135
+ def evaluate_guardfile(options = T.unsafe(nil)); end
136
+ end
137
+
138
+ # `Guard::Guardfile::Evaluator.new(options).evaluate_guardfile`
139
+ # instead.
140
+ #
141
+ # to upgrade for Guard 2.0
142
+ #
143
+ # @deprecated Use
144
+ # @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How
145
+ #
146
+ # source://guard//lib/guard/deprecated/dsl.rb#24
147
+ Guard::Deprecated::Dsl::ClassMethods::EVALUATE_GUARDFILE = T.let(T.unsafe(nil), String)
148
+
149
+ # source://guard//lib/guard/deprecated/dsl.rb#11
150
+ Guard::Deprecated::Dsl::MORE_INFO_ON_UPGRADING_TO_GUARD_2 = T.let(T.unsafe(nil), String)
151
+
152
+ # source://guard//lib/guard/deprecated/evaluator.rb#8
153
+ module Guard::Deprecated::Evaluator
154
+ # source://guard//lib/guard/deprecated/evaluator.rb#26
155
+ def evaluate_guardfile; end
156
+
157
+ # source://guard//lib/guard/deprecated/evaluator.rb#31
158
+ def reevaluate_guardfile; end
159
+
160
+ class << self
161
+ # source://guard//lib/guard/deprecated/evaluator.rb#9
162
+ def add_deprecated(klass); end
163
+ end
164
+ end
165
+
166
+ # source://guard//lib/guard/deprecated/evaluator.rb#13
167
+ Guard::Deprecated::Evaluator::EVALUATE_GUARDFILE = T.let(T.unsafe(nil), String)
168
+
169
+ # source://guard//lib/guard/deprecated/evaluator.rb#18
170
+ Guard::Deprecated::Evaluator::REEVALUATE_GUARDFILE = T.let(T.unsafe(nil), String)
171
+
172
+ # source://guard//lib/guard/deprecated/guard.rb#14
173
+ module Guard::Deprecated::Guard
174
+ class << self
175
+ # source://guard//lib/guard/deprecated/guard.rb#15
176
+ def add_deprecated(klass); end
177
+ end
178
+ end
179
+
180
+ # source://guard//lib/guard/deprecated/guard.rb#19
181
+ module Guard::Deprecated::Guard::ClassMethods
182
+ # source://guard//lib/guard/deprecated/guard.rb#251
183
+ def add_group(name, options = T.unsafe(nil)); end
184
+
185
+ # source://guard//lib/guard/deprecated/guard.rb#57
186
+ def add_guard(*args); end
187
+
188
+ # source://guard//lib/guard/deprecated/guard.rb#261
189
+ def add_plugin(name, options = T.unsafe(nil)); end
190
+
191
+ # source://guard//lib/guard/deprecated/guard.rb#179
192
+ def evaluate_guardfile; end
193
+
194
+ # source://guard//lib/guard/deprecated/guard.rb#152
195
+ def evaluator; end
196
+
197
+ # source://guard//lib/guard/deprecated/guard.rb#79
198
+ def get_guard_class(name, fail_gracefully = T.unsafe(nil)); end
199
+
200
+ # source://guard//lib/guard/deprecated/guard.rb#271
201
+ def group(filter); end
202
+
203
+ # source://guard//lib/guard/deprecated/guard.rb#291
204
+ def groups(filter); end
205
+
206
+ # source://guard//lib/guard/deprecated/guard.rb#116
207
+ def guard_gem_names; end
208
+
209
+ # source://guard//lib/guard/deprecated/guard.rb#38
210
+ def guards(filter = T.unsafe(nil)); end
211
+
212
+ # source://guard//lib/guard/deprecated/guard.rb#143
213
+ def listener=(_); end
214
+
215
+ # source://guard//lib/guard/deprecated/guard.rb#97
216
+ def locate_guard(name); end
217
+
218
+ # source://guard//lib/guard/deprecated/guard.rb#135
219
+ def lock; end
220
+
221
+ # source://guard//lib/guard/deprecated/guard.rb#195
222
+ def options; end
223
+
224
+ # source://guard//lib/guard/deprecated/guard.rb#281
225
+ def plugin(filter); end
226
+
227
+ # source://guard//lib/guard/deprecated/guard.rb#301
228
+ def plugins(filter); end
229
+
230
+ # source://guard//lib/guard/deprecated/guard.rb#162
231
+ def reset_evaluator(_options); end
232
+
233
+ # source://guard//lib/guard/deprecated/guard.rb#170
234
+ def runner; end
235
+
236
+ # source://guard//lib/guard/deprecated/guard.rb#126
237
+ def running; end
238
+
239
+ # source://guard//lib/guard/deprecated/guard.rb#311
240
+ def scope; end
241
+
242
+ # source://guard//lib/guard/deprecated/guard.rb#321
243
+ def scope=(scope); end
244
+ end
245
+
246
+ # source://guard//lib/guard/deprecated/guard.rb#246
247
+ Guard::Deprecated::Guard::ClassMethods::ADD_GROUP = T.let(T.unsafe(nil), String)
248
+
249
+ # @deprecated Use `Guard.add_plugin(name, options = {})` instead.
250
+ # @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How to
251
+ # upgrade for Guard 2.0
252
+ #
253
+ # source://guard//lib/guard/deprecated/guard.rb#48
254
+ Guard::Deprecated::Guard::ClassMethods::ADD_GUARD = T.let(T.unsafe(nil), String)
255
+
256
+ # source://guard//lib/guard/deprecated/guard.rb#256
257
+ Guard::Deprecated::Guard::ClassMethods::ADD_PLUGIN = T.let(T.unsafe(nil), String)
258
+
259
+ # source://guard//lib/guard/deprecated/guard.rb#175
260
+ Guard::Deprecated::Guard::ClassMethods::EVALUATE_GUARDFILE = T.let(T.unsafe(nil), String)
261
+
262
+ # source://guard//lib/guard/deprecated/guard.rb#148
263
+ Guard::Deprecated::Guard::ClassMethods::EVALUATOR = T.let(T.unsafe(nil), String)
264
+
265
+ # @deprecated Use
266
+ # `Guard::PluginUtil.new(name).plugin_class(fail_gracefully:
267
+ # fail_gracefully)` instead.
268
+ # @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How to
269
+ # upgrade for Guard 2.0
270
+ #
271
+ # source://guard//lib/guard/deprecated/guard.rb#69
272
+ Guard::Deprecated::Guard::ClassMethods::GET_GUARD_CLASS = T.let(T.unsafe(nil), String)
273
+
274
+ # source://guard//lib/guard/deprecated/guard.rb#266
275
+ Guard::Deprecated::Guard::ClassMethods::GROUP = T.let(T.unsafe(nil), String)
276
+
277
+ # source://guard//lib/guard/deprecated/guard.rb#286
278
+ Guard::Deprecated::Guard::ClassMethods::GROUPS = T.let(T.unsafe(nil), String)
279
+
280
+ # @deprecated Use `Guard.plugins(filter)` instead.
281
+ # @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How to
282
+ # upgrade for Guard 2.0
283
+ #
284
+ # source://guard//lib/guard/deprecated/guard.rb#30
285
+ Guard::Deprecated::Guard::ClassMethods::GUARDS = T.let(T.unsafe(nil), String)
286
+
287
+ # Deprecator message for the `Guard.guard_gem_names` method
288
+ #
289
+ # @deprecated Use `Guard::PluginUtil.plugin_names` instead.
290
+ # @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How to
291
+ # upgrade for Guard 2.0
292
+ #
293
+ # source://guard//lib/guard/deprecated/guard.rb#108
294
+ Guard::Deprecated::Guard::ClassMethods::GUARD_GEM_NAMES = T.let(T.unsafe(nil), String)
295
+
296
+ # source://guard//lib/guard/deprecated/guard.rb#139
297
+ Guard::Deprecated::Guard::ClassMethods::LISTENER_ASSIGN = T.let(T.unsafe(nil), String)
298
+
299
+ # @deprecated Use `Guard::PluginUtil.new(name).plugin_location` instead.
300
+ # @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How to
301
+ # upgrade for Guard 2.0
302
+ #
303
+ # source://guard//lib/guard/deprecated/guard.rb#89
304
+ Guard::Deprecated::Guard::ClassMethods::LOCATE_GUARD = T.let(T.unsafe(nil), String)
305
+
306
+ # source://guard//lib/guard/deprecated/guard.rb#131
307
+ Guard::Deprecated::Guard::ClassMethods::LOCK = T.let(T.unsafe(nil), String)
308
+
309
+ # source://guard//lib/guard/deprecated/guard.rb#20
310
+ Guard::Deprecated::Guard::ClassMethods::MORE_INFO_ON_UPGRADING_TO_GUARD_2 = T.let(T.unsafe(nil), String)
311
+
312
+ # source://guard//lib/guard/deprecated/guard.rb#188
313
+ Guard::Deprecated::Guard::ClassMethods::OPTIONS = T.let(T.unsafe(nil), String)
314
+
315
+ # source://guard//lib/guard/deprecated/guard.rb#276
316
+ Guard::Deprecated::Guard::ClassMethods::PLUGIN = T.let(T.unsafe(nil), String)
317
+
318
+ # source://guard//lib/guard/deprecated/guard.rb#296
319
+ Guard::Deprecated::Guard::ClassMethods::PLUGINS = T.let(T.unsafe(nil), String)
320
+
321
+ # source://guard//lib/guard/deprecated/guard.rb#158
322
+ Guard::Deprecated::Guard::ClassMethods::RESET_EVALUATOR = T.let(T.unsafe(nil), String)
323
+
324
+ # source://guard//lib/guard/deprecated/guard.rb#166
325
+ Guard::Deprecated::Guard::ClassMethods::RUNNER = T.let(T.unsafe(nil), String)
326
+
327
+ # source://guard//lib/guard/deprecated/guard.rb#121
328
+ Guard::Deprecated::Guard::ClassMethods::RUNNING = T.let(T.unsafe(nil), String)
329
+
330
+ # source://guard//lib/guard/deprecated/guard.rb#306
331
+ Guard::Deprecated::Guard::ClassMethods::SCOPE = T.let(T.unsafe(nil), String)
332
+
333
+ # source://guard//lib/guard/deprecated/guard.rb#316
334
+ Guard::Deprecated::Guard::ClassMethods::SCOPE_ASSIGN = T.let(T.unsafe(nil), String)
335
+
336
+ # source://guard//lib/guard/deprecated/watcher.rb#6
337
+ module Guard::Deprecated::Watcher
338
+ class << self
339
+ # source://guard//lib/guard/deprecated/watcher.rb#7
340
+ def add_deprecated(klass); end
341
+ end
342
+ end
343
+
344
+ # source://guard//lib/guard/deprecated/watcher.rb#11
345
+ module Guard::Deprecated::Watcher::ClassMethods
346
+ # @return [Boolean]
347
+ #
348
+ # source://guard//lib/guard/deprecated/watcher.rb#16
349
+ def match_guardfile?(files); end
350
+ end
351
+
352
+ # source://guard//lib/guard/deprecated/watcher.rb#12
353
+ Guard::Deprecated::Watcher::ClassMethods::MATCH_GUARDFILE = T.let(T.unsafe(nil), String)
354
+
355
+ # The Dsl class provides the methods that are used in each `Guardfile` to
356
+ # describe the behaviour of Guard.
357
+ #
358
+ # The main keywords of the DSL are {#guard} and {#watch}. These are necessary
359
+ # to define the used Guard plugins and the file changes they are watching.
360
+ #
361
+ # You can optionally group the Guard plugins with the {#group} keyword and
362
+ # ignore and filter certain paths with the {#ignore} and {#filter} keywords.
363
+ #
364
+ # You can set your preferred system notification library with {#notification}
365
+ # and pass some optional configuration options for the library. If you don't
366
+ # configure a library, Guard will automatically pick one with default options
367
+ # (if you don't want notifications, specify `:off` as library). Please see
368
+ # {Notifier} for more information about the supported libraries.
369
+ #
370
+ # A more advanced DSL use is the {#callback} keyword that allows you to
371
+ # execute arbitrary code before or after any of the {Plugin#start},
372
+ # {Plugin#stop}, {Plugin#reload}, {Plugin#run_all},
373
+ # {Plugin#run_on_changes}, {Plugin#run_on_additions},
374
+ # {Plugin#run_on_modifications} and {Plugin#run_on_removals}
375
+ # Guard plugins method.
376
+ # You can even insert more hooks inside these methods. Please [checkout the
377
+ # Wiki page](https://github.com/guard/guard/wiki/Hooks-and-callbacks) for
378
+ # more details.
379
+ #
380
+ # The DSL will also evaluate normal Ruby code.
381
+ #
382
+ # There are two possible locations for the `Guardfile`:
383
+ #
384
+ # * The `Guardfile` or `guardfile.rb` in the current directory where Guard
385
+ # has been started
386
+ # * The `.Guardfile` in your home directory.
387
+ #
388
+ # In addition, if a user configuration `.guard.rb` in your home directory is
389
+ # found, it will be appended to the current project `Guardfile`.
390
+ #
391
+ # @see https://github.com/guard/guard/wiki/Guardfile-examples
392
+ #
393
+ # source://guard//lib/guard/dsl.rb#49
394
+ class Guard::Dsl
395
+ extend ::Guard::Deprecated::Dsl::ClassMethods
396
+
397
+ # Defines a callback to execute arbitrary code before or after any of
398
+ # the `start`, `stop`, `reload`, `run_all`, `run_on_changes`,
399
+ # `run_on_additions`, `run_on_modifications` and `run_on_removals` plugin
400
+ # method.
401
+ #
402
+ # @example Add callback before the `reload` action.
403
+ # callback(:reload_begin) { puts "Let's reload!" }
404
+ # @example Add callback before the `start` and `stop` actions.
405
+ #
406
+ # my_lambda = lambda do |plugin, event, *args|
407
+ # puts "Let's #{event} #{plugin} with #{args}!"
408
+ # end
409
+ #
410
+ # callback(my_lambda, [:start_begin, :start_end])
411
+ # @param args [Array] the callback arguments
412
+ # @yield a callback block
413
+ #
414
+ # source://guard//lib/guard/dsl.rb#246
415
+ def callback(*args, &block); end
416
+
417
+ # Sets Guard to clear the screen before every task is run
418
+ #
419
+ # @example switching clearing the screen on
420
+ # clearing(:on)
421
+ # @param on [Symbol] ':on' to turn on, ':off' (default) to turn off
422
+ #
423
+ # source://guard//lib/guard/dsl.rb#408
424
+ def clearing(on); end
425
+
426
+ # Sets the directories to pass to Listen
427
+ #
428
+ # @example watch only given directories
429
+ # directories %w(lib specs)
430
+ # @param directories [Array] directories for Listen to watch
431
+ #
432
+ # source://guard//lib/guard/dsl.rb#394
433
+ def directories(directories); end
434
+
435
+ # :nodoc
436
+ #
437
+ # source://guard//lib/guard/dsl.rb#377
438
+ def evaluate(contents, filename, lineno); end
439
+
440
+ # Ignores certain paths globally.
441
+ # TODO: deprecate
442
+ #
443
+ # @example Ignore some paths
444
+ # ignore %r{^ignored/path/}, /man/
445
+ # @param regexps [Regexp] a pattern (or list of patterns) for ignoring paths
446
+ #
447
+ # source://guard//lib/guard/dsl.rb#267
448
+ def filter(*regexps); end
449
+
450
+ # Replaces ignored paths globally
451
+ # TODO: deprecate
452
+ #
453
+ # @example Ignore only these paths
454
+ # ignore! %r{^ignored/path/}, /man/
455
+ # @param regexps [Regexp] a pattern (or list of patterns) for ignoring paths
456
+ #
457
+ # source://guard//lib/guard/dsl.rb#282
458
+ def filter!(*regexps); end
459
+
460
+ # Declares a group of Guard plugins to be run with `guard start --group
461
+ # group_name`.
462
+ #
463
+ # @example Declare two groups of Guard plugins
464
+ # group :backend do
465
+ # guard :spork
466
+ # guard :rspec
467
+ # end
468
+ #
469
+ # group :frontend do
470
+ # guard :passenger
471
+ # guard :livereload
472
+ # end
473
+ # @param name [Symbol, String, Array<Symbol, String>] the group name called
474
+ # from the CLI
475
+ # @param options [Hash] the options accepted by the group
476
+ # @see Group
477
+ # @see Guard.add_group
478
+ # @see #guard
479
+ # @yield a block where you can declare several Guard plugins
480
+ #
481
+ # source://guard//lib/guard/dsl.rb#124
482
+ def group(*args); end
483
+
484
+ # Declares a Guard plugin to be used when running `guard start`.
485
+ #
486
+ # The name parameter is usually the name of the gem without
487
+ # the 'guard-' prefix.
488
+ #
489
+ # The available options are different for each Guard implementation.
490
+ #
491
+ # @example Declare a Guard without `watch` patterns
492
+ # guard :rspec
493
+ # @example Declare a Guard with a `watch` pattern
494
+ # guard :rspec do
495
+ # watch %r{.*_spec.rb}
496
+ # end
497
+ # @param name [String] the Guard plugin name
498
+ # @param options [Hash] the options accepted by the Guard plugin
499
+ # @see Plugin
500
+ # @see Guard.add_plugin
501
+ # @see #watch
502
+ # @see #group
503
+ # @yield a block where you can declare several watch patterns and actions
504
+ #
505
+ # source://guard//lib/guard/dsl.rb#176
506
+ def guard(name, options = T.unsafe(nil)); end
507
+
508
+ # Ignores certain paths globally.
509
+ #
510
+ # @example Ignore some paths
511
+ # ignore %r{^ignored/path/}, /man/
512
+ # @param regexps [Regexp] a pattern (or list of patterns) for ignoring paths
513
+ #
514
+ # source://guard//lib/guard/dsl.rb#267
515
+ def ignore(*regexps); end
516
+
517
+ # Replaces ignored paths globally
518
+ #
519
+ # @example Ignore only these paths
520
+ # ignore! %r{^ignored/path/}, /man/
521
+ # @param regexps [Regexp] a pattern (or list of patterns) for ignoring paths
522
+ #
523
+ # source://guard//lib/guard/dsl.rb#282
524
+ def ignore!(*regexps); end
525
+
526
+ # Sets the interactor options or disable the interactor.
527
+ #
528
+ # @example Pass options to the interactor
529
+ # interactor option1: 'value1', option2: 'value2'
530
+ # @example Turn off interactions
531
+ # interactor :off
532
+ # @param options [Symbol, Hash] either `:off` or a Hash with interactor
533
+ # options
534
+ #
535
+ # source://guard//lib/guard/dsl.rb#91
536
+ def interactor(options); end
537
+
538
+ # Configures the Guard logger.
539
+ #
540
+ # * Log level must be either `:debug`, `:info`, `:warn` or `:error`.
541
+ # * Template supports the following placeholders: `:time`, `:severity`,
542
+ # `:progname`, `:pid`, `:unit_of_work_id` and `:message`.
543
+ # * Time format directives are the same as `Time#strftime` or
544
+ # `:milliseconds`.
545
+ # * The `:only` and `:except` options must be a `RegExp`.
546
+ #
547
+ # @example Set the log level
548
+ # logger level: :warn
549
+ # @example Set a custom log template
550
+ # logger template: '[Guard - :severity - :progname - :time] :message'
551
+ # @example Set a custom time format
552
+ # logger time_format: '%h'
553
+ # @example Limit logging to a Guard plugin
554
+ # logger only: :jasmine
555
+ # @example Log all but not the messages from a specific Guard plugin
556
+ # logger except: :jasmine
557
+ # @option options
558
+ # @option options
559
+ # @option options
560
+ # @option options
561
+ # @option options
562
+ # @param options [Hash] the log options
563
+ #
564
+ # source://guard//lib/guard/dsl.rb#325
565
+ def logger(options); end
566
+
567
+ # Set notification options for the system notifications.
568
+ # You can set multiple notifications, which allows you to show local
569
+ # system notifications and remote notifications with separate libraries.
570
+ # You can also pass `:off` as library to turn off notifications.
571
+ #
572
+ # @example Define multiple notifications
573
+ # notification :ruby_gntp
574
+ # notification :ruby_gntp, host: '192.168.1.5'
575
+ # @param notifier [Symbol, String] the name of the notifier to use
576
+ # @param opts [Hash] the notification library options
577
+ # @see Guard::Notifier for available notifier and its options.
578
+ #
579
+ # source://guard//lib/guard/dsl.rb#76
580
+ def notification(notifier, opts = T.unsafe(nil)); end
581
+
582
+ # Sets the default scope on startup
583
+ #
584
+ # @example Scope Guard to a single group
585
+ # scope group: :frontend
586
+ # @example Scope Guard to multiple groups
587
+ # scope groups: [:specs, :docs]
588
+ # @example Scope Guard to a single plugin
589
+ # scope plugin: :test
590
+ # @example Scope Guard to multiple plugins
591
+ # scope plugins: [:jasmine, :rspec]
592
+ # @param scope [Hash] the scope for the groups and plugins
593
+ #
594
+ # source://guard//lib/guard/dsl.rb#372
595
+ def scope(scope = T.unsafe(nil)); end
596
+
597
+ # Defines a pattern to be watched in order to run actions on file
598
+ # modification.
599
+ #
600
+ # modification
601
+ #
602
+ # @example Declare global watchers outside of a Guard
603
+ # watch(%r{^(.+)$}) { |m| puts "#{m[1]} changed." }
604
+ # @example Declare watchers for a Guard
605
+ # guard :rspec do
606
+ # watch('spec/spec_helper.rb')
607
+ # watch(%r{^.+_spec.rb})
608
+ # watch(%r{^app/controllers/(.+).rb}) do |m|
609
+ # 'spec/acceptance/#{m[1]}s_spec.rb'
610
+ # end
611
+ # end
612
+ # @param pattern [String, Regexp] the pattern that Guard must watch for
613
+ # @see #guard
614
+ # @see Guard::Watcher
615
+ # @yield a block to be run when the pattern is matched
616
+ # @yieldparam m [MatchData] matches of the pattern
617
+ # @yieldreturn a directory, a filename, an array of
618
+ # directories / filenames, or nothing (can be an arbitrary command)
619
+ #
620
+ # source://guard//lib/guard/dsl.rb#218
621
+ def watch(pattern, &action); end
622
+
623
+ private
624
+
625
+ # source://guard//lib/guard/dsl.rb#414
626
+ def _cleanup_backtrace(backtrace); end
627
+ end
628
+
629
+ # Wrap exceptions during parsing Guardfile
630
+ #
631
+ # source://guard//lib/guard/dsl.rb#53
632
+ class Guard::Dsl::Error < ::RuntimeError; end
633
+
634
+ # source://guard//lib/guard/dsl.rb#56
635
+ Guard::Dsl::WARN_INVALID_LOG_LEVEL = T.let(T.unsafe(nil), String)
636
+
637
+ # source://guard//lib/guard/dsl.rb#59
638
+ Guard::Dsl::WARN_INVALID_LOG_OPTIONS = T.let(T.unsafe(nil), String)
639
+
640
+ # TODO: this should probably be a base class for Dsl instead (in Guard 3.x)
641
+ #
642
+ # source://guard//lib/guard/dsl_reader.rb#5
643
+ class Guard::DslReader < ::Guard::Dsl
644
+ # @return [DslReader] a new instance of DslReader
645
+ #
646
+ # source://guard//lib/guard/dsl_reader.rb#8
647
+ def initialize; end
648
+
649
+ # source://guard//lib/guard/dsl_reader.rb#30
650
+ def callback(*_args, &_block); end
651
+
652
+ # source://guard//lib/guard/dsl_reader.rb#48
653
+ def clearing(_on); end
654
+
655
+ # source://guard//lib/guard/dsl_reader.rb#45
656
+ def directories(_directories); end
657
+
658
+ # source://guard//lib/guard/dsl_reader.rb#24
659
+ def group(*_args); end
660
+
661
+ # source://guard//lib/guard/dsl_reader.rb#13
662
+ def guard(name, _options = T.unsafe(nil)); end
663
+
664
+ # source://guard//lib/guard/dsl_reader.rb#33
665
+ def ignore(*_regexps); end
666
+
667
+ # source://guard//lib/guard/dsl_reader.rb#36
668
+ def ignore!(*_regexps); end
669
+
670
+ # source://guard//lib/guard/dsl_reader.rb#21
671
+ def interactor(_options); end
672
+
673
+ # source://guard//lib/guard/dsl_reader.rb#39
674
+ def logger(_options); end
675
+
676
+ # Stub everything else
677
+ #
678
+ # source://guard//lib/guard/dsl_reader.rb#18
679
+ def notification(_notifier, _opts = T.unsafe(nil)); end
680
+
681
+ # Returns the value of attribute plugin_names.
682
+ #
683
+ # source://guard//lib/guard/dsl_reader.rb#6
684
+ def plugin_names; end
685
+
686
+ # source://guard//lib/guard/dsl_reader.rb#42
687
+ def scope(_scope = T.unsafe(nil)); end
688
+
689
+ # source://guard//lib/guard/dsl_reader.rb#27
690
+ def watch(_pattern, &_action); end
691
+ end
692
+
693
+ # A group of Guard plugins. There are two reasons why you want to group your
694
+ # Guard plugins:
695
+ #
696
+ # * You can start only certain groups from the command line by passing the
697
+ # `--group` option to `guard start`.
698
+ # * Abort task execution chain on failure within a group with the
699
+ # `:halt_on_fail` option.
700
+ #
701
+ # @example Group that aborts on failure
702
+ #
703
+ # group :frontend, halt_on_fail: true do
704
+ # guard 'coffeescript', input: 'spec/coffeescripts',
705
+ # output: 'spec/javascripts'
706
+ # guard 'jasmine-headless-webkit' do
707
+ # watch(%r{^spec/javascripts/(.*)\..*}) do |m|
708
+ # newest_js_file("spec/javascripts/#{m[1]}_spec")
709
+ # end
710
+ # end
711
+ # end
712
+ # @see Guard::CLI
713
+ #
714
+ # source://guard//lib/guard/group.rb#24
715
+ class Guard::Group
716
+ # Initializes a Group.
717
+ #
718
+ # @option options
719
+ # @param name [String] the name of the group
720
+ # @param options [Hash] the group options
721
+ # @return [Group] a new instance of Group
722
+ #
723
+ # source://guard//lib/guard/group.rb#35
724
+ def initialize(name, options = T.unsafe(nil)); end
725
+
726
+ # Returns the value of attribute name.
727
+ #
728
+ # source://guard//lib/guard/group.rb#25
729
+ def name; end
730
+
731
+ # Sets the attribute name
732
+ #
733
+ # @param value the value to set the attribute name to.
734
+ #
735
+ # source://guard//lib/guard/group.rb#25
736
+ def name=(_arg0); end
737
+
738
+ # Returns the value of attribute options.
739
+ #
740
+ # source://guard//lib/guard/group.rb#25
741
+ def options; end
742
+
743
+ # Sets the attribute options
744
+ #
745
+ # @param value the value to set the attribute options to.
746
+ #
747
+ # source://guard//lib/guard/group.rb#25
748
+ def options=(_arg0); end
749
+
750
+ # Returns the group title.
751
+ #
752
+ # @example Title for a group named 'backend'
753
+ # > Guard::Group.new('backend').title
754
+ # => "Backend"
755
+ # @return [String]
756
+ #
757
+ # source://guard//lib/guard/group.rb#48
758
+ def title; end
759
+
760
+ # String representation of the group.
761
+ #
762
+ # @example String representation of a group named 'backend'
763
+ # > Guard::Group.new('backend').to_s
764
+ # => "#<Guard::Group @name=backend @options={}>"
765
+ # @return [String] the string representation
766
+ #
767
+ # source://guard//lib/guard/group.rb#60
768
+ def to_s; end
769
+ end
770
+
771
+ # source://guard//lib/guard/guardfile/evaluator.rb#11
772
+ module Guard::Guardfile; end
773
+
774
+ # This class is responsible for evaluating the Guardfile. It delegates to
775
+ # Guard::Dsl for the actual objects generation from the Guardfile content.
776
+ #
777
+ # TODO: rename this to a Locator or Loader or something
778
+ #
779
+ # @see Guard::Dsl
780
+ #
781
+ # source://guard//lib/guard/guardfile/evaluator.rb#18
782
+ class Guard::Guardfile::Evaluator
783
+ include ::Guard::Deprecated::Evaluator
784
+
785
+ # Initializes a new Guard::Guardfile::Evaluator object.
786
+ #
787
+ # content of a valid Guardfile
788
+ #
789
+ # @option opts
790
+ # @option opts
791
+ # @param opts [Hash] a customizable set of options
792
+ # @return [Evaluator] a new instance of Evaluator
793
+ #
794
+ # source://guard//lib/guard/guardfile/evaluator.rb#57
795
+ def initialize(opts = T.unsafe(nil)); end
796
+
797
+ # @return [Boolean]
798
+ #
799
+ # source://guard//lib/guard/guardfile/evaluator.rb#121
800
+ def custom?; end
801
+
802
+ # Evaluates the DSL methods in the `Guardfile`.
803
+ #
804
+ # path
805
+ #
806
+ # options = { guardfile: '/Users/guardfile/MyAwesomeGuardfile' }
807
+ # Guard::Guardfile::Evaluator.new(options).evaluate
808
+ #
809
+ # @example Programmatically evaluate a Guardfile
810
+ # Guard::Guardfile::Evaluator.new.evaluate
811
+ # @example Programmatically evaluate a Guardfile with a custom Guardfile
812
+ # @example Programmatically evaluate a Guardfile with an inline Guardfile
813
+ #
814
+ # options = { contents: 'guard :rspec' }
815
+ # Guard::Guardfile::Evaluator.new(options).evaluate
816
+ #
817
+ # source://guard//lib/guard/guardfile/evaluator.rb#89
818
+ def evaluate; end
819
+
820
+ # Gets the content of the `Guardfile` concatenated with the global
821
+ # user configuration file.
822
+ #
823
+ # @example Programmatically get the content of the current Guardfile
824
+ # Guard::Guardfile::Evaluator.new.guardfile_contents
825
+ # => "guard :rspec"
826
+ # @return [String] the Guardfile content
827
+ #
828
+ # source://guard//lib/guard/guardfile/evaluator.rb#134
829
+ def guardfile_contents; end
830
+
831
+ # Tests if the current `Guardfile` contains a specific Guard plugin.
832
+ #
833
+ # plugin
834
+ #
835
+ # File.read('Guardfile')
836
+ # => "guard :rspec"
837
+ #
838
+ # Guard::Guardfile::Evaluator.new.guardfile_include?('rspec)
839
+ # => true
840
+ #
841
+ # TODO: rename this method to it matches RSpec examples better
842
+ #
843
+ # @example Programmatically test if a Guardfile contains a specific Guard
844
+ # @param plugin_name [String] the name of the Guard
845
+ # @return [Boolean] whether the Guard plugin has been declared
846
+ #
847
+ # source://guard//lib/guard/guardfile/evaluator.rb#113
848
+ def guardfile_include?(plugin_name); end
849
+
850
+ # Returns the value of attribute guardfile_path.
851
+ #
852
+ # source://guard//lib/guard/guardfile/evaluator.rb#30
853
+ def guardfile_path; end
854
+
855
+ # source://guard//lib/guard/guardfile/evaluator.rb#47
856
+ def guardfile_source; end
857
+
858
+ # @return [Boolean]
859
+ #
860
+ # source://guard//lib/guard/guardfile/evaluator.rb#139
861
+ def inline?; end
862
+
863
+ # Returns the value of attribute options.
864
+ #
865
+ # source://guard//lib/guard/guardfile/evaluator.rb#30
866
+ def options; end
867
+
868
+ # Returns the value of attribute path.
869
+ #
870
+ # source://guard//lib/guard/guardfile/evaluator.rb#119
871
+ def path; end
872
+
873
+ private
874
+
875
+ # source://guard//lib/guard/guardfile/evaluator.rb#156
876
+ def _fetch_guardfile_contents; end
877
+
878
+ # source://guard//lib/guard/guardfile/evaluator.rb#223
879
+ def _from_deprecated(opts); end
880
+
881
+ # source://guard//lib/guard/guardfile/evaluator.rb#212
882
+ def _guardfile_contents; end
883
+
884
+ # @return [Boolean]
885
+ #
886
+ # source://guard//lib/guard/guardfile/evaluator.rb#219
887
+ def _guardfile_contents_usable?; end
888
+
889
+ # source://guard//lib/guard/guardfile/evaluator.rb#145
890
+ def _guardfile_contents_without_user_config; end
891
+
892
+ # source://guard//lib/guard/guardfile/evaluator.rb#149
893
+ def _instance_eval_guardfile(contents); end
894
+
895
+ # source://guard//lib/guard/guardfile/evaluator.rb#200
896
+ def _read(path); end
897
+
898
+ # source://guard//lib/guard/guardfile/evaluator.rb#186
899
+ def _use_default!; end
900
+
901
+ # source://guard//lib/guard/guardfile/evaluator.rb#165
902
+ def _use_inline; end
903
+
904
+ # source://guard//lib/guard/guardfile/evaluator.rb#178
905
+ def _use_provided; end
906
+ end
907
+
908
+ # source://guard//lib/guard/guardfile/evaluator.rb#21
909
+ Guard::Guardfile::Evaluator::DEFAULT_GUARDFILES = T.let(T.unsafe(nil), Array)
910
+
911
+ # source://guard//lib/guard/guardfile/evaluator.rb#27
912
+ Guard::Guardfile::Evaluator::ERROR_NO_GUARDFILE = T.let(T.unsafe(nil), String)
913
+
914
+ # source://guard//lib/guard/guardfile/evaluator.rb#32
915
+ Guard::Guardfile::Evaluator::ERROR_NO_PLUGINS = T.let(T.unsafe(nil), String)
916
+
917
+ # source://guard//lib/guard/guardfile/evaluator.rb#35
918
+ class Guard::Guardfile::Evaluator::Error < ::RuntimeError; end
919
+
920
+ # source://guard//lib/guard/guardfile/evaluator.rb#41
921
+ class Guard::Guardfile::Evaluator::NoCustomGuardfile < ::Guard::Guardfile::Evaluator::Error; end
922
+
923
+ # source://guard//lib/guard/guardfile/evaluator.rb#38
924
+ class Guard::Guardfile::Evaluator::NoGuardfileError < ::Guard::Guardfile::Evaluator::Error; end
925
+
926
+ # source://guard//lib/guard/guardfile/evaluator.rb#44
927
+ class Guard::Guardfile::Evaluator::NoPluginsError < ::Guard::Guardfile::Evaluator::Error; end
928
+
929
+ # source://guard//lib/guard/interactor.rb#4
930
+ class Guard::Interactor
931
+ extend ::Forwardable
932
+
933
+ # Initializes the interactor. This configures
934
+ # Pry and creates some custom commands and aliases
935
+ # for Guard.
936
+ #
937
+ # @return [Interactor] a new instance of Interactor
938
+ #
939
+ # source://guard//lib/guard/interactor.rb#9
940
+ def initialize(no_interaction = T.unsafe(nil)); end
941
+
942
+ # source://forwardable/1.3.1/forwardable.rb#226
943
+ def background(*args, &block); end
944
+
945
+ # source://forwardable/1.3.1/forwardable.rb#226
946
+ def foreground(*args, &block); end
947
+
948
+ # source://forwardable/1.3.1/forwardable.rb#226
949
+ def handle_interrupt(*args, &block); end
950
+
951
+ # @return [Boolean]
952
+ #
953
+ # source://guard//lib/guard/interactor.rb#20
954
+ def interactive?; end
955
+
956
+ private
957
+
958
+ # Returns the value of attribute idle_job.
959
+ #
960
+ # source://guard//lib/guard/interactor.rb#51
961
+ def idle_job; end
962
+
963
+ class << self
964
+ # TODO: allow custom user idle jobs, e.g. [:pry, :sleep, :exit, ...]
965
+ #
966
+ # @return [Boolean]
967
+ #
968
+ # source://guard//lib/guard/interactor.rb#39
969
+ def enabled; end
970
+
971
+ # TODO: handle switching interactors during runtime?
972
+ #
973
+ # source://guard//lib/guard/interactor.rb#46
974
+ def enabled=(_arg0); end
975
+
976
+ # TODO: allow custom user idle jobs, e.g. [:pry, :sleep, :exit, ...]
977
+ #
978
+ # @return [Boolean]
979
+ #
980
+ # source://guard//lib/guard/interactor.rb#39
981
+ def enabled?; end
982
+
983
+ # source://guard//lib/guard/interactor.rb#31
984
+ def options; end
985
+
986
+ # Pass options to interactor's job when it's created
987
+ #
988
+ # source://guard//lib/guard/interactor.rb#36
989
+ def options=(_arg0); end
990
+ end
991
+ end
992
+
993
+ # @private api
994
+ #
995
+ # source://guard//lib/guard/internals/plugins.rb#7
996
+ module Guard::Internals; end
997
+
998
+ # source://guard//lib/guard/internals/debugging.rb#12
999
+ class Guard::Internals::Debugging
1000
+ class << self
1001
+ # Sets up debugging:
1002
+ #
1003
+ # * aborts on thread exceptions
1004
+ # * Set the logging level to `:debug`
1005
+ # * traces execution of Kernel.system and backtick calls
1006
+ #
1007
+ # source://guard//lib/guard/internals/debugging.rb#26
1008
+ def start; end
1009
+
1010
+ # source://guard//lib/guard/internals/debugging.rb#38
1011
+ def stop; end
1012
+
1013
+ private
1014
+
1015
+ # source://guard//lib/guard/internals/debugging.rb#46
1016
+ def _notify(*args); end
1017
+
1018
+ # reset singleton - called by tests
1019
+ #
1020
+ # source://guard//lib/guard/internals/debugging.rb#51
1021
+ def _reset; end
1022
+
1023
+ # source://guard//lib/guard/internals/debugging.rb#58
1024
+ def _trace(mod, meth, &block); end
1025
+
1026
+ # source://guard//lib/guard/internals/debugging.rb#62
1027
+ def _untrace(mod, meth); end
1028
+ end
1029
+ end
1030
+
1031
+ # source://guard//lib/guard/internals/groups.rb#6
1032
+ class Guard::Internals::Groups
1033
+ # @return [Groups] a new instance of Groups
1034
+ #
1035
+ # source://guard//lib/guard/internals/groups.rb#9
1036
+ def initialize; end
1037
+
1038
+ # source://guard//lib/guard/internals/groups.rb#19
1039
+ def add(name, options = T.unsafe(nil)); end
1040
+
1041
+ # source://guard//lib/guard/internals/groups.rb#13
1042
+ def all(filter = T.unsafe(nil)); end
1043
+
1044
+ private
1045
+
1046
+ # source://guard//lib/guard/internals/groups.rb#28
1047
+ def matcher_for(filter); end
1048
+ end
1049
+
1050
+ # source://guard//lib/guard/internals/groups.rb#7
1051
+ Guard::Internals::Groups::DEFAULT_GROUPS = T.let(T.unsafe(nil), Array)
1052
+
1053
+ # source://guard//lib/guard/internals/helpers.rb#4
1054
+ module Guard::Internals::Helpers
1055
+ # source://guard//lib/guard/internals/helpers.rb#5
1056
+ def _relative_pathname(path); end
1057
+ end
1058
+
1059
+ # source://guard//lib/guard/internals/plugins.rb#8
1060
+ class Guard::Internals::Plugins
1061
+ # @return [Plugins] a new instance of Plugins
1062
+ #
1063
+ # source://guard//lib/guard/internals/plugins.rb#9
1064
+ def initialize; end
1065
+
1066
+ # TODO: should it allow duplicates? (probably yes because of different
1067
+ # configs or groups)
1068
+ #
1069
+ # source://guard//lib/guard/internals/plugins.rb#25
1070
+ def add(name, options); end
1071
+
1072
+ # source://guard//lib/guard/internals/plugins.rb#13
1073
+ def all(filter = T.unsafe(nil)); end
1074
+
1075
+ # source://guard//lib/guard/internals/plugins.rb#19
1076
+ def remove(plugin); end
1077
+
1078
+ private
1079
+
1080
+ # source://guard//lib/guard/internals/plugins.rb#31
1081
+ def matcher_for(filter); end
1082
+ end
1083
+
1084
+ # source://guard//lib/guard/internals/queue.rb#3
1085
+ class Guard::Internals::Queue
1086
+ # @return [Queue] a new instance of Queue
1087
+ #
1088
+ # source://guard//lib/guard/internals/queue.rb#4
1089
+ def initialize(commander); end
1090
+
1091
+ # source://guard//lib/guard/internals/queue.rb#31
1092
+ def <<(changes); end
1093
+
1094
+ # @return [Boolean]
1095
+ #
1096
+ # source://guard//lib/guard/internals/queue.rb#27
1097
+ def pending?; end
1098
+
1099
+ # Process the change queue, running tasks within the main Guard thread
1100
+ #
1101
+ # source://guard//lib/guard/internals/queue.rb#10
1102
+ def process; end
1103
+
1104
+ private
1105
+
1106
+ # source://guard//lib/guard/internals/queue.rb#37
1107
+ def _run_actions(actions); end
1108
+ end
1109
+
1110
+ # source://guard//lib/guard/internals/scope.rb#6
1111
+ class Guard::Internals::Scope
1112
+ # @return [Scope] a new instance of Scope
1113
+ #
1114
+ # source://guard//lib/guard/internals/scope.rb#7
1115
+ def initialize; end
1116
+
1117
+ # source://guard//lib/guard/internals/scope.rb#51
1118
+ def from_interactor(scope); end
1119
+
1120
+ # TODO: refactor
1121
+ #
1122
+ # source://guard//lib/guard/internals/scope.rb#20
1123
+ def grouped_plugins(scope = T.unsafe(nil)); end
1124
+
1125
+ # source://guard//lib/guard/internals/scope.rb#56
1126
+ def titles(scope = T.unsafe(nil)); end
1127
+
1128
+ # source://guard//lib/guard/internals/scope.rb#12
1129
+ def to_hash; end
1130
+
1131
+ private
1132
+
1133
+ # source://guard//lib/guard/internals/scope.rb#108
1134
+ def _find_non_empty_scope(type, local_scope); end
1135
+
1136
+ # source://guard//lib/guard/internals/scope.rb#112
1137
+ def _groups; end
1138
+
1139
+ # TODO: let the Plugins and Groups classes handle this?
1140
+ # TODO: why even instantiate?? just to check if it exists?
1141
+ #
1142
+ # source://guard//lib/guard/internals/scope.rb#77
1143
+ def _hashify_scope(type); end
1144
+
1145
+ # source://guard//lib/guard/internals/scope.rb#102
1146
+ def _instantiate(meth, obj); end
1147
+
1148
+ # source://guard//lib/guard/internals/scope.rb#116
1149
+ def _plugins; end
1150
+
1151
+ # TODO: move to session
1152
+ #
1153
+ # source://guard//lib/guard/internals/scope.rb#68
1154
+ def _scope_names(new_scope, name); end
1155
+ end
1156
+
1157
+ # TODO: split into a commandline class and session (plugins, groups)
1158
+ # TODO: swap session and metadata
1159
+ #
1160
+ # source://guard//lib/guard/internals/session.rb#11
1161
+ class Guard::Internals::Session
1162
+ # @return [Session] a new instance of Session
1163
+ #
1164
+ # source://guard//lib/guard/internals/session.rb#51
1165
+ def initialize(new_options); end
1166
+
1167
+ # @return [Boolean]
1168
+ #
1169
+ # source://guard//lib/guard/internals/session.rb#102
1170
+ def clear?; end
1171
+
1172
+ # source://guard//lib/guard/internals/session.rb#98
1173
+ def clearing(on); end
1174
+
1175
+ # @return [Boolean]
1176
+ #
1177
+ # source://guard//lib/guard/internals/session.rb#102
1178
+ def clearing?; end
1179
+
1180
+ # source://guard//lib/guard/internals/session.rb#43
1181
+ def cmdline_groups; end
1182
+
1183
+ # source://guard//lib/guard/internals/session.rb#47
1184
+ def cmdline_plugins; end
1185
+
1186
+ # TODO: call this from within action, not within interactor command
1187
+ #
1188
+ # source://guard//lib/guard/internals/session.rb#162
1189
+ def convert_scope(entries); end
1190
+
1191
+ # @return [Boolean]
1192
+ #
1193
+ # source://guard//lib/guard/internals/session.rb#108
1194
+ def debug?; end
1195
+
1196
+ # source://guard//lib/guard/internals/session.rb#136
1197
+ def evaluator_options; end
1198
+
1199
+ # Returns the value of attribute groups.
1200
+ #
1201
+ # source://guard//lib/guard/internals/session.rb#13
1202
+ def groups; end
1203
+
1204
+ # TODO: create a EvaluatorResult class?
1205
+ #
1206
+ # source://guard//lib/guard/internals/session.rb#89
1207
+ def guardfile_group_scope; end
1208
+
1209
+ # Returns the value of attribute guardfile_ignore.
1210
+ #
1211
+ # source://guard//lib/guard/internals/session.rb#93
1212
+ def guardfile_ignore; end
1213
+
1214
+ # source://guard//lib/guard/internals/session.rb#94
1215
+ def guardfile_ignore=(ignores); end
1216
+
1217
+ # Returns the value of attribute guardfile_ignore_bang.
1218
+ #
1219
+ # source://guard//lib/guard/internals/session.rb#91
1220
+ def guardfile_ignore_bang; end
1221
+
1222
+ # Sets the attribute guardfile_ignore_bang
1223
+ #
1224
+ # @param value the value to set the attribute guardfile_ignore_bang to.
1225
+ #
1226
+ # source://guard//lib/guard/internals/session.rb#91
1227
+ def guardfile_ignore_bang=(_arg0); end
1228
+
1229
+ # source://guard//lib/guard/internals/session.rb#155
1230
+ def guardfile_notification=(config); end
1231
+
1232
+ # Returns the value of attribute guardfile_plugin_scope.
1233
+ #
1234
+ # source://guard//lib/guard/internals/session.rb#90
1235
+ def guardfile_plugin_scope; end
1236
+
1237
+ # source://guard//lib/guard/internals/session.rb#74
1238
+ def guardfile_scope(scope); end
1239
+
1240
+ # Returns the value of attribute interactor_name.
1241
+ #
1242
+ # source://guard//lib/guard/internals/session.rb#159
1243
+ def interactor_name; end
1244
+
1245
+ # source://guard//lib/guard/internals/session.rb#123
1246
+ def listener_args; end
1247
+
1248
+ # source://guard//lib/guard/internals/session.rb#145
1249
+ def notify_options; end
1250
+
1251
+ # Returns the value of attribute plugins.
1252
+ #
1253
+ # source://guard//lib/guard/internals/session.rb#12
1254
+ def plugins; end
1255
+
1256
+ # source://guard//lib/guard/internals/session.rb#112
1257
+ def watchdirs; end
1258
+
1259
+ # set by Dsl with :directories() command
1260
+ #
1261
+ # source://guard//lib/guard/internals/session.rb#118
1262
+ def watchdirs=(dirs); end
1263
+ end
1264
+
1265
+ # source://guard//lib/guard/internals/session.rb#15
1266
+ Guard::Internals::Session::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
1267
+
1268
+ # source://guard//lib/guard/internals/state.rb#10
1269
+ class Guard::Internals::State
1270
+ # Minimal setup for non-interactive commands (list, init, show, etc.)
1271
+ #
1272
+ # @return [State] a new instance of State
1273
+ #
1274
+ # source://guard//lib/guard/internals/state.rb#12
1275
+ def initialize(cmdline_opts); end
1276
+
1277
+ # Returns the value of attribute scope.
1278
+ #
1279
+ # source://guard//lib/guard/internals/state.rb#21
1280
+ def scope; end
1281
+
1282
+ # Returns the value of attribute session.
1283
+ #
1284
+ # source://guard//lib/guard/internals/state.rb#22
1285
+ def session; end
1286
+ end
1287
+
1288
+ # source://guard//lib/guard/internals/tracing.rb#3
1289
+ module Guard::Internals::Tracing
1290
+ class << self
1291
+ # source://guard//lib/guard/internals/tracing.rb#4
1292
+ def trace(mod, meth); end
1293
+
1294
+ # source://guard//lib/guard/internals/tracing.rb#19
1295
+ def untrace(mod, meth); end
1296
+ end
1297
+ end
1298
+
1299
+ # source://guard//lib/guard/internals/traps.rb#3
1300
+ module Guard::Internals::Traps
1301
+ class << self
1302
+ # source://guard//lib/guard/internals/traps.rb#4
1303
+ def handle(signal, &block); end
1304
+ end
1305
+ end
1306
+
1307
+ # source://guard//lib/guard/notifier.rb#5
1308
+ class Guard::Notifier
1309
+ class << self
1310
+ # source://guard//lib/guard/notifier.rb#6
1311
+ def connect(options = T.unsafe(nil)); end
1312
+
1313
+ # Used by dsl describer
1314
+ #
1315
+ # source://guard//lib/guard/notifier.rb#65
1316
+ def detected; end
1317
+
1318
+ # source://guard//lib/guard/notifier.rb#18
1319
+ def disconnect; end
1320
+
1321
+ # source://guard//lib/guard/notifier.rb#27
1322
+ def notify(message, options = T.unsafe(nil)); end
1323
+
1324
+ # Used by dsl describer
1325
+ #
1326
+ # source://guard//lib/guard/notifier.rb#60
1327
+ def supported; end
1328
+
1329
+ # source://guard//lib/guard/notifier.rb#44
1330
+ def toggle; end
1331
+
1332
+ # source://guard//lib/guard/notifier.rb#40
1333
+ def turn_on; end
1334
+ end
1335
+ end
1336
+
1337
+ # source://guard//lib/guard/notifier.rb#23
1338
+ Guard::Notifier::DEPRECATED_IMPLICIT_CONNECT = T.let(T.unsafe(nil), String)
1339
+
1340
+ # A class that holds options. Can be instantiated with default options.
1341
+ #
1342
+ # source://guard//lib/guard/options.rb#12
1343
+ class Guard::Options < ::Thor::CoreExt::HashWithIndifferentAccess
1344
+ # Initializes an Guard::Options object. `default_opts` is merged into
1345
+ # `opts`.
1346
+ #
1347
+ # @param opts [Hash] the options
1348
+ # @param default_opts [Hash] the default options
1349
+ # @return [Options] a new instance of Options
1350
+ #
1351
+ # source://guard//lib/guard/options.rb#13
1352
+ def initialize(opts = T.unsafe(nil), default_opts = T.unsafe(nil)); end
1353
+
1354
+ # workaround for: https://github.com/erikhuda/thor/issues/504
1355
+ #
1356
+ # source://guard//lib/guard/options.rb#18
1357
+ def fetch(name); end
1358
+ end
1359
+
1360
+ # Base class from which every Guard plugin implementation must inherit.
1361
+ #
1362
+ # Guard will trigger the {#start}, {#stop}, {#reload}, {#run_all} and
1363
+ # {#run_on_changes} ({#run_on_additions}, {#run_on_modifications} and
1364
+ # {#run_on_removals}) task methods depending on user interaction and file
1365
+ # modification.
1366
+ #
1367
+ # {#run_on_changes} could be implemented to handle all the changes task case
1368
+ # (additions, modifications, removals) in once, or each task can be
1369
+ # implemented separately with a specific behavior.
1370
+ #
1371
+ # In each of these Guard task methods you have to implement some work when
1372
+ # you want to support this kind of task. The return value of each Guard task
1373
+ # method is not evaluated by Guard, but it'll be passed to the "_end" hook
1374
+ # for further evaluation. You can throw `:task_has_failed` to indicate that
1375
+ # your Guard plugin method was not successful, and successive Guard plugin
1376
+ # tasks will be aborted when the group has set the `:halt_on_fail` option.
1377
+ #
1378
+ # Each Guard plugin should provide a template Guardfile located within the Gem
1379
+ # at `lib/guard/guard-name/templates/Guardfile`.
1380
+ #
1381
+ # Watchers for a Guard plugin should return a file path or an array of files
1382
+ # paths to Guard, but if your Guard plugin wants to allow any return value
1383
+ # from a watcher, you can set the `any_return` option to true.
1384
+ #
1385
+ # If one of those methods raises an exception other than `:task_has_failed`,
1386
+ # the `Guard::GuardName` instance will be removed from the active Guard
1387
+ # plugins.
1388
+ #
1389
+ # @example Throw :task_has_failed
1390
+ #
1391
+ # def run_all
1392
+ # if !runner.run(['all'])
1393
+ # throw :task_has_failed
1394
+ # end
1395
+ # end
1396
+ # @see Guard::Group
1397
+ #
1398
+ # source://guard//lib/guard/plugin.rb#44
1399
+ class Guard::Plugin
1400
+ # Initializes a Guard plugin.
1401
+ # Don't do any work here, especially as Guard plugins get initialized even
1402
+ # if they are not in an active group!
1403
+ #
1404
+ # @option options
1405
+ # @option options
1406
+ # @option options
1407
+ # @param options [Hash] the Guard plugin options
1408
+ # @return [Plugin] a new instance of Plugin
1409
+ #
1410
+ # source://guard//lib/guard/plugin.rb#285
1411
+ def initialize(options = T.unsafe(nil)); end
1412
+
1413
+ # Returns the value of attribute callbacks.
1414
+ #
1415
+ # source://guard//lib/guard/plugin.rb#129
1416
+ def callbacks; end
1417
+
1418
+ # Sets the attribute callbacks
1419
+ #
1420
+ # @param value the value to set the attribute callbacks to.
1421
+ #
1422
+ # source://guard//lib/guard/plugin.rb#129
1423
+ def callbacks=(_arg0); end
1424
+
1425
+ # Returns the value of attribute group.
1426
+ #
1427
+ # source://guard//lib/guard/plugin.rb#129
1428
+ def group; end
1429
+
1430
+ # Sets the attribute group
1431
+ #
1432
+ # @param value the value to set the attribute group to.
1433
+ #
1434
+ # source://guard//lib/guard/plugin.rb#129
1435
+ def group=(_arg0); end
1436
+
1437
+ # When event is a Symbol, {#hook} will generate a hook name
1438
+ # by concatenating the method name from where {#hook} is called
1439
+ # with the given Symbol.
1440
+ #
1441
+ # Here, when {Guard::Plugin#run_all} is called, {#hook} will notify
1442
+ # callbacks registered for the "run_all_foo" event.
1443
+ #
1444
+ # When event is a String, {#hook} will directly turn the String
1445
+ # into a Symbol.
1446
+ #
1447
+ # When {Guard::Plugin::run_all} is called, {#hook} will notify
1448
+ # callbacks registered for the "foo_bar" event.
1449
+ #
1450
+ # @example Add a hook with a Symbol
1451
+ #
1452
+ # def run_all
1453
+ # hook :foo
1454
+ # end
1455
+ # @example Add a hook with a String
1456
+ #
1457
+ # def run_all
1458
+ # hook "foo_bar"
1459
+ # end
1460
+ # @param event [Symbol, String] the name of the Guard event
1461
+ # @param args [Array] the parameters are passed as is to the callbacks
1462
+ # registered for the given event.
1463
+ #
1464
+ # source://guard//lib/guard/plugin.rb#116
1465
+ def hook(event, *args); end
1466
+
1467
+ # Returns the plugin's name (without "guard-").
1468
+ #
1469
+ # @example Name for Guard::RSpec
1470
+ # Guard::RSpec.new.name
1471
+ # #=> "rspec"
1472
+ # @return [String]
1473
+ #
1474
+ # source://guard//lib/guard/plugin.rb#240
1475
+ def name; end
1476
+
1477
+ # Returns the value of attribute options.
1478
+ #
1479
+ # source://guard//lib/guard/plugin.rb#129
1480
+ def options; end
1481
+
1482
+ # Sets the attribute options
1483
+ #
1484
+ # @param value the value to set the attribute options to.
1485
+ #
1486
+ # source://guard//lib/guard/plugin.rb#129
1487
+ def options=(_arg0); end
1488
+
1489
+ # Returns the plugin's class name without the Guard:: namespace.
1490
+ #
1491
+ # @example Title for Guard::RSpec
1492
+ # Guard::RSpec.new.title
1493
+ # #=> "RSpec"
1494
+ # @return [String]
1495
+ #
1496
+ # source://guard//lib/guard/plugin.rb#252
1497
+ def title; end
1498
+
1499
+ # String representation of the plugin.
1500
+ #
1501
+ # @example String representation of an instance of the Guard::RSpec plugin
1502
+ #
1503
+ # Guard::RSpec.new.title
1504
+ # #=> "#<Guard::RSpec @name=rspec @group=#<Guard::Group @name=default
1505
+ # @options={}> @watchers=[] @callbacks=[] @options={all_after_pass:
1506
+ # true}>"
1507
+ # @return [String] the string representation
1508
+ #
1509
+ # source://guard//lib/guard/plugin.rb#267
1510
+ def to_s; end
1511
+
1512
+ # Returns the value of attribute watchers.
1513
+ #
1514
+ # source://guard//lib/guard/plugin.rb#129
1515
+ def watchers; end
1516
+
1517
+ # Sets the attribute watchers
1518
+ #
1519
+ # @param value the value to set the attribute watchers to.
1520
+ #
1521
+ # source://guard//lib/guard/plugin.rb#129
1522
+ def watchers=(_arg0); end
1523
+
1524
+ private
1525
+
1526
+ # Add all the Guard::Plugin's callbacks to the global @callbacks array
1527
+ # that's used by Guard to know which callbacks to notify.
1528
+ #
1529
+ # source://guard//lib/guard/plugin.rb#297
1530
+ def _register_callbacks; end
1531
+
1532
+ class << self
1533
+ # Add a callback.
1534
+ #
1535
+ # @param listener [Block] the listener to notify
1536
+ # @param guard_plugin [Guard::Plugin] the Guard plugin to add the callback
1537
+ # @param events [Array<Symbol>] the events to register
1538
+ #
1539
+ # source://guard//lib/guard/plugin.rb#62
1540
+ def add_callback(listener, guard_plugin, events); end
1541
+
1542
+ # Get all callbacks registered for all Guard plugins present in the
1543
+ # Guardfile.
1544
+ #
1545
+ # source://guard//lib/guard/plugin.rb#52
1546
+ def callbacks; end
1547
+
1548
+ # Returns the non-namespaced class name of the plugin
1549
+ #
1550
+ # @example Non-namespaced class name for Guard::RSpec
1551
+ # Guard::RSpec.non_namespaced_classname
1552
+ # #=> "RSpec"
1553
+ # @return [String]
1554
+ #
1555
+ # source://guard//lib/guard/plugin.rb#140
1556
+ def non_namespaced_classname; end
1557
+
1558
+ # Returns the non-namespaced name of the plugin
1559
+ #
1560
+ # @example Non-namespaced name for Guard::RSpec
1561
+ # Guard::RSpec.non_namespaced_name
1562
+ # #=> "rspec"
1563
+ # @return [String]
1564
+ #
1565
+ # source://guard//lib/guard/plugin.rb#153
1566
+ def non_namespaced_name; end
1567
+
1568
+ # Notify a callback.
1569
+ #
1570
+ # @param guard_plugin [Guard::Plugin] the Guard plugin to add the callback
1571
+ # @param event [Symbol] the event to trigger
1572
+ # @param args [Array] the arguments for the listener
1573
+ #
1574
+ # source://guard//lib/guard/plugin.rb#74
1575
+ def notify(guard_plugin, event, *args); end
1576
+
1577
+ # Reset all callbacks.
1578
+ #
1579
+ # TODO: remove (not used anywhere)
1580
+ #
1581
+ # source://guard//lib/guard/plugin.rb#83
1582
+ def reset_callbacks!; end
1583
+
1584
+ # Specify the source for the Guardfile template.
1585
+ # Each Guard plugin can redefine this method to add its own logic.
1586
+ #
1587
+ # @param plugin_location [String] the plugin location
1588
+ #
1589
+ # source://guard//lib/guard/plugin.rb#162
1590
+ def template(plugin_location); end
1591
+ end
1592
+ end
1593
+
1594
+ # source://guard//lib/guard/plugin.rb#45
1595
+ Guard::Plugin::TEMPLATE_FORMAT = T.let(T.unsafe(nil), String)
1596
+
1597
+ # This class contains useful methods to:
1598
+ #
1599
+ # * Fetch all the Guard plugins names;
1600
+ # * Initialize a plugin, get its location;
1601
+ # * Return its class name;
1602
+ # * Add its template to the Guardfile.
1603
+ #
1604
+ # source://guard//lib/guard/plugin_util.rb#11
1605
+ class Guard::PluginUtil
1606
+ # Initializes a new `Guard::PluginUtil` object.
1607
+ #
1608
+ # @param name [String] the name of the Guard plugin
1609
+ # @return [PluginUtil] a new instance of PluginUtil
1610
+ #
1611
+ # source://guard//lib/guard/plugin_util.rb#36
1612
+ def initialize(name); end
1613
+
1614
+ # Adds a plugin's template to the Guardfile.
1615
+ #
1616
+ # source://guard//lib/guard/plugin_util.rb#126
1617
+ def add_to_guardfile; end
1618
+
1619
+ # Initializes a new `Guard::Plugin` with the given `options` hash. This
1620
+ # methods handles plugins that inherit from the deprecated `Guard::Guard`
1621
+ # class as well as plugins that inherit from `Guard::Plugin`.
1622
+ #
1623
+ # upgrade for Guard 2.0
1624
+ #
1625
+ # @return [Guard::Plugin] the initialized plugin
1626
+ # @return [Guard::Guard] the initialized plugin. This return type is
1627
+ # deprecated and the plugin's maintainer should update it to be
1628
+ # compatible with Guard 2.0. For more information on how to upgrade for
1629
+ # Guard 2.0, please head over to:
1630
+ # https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0
1631
+ # @see Guard::Plugin
1632
+ # @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How to
1633
+ #
1634
+ # source://guard//lib/guard/plugin_util.rb#55
1635
+ def initialize_plugin(options); end
1636
+
1637
+ # Returns the value of attribute name.
1638
+ #
1639
+ # source://guard//lib/guard/plugin_util.rb#18
1640
+ def name; end
1641
+
1642
+ # Sets the attribute name
1643
+ #
1644
+ # @param value the value to set the attribute name to.
1645
+ #
1646
+ # source://guard//lib/guard/plugin_util.rb#18
1647
+ def name=(_arg0); end
1648
+
1649
+ # Tries to load the Guard plugin main class. This transforms the supplied
1650
+ # plugin name into a class name:
1651
+ #
1652
+ # * `guardname` will become `Guard::Guardname`
1653
+ # * `dashed-guard-name` will become `Guard::DashedGuardName`
1654
+ # * `underscore_guard_name` will become `Guard::UnderscoreGuardName`
1655
+ #
1656
+ # When no class is found with the strict case sensitive rules, another
1657
+ # try is made to locate the class without matching case:
1658
+ #
1659
+ # * `rspec` will find a class `Guard::RSpec`
1660
+ #
1661
+ # not be printed
1662
+ #
1663
+ # @option options
1664
+ # @param options [Hash] a customizable set of options
1665
+ # @return [Class, nil] the loaded class
1666
+ #
1667
+ # source://guard//lib/guard/plugin_util.rb#96
1668
+ def plugin_class(options = T.unsafe(nil)); end
1669
+
1670
+ # Locates a path to a Guard plugin gem.
1671
+ #
1672
+ # @return [String] the full path to the plugin gem
1673
+ #
1674
+ # source://guard//lib/guard/plugin_util.rb#73
1675
+ def plugin_location; end
1676
+
1677
+ private
1678
+
1679
+ # Guesses the most probable name for the current plugin based on its name.
1680
+ #
1681
+ # @example Returns the most probable name for a plugin
1682
+ # > Guard::PluginUtil.new('rspec').send(:_constant_name)
1683
+ # => "Rspec"
1684
+ #
1685
+ # source://guard//lib/guard/plugin_util.rb#172
1686
+ def _constant_name; end
1687
+
1688
+ # source://guard//lib/guard/plugin_util.rb#177
1689
+ def _full_gem_path(name); end
1690
+
1691
+ # Returns the constant for the current plugin.
1692
+ #
1693
+ # @example Returns the constant for a plugin
1694
+ # > Guard::PluginUtil.new('rspec').send(:_plugin_constant)
1695
+ # => Guard::RSpec
1696
+ #
1697
+ # source://guard//lib/guard/plugin_util.rb#160
1698
+ def _plugin_constant; end
1699
+
1700
+ class << self
1701
+ # @return [Boolean]
1702
+ #
1703
+ # source://guard//lib/guard/plugin_util.rb#182
1704
+ def _gem_valid?(gem); end
1705
+
1706
+ # Returns a list of Guard plugin Gem names installed locally.
1707
+ #
1708
+ # @return [Array<String>] a list of Guard plugin gem names
1709
+ #
1710
+ # source://guard//lib/guard/plugin_util.rb#24
1711
+ def plugin_names; end
1712
+ end
1713
+ end
1714
+
1715
+ # source://guard//lib/guard/plugin_util.rb#12
1716
+ Guard::PluginUtil::ERROR_NO_GUARD_OR_CLASS = T.let(T.unsafe(nil), String)
1717
+
1718
+ # source://guard//lib/guard/plugin_util.rb#15
1719
+ Guard::PluginUtil::INFO_ADDED_GUARD_TO_GUARDFILE = T.let(T.unsafe(nil), String)
1720
+
1721
+ # The runner is responsible for running all methods defined on each plugin.
1722
+ #
1723
+ # source://guard//lib/guard/runner.rb#9
1724
+ class Guard::Runner
1725
+ # Run a Guard plugin task, but remove the Guard plugin when his work leads
1726
+ # to a system failure.
1727
+ #
1728
+ # When the Group has `:halt_on_fail` disabled, we've to catch
1729
+ # `:task_has_failed` here in order to avoid an uncaught throw error.
1730
+ #
1731
+ # @param plugin [Guard::Plugin] guard the Guard to execute
1732
+ # @param task [Symbol] the task to run
1733
+ # @param args [Array] the arguments for the task
1734
+ # @raise [:task_has_failed] when task has failed
1735
+ #
1736
+ # source://guard//lib/guard/runner.rb#78
1737
+ def _supervise(plugin, task, *args); end
1738
+
1739
+ # Runs a Guard-task on all registered plugins.
1740
+ #
1741
+ # on
1742
+ #
1743
+ # @param task [Symbol] the task to run
1744
+ # @param scope_hash [Hash] either the Guard plugin or the group to run the task
1745
+ #
1746
+ # source://guard//lib/guard/runner.rb#17
1747
+ def run(task, scope_hash = T.unsafe(nil)); end
1748
+
1749
+ # Runs the appropriate tasks on all registered plugins
1750
+ # based on the passed changes.
1751
+ #
1752
+ # @param modified [Array<String>] the modified paths.
1753
+ # @param added [Array<String>] the added paths.
1754
+ # @param removed [Array<String>] the removed paths.
1755
+ #
1756
+ # source://guard//lib/guard/runner.rb#44
1757
+ def run_on_changes(modified, added, removed); end
1758
+
1759
+ private
1760
+
1761
+ # source://guard//lib/guard/runner.rb#116
1762
+ def _run_group_plugins(plugins); end
1763
+
1764
+ class << self
1765
+ # Returns the symbol that has to be caught when running a supervised task.
1766
+ #
1767
+ # @note If a Guard group is being run and it has the `:halt_on_fail`
1768
+ # option set, this method returns :no_catch as it will be caught at the
1769
+ # group level.
1770
+ # @param guard [Guard::Plugin] the Guard plugin to execute
1771
+ # @return [Symbol] the symbol to catch
1772
+ #
1773
+ # source://guard//lib/guard/runner.rb#110
1774
+ def stopping_symbol_for(guard); end
1775
+ end
1776
+ end
1777
+
1778
+ # source://guard//lib/guard/runner.rb#34
1779
+ Guard::Runner::ADDITION_TASKS = T.let(T.unsafe(nil), Array)
1780
+
1781
+ # source://guard//lib/guard/runner.rb#30
1782
+ Guard::Runner::MODIFICATION_TASKS = T.let(T.unsafe(nil), Array)
1783
+
1784
+ # source://guard//lib/guard/runner.rb#28
1785
+ Guard::Runner::PLUGIN_FAILED = T.let(T.unsafe(nil), String)
1786
+
1787
+ # source://guard//lib/guard/runner.rb#35
1788
+ Guard::Runner::REMOVAL_TASKS = T.let(T.unsafe(nil), Array)
1789
+
1790
+ module Guard::SrbVersion; end
1791
+
1792
+ # source://guard//lib/guard/terminal.rb#4
1793
+ class Guard::Terminal
1794
+ class << self
1795
+ # source://guard//lib/guard/terminal.rb#6
1796
+ def clear; end
1797
+ end
1798
+ end
1799
+
1800
+ # The UI class helps to format messages for the user. Everything that is
1801
+ # logged through this class is considered either as an error message or a
1802
+ # diagnostic message and is written to standard error ($stderr).
1803
+ #
1804
+ # If your Guard plugin does some output that is piped into another process
1805
+ # for further processing, please just write it to STDOUT with `puts`.
1806
+ #
1807
+ # source://guard//lib/guard/ui/colors.rb#2
1808
+ module Guard::UI
1809
+ include ::Guard::UI::Colors
1810
+
1811
+ class << self
1812
+ # Show a scoped action message.
1813
+ #
1814
+ # @param action [String] the action to show
1815
+ # @param scope [Hash] hash with a guard or a group scope
1816
+ #
1817
+ # source://guard//lib/guard/ui.rb#161
1818
+ def action_with_scopes(action, scope); end
1819
+
1820
+ # Clear the output if clearable.
1821
+ #
1822
+ # source://guard//lib/guard/ui.rb#131
1823
+ def clear(opts = T.unsafe(nil)); end
1824
+
1825
+ # Allow the screen to be cleared again.
1826
+ #
1827
+ # source://guard//lib/guard/ui.rb#152
1828
+ def clearable; end
1829
+
1830
+ # Show a debug message that is prefixed with DEBUG and a timestamp.
1831
+ #
1832
+ # @option options
1833
+ # @option options
1834
+ # @param message [String] the message to show
1835
+ # @param options [Hash] a customizable set of options
1836
+ #
1837
+ # source://guard//lib/guard/ui.rb#119
1838
+ def debug(message, options = T.unsafe(nil)); end
1839
+
1840
+ # Show a red deprecation message that is prefixed with DEPRECATION.
1841
+ # It has a log level of `warn`.
1842
+ #
1843
+ # @option options
1844
+ # @option options
1845
+ # @param message [String] the message to show
1846
+ # @param options [Hash] a customizable set of options
1847
+ #
1848
+ # source://guard//lib/guard/ui.rb#105
1849
+ def deprecation(message, options = T.unsafe(nil)); end
1850
+
1851
+ # Show a red error message that is prefixed with ERROR.
1852
+ #
1853
+ # @option options
1854
+ # @option options
1855
+ # @param message [String] the message to show
1856
+ # @param options [Hash] a customizable set of options
1857
+ #
1858
+ # source://guard//lib/guard/ui.rb#94
1859
+ def error(message, options = T.unsafe(nil)); end
1860
+
1861
+ # Show an info message.
1862
+ #
1863
+ # @option options
1864
+ # @option options
1865
+ # @param message [String] the message to show
1866
+ # @param options [Hash] a customizable set of options
1867
+ #
1868
+ # source://guard//lib/guard/ui.rb#74
1869
+ def info(message, options = T.unsafe(nil)); end
1870
+
1871
+ # Assigns a log level
1872
+ #
1873
+ # source://guard//lib/guard/ui.rb#63
1874
+ def level=(new_level); end
1875
+
1876
+ # Get the Guard::UI logger instance
1877
+ #
1878
+ # source://guard//lib/guard/ui.rb#26
1879
+ def logger; end
1880
+
1881
+ # Get the logger options
1882
+ #
1883
+ # @return [Hash] the logger options
1884
+ #
1885
+ # source://guard//lib/guard/ui.rb#46
1886
+ def options; end
1887
+
1888
+ # Set the logger options
1889
+ #
1890
+ # TODO: deprecate?
1891
+ #
1892
+ # @option options
1893
+ # @option options
1894
+ # @option options
1895
+ # @param options [Hash] the logger options
1896
+ #
1897
+ # source://guard//lib/guard/ui.rb#58
1898
+ def options=(options); end
1899
+
1900
+ # TODO: arguments: UI uses Guard::options anyway
1901
+ #
1902
+ # @private api
1903
+ #
1904
+ # source://guard//lib/guard/ui.rb#145
1905
+ def reset_and_clear; end
1906
+
1907
+ # Reset a line.
1908
+ #
1909
+ # source://guard//lib/guard/ui.rb#125
1910
+ def reset_line; end
1911
+
1912
+ # Since logger is global, for Aruba in-process to properly
1913
+ # separate output between calls, we need to reset
1914
+ #
1915
+ # We don't use logger=() since it's expected to be a Lumberjack instance
1916
+ #
1917
+ # source://guard//lib/guard/ui.rb#38
1918
+ def reset_logger; end
1919
+
1920
+ # Show a yellow warning message that is prefixed with WARNING.
1921
+ #
1922
+ # @option options
1923
+ # @option options
1924
+ # @param message [String] the message to show
1925
+ # @param options [Hash] a customizable set of options
1926
+ #
1927
+ # source://guard//lib/guard/ui.rb#84
1928
+ def warning(message, options = T.unsafe(nil)); end
1929
+
1930
+ private
1931
+
1932
+ # Tries to extract the calling Guard plugin name
1933
+ # from the call stack.
1934
+ #
1935
+ # @param depth [Integer] the stack depth
1936
+ # @return [String] the Guard plugin name
1937
+ #
1938
+ # source://guard//lib/guard/ui.rb#203
1939
+ def _calling_plugin_name; end
1940
+
1941
+ # Filters log messages depending on either the
1942
+ # `:only`` or `:except` option.
1943
+ #
1944
+ # @param plugin [String] the calling plugin name
1945
+ # @yield When the message should be logged
1946
+ # @yieldparam param [String] the calling plugin name
1947
+ #
1948
+ # source://guard//lib/guard/ui.rb#175
1949
+ def _filter(plugin); end
1950
+
1951
+ # @private
1952
+ #
1953
+ # source://guard//lib/guard/ui.rb#188
1954
+ def _filtered_logger_message(message, method, color_name, options = T.unsafe(nil)); end
1955
+
1956
+ # Colorizes a text message. See the constant in the UI class for possible
1957
+ # color_options parameters. You can pass optionally :bright, a foreground
1958
+ # color and a background color.
1959
+ #
1960
+ # @example
1961
+ #
1962
+ # color('Hello World', :red, :bright)
1963
+ # @param text [String] the text to colorize
1964
+ # @param color_options [Array] the color options
1965
+ #
1966
+ # source://guard//lib/guard/ui.rb#247
1967
+ def color(text, *color_options); end
1968
+
1969
+ # Checks if color output can be enabled.
1970
+ #
1971
+ # @return [Boolean] whether color is enabled or not
1972
+ #
1973
+ # source://guard//lib/guard/ui.rb#217
1974
+ def color_enabled?; end
1975
+ end
1976
+ end
1977
+
1978
+ # source://guard//lib/guard/ui/colors.rb#3
1979
+ module Guard::UI::Colors; end
1980
+
1981
+ # Black background color
1982
+ #
1983
+ # source://guard//lib/guard/ui/colors.rb#32
1984
+ Guard::UI::Colors::ANSI_ESCAPE_BGBLACK = T.let(T.unsafe(nil), String)
1985
+
1986
+ # Blue background color
1987
+ #
1988
+ # source://guard//lib/guard/ui/colors.rb#44
1989
+ Guard::UI::Colors::ANSI_ESCAPE_BGBLUE = T.let(T.unsafe(nil), String)
1990
+
1991
+ # Cyan background color
1992
+ #
1993
+ # source://guard//lib/guard/ui/colors.rb#50
1994
+ Guard::UI::Colors::ANSI_ESCAPE_BGCYAN = T.let(T.unsafe(nil), String)
1995
+
1996
+ # Green background color
1997
+ #
1998
+ # source://guard//lib/guard/ui/colors.rb#38
1999
+ Guard::UI::Colors::ANSI_ESCAPE_BGGREEN = T.let(T.unsafe(nil), String)
2000
+
2001
+ # Magenta background color
2002
+ #
2003
+ # source://guard//lib/guard/ui/colors.rb#47
2004
+ Guard::UI::Colors::ANSI_ESCAPE_BGMAGENTA = T.let(T.unsafe(nil), String)
2005
+
2006
+ # Red background color
2007
+ #
2008
+ # source://guard//lib/guard/ui/colors.rb#35
2009
+ Guard::UI::Colors::ANSI_ESCAPE_BGRED = T.let(T.unsafe(nil), String)
2010
+
2011
+ # White background color
2012
+ #
2013
+ # source://guard//lib/guard/ui/colors.rb#53
2014
+ Guard::UI::Colors::ANSI_ESCAPE_BGWHITE = T.let(T.unsafe(nil), String)
2015
+
2016
+ # Yellow background color
2017
+ #
2018
+ # source://guard//lib/guard/ui/colors.rb#41
2019
+ Guard::UI::Colors::ANSI_ESCAPE_BGYELLOW = T.let(T.unsafe(nil), String)
2020
+
2021
+ # Black foreground color
2022
+ #
2023
+ # source://guard//lib/guard/ui/colors.rb#8
2024
+ Guard::UI::Colors::ANSI_ESCAPE_BLACK = T.let(T.unsafe(nil), String)
2025
+
2026
+ # Blue foreground color
2027
+ #
2028
+ # source://guard//lib/guard/ui/colors.rb#20
2029
+ Guard::UI::Colors::ANSI_ESCAPE_BLUE = T.let(T.unsafe(nil), String)
2030
+
2031
+ # Brighten the color
2032
+ #
2033
+ # source://guard//lib/guard/ui/colors.rb#5
2034
+ Guard::UI::Colors::ANSI_ESCAPE_BRIGHT = T.let(T.unsafe(nil), String)
2035
+
2036
+ # Cyan foreground color
2037
+ #
2038
+ # source://guard//lib/guard/ui/colors.rb#26
2039
+ Guard::UI::Colors::ANSI_ESCAPE_CYAN = T.let(T.unsafe(nil), String)
2040
+
2041
+ # Green foreground color
2042
+ #
2043
+ # source://guard//lib/guard/ui/colors.rb#14
2044
+ Guard::UI::Colors::ANSI_ESCAPE_GREEN = T.let(T.unsafe(nil), String)
2045
+
2046
+ # Magenta foreground color
2047
+ #
2048
+ # source://guard//lib/guard/ui/colors.rb#23
2049
+ Guard::UI::Colors::ANSI_ESCAPE_MAGENTA = T.let(T.unsafe(nil), String)
2050
+
2051
+ # Red foreground color
2052
+ #
2053
+ # source://guard//lib/guard/ui/colors.rb#11
2054
+ Guard::UI::Colors::ANSI_ESCAPE_RED = T.let(T.unsafe(nil), String)
2055
+
2056
+ # White foreground color
2057
+ #
2058
+ # source://guard//lib/guard/ui/colors.rb#29
2059
+ Guard::UI::Colors::ANSI_ESCAPE_WHITE = T.let(T.unsafe(nil), String)
2060
+
2061
+ # Yellow foreground color
2062
+ #
2063
+ # source://guard//lib/guard/ui/colors.rb#17
2064
+ Guard::UI::Colors::ANSI_ESCAPE_YELLOW = T.let(T.unsafe(nil), String)
2065
+
2066
+ # source://guard//lib/guard/ui/config.rb#6
2067
+ class Guard::UI::Config < ::Guard::Options
2068
+ # @return [Config] a new instance of Config
2069
+ #
2070
+ # source://guard//lib/guard/ui/config.rb#20
2071
+ def initialize(options = T.unsafe(nil)); end
2072
+
2073
+ # source://guard//lib/guard/ui/config.rb#48
2074
+ def [](name); end
2075
+
2076
+ # source://guard//lib/guard/ui/config.rb#35
2077
+ def device; end
2078
+
2079
+ # source://guard//lib/guard/ui/config.rb#44
2080
+ def except; end
2081
+
2082
+ # Returns the value of attribute logger_config.
2083
+ #
2084
+ # source://guard//lib/guard/ui/config.rb#18
2085
+ def logger_config; end
2086
+
2087
+ # source://guard//lib/guard/ui/config.rb#40
2088
+ def only; end
2089
+
2090
+ # source://guard//lib/guard/ui/config.rb#59
2091
+ def with_progname(name); end
2092
+ end
2093
+
2094
+ # source://guard//lib/guard/ui/config.rb#7
2095
+ Guard::UI::Config::DEFAULTS = T.let(T.unsafe(nil), Hash)
2096
+
2097
+ # source://guard//lib/guard/ui/config.rb#16
2098
+ Guard::UI::Config::DEPRECATED_OPTS = T.let(T.unsafe(nil), Array)
2099
+
2100
+ # source://guard//lib/guard/ui/logger.rb#5
2101
+ class Guard::UI::Logger; end
2102
+
2103
+ # source://guard//lib/guard/ui/logger.rb#6
2104
+ class Guard::UI::Logger::Config < ::Guard::Options
2105
+ # @return [Config] a new instance of Config
2106
+ #
2107
+ # source://guard//lib/guard/ui/logger.rb#20
2108
+ def initialize(options = T.unsafe(nil)); end
2109
+
2110
+ # source://guard//lib/guard/ui/logger.rb#24
2111
+ def level=(value); end
2112
+ end
2113
+
2114
+ # source://guard//lib/guard/ui/logger.rb#7
2115
+ Guard::UI::Logger::Config::DEFAULTS = T.let(T.unsafe(nil), Hash)
2116
+
2117
+ # The watcher defines a RegExp that will be matched against file system
2118
+ # modifications.
2119
+ # When a watcher matches a change, an optional action block is executed to
2120
+ # enable processing the file system change result.
2121
+ #
2122
+ # source://guard//lib/guard/watcher/pattern/match_result.rb#2
2123
+ class Guard::Watcher
2124
+ extend ::Guard::Deprecated::Watcher::ClassMethods
2125
+
2126
+ # Initializes a file watcher.
2127
+ #
2128
+ # @param pattern [String, Regexp] the pattern to be watched by the Guard
2129
+ # plugin
2130
+ # @param action [Block] the action to execute before passing the result to
2131
+ # the Guard plugin
2132
+ # @return [Watcher] a new instance of Watcher
2133
+ #
2134
+ # source://guard//lib/guard/watcher.rb#24
2135
+ def initialize(pattern, action = T.unsafe(nil)); end
2136
+
2137
+ # Compare with other watcher
2138
+ #
2139
+ # @param other [Guard::Watcher] other watcher for comparing
2140
+ # @return [true, false] equal or not
2141
+ #
2142
+ # source://guard//lib/guard/watcher.rb#32
2143
+ def ==(other); end
2144
+
2145
+ # Returns the value of attribute action.
2146
+ #
2147
+ # source://guard//lib/guard/watcher.rb#15
2148
+ def action; end
2149
+
2150
+ # Sets the attribute action
2151
+ #
2152
+ # @param value the value to set the attribute action to.
2153
+ #
2154
+ # source://guard//lib/guard/watcher.rb#15
2155
+ def action=(_arg0); end
2156
+
2157
+ # Executes a watcher action.
2158
+ #
2159
+ # @param matches [String, MatchData] the matched path or the match from the
2160
+ # Regex
2161
+ # @return [String] the final paths
2162
+ #
2163
+ # source://guard//lib/guard/watcher.rb#81
2164
+ def call_action(matches); end
2165
+
2166
+ # source://guard//lib/guard/watcher.rb#70
2167
+ def match(string_or_pathname); end
2168
+
2169
+ # Returns the value of attribute pattern.
2170
+ #
2171
+ # source://guard//lib/guard/watcher.rb#15
2172
+ def pattern; end
2173
+
2174
+ # Sets the attribute pattern
2175
+ #
2176
+ # @param value the value to set the attribute pattern to.
2177
+ #
2178
+ # source://guard//lib/guard/watcher.rb#15
2179
+ def pattern=(_arg0); end
2180
+
2181
+ class << self
2182
+ # Finds the files that matches a Guard plugin.
2183
+ #
2184
+ # @param guard [Guard::Plugin] the Guard plugin which watchers are used
2185
+ # @param files [Array<String>] the changed files
2186
+ # @return [Array<Object>] the matched watcher response
2187
+ #
2188
+ # source://guard//lib/guard/watcher.rb#42
2189
+ def match_files(guard, files); end
2190
+ end
2191
+ end
2192
+
2193
+ # source://guard//lib/guard/watcher/pattern/match_result.rb#3
2194
+ class Guard::Watcher::Pattern
2195
+ class << self
2196
+ # source://guard//lib/guard/watcher/pattern.rb#12
2197
+ def create(pattern); end
2198
+ end
2199
+ end
2200
+
2201
+ # TODO: remove before Guard 3.x
2202
+ #
2203
+ # source://guard//lib/guard/watcher/pattern/deprecated_regexp.rb#7
2204
+ class Guard::Watcher::Pattern::DeprecatedRegexp
2205
+ # @return [DeprecatedRegexp] a new instance of DeprecatedRegexp
2206
+ #
2207
+ # source://guard//lib/guard/watcher/pattern/deprecated_regexp.rb#8
2208
+ def initialize(pattern); end
2209
+
2210
+ # @return [Boolean]
2211
+ #
2212
+ # source://guard//lib/guard/watcher/pattern/deprecated_regexp.rb#16
2213
+ def deprecated?; end
2214
+
2215
+ class << self
2216
+ # source://guard//lib/guard/watcher/pattern/deprecated_regexp.rb#12
2217
+ def convert(pattern); end
2218
+
2219
+ # source://guard//lib/guard/watcher/pattern/deprecated_regexp.rb#21
2220
+ def show_deprecation(pattern); end
2221
+ end
2222
+ end
2223
+
2224
+ # source://guard//lib/guard/watcher/pattern/match_result.rb#4
2225
+ class Guard::Watcher::Pattern::MatchResult
2226
+ # @return [MatchResult] a new instance of MatchResult
2227
+ #
2228
+ # source://guard//lib/guard/watcher/pattern/match_result.rb#5
2229
+ def initialize(match_result, original_value); end
2230
+
2231
+ # source://guard//lib/guard/watcher/pattern/match_result.rb#10
2232
+ def [](index); end
2233
+ end
2234
+
2235
+ # source://guard//lib/guard/watcher/pattern/matcher.rb#4
2236
+ class Guard::Watcher::Pattern::Matcher
2237
+ # @return [Matcher] a new instance of Matcher
2238
+ #
2239
+ # source://guard//lib/guard/watcher/pattern/matcher.rb#7
2240
+ def initialize(obj); end
2241
+
2242
+ # Compare with other matcher
2243
+ #
2244
+ # @param other [Guard::Watcher::Pattern::Matcher] other matcher for comparing
2245
+ # @return [true, false] equal or not
2246
+ #
2247
+ # source://guard//lib/guard/watcher/pattern/matcher.rb#15
2248
+ def ==(other); end
2249
+
2250
+ # source://guard//lib/guard/watcher/pattern/matcher.rb#19
2251
+ def match(string_or_pathname); end
2252
+
2253
+ # Returns the value of attribute matcher.
2254
+ #
2255
+ # source://guard//lib/guard/watcher/pattern/matcher.rb#5
2256
+ def matcher; end
2257
+
2258
+ private
2259
+
2260
+ # source://guard//lib/guard/watcher/pattern/matcher.rb#25
2261
+ def normalized(string_or_pathname); end
2262
+ end
2263
+
2264
+ # source://guard//lib/guard/watcher/pattern/pathname_path.rb#6
2265
+ class Guard::Watcher::Pattern::PathnamePath < ::Guard::Watcher::Pattern::SimplePath
2266
+ protected
2267
+
2268
+ # source://guard//lib/guard/watcher/pattern/pathname_path.rb#9
2269
+ def normalize(string_or_pathname); end
2270
+ end
2271
+
2272
+ # source://guard//lib/guard/watcher/pattern/simple_path.rb#4
2273
+ class Guard::Watcher::Pattern::SimplePath
2274
+ # @return [SimplePath] a new instance of SimplePath
2275
+ #
2276
+ # source://guard//lib/guard/watcher/pattern/simple_path.rb#5
2277
+ def initialize(string_or_pathname); end
2278
+
2279
+ # source://guard//lib/guard/watcher/pattern/simple_path.rb#9
2280
+ def match(string_or_pathname); end
2281
+
2282
+ protected
2283
+
2284
+ # source://guard//lib/guard/watcher/pattern/simple_path.rb#17
2285
+ def normalize(string_or_pathname); end
2286
+ end