visualize_packwerk 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +32 -0
  3. data/lib/visualize_packwerk/graph_interface.rb +17 -0
  4. data/lib/visualize_packwerk/node_interface.rb +29 -0
  5. data/lib/visualize_packwerk/package_graph.rb +48 -0
  6. data/lib/visualize_packwerk/package_node.rb +28 -0
  7. data/lib/visualize_packwerk/package_relationships.rb +158 -0
  8. data/lib/visualize_packwerk/railtie.rb +15 -0
  9. data/lib/visualize_packwerk/tasks/visualize_packwerk.rake +73 -0
  10. data/lib/visualize_packwerk/team_graph.rb +52 -0
  11. data/lib/visualize_packwerk/team_node.rb +27 -0
  12. data/lib/visualize_packwerk.rb +17 -0
  13. data/sorbet/config +2 -0
  14. data/sorbet/rbi/gems/activesupport@7.0.3.1.rbi +76 -0
  15. data/sorbet/rbi/gems/ast@2.4.2.rbi +522 -0
  16. data/sorbet/rbi/gems/code_ownership@1.28.0.rbi +411 -0
  17. data/sorbet/rbi/gems/code_teams@1.0.0.rbi +138 -0
  18. data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
  19. data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +8 -0
  20. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +866 -0
  21. data/sorbet/rbi/gems/i18n@1.12.0.rbi +8 -0
  22. data/sorbet/rbi/gems/json@2.6.2.rbi +1423 -0
  23. data/sorbet/rbi/gems/method_source@1.0.0.rbi +8 -0
  24. data/sorbet/rbi/gems/minitest@5.16.2.rbi +9 -0
  25. data/sorbet/rbi/gems/package_protections@1.3.0.rbi +654 -0
  26. data/sorbet/rbi/gems/parallel@1.22.1.rbi +163 -0
  27. data/sorbet/rbi/gems/parse_packwerk@0.11.0.rbi +148 -0
  28. data/sorbet/rbi/gems/parser@3.1.2.0.rbi +4261 -0
  29. data/sorbet/rbi/gems/pry@0.14.1.rbi +8 -0
  30. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +8 -0
  31. data/sorbet/rbi/gems/rake@13.0.6.rbi +1854 -0
  32. data/sorbet/rbi/gems/rbi@0.0.15.rbi +2340 -0
  33. data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +8 -0
  34. data/sorbet/rbi/gems/rexml@3.2.5.rbi +8 -0
  35. data/sorbet/rbi/gems/rspec-core@3.11.0.rbi +7698 -0
  36. data/sorbet/rbi/gems/rspec-expectations@3.11.0.rbi +6201 -0
  37. data/sorbet/rbi/gems/rspec-mocks@3.11.1.rbi +3625 -0
  38. data/sorbet/rbi/gems/rspec-support@3.11.0.rbi +1176 -0
  39. data/sorbet/rbi/gems/rspec@3.11.0.rbi +40 -0
  40. data/sorbet/rbi/gems/rubocop-ast@1.19.1.rbi +8 -0
  41. data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +8 -0
  42. data/sorbet/rbi/gems/rubocop@1.33.0.rbi +8 -0
  43. data/sorbet/rbi/gems/ruby-graphviz@1.2.5.rbi +840 -0
  44. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +8 -0
  45. data/sorbet/rbi/gems/spoom@1.1.11.rbi +1600 -0
  46. data/sorbet/rbi/gems/tapioca@0.8.3.rbi +1978 -0
  47. data/sorbet/rbi/gems/thor@1.2.1.rbi +2921 -0
  48. data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +8 -0
  49. data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +8 -0
  50. data/sorbet/rbi/gems/unparser@0.6.5.rbi +8 -0
  51. data/sorbet/rbi/gems/webrick@1.7.0.rbi +1802 -0
  52. data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +288 -0
  53. data/sorbet/rbi/gems/yard@0.9.28.rbi +12863 -0
  54. data/sorbet/tapioca/config.yml +13 -0
  55. data/sorbet/tapioca/require.rb +7 -0
  56. metadata +241 -0
@@ -0,0 +1,1854 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `rake` gem.
5
+ # Please instead update this file by running `bin/tapioca gem rake`.
6
+
7
+ # :stopdoc:
8
+ #
9
+ # Some top level Constants.
10
+ FileList = Rake::FileList
11
+
12
+ # --
13
+ # This a FileUtils extension that defines several additional commands to be
14
+ # added to the FileUtils utility functions.
15
+ module FileUtils
16
+ include ::FileUtils::StreamUtils_
17
+ extend ::FileUtils::StreamUtils_
18
+
19
+ # Run a Ruby interpreter with the given arguments.
20
+ #
21
+ # Example:
22
+ # ruby %{-pe '$_.upcase!' <README}
23
+ def ruby(*args, **options, &block); end
24
+
25
+ # Attempt to do a normal file link, but fall back to a copy if the link
26
+ # fails.
27
+ def safe_ln(*args, **options); end
28
+
29
+ # Run the system command +cmd+. If multiple arguments are given the command
30
+ # is run directly (without the shell, same semantics as Kernel::exec and
31
+ # Kernel::system).
32
+ #
33
+ # It is recommended you use the multiple argument form over interpolating
34
+ # user input for both usability and security reasons. With the multiple
35
+ # argument form you can easily process files with spaces or other shell
36
+ # reserved characters in them. With the multiple argument form your rake
37
+ # tasks are not vulnerable to users providing an argument like
38
+ # <code>; rm # -rf /</code>.
39
+ #
40
+ # If a block is given, upon command completion the block is called with an
41
+ # OK flag (true on a zero exit status) and a Process::Status object.
42
+ # Without a block a RuntimeError is raised when the command exits non-zero.
43
+ #
44
+ # Examples:
45
+ #
46
+ # sh 'ls -ltr'
47
+ #
48
+ # sh 'ls', 'file with spaces'
49
+ #
50
+ # # check exit status after command runs
51
+ # sh %{grep pattern file} do |ok, res|
52
+ # if !ok
53
+ # puts "pattern not found (status = #{res.exitstatus})"
54
+ # end
55
+ # end
56
+ def sh(*cmd, &block); end
57
+
58
+ # Split a file path into individual directory names.
59
+ #
60
+ # Example:
61
+ # split_all("a/b/c") => ['a', 'b', 'c']
62
+ def split_all(path); end
63
+
64
+ private
65
+
66
+ def create_shell_runner(cmd); end
67
+ def set_verbose_option(options); end
68
+ def sh_show_command(cmd); end
69
+ end
70
+
71
+ FileUtils::LN_SUPPORTED = T.let(T.unsafe(nil), Array)
72
+
73
+ # Path to the currently running Ruby program
74
+ FileUtils::RUBY = T.let(T.unsafe(nil), String)
75
+
76
+ class Module
77
+ # Check for an existing method in the current class before extending. If
78
+ # the method already exists, then a warning is printed and the extension is
79
+ # not added. Otherwise the block is yielded and any definitions in the
80
+ # block will take effect.
81
+ #
82
+ # Usage:
83
+ #
84
+ # class String
85
+ # rake_extension("xyz") do
86
+ # def xyz
87
+ # ...
88
+ # end
89
+ # end
90
+ # end
91
+ def rake_extension(method); end
92
+ end
93
+
94
+ module Rake
95
+ extend ::FileUtils::StreamUtils_
96
+ extend ::FileUtils
97
+ extend ::Rake::FileUtilsExt
98
+
99
+ class << self
100
+ # Add files to the rakelib list
101
+ def add_rakelib(*files); end
102
+
103
+ # Current Rake Application
104
+ def application; end
105
+
106
+ # Set the current Rake application object.
107
+ def application=(app); end
108
+
109
+ # Yield each file or directory component.
110
+ def each_dir_parent(dir); end
111
+
112
+ # Convert Pathname and Pathname-like objects to strings;
113
+ # leave everything else alone
114
+ def from_pathname(path); end
115
+
116
+ # Load a rakefile.
117
+ def load_rakefile(path); end
118
+
119
+ # Return the original directory where the Rake application was started.
120
+ def original_dir; end
121
+
122
+ def suggested_thread_count; end
123
+
124
+ # Make +block_application+ the default rake application inside a block so
125
+ # you can load rakefiles into a different application.
126
+ #
127
+ # This is useful when you want to run rake tasks inside a library without
128
+ # running rake in a sub-shell.
129
+ #
130
+ # Example:
131
+ #
132
+ # Dir.chdir 'other/directory'
133
+ #
134
+ # other_rake = Rake.with_application do |rake|
135
+ # rake.load_rakefile
136
+ # end
137
+ #
138
+ # puts other_rake.tasks
139
+ def with_application(block_application = T.unsafe(nil)); end
140
+ end
141
+ end
142
+
143
+ # Rake main application object. When invoking +rake+ from the
144
+ # command line, a Rake::Application object is created and run.
145
+ class Rake::Application
146
+ include ::Rake::TaskManager
147
+ include ::Rake::TraceOutput
148
+
149
+ # Initialize a Rake::Application object.
150
+ #
151
+ # @return [Application] a new instance of Application
152
+ def initialize; end
153
+
154
+ # Add a file to the list of files to be imported.
155
+ def add_import(fn); end
156
+
157
+ # Add a loader to handle imported files ending in the extension
158
+ # +ext+.
159
+ def add_loader(ext, loader); end
160
+
161
+ # Collect the list of tasks on the command line. If no tasks are
162
+ # given, return a list containing only the default task.
163
+ # Environmental assignments are processed at this time as well.
164
+ #
165
+ # `args` is the list of arguments to peruse to get the list of tasks.
166
+ # It should be the command line that was given to rake, less any
167
+ # recognised command-line options, which OptionParser.parse will
168
+ # have taken care of already.
169
+ def collect_command_line_tasks(args); end
170
+
171
+ # Default task name ("default").
172
+ # (May be overridden by subclasses)
173
+ def default_task_name; end
174
+
175
+ # Warn about deprecated usage.
176
+ #
177
+ # Example:
178
+ # Rake.application.deprecate("import", "Rake.import", caller.first)
179
+ def deprecate(old_usage, new_usage, call_site); end
180
+
181
+ def display_cause_details(ex); end
182
+
183
+ # Display the error message that caused the exception.
184
+ def display_error_message(ex); end
185
+
186
+ def display_exception_backtrace(ex); end
187
+ def display_exception_details(ex); end
188
+ def display_exception_details_seen; end
189
+ def display_exception_message_details(ex); end
190
+
191
+ # Display the tasks and prerequisites
192
+ def display_prerequisites; end
193
+
194
+ # Display the tasks and comments.
195
+ def display_tasks_and_comments; end
196
+
197
+ # Calculate the dynamic width of the
198
+ def dynamic_width; end
199
+
200
+ def dynamic_width_stty; end
201
+ def dynamic_width_tput; end
202
+
203
+ # Exit the program because of an unhandled exception.
204
+ # (may be overridden by subclasses)
205
+ def exit_because_of_exception(ex); end
206
+
207
+ def find_rakefile_location; end
208
+
209
+ # Read and handle the command line options. Returns the command line
210
+ # arguments that we didn't understand, which should (in theory) be just
211
+ # task names and env vars.
212
+ def handle_options(argv); end
213
+
214
+ # @return [Boolean]
215
+ def has_cause?(ex); end
216
+
217
+ # True if one of the files in RAKEFILES is in the current directory.
218
+ # If a match is found, it is copied into @rakefile.
219
+ def have_rakefile; end
220
+
221
+ # Initialize the command line parameters and app name.
222
+ def init(app_name = T.unsafe(nil), argv = T.unsafe(nil)); end
223
+
224
+ # Invokes a task with arguments that are extracted from +task_string+
225
+ def invoke_task(task_string); end
226
+
227
+ # Load the pending list of imported files.
228
+ def load_imports; end
229
+
230
+ # Find the rakefile and then load it and any pending imports.
231
+ def load_rakefile; end
232
+
233
+ # The name of the application (typically 'rake')
234
+ def name; end
235
+
236
+ # Application options from the command line
237
+ def options; end
238
+
239
+ # The original directory where rake was invoked.
240
+ def original_dir; end
241
+
242
+ def parse_task_string(string); end
243
+ def print_rakefile_directory(location); end
244
+
245
+ # Similar to the regular Ruby +require+ command, but will check
246
+ # for *.rake files in addition to *.rb files.
247
+ def rake_require(file_name, paths = T.unsafe(nil), loaded = T.unsafe(nil)); end
248
+
249
+ # Name of the actual rakefile used.
250
+ def rakefile; end
251
+
252
+ def rakefile_location(backtrace = T.unsafe(nil)); end
253
+ def raw_load_rakefile; end
254
+
255
+ # Run the Rake application. The run method performs the following
256
+ # three steps:
257
+ #
258
+ # * Initialize the command line options (+init+).
259
+ # * Define the tasks (+load_rakefile+).
260
+ # * Run the top level tasks (+top_level+).
261
+ #
262
+ # If you wish to build a custom rake command, you should call
263
+ # +init+ on your application. Then define any tasks. Finally,
264
+ # call +top_level+ to run your top level tasks.
265
+ def run(argv = T.unsafe(nil)); end
266
+
267
+ # Run the given block with the thread startup and shutdown.
268
+ def run_with_threads; end
269
+
270
+ def set_default_options; end
271
+
272
+ # Provide standard exception handling for the given block.
273
+ def standard_exception_handling; end
274
+
275
+ # A list of all the standard options used in rake, suitable for
276
+ # passing to OptionParser.
277
+ def standard_rake_options; end
278
+
279
+ # The directory path containing the system wide rakefiles.
280
+ def system_dir; end
281
+
282
+ # Number of columns on the terminal
283
+ def terminal_columns; end
284
+
285
+ # Number of columns on the terminal
286
+ def terminal_columns=(_arg0); end
287
+
288
+ def terminal_width; end
289
+
290
+ # Return the thread pool used for multithreaded processing.
291
+ def thread_pool; end
292
+
293
+ # Run the top level tasks of a Rake application.
294
+ def top_level; end
295
+
296
+ # List of the top level task names (task names from the command line).
297
+ def top_level_tasks; end
298
+
299
+ def trace(*strings); end
300
+ def truncate(string, width); end
301
+
302
+ # We will truncate output if we are outputting to a TTY or if we've been
303
+ # given an explicit column width to honor
304
+ #
305
+ # @return [Boolean]
306
+ def truncate_output?; end
307
+
308
+ # Override the detected TTY output state (mostly for testing)
309
+ def tty_output=(_arg0); end
310
+
311
+ # True if we are outputting to TTY, false otherwise
312
+ #
313
+ # @return [Boolean]
314
+ def tty_output?; end
315
+
316
+ # @return [Boolean]
317
+ def unix?; end
318
+
319
+ # @return [Boolean]
320
+ def windows?; end
321
+
322
+ private
323
+
324
+ def glob(path, &block); end
325
+
326
+ # Does the exception have a task invocation chain?
327
+ #
328
+ # @return [Boolean]
329
+ def has_chain?(exception); end
330
+
331
+ def select_tasks_to_show(options, show_tasks, value); end
332
+ def select_trace_output(options, trace_option, value); end
333
+ def sort_options(options); end
334
+ def standard_system_dir; end
335
+ end
336
+
337
+ Rake::Application::DEFAULT_RAKEFILES = T.let(T.unsafe(nil), Array)
338
+
339
+ module Rake::Backtrace
340
+ class << self
341
+ def collapse(backtrace); end
342
+ end
343
+ end
344
+
345
+ Rake::Backtrace::SUPPRESSED_PATHS = T.let(T.unsafe(nil), Array)
346
+ Rake::Backtrace::SUPPRESSED_PATHS_RE = T.let(T.unsafe(nil), String)
347
+ Rake::Backtrace::SUPPRESS_PATTERN = T.let(T.unsafe(nil), Regexp)
348
+ Rake::Backtrace::SYS_KEYS = T.let(T.unsafe(nil), Array)
349
+ Rake::Backtrace::SYS_PATHS = T.let(T.unsafe(nil), Array)
350
+
351
+ # Mixin for creating easily cloned objects.
352
+ module Rake::Cloneable
353
+ private
354
+
355
+ # The hook that is invoked by 'clone' and 'dup' methods.
356
+ def initialize_copy(source); end
357
+ end
358
+
359
+ class Rake::CommandLineOptionError < ::StandardError; end
360
+
361
+ # Based on a script at:
362
+ # http://stackoverflow.com/questions/891537/ruby-detect-number-of-cpus-installed
363
+ class Rake::CpuCounter
364
+ def count; end
365
+ def count_with_default(default = T.unsafe(nil)); end
366
+
367
+ class << self
368
+ def count; end
369
+ end
370
+ end
371
+
372
+ # DSL is a module that provides #task, #desc, #namespace, etc. Use this
373
+ # when you'd like to use rake outside the top level scope.
374
+ #
375
+ # For a Rakefile you run from the command line this module is automatically
376
+ # included.
377
+ module Rake::DSL
378
+ include ::FileUtils::StreamUtils_
379
+ include ::FileUtils
380
+ include ::Rake::FileUtilsExt
381
+
382
+ private
383
+
384
+ # Describes the next rake task. Duplicate descriptions are discarded.
385
+ # Descriptions are shown with <code>rake -T</code> (up to the first
386
+ # sentence) and <code>rake -D</code> (the entire description).
387
+ #
388
+ # Example:
389
+ # desc "Run the Unit Tests"
390
+ # task test: [:build]
391
+ # # ... run tests
392
+ # end
393
+ def desc(description); end
394
+
395
+ # Declare a set of files tasks to create the given directories on
396
+ # demand.
397
+ #
398
+ # Example:
399
+ # directory "testdata/doc"
400
+ def directory(*args, &block); end
401
+
402
+ # Declare a file task.
403
+ #
404
+ # Example:
405
+ # file "config.cfg" => ["config.template"] do
406
+ # open("config.cfg", "w") do |outfile|
407
+ # open("config.template") do |infile|
408
+ # while line = infile.gets
409
+ # outfile.puts line
410
+ # end
411
+ # end
412
+ # end
413
+ # end
414
+ def file(*args, &block); end
415
+
416
+ # Declare a file creation task.
417
+ # (Mainly used for the directory command).
418
+ def file_create(*args, &block); end
419
+
420
+ # Import the partial Rakefiles +fn+. Imported files are loaded
421
+ # _after_ the current file is completely loaded. This allows the
422
+ # import statement to appear anywhere in the importing file, and yet
423
+ # allowing the imported files to depend on objects defined in the
424
+ # importing file.
425
+ #
426
+ # A common use of the import statement is to include files
427
+ # containing dependency declarations.
428
+ #
429
+ # See also the --rakelibdir command line option.
430
+ #
431
+ # Example:
432
+ # import ".depend", "my_rules"
433
+ def import(*fns); end
434
+
435
+ # Declare a task that performs its prerequisites in
436
+ # parallel. Multitasks does *not* guarantee that its prerequisites
437
+ # will execute in any given order (which is obvious when you think
438
+ # about it)
439
+ #
440
+ # Example:
441
+ # multitask deploy: %w[deploy_gem deploy_rdoc]
442
+ def multitask(*args, &block); end
443
+
444
+ # Create a new rake namespace and use it for evaluating the given
445
+ # block. Returns a NameSpace object that can be used to lookup
446
+ # tasks defined in the namespace.
447
+ #
448
+ # Example:
449
+ #
450
+ # ns = namespace "nested" do
451
+ # # the "nested:run" task
452
+ # task :run
453
+ # end
454
+ # task_run = ns[:run] # find :run in the given namespace.
455
+ #
456
+ # Tasks can also be defined in a namespace by using a ":" in the task
457
+ # name:
458
+ #
459
+ # task "nested:test" do
460
+ # # ...
461
+ # end
462
+ def namespace(name = T.unsafe(nil), &block); end
463
+
464
+ # Declare a rule for auto-tasks.
465
+ #
466
+ # Example:
467
+ # rule '.o' => '.c' do |t|
468
+ # sh 'cc', '-o', t.name, t.source
469
+ # end
470
+ def rule(*args, &block); end
471
+
472
+ # :call-seq:
473
+ # task(task_name)
474
+ # task(task_name: dependencies)
475
+ # task(task_name, arguments => dependencies)
476
+ #
477
+ # Declare a basic task. The +task_name+ is always the first argument. If
478
+ # the task name contains a ":" it is defined in that namespace.
479
+ #
480
+ # The +dependencies+ may be a single task name or an Array of task names.
481
+ # The +argument+ (a single name) or +arguments+ (an Array of names) define
482
+ # the arguments provided to the task.
483
+ #
484
+ # The task, argument and dependency names may be either symbols or
485
+ # strings.
486
+ #
487
+ # A task with a single dependency:
488
+ #
489
+ # task clobber: %w[clean] do
490
+ # rm_rf "html"
491
+ # end
492
+ #
493
+ # A task with an argument and a dependency:
494
+ #
495
+ # task :package, [:version] => :test do |t, args|
496
+ # # ...
497
+ # end
498
+ #
499
+ # To invoke this task from the command line:
500
+ #
501
+ # $ rake package[1.2.3]
502
+ def task(*args, &block); end
503
+ end
504
+
505
+ # Default Rakefile loader used by +import+.
506
+ class Rake::DefaultLoader
507
+ # Loads a rakefile into the current application from +fn+
508
+ def load(fn); end
509
+ end
510
+
511
+ Rake::EARLY = T.let(T.unsafe(nil), Rake::EarlyTime)
512
+ Rake::EMPTY_TASK_ARGS = T.let(T.unsafe(nil), Rake::TaskArguments)
513
+
514
+ # EarlyTime is a fake timestamp that occurs _before_ any other time value.
515
+ class Rake::EarlyTime
516
+ include ::Comparable
517
+ include ::Singleton
518
+ extend ::Singleton::SingletonClassMethods
519
+
520
+ # The EarlyTime always comes before +other+!
521
+ def <=>(other); end
522
+
523
+ def to_s; end
524
+ end
525
+
526
+ # A FileCreationTask is a file task that when used as a dependency will be
527
+ # needed if and only if the file has not been created. Once created, it is
528
+ # not re-triggered if any of its dependencies are newer, nor does trigger
529
+ # any rebuilds of tasks that depend on it whenever it is updated.
530
+ class Rake::FileCreationTask < ::Rake::FileTask
531
+ # Is this file task needed? Yes if it doesn't exist.
532
+ #
533
+ # @return [Boolean]
534
+ def needed?; end
535
+
536
+ # Time stamp for file creation task. This time stamp is earlier
537
+ # than any other time stamp.
538
+ def timestamp; end
539
+ end
540
+
541
+ # A FileList is essentially an array with a few helper methods defined to
542
+ # make file manipulation a bit easier.
543
+ #
544
+ # FileLists are lazy. When given a list of glob patterns for possible files
545
+ # to be included in the file list, instead of searching the file structures
546
+ # to find the files, a FileList holds the pattern for latter use.
547
+ #
548
+ # This allows us to define a number of FileList to match any number of
549
+ # files, but only search out the actual files when then FileList itself is
550
+ # actually used. The key is that the first time an element of the
551
+ # FileList/Array is requested, the pending patterns are resolved into a real
552
+ # list of file names.
553
+ class Rake::FileList
554
+ include ::Rake::Cloneable
555
+
556
+ # Create a file list from the globbable patterns given. If you wish to
557
+ # perform multiple includes or excludes at object build time, use the
558
+ # "yield self" pattern.
559
+ #
560
+ # Example:
561
+ # file_list = FileList.new('lib/**/*.rb', 'test/test*.rb')
562
+ #
563
+ # pkg_files = FileList.new('lib/**/*') do |fl|
564
+ # fl.exclude(/\bCVS\b/)
565
+ # end
566
+ #
567
+ # @return [FileList] a new instance of FileList
568
+ # @yield [_self]
569
+ # @yieldparam _self [Rake::FileList] the object that the method was called on
570
+ def initialize(*patterns); end
571
+
572
+ def &(*args, &block); end
573
+
574
+ # Redefine * to return either a string or a new file list.
575
+ def *(other); end
576
+
577
+ def +(*args, &block); end
578
+ def -(*args, &block); end
579
+ def <<(obj); end
580
+ def <=>(*args, &block); end
581
+
582
+ # A FileList is equal through array equality.
583
+ def ==(array); end
584
+
585
+ def [](*args, &block); end
586
+ def []=(*args, &block); end
587
+
588
+ # Add file names defined by glob patterns to the file list. If an array
589
+ # is given, add each element of the array.
590
+ #
591
+ # Example:
592
+ # file_list.include("*.java", "*.cfg")
593
+ # file_list.include %w( math.c lib.h *.o )
594
+ def add(*filenames); end
595
+
596
+ def all?(*args, &block); end
597
+ def any?(*args, &block); end
598
+ def append(*args, &block); end
599
+ def assoc(*args, &block); end
600
+ def at(*args, &block); end
601
+ def bsearch(*args, &block); end
602
+ def bsearch_index(*args, &block); end
603
+ def chain(*args, &block); end
604
+ def chunk(*args, &block); end
605
+ def chunk_while(*args, &block); end
606
+ def clear(*args, &block); end
607
+
608
+ # Clear all the exclude patterns so that we exclude nothing.
609
+ def clear_exclude; end
610
+
611
+ def collect(*args, &block); end
612
+ def collect!(*args, &block); end
613
+ def collect_concat(*args, &block); end
614
+ def combination(*args, &block); end
615
+ def compact(*args, &block); end
616
+ def compact!(*args, &block); end
617
+ def concat(*args, &block); end
618
+ def count(*args, &block); end
619
+ def cycle(*args, &block); end
620
+ def deconstruct(*args, &block); end
621
+ def delete(*args, &block); end
622
+ def delete_at(*args, &block); end
623
+ def delete_if(*args, &block); end
624
+ def detect(*args, &block); end
625
+ def difference(*args, &block); end
626
+ def dig(*args, &block); end
627
+ def drop(*args, &block); end
628
+ def drop_while(*args, &block); end
629
+ def each(*args, &block); end
630
+ def each_cons(*args, &block); end
631
+ def each_entry(*args, &block); end
632
+ def each_index(*args, &block); end
633
+ def each_slice(*args, &block); end
634
+ def each_with_index(*args, &block); end
635
+ def each_with_object(*args, &block); end
636
+
637
+ # Grep each of the files in the filelist using the given pattern. If a
638
+ # block is given, call the block on each matching line, passing the file
639
+ # name, line number, and the matching line of text. If no block is given,
640
+ # a standard emacs style file:linenumber:line message will be printed to
641
+ # standard out. Returns the number of matched items.
642
+ def egrep(pattern, *options); end
643
+
644
+ def empty?(*args, &block); end
645
+ def entries(*args, &block); end
646
+
647
+ # Register a list of file name patterns that should be excluded from the
648
+ # list. Patterns may be regular expressions, glob patterns or regular
649
+ # strings. In addition, a block given to exclude will remove entries that
650
+ # return true when given to the block.
651
+ #
652
+ # Note that glob patterns are expanded against the file system. If a file
653
+ # is explicitly added to a file list, but does not exist in the file
654
+ # system, then an glob pattern in the exclude list will not exclude the
655
+ # file.
656
+ #
657
+ # Examples:
658
+ # FileList['a.c', 'b.c'].exclude("a.c") => ['b.c']
659
+ # FileList['a.c', 'b.c'].exclude(/^a/) => ['b.c']
660
+ #
661
+ # If "a.c" is a file, then ...
662
+ # FileList['a.c', 'b.c'].exclude("a.*") => ['b.c']
663
+ #
664
+ # If "a.c" is not a file, then ...
665
+ # FileList['a.c', 'b.c'].exclude("a.*") => ['a.c', 'b.c']
666
+ def exclude(*patterns, &block); end
667
+
668
+ # Should the given file name be excluded from the list?
669
+ #
670
+ # NOTE: This method was formerly named "exclude?", but Rails
671
+ # introduced an exclude? method as an array method and setup a
672
+ # conflict with file list. We renamed the method to avoid
673
+ # confusion. If you were using "FileList#exclude?" in your user
674
+ # code, you will need to update.
675
+ #
676
+ # @return [Boolean]
677
+ def excluded_from_list?(fn); end
678
+
679
+ # Return a new file list that only contains file names from the current
680
+ # file list that exist on the file system.
681
+ def existing; end
682
+
683
+ # Modify the current file list so that it contains only file name that
684
+ # exist on the file system.
685
+ def existing!; end
686
+
687
+ # Return a new FileList with <tt>String#ext</tt> method applied to
688
+ # each member of the array.
689
+ #
690
+ # This method is a shortcut for:
691
+ #
692
+ # array.collect { |item| item.ext(newext) }
693
+ #
694
+ # +ext+ is a user added method for the Array class.
695
+ def ext(newext = T.unsafe(nil)); end
696
+
697
+ def fetch(*args, &block); end
698
+ def fill(*args, &block); end
699
+ def filter(*args, &block); end
700
+ def filter!(*args, &block); end
701
+ def filter_map(*args, &block); end
702
+ def find(*args, &block); end
703
+ def find_all(*args, &block); end
704
+ def find_index(*args, &block); end
705
+ def first(*args, &block); end
706
+ def flat_map(*args, &block); end
707
+ def flatten(*args, &block); end
708
+ def flatten!(*args, &block); end
709
+ def grep(*args, &block); end
710
+ def grep_v(*args, &block); end
711
+ def group_by(*args, &block); end
712
+
713
+ # Return a new FileList with the results of running +gsub+ against each
714
+ # element of the original list.
715
+ #
716
+ # Example:
717
+ # FileList['lib/test/file', 'x/y'].gsub(/\//, "\\")
718
+ # => ['lib\\test\\file', 'x\\y']
719
+ def gsub(pat, rep); end
720
+
721
+ # Same as +gsub+ except that the original file list is modified.
722
+ def gsub!(pat, rep); end
723
+
724
+ def import(array); end
725
+
726
+ # Add file names defined by glob patterns to the file list. If an array
727
+ # is given, add each element of the array.
728
+ #
729
+ # Example:
730
+ # file_list.include("*.java", "*.cfg")
731
+ # file_list.include %w( math.c lib.h *.o )
732
+ def include(*filenames); end
733
+
734
+ def include?(*args, &block); end
735
+ def index(*args, &block); end
736
+ def inject(*args, &block); end
737
+ def insert(*args, &block); end
738
+ def inspect(*args, &block); end
739
+ def intersection(*args, &block); end
740
+
741
+ # Lie about our class.
742
+ #
743
+ # @return [Boolean]
744
+ def is_a?(klass); end
745
+
746
+ def join(*args, &block); end
747
+ def keep_if(*args, &block); end
748
+
749
+ # Lie about our class.
750
+ #
751
+ # @return [Boolean]
752
+ def kind_of?(klass); end
753
+
754
+ def last(*args, &block); end
755
+ def lazy(*args, &block); end
756
+ def length(*args, &block); end
757
+ def map(*args, &block); end
758
+ def map!(*args, &block); end
759
+ def max(*args, &block); end
760
+ def max_by(*args, &block); end
761
+ def member?(*args, &block); end
762
+ def min(*args, &block); end
763
+ def min_by(*args, &block); end
764
+ def minmax(*args, &block); end
765
+ def minmax_by(*args, &block); end
766
+ def none?(*args, &block); end
767
+ def one?(*args, &block); end
768
+ def pack(*args, &block); end
769
+
770
+ # FileList version of partition. Needed because the nested arrays should
771
+ # be FileLists in this version.
772
+ def partition(&block); end
773
+
774
+ # Apply the pathmap spec to each of the included file names, returning a
775
+ # new file list with the modified paths. (See String#pathmap for
776
+ # details.)
777
+ def pathmap(spec = T.unsafe(nil), &block); end
778
+
779
+ def permutation(*args, &block); end
780
+ def place(*args, &block); end
781
+ def pop(*args, &block); end
782
+ def prepend(*args, &block); end
783
+ def product(*args, &block); end
784
+ def push(*args, &block); end
785
+ def rassoc(*args, &block); end
786
+ def reduce(*args, &block); end
787
+ def reject(*args, &block); end
788
+ def reject!(*args, &block); end
789
+ def repeated_combination(*args, &block); end
790
+ def repeated_permutation(*args, &block); end
791
+ def replace(*args, &block); end
792
+
793
+ # Resolve all the pending adds now.
794
+ def resolve; end
795
+
796
+ def reverse(*args, &block); end
797
+ def reverse!(*args, &block); end
798
+ def reverse_each(*args, &block); end
799
+ def rindex(*args, &block); end
800
+ def rotate(*args, &block); end
801
+ def rotate!(*args, &block); end
802
+ def sample(*args, &block); end
803
+ def select(*args, &block); end
804
+ def select!(*args, &block); end
805
+ def shelljoin(*args, &block); end
806
+ def shift(*args, &block); end
807
+ def shuffle(*args, &block); end
808
+ def shuffle!(*args, &block); end
809
+ def size(*args, &block); end
810
+ def slice(*args, &block); end
811
+ def slice!(*args, &block); end
812
+ def slice_after(*args, &block); end
813
+ def slice_before(*args, &block); end
814
+ def slice_when(*args, &block); end
815
+ def sort(*args, &block); end
816
+ def sort!(*args, &block); end
817
+ def sort_by(*args, &block); end
818
+ def sort_by!(*args, &block); end
819
+
820
+ # Return a new FileList with the results of running +sub+ against each
821
+ # element of the original list.
822
+ #
823
+ # Example:
824
+ # FileList['a.c', 'b.c'].sub(/\.c$/, '.o') => ['a.o', 'b.o']
825
+ def sub(pat, rep); end
826
+
827
+ # Same as +sub+ except that the original file list is modified.
828
+ def sub!(pat, rep); end
829
+
830
+ def sum(*args, &block); end
831
+ def take(*args, &block); end
832
+ def take_while(*args, &block); end
833
+ def tally(*args, &block); end
834
+
835
+ # Return the internal array object.
836
+ def to_a; end
837
+
838
+ # Return the internal array object.
839
+ def to_ary; end
840
+
841
+ def to_h(*args, &block); end
842
+
843
+ # Convert a FileList to a string by joining all elements with a space.
844
+ def to_s; end
845
+
846
+ def to_set(*args, &block); end
847
+ def transpose(*args, &block); end
848
+ def union(*args, &block); end
849
+ def uniq(*args, &block); end
850
+ def uniq!(*args, &block); end
851
+ def unshift(*args, &block); end
852
+ def values_at(*args, &block); end
853
+ def zip(*args, &block); end
854
+ def |(*args, &block); end
855
+
856
+ private
857
+
858
+ # Add matching glob patterns.
859
+ def add_matching(pattern); end
860
+
861
+ def resolve_add(fn); end
862
+ def resolve_exclude; end
863
+
864
+ class << self
865
+ # Create a new file list including the files listed. Similar to:
866
+ #
867
+ # FileList.new(*args)
868
+ def [](*args); end
869
+
870
+ # Get a sorted list of files matching the pattern. This method
871
+ # should be preferred to Dir[pattern] and Dir.glob(pattern) because
872
+ # the files returned are guaranteed to be sorted.
873
+ def glob(pattern, *args); end
874
+ end
875
+ end
876
+
877
+ # List of array methods (that are not in +Object+) that need to be
878
+ # delegated.
879
+ Rake::FileList::ARRAY_METHODS = T.let(T.unsafe(nil), Array)
880
+
881
+ Rake::FileList::DEFAULT_IGNORE_PATTERNS = T.let(T.unsafe(nil), Array)
882
+ Rake::FileList::DEFAULT_IGNORE_PROCS = T.let(T.unsafe(nil), Array)
883
+ Rake::FileList::DELEGATING_METHODS = T.let(T.unsafe(nil), Array)
884
+ Rake::FileList::GLOB_PATTERN = T.let(T.unsafe(nil), Regexp)
885
+
886
+ # List of additional methods that must be delegated.
887
+ Rake::FileList::MUST_DEFINE = T.let(T.unsafe(nil), Array)
888
+
889
+ # List of methods that should not be delegated here (we define special
890
+ # versions of them explicitly below).
891
+ Rake::FileList::MUST_NOT_DEFINE = T.let(T.unsafe(nil), Array)
892
+
893
+ # List of delegated methods that return new array values which need
894
+ # wrapping.
895
+ Rake::FileList::SPECIAL_RETURN = T.let(T.unsafe(nil), Array)
896
+
897
+ # A FileTask is a task that includes time based dependencies. If any of a
898
+ # FileTask's prerequisites have a timestamp that is later than the file
899
+ # represented by this task, then the file must be rebuilt (using the
900
+ # supplied actions).
901
+ class Rake::FileTask < ::Rake::Task
902
+ # Is this file task needed? Yes if it doesn't exist, or if its time stamp
903
+ # is out of date.
904
+ #
905
+ # @return [Boolean]
906
+ def needed?; end
907
+
908
+ # Time stamp for file task.
909
+ def timestamp; end
910
+
911
+ private
912
+
913
+ # Are there any prerequisites with a later time than the given time stamp?
914
+ #
915
+ # @return [Boolean]
916
+ def out_of_date?(stamp); end
917
+
918
+ class << self
919
+ # Apply the scope to the task name according to the rules for this kind
920
+ # of task. File based tasks ignore the scope when creating the name.
921
+ def scope_name(scope, task_name); end
922
+ end
923
+ end
924
+
925
+ # FileUtilsExt provides a custom version of the FileUtils methods
926
+ # that respond to the <tt>verbose</tt> and <tt>nowrite</tt>
927
+ # commands.
928
+ module Rake::FileUtilsExt
929
+ include ::FileUtils::StreamUtils_
930
+ include ::FileUtils
931
+ extend ::FileUtils::StreamUtils_
932
+ extend ::FileUtils
933
+ extend ::Rake::FileUtilsExt
934
+
935
+ def cd(*args, **options, &block); end
936
+ def chdir(*args, **options, &block); end
937
+ def chmod(*args, **options, &block); end
938
+ def chmod_R(*args, **options, &block); end
939
+ def chown(*args, **options, &block); end
940
+ def chown_R(*args, **options, &block); end
941
+ def copy(*args, **options, &block); end
942
+ def cp(*args, **options, &block); end
943
+ def cp_lr(*args, **options, &block); end
944
+ def cp_r(*args, **options, &block); end
945
+ def install(*args, **options, &block); end
946
+ def link(*args, **options, &block); end
947
+ def ln(*args, **options, &block); end
948
+ def ln_s(*args, **options, &block); end
949
+ def ln_sf(*args, **options, &block); end
950
+ def makedirs(*args, **options, &block); end
951
+ def mkdir(*args, **options, &block); end
952
+ def mkdir_p(*args, **options, &block); end
953
+ def mkpath(*args, **options, &block); end
954
+ def move(*args, **options, &block); end
955
+ def mv(*args, **options, &block); end
956
+
957
+ # Get/set the nowrite flag controlling output from the FileUtils
958
+ # utilities. If verbose is true, then the utility method is
959
+ # echoed to standard output.
960
+ #
961
+ # Examples:
962
+ # nowrite # return the current value of the
963
+ # # nowrite flag
964
+ # nowrite(v) # set the nowrite flag to _v_.
965
+ # nowrite(v) { code } # Execute code with the nowrite flag set
966
+ # # temporarily to _v_. Return to the
967
+ # # original value when code is done.
968
+ def nowrite(value = T.unsafe(nil)); end
969
+
970
+ # Check that the options do not contain options not listed in
971
+ # +optdecl+. An ArgumentError exception is thrown if non-declared
972
+ # options are found.
973
+ #
974
+ # @raise [ArgumentError]
975
+ def rake_check_options(options, *optdecl); end
976
+
977
+ # Send the message to the default rake output (which is $stderr).
978
+ def rake_output_message(message); end
979
+
980
+ def remove(*args, **options, &block); end
981
+ def rm(*args, **options, &block); end
982
+ def rm_f(*args, **options, &block); end
983
+ def rm_r(*args, **options, &block); end
984
+ def rm_rf(*args, **options, &block); end
985
+ def rmdir(*args, **options, &block); end
986
+ def rmtree(*args, **options, &block); end
987
+ def safe_unlink(*args, **options, &block); end
988
+ def symlink(*args, **options, &block); end
989
+ def touch(*args, **options, &block); end
990
+
991
+ # Get/set the verbose flag controlling output from the FileUtils
992
+ # utilities. If verbose is true, then the utility method is
993
+ # echoed to standard output.
994
+ #
995
+ # Examples:
996
+ # verbose # return the current value of the
997
+ # # verbose flag
998
+ # verbose(v) # set the verbose flag to _v_.
999
+ # verbose(v) { code } # Execute code with the verbose flag set
1000
+ # # temporarily to _v_. Return to the
1001
+ # # original value when code is done.
1002
+ def verbose(value = T.unsafe(nil)); end
1003
+
1004
+ # Use this function to prevent potentially destructive ruby code
1005
+ # from running when the :nowrite flag is set.
1006
+ #
1007
+ # Example:
1008
+ #
1009
+ # when_writing("Building Project") do
1010
+ # project.build
1011
+ # end
1012
+ #
1013
+ # The following code will build the project under normal
1014
+ # conditions. If the nowrite(true) flag is set, then the example
1015
+ # will print:
1016
+ #
1017
+ # DRYRUN: Building Project
1018
+ #
1019
+ # instead of actually building the project.
1020
+ def when_writing(msg = T.unsafe(nil)); end
1021
+
1022
+ class << self
1023
+ # Returns the value of attribute nowrite_flag.
1024
+ def nowrite_flag; end
1025
+
1026
+ # Sets the attribute nowrite_flag
1027
+ #
1028
+ # @param value the value to set the attribute nowrite_flag to.
1029
+ def nowrite_flag=(_arg0); end
1030
+
1031
+ # Returns the value of attribute verbose_flag.
1032
+ def verbose_flag; end
1033
+
1034
+ # Sets the attribute verbose_flag
1035
+ #
1036
+ # @param value the value to set the attribute verbose_flag to.
1037
+ def verbose_flag=(_arg0); end
1038
+ end
1039
+ end
1040
+
1041
+ Rake::FileUtilsExt::DEFAULT = T.let(T.unsafe(nil), Object)
1042
+
1043
+ # InvocationChain tracks the chain of task invocations to detect
1044
+ # circular dependencies.
1045
+ class Rake::InvocationChain < ::Rake::LinkedList
1046
+ # Append an invocation to the chain of invocations. It is an error
1047
+ # if the invocation already listed.
1048
+ def append(invocation); end
1049
+
1050
+ # Is the invocation already in the chain?
1051
+ #
1052
+ # @return [Boolean]
1053
+ def member?(invocation); end
1054
+
1055
+ # Convert to string, ie: TOP => invocation => invocation
1056
+ def to_s; end
1057
+
1058
+ private
1059
+
1060
+ def prefix; end
1061
+
1062
+ class << self
1063
+ # Class level append.
1064
+ def append(invocation, chain); end
1065
+ end
1066
+ end
1067
+
1068
+ Rake::InvocationChain::EMPTY = T.let(T.unsafe(nil), Rake::InvocationChain::EmptyInvocationChain)
1069
+
1070
+ # Null object for an empty chain.
1071
+ class Rake::InvocationChain::EmptyInvocationChain < ::Rake::LinkedList::EmptyLinkedList
1072
+ def append(invocation); end
1073
+
1074
+ # @return [Boolean]
1075
+ def member?(obj); end
1076
+
1077
+ def to_s; end
1078
+ end
1079
+
1080
+ module Rake::InvocationExceptionMixin
1081
+ # Return the invocation chain (list of Rake tasks) that were in
1082
+ # effect when this exception was detected by rake. May be null if
1083
+ # no tasks were active.
1084
+ def chain; end
1085
+
1086
+ # Set the invocation chain in effect when this exception was
1087
+ # detected.
1088
+ def chain=(value); end
1089
+ end
1090
+
1091
+ Rake::LATE = T.let(T.unsafe(nil), Rake::LateTime)
1092
+
1093
+ # LateTime is a fake timestamp that occurs _after_ any other time value.
1094
+ class Rake::LateTime
1095
+ include ::Comparable
1096
+ include ::Singleton
1097
+ extend ::Singleton::SingletonClassMethods
1098
+
1099
+ def <=>(other); end
1100
+ def to_s; end
1101
+ end
1102
+
1103
+ # Polylithic linked list structure used to implement several data
1104
+ # structures in Rake.
1105
+ class Rake::LinkedList
1106
+ include ::Enumerable
1107
+
1108
+ # @return [LinkedList] a new instance of LinkedList
1109
+ def initialize(head, tail = T.unsafe(nil)); end
1110
+
1111
+ # Lists are structurally equivalent.
1112
+ def ==(other); end
1113
+
1114
+ # Polymorphically add a new element to the head of a list. The
1115
+ # type of head node will be the same list type as the tail.
1116
+ def conj(item); end
1117
+
1118
+ # For each item in the list.
1119
+ def each; end
1120
+
1121
+ # Is the list empty?
1122
+ # .make guards against a list being empty making any instantiated LinkedList
1123
+ # object not empty by default
1124
+ # You should consider overriding this method if you implement your own .make method
1125
+ #
1126
+ # @return [Boolean]
1127
+ def empty?; end
1128
+
1129
+ # Returns the value of attribute head.
1130
+ def head; end
1131
+
1132
+ # Same as +to_s+, but with inspected items.
1133
+ def inspect; end
1134
+
1135
+ # Returns the value of attribute tail.
1136
+ def tail; end
1137
+
1138
+ # Convert to string: LL(item, item...)
1139
+ def to_s; end
1140
+
1141
+ class << self
1142
+ # Cons a new head onto the tail list.
1143
+ def cons(head, tail); end
1144
+
1145
+ # The standard empty list class for the given LinkedList class.
1146
+ def empty; end
1147
+
1148
+ # Make a list out of the given arguments. This method is
1149
+ # polymorphic
1150
+ def make(*args); end
1151
+ end
1152
+ end
1153
+
1154
+ Rake::LinkedList::EMPTY = T.let(T.unsafe(nil), Rake::LinkedList::EmptyLinkedList)
1155
+
1156
+ # Represent an empty list, using the Null Object Pattern.
1157
+ #
1158
+ # When inheriting from the LinkedList class, you should implement
1159
+ # a type specific Empty class as well. Make sure you set the class
1160
+ # instance variable @parent to the associated list class (this
1161
+ # allows conj, cons and make to work polymorphically).
1162
+ class Rake::LinkedList::EmptyLinkedList < ::Rake::LinkedList
1163
+ # @return [EmptyLinkedList] a new instance of EmptyLinkedList
1164
+ def initialize; end
1165
+
1166
+ # @return [Boolean]
1167
+ def empty?; end
1168
+
1169
+ class << self
1170
+ def cons(head, tail); end
1171
+ end
1172
+ end
1173
+
1174
+ # Same as a regular task, but the immediate prerequisites are done in
1175
+ # parallel using Ruby threads.
1176
+ class Rake::MultiTask < ::Rake::Task
1177
+ private
1178
+
1179
+ def invoke_prerequisites(task_args, invocation_chain); end
1180
+ end
1181
+
1182
+ # The NameSpace class will lookup task names in the scope defined by a
1183
+ # +namespace+ command.
1184
+ class Rake::NameSpace
1185
+ # Create a namespace lookup object using the given task manager
1186
+ # and the list of scopes.
1187
+ #
1188
+ # @return [NameSpace] a new instance of NameSpace
1189
+ def initialize(task_manager, scope_list); end
1190
+
1191
+ # Lookup a task named +name+ in the namespace.
1192
+ def [](name); end
1193
+
1194
+ # The scope of the namespace (a LinkedList)
1195
+ def scope; end
1196
+
1197
+ # Return the list of tasks defined in this and nested namespaces.
1198
+ def tasks; end
1199
+ end
1200
+
1201
+ # Include PrivateReader to use +private_reader+.
1202
+ module Rake::PrivateReader
1203
+ mixes_in_class_methods ::Rake::PrivateReader::ClassMethods
1204
+
1205
+ class << self
1206
+ def included(base); end
1207
+ end
1208
+ end
1209
+
1210
+ module Rake::PrivateReader::ClassMethods
1211
+ # Declare a list of private accessors
1212
+ def private_reader(*names); end
1213
+ end
1214
+
1215
+ # A Promise object represents a promise to do work (a chore) in the
1216
+ # future. The promise is created with a block and a list of
1217
+ # arguments for the block. Calling value will return the value of
1218
+ # the promised chore.
1219
+ #
1220
+ # Used by ThreadPool.
1221
+ class Rake::Promise
1222
+ # Create a promise to do the chore specified by the block.
1223
+ #
1224
+ # @return [Promise] a new instance of Promise
1225
+ def initialize(args, &block); end
1226
+
1227
+ def recorder; end
1228
+ def recorder=(_arg0); end
1229
+
1230
+ # Return the value of this promise.
1231
+ #
1232
+ # If the promised chore is not yet complete, then do the work
1233
+ # synchronously. We will wait.
1234
+ def value; end
1235
+
1236
+ # If no one else is working this promise, go ahead and do the chore.
1237
+ def work; end
1238
+
1239
+ private
1240
+
1241
+ # Perform the chore promised
1242
+ def chore; end
1243
+
1244
+ # Are we done with the promise
1245
+ #
1246
+ # @return [Boolean]
1247
+ def complete?; end
1248
+
1249
+ # free up these items for the GC
1250
+ def discard; end
1251
+
1252
+ # Did the promise throw an error
1253
+ #
1254
+ # @return [Boolean]
1255
+ def error?; end
1256
+
1257
+ # Do we have a result for the promise
1258
+ #
1259
+ # @return [Boolean]
1260
+ def result?; end
1261
+
1262
+ # Record execution statistics if there is a recorder
1263
+ def stat(*args); end
1264
+ end
1265
+
1266
+ Rake::Promise::NOT_SET = T.let(T.unsafe(nil), Object)
1267
+
1268
+ # Exit status class for times the system just gives us a nil.
1269
+ class Rake::PseudoStatus
1270
+ # @return [PseudoStatus] a new instance of PseudoStatus
1271
+ def initialize(code = T.unsafe(nil)); end
1272
+
1273
+ def >>(n); end
1274
+
1275
+ # @return [Boolean]
1276
+ def exited?; end
1277
+
1278
+ def exitstatus; end
1279
+
1280
+ # @return [Boolean]
1281
+ def stopped?; end
1282
+
1283
+ def to_i; end
1284
+ end
1285
+
1286
+ Rake::RDocTask = RDoc::Task
1287
+
1288
+ # Error indicating a recursion overflow error in task selection.
1289
+ class Rake::RuleRecursionOverflowError < ::StandardError
1290
+ # @return [RuleRecursionOverflowError] a new instance of RuleRecursionOverflowError
1291
+ def initialize(*args); end
1292
+
1293
+ def add_target(target); end
1294
+ def message; end
1295
+ end
1296
+
1297
+ class Rake::Scope < ::Rake::LinkedList
1298
+ # Path for the scope.
1299
+ def path; end
1300
+
1301
+ # Path for the scope + the named path.
1302
+ def path_with_task_name(task_name); end
1303
+
1304
+ # Trim +n+ innermost scope levels from the scope. In no case will
1305
+ # this trim beyond the toplevel scope.
1306
+ def trim(n); end
1307
+ end
1308
+
1309
+ # Singleton null object for an empty scope.
1310
+ Rake::Scope::EMPTY = T.let(T.unsafe(nil), Rake::Scope::EmptyScope)
1311
+
1312
+ # Scope lists always end with an EmptyScope object. See Null
1313
+ # Object Pattern)
1314
+ class Rake::Scope::EmptyScope < ::Rake::LinkedList::EmptyLinkedList
1315
+ def path; end
1316
+ def path_with_task_name(task_name); end
1317
+ end
1318
+
1319
+ # A Task is the basic unit of work in a Rakefile. Tasks have associated
1320
+ # actions (possibly more than one) and a list of prerequisites. When
1321
+ # invoked, a task will first ensure that all of its prerequisites have an
1322
+ # opportunity to run and then it will execute its own actions.
1323
+ #
1324
+ # Tasks are not usually created directly using the new method, but rather
1325
+ # use the +file+ and +task+ convenience methods.
1326
+ class Rake::Task
1327
+ # Create a task named +task_name+ with no actions or prerequisites. Use
1328
+ # +enhance+ to add actions and prerequisites.
1329
+ #
1330
+ # @return [Task] a new instance of Task
1331
+ def initialize(task_name, app); end
1332
+
1333
+ # List of actions attached to a task.
1334
+ def actions; end
1335
+
1336
+ # Add a description to the task. The description can consist of an option
1337
+ # argument list (enclosed brackets) and an optional comment.
1338
+ def add_description(description); end
1339
+
1340
+ # List of all unique prerequisite tasks including prerequisite tasks'
1341
+ # prerequisites.
1342
+ # Includes self when cyclic dependencies are found.
1343
+ def all_prerequisite_tasks; end
1344
+
1345
+ # Has this task already been invoked? Already invoked tasks
1346
+ # will be skipped unless you reenable them.
1347
+ def already_invoked; end
1348
+
1349
+ # Application owning this task.
1350
+ def application; end
1351
+
1352
+ # Application owning this task.
1353
+ def application=(_arg0); end
1354
+
1355
+ # Argument description (nil if none).
1356
+ def arg_description; end
1357
+
1358
+ # Name of arguments for this task.
1359
+ def arg_names; end
1360
+
1361
+ # Clear the existing prerequisites, actions, comments, and arguments of a rake task.
1362
+ def clear; end
1363
+
1364
+ # Clear the existing actions on a rake task.
1365
+ def clear_actions; end
1366
+
1367
+ # Clear the existing arguments on a rake task.
1368
+ def clear_args; end
1369
+
1370
+ # Clear the existing comments on a rake task.
1371
+ def clear_comments; end
1372
+
1373
+ # Clear the existing prerequisites of a rake task.
1374
+ def clear_prerequisites; end
1375
+
1376
+ # First line (or sentence) of all comments. Multiple comments are
1377
+ # separated by a "/".
1378
+ def comment; end
1379
+
1380
+ def comment=(comment); end
1381
+
1382
+ # Enhance a task with prerequisites or actions. Returns self.
1383
+ def enhance(deps = T.unsafe(nil), &block); end
1384
+
1385
+ # Execute the actions associated with this task.
1386
+ def execute(args = T.unsafe(nil)); end
1387
+
1388
+ # Full collection of comments. Multiple comments are separated by
1389
+ # newlines.
1390
+ def full_comment; end
1391
+
1392
+ def inspect; end
1393
+
1394
+ # Return a string describing the internal state of a task. Useful for
1395
+ # debugging.
1396
+ def investigation; end
1397
+
1398
+ # Invoke the task if it is needed. Prerequisites are invoked first.
1399
+ def invoke(*args); end
1400
+
1401
+ # Invoke all the prerequisites of a task.
1402
+ def invoke_prerequisites(task_args, invocation_chain); end
1403
+
1404
+ # Invoke all the prerequisites of a task in parallel.
1405
+ def invoke_prerequisites_concurrently(task_args, invocation_chain); end
1406
+
1407
+ # File/Line locations of each of the task definitions for this
1408
+ # task (only valid if the task was defined with the detect
1409
+ # location option set).
1410
+ def locations; end
1411
+
1412
+ # Name of the task, including any namespace qualifiers.
1413
+ def name; end
1414
+
1415
+ # Name of task with argument list description.
1416
+ def name_with_args; end
1417
+
1418
+ # Is this task needed?
1419
+ #
1420
+ # @return [Boolean]
1421
+ def needed?; end
1422
+
1423
+ # List of order only prerequisites for a task.
1424
+ def order_only_prerequisites; end
1425
+
1426
+ # List of prerequisites for a task.
1427
+ def prereqs; end
1428
+
1429
+ # List of prerequisite tasks
1430
+ def prerequisite_tasks; end
1431
+
1432
+ # List of prerequisites for a task.
1433
+ def prerequisites; end
1434
+
1435
+ # Reenable the task, allowing its tasks to be executed if the task
1436
+ # is invoked again.
1437
+ def reenable; end
1438
+
1439
+ # Array of nested namespaces names used for task lookup by this task.
1440
+ def scope; end
1441
+
1442
+ # Set the names of the arguments for this task. +args+ should be
1443
+ # an array of symbols, one for each argument name.
1444
+ def set_arg_names(args); end
1445
+
1446
+ # First source from a rule (nil if no sources)
1447
+ def source; end
1448
+
1449
+ def sources; end
1450
+
1451
+ # List of sources for task.
1452
+ def sources=(_arg0); end
1453
+
1454
+ # Timestamp for this task. Basic tasks return the current time for their
1455
+ # time stamp. Other tasks can be more sophisticated.
1456
+ def timestamp; end
1457
+
1458
+ # Return task name
1459
+ def to_s; end
1460
+
1461
+ # Add order only dependencies.
1462
+ def |(deps); end
1463
+
1464
+ protected
1465
+
1466
+ def collect_prerequisites(seen); end
1467
+
1468
+ # Same as invoke, but explicitly pass a call chain to detect
1469
+ # circular dependencies.
1470
+ #
1471
+ # If multiple tasks depend on this
1472
+ # one in parallel, they will all fail if the first execution of
1473
+ # this task fails.
1474
+ def invoke_with_call_chain(task_args, invocation_chain); end
1475
+
1476
+ private
1477
+
1478
+ def add_chain_to(exception, new_chain); end
1479
+ def add_comment(comment); end
1480
+
1481
+ # Get the first sentence in a string. The sentence is terminated
1482
+ # by the first period, exclamation mark, or the end of the line.
1483
+ # Decimal points do not count as periods.
1484
+ def first_sentence(string); end
1485
+
1486
+ # Format the trace flags for display.
1487
+ def format_trace_flags; end
1488
+
1489
+ def lookup_prerequisite(prerequisite_name); end
1490
+
1491
+ # Transform the list of comments as specified by the block and
1492
+ # join with the separator.
1493
+ def transform_comments(separator, &block); end
1494
+
1495
+ class << self
1496
+ # Return a task with the given name. If the task is not currently
1497
+ # known, try to synthesize one from the defined rules. If no rules are
1498
+ # found, but an existing file matches the task name, assume it is a file
1499
+ # task with no dependencies or actions.
1500
+ def [](task_name); end
1501
+
1502
+ # Clear the task list. This cause rake to immediately forget all the
1503
+ # tasks that have been assigned. (Normally used in the unit tests.)
1504
+ def clear; end
1505
+
1506
+ # Define a rule for synthesizing tasks.
1507
+ def create_rule(*args, &block); end
1508
+
1509
+ # Define a task given +args+ and an option block. If a rule with the
1510
+ # given name already exists, the prerequisites and actions are added to
1511
+ # the existing task. Returns the defined task.
1512
+ def define_task(*args, &block); end
1513
+
1514
+ # Format dependencies parameter to pass to task.
1515
+ def format_deps(deps); end
1516
+
1517
+ # Apply the scope to the task name according to the rules for
1518
+ # this kind of task. Generic tasks will accept the scope as
1519
+ # part of the name.
1520
+ def scope_name(scope, task_name); end
1521
+
1522
+ # TRUE if the task name is already defined.
1523
+ #
1524
+ # @return [Boolean]
1525
+ def task_defined?(task_name); end
1526
+
1527
+ # List of all defined tasks.
1528
+ def tasks; end
1529
+ end
1530
+ end
1531
+
1532
+ # Error indicating an ill-formed task declaration.
1533
+ class Rake::TaskArgumentError < ::ArgumentError; end
1534
+
1535
+ # TaskArguments manage the arguments passed to a task.
1536
+ class Rake::TaskArguments
1537
+ include ::Enumerable
1538
+
1539
+ # Create a TaskArgument object with a list of argument +names+ and a set
1540
+ # of associated +values+. +parent+ is the parent argument object.
1541
+ #
1542
+ # @return [TaskArguments] a new instance of TaskArguments
1543
+ def initialize(names, values, parent = T.unsafe(nil)); end
1544
+
1545
+ # Find an argument value by name or index.
1546
+ def [](index); end
1547
+
1548
+ # Enumerates the arguments and their values
1549
+ def each(&block); end
1550
+
1551
+ # Retrieve the list of values not associated with named arguments
1552
+ def extras; end
1553
+
1554
+ def fetch(*args, &block); end
1555
+
1556
+ # Returns true if +key+ is one of the arguments
1557
+ #
1558
+ # @return [Boolean]
1559
+ def has_key?(key); end
1560
+
1561
+ def inspect; end
1562
+
1563
+ # Returns true if +key+ is one of the arguments
1564
+ #
1565
+ # @return [Boolean]
1566
+ def key?(key); end
1567
+
1568
+ # Returns the value of the given argument via method_missing
1569
+ def method_missing(sym, *args); end
1570
+
1571
+ # Argument names
1572
+ def names; end
1573
+
1574
+ # Create a new argument scope using the prerequisite argument
1575
+ # names.
1576
+ def new_scope(names); end
1577
+
1578
+ # Retrieve the complete array of sequential values
1579
+ def to_a; end
1580
+
1581
+ # Returns a Hash of arguments and their values
1582
+ def to_hash; end
1583
+
1584
+ def to_s; end
1585
+
1586
+ # Extracts the argument values at +keys+
1587
+ def values_at(*keys); end
1588
+
1589
+ # Specify a hash of default values for task arguments. Use the
1590
+ # defaults only if there is no specific value for the given
1591
+ # argument.
1592
+ def with_defaults(defaults); end
1593
+
1594
+ protected
1595
+
1596
+ def lookup(name); end
1597
+ end
1598
+
1599
+ # Base class for Task Libraries.
1600
+ class Rake::TaskLib
1601
+ include ::Rake::Cloneable
1602
+ include ::FileUtils::StreamUtils_
1603
+ include ::FileUtils
1604
+ include ::Rake::FileUtilsExt
1605
+ include ::Rake::DSL
1606
+ end
1607
+
1608
+ # The TaskManager module is a mixin for managing tasks.
1609
+ module Rake::TaskManager
1610
+ def initialize; end
1611
+
1612
+ # Find a matching task for +task_name+.
1613
+ def [](task_name, scopes = T.unsafe(nil)); end
1614
+
1615
+ # Clear all tasks in this application.
1616
+ def clear; end
1617
+
1618
+ def create_rule(*args, &block); end
1619
+
1620
+ # Return the list of scope names currently active in the task
1621
+ # manager.
1622
+ def current_scope; end
1623
+
1624
+ def define_task(task_class, *args, &block); end
1625
+
1626
+ # If a rule can be found that matches the task name, enhance the
1627
+ # task with the prerequisites and actions from the rule. Set the
1628
+ # source attribute of the task appropriately for the rule. Return
1629
+ # the enhanced task or nil of no rule was found.
1630
+ def enhance_with_matching_rule(task_name, level = T.unsafe(nil)); end
1631
+
1632
+ def generate_did_you_mean_suggestions(task_name); end
1633
+ def generate_message_for_undefined_task(task_name); end
1634
+
1635
+ # Evaluate the block in a nested namespace named +name+. Create
1636
+ # an anonymous namespace if +name+ is nil.
1637
+ def in_namespace(name); end
1638
+
1639
+ # Lookup a task. Return an existing task if found, otherwise
1640
+ # create a task of the current type.
1641
+ def intern(task_class, task_name); end
1642
+
1643
+ # Track the last comment made in the Rakefile.
1644
+ def last_description; end
1645
+
1646
+ # Track the last comment made in the Rakefile.
1647
+ def last_description=(_arg0); end
1648
+
1649
+ # Lookup a task, using scope and the scope hints in the task name.
1650
+ # This method performs straight lookups without trying to
1651
+ # synthesize file tasks or rules. Special scope names (e.g. '^')
1652
+ # are recognized. If no scope argument is supplied, use the
1653
+ # current scope. Return nil if the task cannot be found.
1654
+ def lookup(task_name, initial_scope = T.unsafe(nil)); end
1655
+
1656
+ # Resolve the arguments for a task/rule. Returns a tuple of
1657
+ # [task_name, arg_name_list, prerequisites, order_only_prerequisites].
1658
+ def resolve_args(args); end
1659
+
1660
+ def synthesize_file_task(task_name); end
1661
+
1662
+ # List of all defined tasks in this application.
1663
+ def tasks; end
1664
+
1665
+ # List of all the tasks defined in the given scope (and its
1666
+ # sub-scopes).
1667
+ def tasks_in_scope(scope); end
1668
+
1669
+ private
1670
+
1671
+ # Add a location to the locations field of the given task.
1672
+ def add_location(task); end
1673
+
1674
+ # Attempt to create a rule given the list of prerequisites.
1675
+ def attempt_rule(task_name, task_pattern, args, extensions, block, level); end
1676
+
1677
+ # Find the location that called into the dsl layer.
1678
+ def find_location; end
1679
+
1680
+ # Generate an anonymous namespace name.
1681
+ def generate_name; end
1682
+
1683
+ # Return the current description, clearing it in the process.
1684
+ def get_description(task); end
1685
+
1686
+ # Lookup the task name
1687
+ def lookup_in_scope(name, scope); end
1688
+
1689
+ # Make a list of sources from the list of file name extensions /
1690
+ # translation procs.
1691
+ def make_sources(task_name, task_pattern, extensions); end
1692
+
1693
+ # Resolve task arguments for a task or rule when there are
1694
+ # dependencies declared.
1695
+ #
1696
+ # The patterns recognized by this argument resolving function are:
1697
+ #
1698
+ # task :t, order_only: [:e]
1699
+ # task :t => [:d]
1700
+ # task :t => [:d], order_only: [:e]
1701
+ # task :t, [a] => [:d]
1702
+ # task :t, [a] => [:d], order_only: [:e]
1703
+ def resolve_args_with_dependencies(args, hash); end
1704
+
1705
+ # Resolve task arguments for a task or rule when there are no
1706
+ # dependencies declared.
1707
+ #
1708
+ # The patterns recognized by this argument resolving function are:
1709
+ #
1710
+ # task :t
1711
+ # task :t, [:a]
1712
+ def resolve_args_without_dependencies(args); end
1713
+
1714
+ def trace_rule(level, message); end
1715
+
1716
+ class << self
1717
+ def record_task_metadata; end
1718
+ def record_task_metadata=(_arg0); end
1719
+ end
1720
+ end
1721
+
1722
+ class Rake::ThreadHistoryDisplay
1723
+ include ::Rake::PrivateReader
1724
+ extend ::Rake::PrivateReader::ClassMethods
1725
+
1726
+ # @return [ThreadHistoryDisplay] a new instance of ThreadHistoryDisplay
1727
+ def initialize(stats); end
1728
+
1729
+ def show; end
1730
+
1731
+ private
1732
+
1733
+ def items; end
1734
+ def rename(hash, key, renames); end
1735
+ def stats; end
1736
+ def threads; end
1737
+ end
1738
+
1739
+ class Rake::ThreadPool
1740
+ # Creates a ThreadPool object. The +thread_count+ parameter is the size
1741
+ # of the pool.
1742
+ #
1743
+ # @return [ThreadPool] a new instance of ThreadPool
1744
+ def initialize(thread_count); end
1745
+
1746
+ # Creates a future executed by the +ThreadPool+.
1747
+ #
1748
+ # The args are passed to the block when executing (similarly to
1749
+ # Thread#new) The return value is an object representing
1750
+ # a future which has been created and added to the queue in the
1751
+ # pool. Sending #value to the object will sleep the
1752
+ # current thread until the future is finished and will return the
1753
+ # result (or raise an exception thrown from the future)
1754
+ def future(*args, &block); end
1755
+
1756
+ # Enable the gathering of history events.
1757
+ def gather_history; end
1758
+
1759
+ # Return a array of history events for the thread pool.
1760
+ #
1761
+ # History gathering must be enabled to be able to see the events
1762
+ # (see #gather_history). Best to call this when the job is
1763
+ # complete (i.e. after ThreadPool#join is called).
1764
+ def history; end
1765
+
1766
+ # Waits until the queue of futures is empty and all threads have exited.
1767
+ def join; end
1768
+
1769
+ # Return a hash of always collected statistics for the thread pool.
1770
+ def statistics; end
1771
+
1772
+ private
1773
+
1774
+ # for testing only
1775
+ def __queue__; end
1776
+
1777
+ # processes one item on the queue. Returns true if there was an
1778
+ # item to process, false if there was no item
1779
+ def process_queue_item; end
1780
+
1781
+ def safe_thread_count; end
1782
+ def start_thread; end
1783
+ def stat(event, data = T.unsafe(nil)); end
1784
+ end
1785
+
1786
+ module Rake::TraceOutput
1787
+ # Write trace output to output stream +out+.
1788
+ #
1789
+ # The write is done as a single IO call (to print) to lessen the
1790
+ # chance that the trace output is interrupted by other tasks also
1791
+ # producing output.
1792
+ def trace_on(out, *strings); end
1793
+ end
1794
+
1795
+ Rake::VERSION = T.let(T.unsafe(nil), String)
1796
+ module Rake::Version; end
1797
+ Rake::Version::BUILD = T.let(T.unsafe(nil), String)
1798
+ Rake::Version::MAJOR = T.let(T.unsafe(nil), String)
1799
+ Rake::Version::MINOR = T.let(T.unsafe(nil), String)
1800
+ Rake::Version::NUMBERS = T.let(T.unsafe(nil), Array)
1801
+ Rake::Version::OTHER = T.let(T.unsafe(nil), Array)
1802
+
1803
+ # Win 32 interface methods for Rake. Windows specific functionality
1804
+ # will be placed here to collect that knowledge in one spot.
1805
+ module Rake::Win32
1806
+ class << self
1807
+ # Normalize a win32 path so that the slashes are all forward slashes.
1808
+ def normalize(path); end
1809
+
1810
+ # The standard directory containing system wide rake files on
1811
+ # Win 32 systems. Try the following environment variables (in
1812
+ # order):
1813
+ #
1814
+ # * HOME
1815
+ # * HOMEDRIVE + HOMEPATH
1816
+ # * APPDATA
1817
+ # * USERPROFILE
1818
+ #
1819
+ # If the above are not defined, the return nil.
1820
+ #
1821
+ # @raise [Win32HomeError]
1822
+ def win32_system_dir; end
1823
+
1824
+ # True if running on a windows system.
1825
+ #
1826
+ # @return [Boolean]
1827
+ def windows?; end
1828
+ end
1829
+ end
1830
+
1831
+ # Error indicating a problem in locating the home directory on a
1832
+ # Win32 system.
1833
+ class Rake::Win32::Win32HomeError < ::RuntimeError; end
1834
+
1835
+ RakeFileUtils = Rake::FileUtilsExt
1836
+
1837
+ # String inflections define new methods on the String class to transform names for different purposes.
1838
+ # For instance, you can figure out the name of a table from the name of a class.
1839
+ #
1840
+ # 'ScaleScore'.tableize # => "scale_scores"
1841
+ class String
1842
+ include ::Comparable
1843
+ include ::JSON::Ext::Generator::GeneratorMethods::String
1844
+ extend ::JSON::Ext::Generator::GeneratorMethods::String::Extend
1845
+
1846
+ def ext(newext = T.unsafe(nil)); end
1847
+ def pathmap(spec = T.unsafe(nil), &block); end
1848
+
1849
+ protected
1850
+
1851
+ def pathmap_explode; end
1852
+ def pathmap_partial(n); end
1853
+ def pathmap_replace(patterns, &block); end
1854
+ end