ruby-lsp 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/VERSION +1 -1
  4. data/lib/ruby_lsp/handler.rb +0 -19
  5. data/lib/ruby_lsp/requests/document_link.rb +59 -0
  6. data/lib/ruby_lsp/requests/semantic_highlighting.rb +11 -5
  7. data/lib/ruby_lsp/requests/support/highlight_target.rb +2 -1
  8. data/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb +9 -2
  9. data/lib/ruby_lsp/requests.rb +2 -0
  10. data/lib/ruby_lsp/server.rb +51 -19
  11. metadata +3 -69
  12. data/.github/dependabot.yml +0 -11
  13. data/.github/probots.yml +0 -2
  14. data/.github/pull_request_template.md +0 -15
  15. data/.github/workflows/ci.yml +0 -31
  16. data/.github/workflows/publish_docs.yml +0 -32
  17. data/.gitignore +0 -9
  18. data/.rubocop.yml +0 -40
  19. data/.vscode/extensions.json +0 -5
  20. data/.vscode/settings.json +0 -5
  21. data/.vscode/tasks.json +0 -25
  22. data/CODE_OF_CONDUCT.md +0 -78
  23. data/Gemfile +0 -18
  24. data/Gemfile.lock +0 -126
  25. data/Rakefile +0 -28
  26. data/bin/console +0 -19
  27. data/bin/rubocop +0 -29
  28. data/bin/tapioca +0 -29
  29. data/bin/test +0 -9
  30. data/dev.yml +0 -20
  31. data/rakelib/check_docs.rake +0 -81
  32. data/ruby-lsp.gemspec +0 -27
  33. data/service.yml +0 -2
  34. data/sorbet/config +0 -4
  35. data/sorbet/rbi/.rubocop.yml +0 -8
  36. data/sorbet/rbi/gems/ansi@1.5.0.rbi +0 -338
  37. data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -522
  38. data/sorbet/rbi/gems/builder@3.2.4.rbi +0 -418
  39. data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -8
  40. data/sorbet/rbi/gems/debug@1.5.0.rbi +0 -1273
  41. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +0 -867
  42. data/sorbet/rbi/gems/io-console@0.5.11.rbi +0 -8
  43. data/sorbet/rbi/gems/irb@1.4.1.rbi +0 -376
  44. data/sorbet/rbi/gems/language_server-protocol@3.16.0.3.rbi +0 -7325
  45. data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -8
  46. data/sorbet/rbi/gems/minitest-reporters@1.5.0.rbi +0 -612
  47. data/sorbet/rbi/gems/minitest@5.15.0.rbi +0 -994
  48. data/sorbet/rbi/gems/parallel@1.22.1.rbi +0 -163
  49. data/sorbet/rbi/gems/parser@3.1.2.0.rbi +0 -3968
  50. data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +0 -734
  51. data/sorbet/rbi/gems/pry@0.14.1.rbi +0 -8
  52. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -227
  53. data/sorbet/rbi/gems/rake@13.0.6.rbi +0 -1853
  54. data/sorbet/rbi/gems/rbi@0.0.14.rbi +0 -2337
  55. data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +0 -1854
  56. data/sorbet/rbi/gems/reline@0.3.1.rbi +0 -1274
  57. data/sorbet/rbi/gems/rexml@3.2.5.rbi +0 -3852
  58. data/sorbet/rbi/gems/rubocop-ast@1.18.0.rbi +0 -4180
  59. data/sorbet/rbi/gems/rubocop-minitest@0.20.0.rbi +0 -1369
  60. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +0 -246
  61. data/sorbet/rbi/gems/rubocop-shopify@2.6.0.rbi +0 -8
  62. data/sorbet/rbi/gems/rubocop-sorbet@0.6.8.rbi +0 -652
  63. data/sorbet/rbi/gems/rubocop@1.30.0.rbi +0 -36729
  64. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +0 -732
  65. data/sorbet/rbi/gems/spoom@1.1.11.rbi +0 -1600
  66. data/sorbet/rbi/gems/syntax_tree@2.7.1.rbi +0 -6777
  67. data/sorbet/rbi/gems/tapioca@0.8.1.rbi +0 -1972
  68. data/sorbet/rbi/gems/thor@1.2.1.rbi +0 -2921
  69. data/sorbet/rbi/gems/unicode-display_width@2.1.0.rbi +0 -27
  70. data/sorbet/rbi/gems/unparser@0.6.5.rbi +0 -2789
  71. data/sorbet/rbi/gems/webrick@1.7.0.rbi +0 -1779
  72. data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +0 -289
  73. data/sorbet/rbi/gems/yard@0.9.27.rbi +0 -13048
  74. data/sorbet/rbi/shims/fiddle.rbi +0 -4
  75. data/sorbet/rbi/shims/hash.rbi +0 -6
  76. data/sorbet/rbi/shims/rdoc.rbi +0 -4
  77. data/sorbet/tapioca/config.yml +0 -13
  78. data/sorbet/tapioca/require.rb +0 -7
@@ -1,1853 +0,0 @@
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 intersect?(*args, &block); end
740
- def intersection(*args, &block); end
741
-
742
- # Lie about our class.
743
- #
744
- # @return [Boolean]
745
- def is_a?(klass); end
746
-
747
- def join(*args, &block); end
748
- def keep_if(*args, &block); end
749
-
750
- # Lie about our class.
751
- #
752
- # @return [Boolean]
753
- def kind_of?(klass); end
754
-
755
- def last(*args, &block); end
756
- def lazy(*args, &block); end
757
- def length(*args, &block); end
758
- def map(*args, &block); end
759
- def map!(*args, &block); end
760
- def max(*args, &block); end
761
- def max_by(*args, &block); end
762
- def member?(*args, &block); end
763
- def min(*args, &block); end
764
- def min_by(*args, &block); end
765
- def minmax(*args, &block); end
766
- def minmax_by(*args, &block); end
767
- def none?(*args, &block); end
768
- def one?(*args, &block); end
769
- def pack(*args, &block); end
770
-
771
- # FileList version of partition. Needed because the nested arrays should
772
- # be FileLists in this version.
773
- def partition(&block); end
774
-
775
- # Apply the pathmap spec to each of the included file names, returning a
776
- # new file list with the modified paths. (See String#pathmap for
777
- # details.)
778
- def pathmap(spec = T.unsafe(nil), &block); end
779
-
780
- def permutation(*args, &block); end
781
- def place(*args, &block); end
782
- def pop(*args, &block); end
783
- def prepend(*args, &block); end
784
- def product(*args, &block); end
785
- def push(*args, &block); end
786
- def rassoc(*args, &block); end
787
- def reduce(*args, &block); end
788
- def reject(*args, &block); end
789
- def reject!(*args, &block); end
790
- def repeated_combination(*args, &block); end
791
- def repeated_permutation(*args, &block); end
792
- def replace(*args, &block); end
793
-
794
- # Resolve all the pending adds now.
795
- def resolve; end
796
-
797
- def reverse(*args, &block); end
798
- def reverse!(*args, &block); end
799
- def reverse_each(*args, &block); end
800
- def rindex(*args, &block); end
801
- def rotate(*args, &block); end
802
- def rotate!(*args, &block); end
803
- def sample(*args, &block); end
804
- def select(*args, &block); end
805
- def select!(*args, &block); end
806
- def shelljoin(*args, &block); end
807
- def shift(*args, &block); end
808
- def shuffle(*args, &block); end
809
- def shuffle!(*args, &block); end
810
- def size(*args, &block); end
811
- def slice(*args, &block); end
812
- def slice!(*args, &block); end
813
- def slice_after(*args, &block); end
814
- def slice_before(*args, &block); end
815
- def slice_when(*args, &block); end
816
- def sort(*args, &block); end
817
- def sort!(*args, &block); end
818
- def sort_by(*args, &block); end
819
- def sort_by!(*args, &block); end
820
-
821
- # Return a new FileList with the results of running +sub+ against each
822
- # element of the original list.
823
- #
824
- # Example:
825
- # FileList['a.c', 'b.c'].sub(/\.c$/, '.o') => ['a.o', 'b.o']
826
- def sub(pat, rep); end
827
-
828
- # Same as +sub+ except that the original file list is modified.
829
- def sub!(pat, rep); end
830
-
831
- def sum(*args, &block); end
832
- def take(*args, &block); end
833
- def take_while(*args, &block); end
834
- def tally(*args, &block); end
835
-
836
- # Return the internal array object.
837
- def to_a; end
838
-
839
- # Return the internal array object.
840
- def to_ary; end
841
-
842
- def to_h(*args, &block); end
843
-
844
- # Convert a FileList to a string by joining all elements with a space.
845
- def to_s; end
846
-
847
- def to_set(*args, &block); end
848
- def transpose(*args, &block); end
849
- def union(*args, &block); end
850
- def uniq(*args, &block); end
851
- def uniq!(*args, &block); end
852
- def unshift(*args, &block); end
853
- def values_at(*args, &block); end
854
- def zip(*args, &block); end
855
- def |(*args, &block); end
856
-
857
- private
858
-
859
- # Add matching glob patterns.
860
- def add_matching(pattern); end
861
-
862
- def resolve_add(fn); end
863
- def resolve_exclude; end
864
-
865
- class << self
866
- # Create a new file list including the files listed. Similar to:
867
- #
868
- # FileList.new(*args)
869
- def [](*args); end
870
-
871
- # Get a sorted list of files matching the pattern. This method
872
- # should be preferred to Dir[pattern] and Dir.glob(pattern) because
873
- # the files returned are guaranteed to be sorted.
874
- def glob(pattern, *args); end
875
- end
876
- end
877
-
878
- # List of array methods (that are not in +Object+) that need to be
879
- # delegated.
880
- Rake::FileList::ARRAY_METHODS = T.let(T.unsafe(nil), Array)
881
-
882
- Rake::FileList::DEFAULT_IGNORE_PATTERNS = T.let(T.unsafe(nil), Array)
883
- Rake::FileList::DEFAULT_IGNORE_PROCS = T.let(T.unsafe(nil), Array)
884
- Rake::FileList::DELEGATING_METHODS = T.let(T.unsafe(nil), Array)
885
- Rake::FileList::GLOB_PATTERN = T.let(T.unsafe(nil), Regexp)
886
-
887
- # List of additional methods that must be delegated.
888
- Rake::FileList::MUST_DEFINE = T.let(T.unsafe(nil), Array)
889
-
890
- # List of methods that should not be delegated here (we define special
891
- # versions of them explicitly below).
892
- Rake::FileList::MUST_NOT_DEFINE = T.let(T.unsafe(nil), Array)
893
-
894
- # List of delegated methods that return new array values which need
895
- # wrapping.
896
- Rake::FileList::SPECIAL_RETURN = T.let(T.unsafe(nil), Array)
897
-
898
- # A FileTask is a task that includes time based dependencies. If any of a
899
- # FileTask's prerequisites have a timestamp that is later than the file
900
- # represented by this task, then the file must be rebuilt (using the
901
- # supplied actions).
902
- class Rake::FileTask < ::Rake::Task
903
- # Is this file task needed? Yes if it doesn't exist, or if its time stamp
904
- # is out of date.
905
- #
906
- # @return [Boolean]
907
- def needed?; end
908
-
909
- # Time stamp for file task.
910
- def timestamp; end
911
-
912
- private
913
-
914
- # Are there any prerequisites with a later time than the given time stamp?
915
- #
916
- # @return [Boolean]
917
- def out_of_date?(stamp); end
918
-
919
- class << self
920
- # Apply the scope to the task name according to the rules for this kind
921
- # of task. File based tasks ignore the scope when creating the name.
922
- def scope_name(scope, task_name); end
923
- end
924
- end
925
-
926
- # FileUtilsExt provides a custom version of the FileUtils methods
927
- # that respond to the <tt>verbose</tt> and <tt>nowrite</tt>
928
- # commands.
929
- module Rake::FileUtilsExt
930
- include ::FileUtils::StreamUtils_
931
- include ::FileUtils
932
- extend ::FileUtils::StreamUtils_
933
- extend ::FileUtils
934
- extend ::Rake::FileUtilsExt
935
-
936
- def cd(*args, **options, &block); end
937
- def chdir(*args, **options, &block); end
938
- def chmod(*args, **options, &block); end
939
- def chmod_R(*args, **options, &block); end
940
- def chown(*args, **options, &block); end
941
- def chown_R(*args, **options, &block); end
942
- def copy(*args, **options, &block); end
943
- def cp(*args, **options, &block); end
944
- def cp_lr(*args, **options, &block); end
945
- def cp_r(*args, **options, &block); end
946
- def install(*args, **options, &block); end
947
- def link(*args, **options, &block); end
948
- def ln(*args, **options, &block); end
949
- def ln_s(*args, **options, &block); end
950
- def ln_sf(*args, **options, &block); end
951
- def makedirs(*args, **options, &block); end
952
- def mkdir(*args, **options, &block); end
953
- def mkdir_p(*args, **options, &block); end
954
- def mkpath(*args, **options, &block); end
955
- def move(*args, **options, &block); end
956
- def mv(*args, **options, &block); end
957
-
958
- # Get/set the nowrite flag controlling output from the FileUtils
959
- # utilities. If verbose is true, then the utility method is
960
- # echoed to standard output.
961
- #
962
- # Examples:
963
- # nowrite # return the current value of the
964
- # # nowrite flag
965
- # nowrite(v) # set the nowrite flag to _v_.
966
- # nowrite(v) { code } # Execute code with the nowrite flag set
967
- # # temporarily to _v_. Return to the
968
- # # original value when code is done.
969
- def nowrite(value = T.unsafe(nil)); end
970
-
971
- # Check that the options do not contain options not listed in
972
- # +optdecl+. An ArgumentError exception is thrown if non-declared
973
- # options are found.
974
- #
975
- # @raise [ArgumentError]
976
- def rake_check_options(options, *optdecl); end
977
-
978
- # Send the message to the default rake output (which is $stderr).
979
- def rake_output_message(message); end
980
-
981
- def remove(*args, **options, &block); end
982
- def rm(*args, **options, &block); end
983
- def rm_f(*args, **options, &block); end
984
- def rm_r(*args, **options, &block); end
985
- def rm_rf(*args, **options, &block); end
986
- def rmdir(*args, **options, &block); end
987
- def rmtree(*args, **options, &block); end
988
- def safe_unlink(*args, **options, &block); end
989
- def symlink(*args, **options, &block); end
990
- def touch(*args, **options, &block); end
991
-
992
- # Get/set the verbose flag controlling output from the FileUtils
993
- # utilities. If verbose is true, then the utility method is
994
- # echoed to standard output.
995
- #
996
- # Examples:
997
- # verbose # return the current value of the
998
- # # verbose flag
999
- # verbose(v) # set the verbose flag to _v_.
1000
- # verbose(v) { code } # Execute code with the verbose flag set
1001
- # # temporarily to _v_. Return to the
1002
- # # original value when code is done.
1003
- def verbose(value = T.unsafe(nil)); end
1004
-
1005
- # Use this function to prevent potentially destructive ruby code
1006
- # from running when the :nowrite flag is set.
1007
- #
1008
- # Example:
1009
- #
1010
- # when_writing("Building Project") do
1011
- # project.build
1012
- # end
1013
- #
1014
- # The following code will build the project under normal
1015
- # conditions. If the nowrite(true) flag is set, then the example
1016
- # will print:
1017
- #
1018
- # DRYRUN: Building Project
1019
- #
1020
- # instead of actually building the project.
1021
- def when_writing(msg = T.unsafe(nil)); end
1022
-
1023
- class << self
1024
- # Returns the value of attribute nowrite_flag.
1025
- def nowrite_flag; end
1026
-
1027
- # Sets the attribute nowrite_flag
1028
- #
1029
- # @param value the value to set the attribute nowrite_flag to.
1030
- def nowrite_flag=(_arg0); end
1031
-
1032
- # Returns the value of attribute verbose_flag.
1033
- def verbose_flag; end
1034
-
1035
- # Sets the attribute verbose_flag
1036
- #
1037
- # @param value the value to set the attribute verbose_flag to.
1038
- def verbose_flag=(_arg0); end
1039
- end
1040
- end
1041
-
1042
- Rake::FileUtilsExt::DEFAULT = T.let(T.unsafe(nil), Object)
1043
-
1044
- # InvocationChain tracks the chain of task invocations to detect
1045
- # circular dependencies.
1046
- class Rake::InvocationChain < ::Rake::LinkedList
1047
- # Append an invocation to the chain of invocations. It is an error
1048
- # if the invocation already listed.
1049
- def append(invocation); end
1050
-
1051
- # Is the invocation already in the chain?
1052
- #
1053
- # @return [Boolean]
1054
- def member?(invocation); end
1055
-
1056
- # Convert to string, ie: TOP => invocation => invocation
1057
- def to_s; end
1058
-
1059
- private
1060
-
1061
- def prefix; end
1062
-
1063
- class << self
1064
- # Class level append.
1065
- def append(invocation, chain); end
1066
- end
1067
- end
1068
-
1069
- Rake::InvocationChain::EMPTY = T.let(T.unsafe(nil), Rake::InvocationChain::EmptyInvocationChain)
1070
-
1071
- # Null object for an empty chain.
1072
- class Rake::InvocationChain::EmptyInvocationChain < ::Rake::LinkedList::EmptyLinkedList
1073
- def append(invocation); end
1074
-
1075
- # @return [Boolean]
1076
- def member?(obj); end
1077
-
1078
- def to_s; end
1079
- end
1080
-
1081
- module Rake::InvocationExceptionMixin
1082
- # Return the invocation chain (list of Rake tasks) that were in
1083
- # effect when this exception was detected by rake. May be null if
1084
- # no tasks were active.
1085
- def chain; end
1086
-
1087
- # Set the invocation chain in effect when this exception was
1088
- # detected.
1089
- def chain=(value); end
1090
- end
1091
-
1092
- Rake::LATE = T.let(T.unsafe(nil), Rake::LateTime)
1093
-
1094
- # LateTime is a fake timestamp that occurs _after_ any other time value.
1095
- class Rake::LateTime
1096
- include ::Comparable
1097
- include ::Singleton
1098
- extend ::Singleton::SingletonClassMethods
1099
-
1100
- def <=>(other); end
1101
- def to_s; end
1102
- end
1103
-
1104
- # Polylithic linked list structure used to implement several data
1105
- # structures in Rake.
1106
- class Rake::LinkedList
1107
- include ::Enumerable
1108
-
1109
- # @return [LinkedList] a new instance of LinkedList
1110
- def initialize(head, tail = T.unsafe(nil)); end
1111
-
1112
- # Lists are structurally equivalent.
1113
- def ==(other); end
1114
-
1115
- # Polymorphically add a new element to the head of a list. The
1116
- # type of head node will be the same list type as the tail.
1117
- def conj(item); end
1118
-
1119
- # For each item in the list.
1120
- def each; end
1121
-
1122
- # Is the list empty?
1123
- # .make guards against a list being empty making any instantiated LinkedList
1124
- # object not empty by default
1125
- # You should consider overriding this method if you implement your own .make method
1126
- #
1127
- # @return [Boolean]
1128
- def empty?; end
1129
-
1130
- # Returns the value of attribute head.
1131
- def head; end
1132
-
1133
- # Same as +to_s+, but with inspected items.
1134
- def inspect; end
1135
-
1136
- # Returns the value of attribute tail.
1137
- def tail; end
1138
-
1139
- # Convert to string: LL(item, item...)
1140
- def to_s; end
1141
-
1142
- class << self
1143
- # Cons a new head onto the tail list.
1144
- def cons(head, tail); end
1145
-
1146
- # The standard empty list class for the given LinkedList class.
1147
- def empty; end
1148
-
1149
- # Make a list out of the given arguments. This method is
1150
- # polymorphic
1151
- def make(*args); end
1152
- end
1153
- end
1154
-
1155
- Rake::LinkedList::EMPTY = T.let(T.unsafe(nil), Rake::LinkedList::EmptyLinkedList)
1156
-
1157
- # Represent an empty list, using the Null Object Pattern.
1158
- #
1159
- # When inheriting from the LinkedList class, you should implement
1160
- # a type specific Empty class as well. Make sure you set the class
1161
- # instance variable @parent to the associated list class (this
1162
- # allows conj, cons and make to work polymorphically).
1163
- class Rake::LinkedList::EmptyLinkedList < ::Rake::LinkedList
1164
- # @return [EmptyLinkedList] a new instance of EmptyLinkedList
1165
- def initialize; end
1166
-
1167
- # @return [Boolean]
1168
- def empty?; end
1169
-
1170
- class << self
1171
- def cons(head, tail); end
1172
- end
1173
- end
1174
-
1175
- # Same as a regular task, but the immediate prerequisites are done in
1176
- # parallel using Ruby threads.
1177
- class Rake::MultiTask < ::Rake::Task
1178
- private
1179
-
1180
- def invoke_prerequisites(task_args, invocation_chain); end
1181
- end
1182
-
1183
- # The NameSpace class will lookup task names in the scope defined by a
1184
- # +namespace+ command.
1185
- class Rake::NameSpace
1186
- # Create a namespace lookup object using the given task manager
1187
- # and the list of scopes.
1188
- #
1189
- # @return [NameSpace] a new instance of NameSpace
1190
- def initialize(task_manager, scope_list); end
1191
-
1192
- # Lookup a task named +name+ in the namespace.
1193
- def [](name); end
1194
-
1195
- # The scope of the namespace (a LinkedList)
1196
- def scope; end
1197
-
1198
- # Return the list of tasks defined in this and nested namespaces.
1199
- def tasks; end
1200
- end
1201
-
1202
- # Include PrivateReader to use +private_reader+.
1203
- module Rake::PrivateReader
1204
- mixes_in_class_methods ::Rake::PrivateReader::ClassMethods
1205
-
1206
- class << self
1207
- def included(base); end
1208
- end
1209
- end
1210
-
1211
- module Rake::PrivateReader::ClassMethods
1212
- # Declare a list of private accessors
1213
- def private_reader(*names); end
1214
- end
1215
-
1216
- # A Promise object represents a promise to do work (a chore) in the
1217
- # future. The promise is created with a block and a list of
1218
- # arguments for the block. Calling value will return the value of
1219
- # the promised chore.
1220
- #
1221
- # Used by ThreadPool.
1222
- class Rake::Promise
1223
- # Create a promise to do the chore specified by the block.
1224
- #
1225
- # @return [Promise] a new instance of Promise
1226
- def initialize(args, &block); end
1227
-
1228
- def recorder; end
1229
- def recorder=(_arg0); end
1230
-
1231
- # Return the value of this promise.
1232
- #
1233
- # If the promised chore is not yet complete, then do the work
1234
- # synchronously. We will wait.
1235
- def value; end
1236
-
1237
- # If no one else is working this promise, go ahead and do the chore.
1238
- def work; end
1239
-
1240
- private
1241
-
1242
- # Perform the chore promised
1243
- def chore; end
1244
-
1245
- # Are we done with the promise
1246
- #
1247
- # @return [Boolean]
1248
- def complete?; end
1249
-
1250
- # free up these items for the GC
1251
- def discard; end
1252
-
1253
- # Did the promise throw an error
1254
- #
1255
- # @return [Boolean]
1256
- def error?; end
1257
-
1258
- # Do we have a result for the promise
1259
- #
1260
- # @return [Boolean]
1261
- def result?; end
1262
-
1263
- # Record execution statistics if there is a recorder
1264
- def stat(*args); end
1265
- end
1266
-
1267
- Rake::Promise::NOT_SET = T.let(T.unsafe(nil), Object)
1268
-
1269
- # Exit status class for times the system just gives us a nil.
1270
- class Rake::PseudoStatus
1271
- # @return [PseudoStatus] a new instance of PseudoStatus
1272
- def initialize(code = T.unsafe(nil)); end
1273
-
1274
- def >>(n); end
1275
-
1276
- # @return [Boolean]
1277
- def exited?; end
1278
-
1279
- def exitstatus; end
1280
-
1281
- # @return [Boolean]
1282
- def stopped?; end
1283
-
1284
- def to_i; end
1285
- end
1286
-
1287
- Rake::RDocTask = RDoc::Task
1288
-
1289
- # Error indicating a recursion overflow error in task selection.
1290
- class Rake::RuleRecursionOverflowError < ::StandardError
1291
- # @return [RuleRecursionOverflowError] a new instance of RuleRecursionOverflowError
1292
- def initialize(*args); end
1293
-
1294
- def add_target(target); end
1295
- def message; end
1296
- end
1297
-
1298
- class Rake::Scope < ::Rake::LinkedList
1299
- # Path for the scope.
1300
- def path; end
1301
-
1302
- # Path for the scope + the named path.
1303
- def path_with_task_name(task_name); end
1304
-
1305
- # Trim +n+ innermost scope levels from the scope. In no case will
1306
- # this trim beyond the toplevel scope.
1307
- def trim(n); end
1308
- end
1309
-
1310
- # Singleton null object for an empty scope.
1311
- Rake::Scope::EMPTY = T.let(T.unsafe(nil), Rake::Scope::EmptyScope)
1312
-
1313
- # Scope lists always end with an EmptyScope object. See Null
1314
- # Object Pattern)
1315
- class Rake::Scope::EmptyScope < ::Rake::LinkedList::EmptyLinkedList
1316
- def path; end
1317
- def path_with_task_name(task_name); end
1318
- end
1319
-
1320
- # A Task is the basic unit of work in a Rakefile. Tasks have associated
1321
- # actions (possibly more than one) and a list of prerequisites. When
1322
- # invoked, a task will first ensure that all of its prerequisites have an
1323
- # opportunity to run and then it will execute its own actions.
1324
- #
1325
- # Tasks are not usually created directly using the new method, but rather
1326
- # use the +file+ and +task+ convenience methods.
1327
- class Rake::Task
1328
- # Create a task named +task_name+ with no actions or prerequisites. Use
1329
- # +enhance+ to add actions and prerequisites.
1330
- #
1331
- # @return [Task] a new instance of Task
1332
- def initialize(task_name, app); end
1333
-
1334
- # List of actions attached to a task.
1335
- def actions; end
1336
-
1337
- # Add a description to the task. The description can consist of an option
1338
- # argument list (enclosed brackets) and an optional comment.
1339
- def add_description(description); end
1340
-
1341
- # List of all unique prerequisite tasks including prerequisite tasks'
1342
- # prerequisites.
1343
- # Includes self when cyclic dependencies are found.
1344
- def all_prerequisite_tasks; end
1345
-
1346
- # Has this task already been invoked? Already invoked tasks
1347
- # will be skipped unless you reenable them.
1348
- def already_invoked; end
1349
-
1350
- # Application owning this task.
1351
- def application; end
1352
-
1353
- # Application owning this task.
1354
- def application=(_arg0); end
1355
-
1356
- # Argument description (nil if none).
1357
- def arg_description; end
1358
-
1359
- # Name of arguments for this task.
1360
- def arg_names; end
1361
-
1362
- # Clear the existing prerequisites, actions, comments, and arguments of a rake task.
1363
- def clear; end
1364
-
1365
- # Clear the existing actions on a rake task.
1366
- def clear_actions; end
1367
-
1368
- # Clear the existing arguments on a rake task.
1369
- def clear_args; end
1370
-
1371
- # Clear the existing comments on a rake task.
1372
- def clear_comments; end
1373
-
1374
- # Clear the existing prerequisites of a rake task.
1375
- def clear_prerequisites; end
1376
-
1377
- # First line (or sentence) of all comments. Multiple comments are
1378
- # separated by a "/".
1379
- def comment; end
1380
-
1381
- def comment=(comment); end
1382
-
1383
- # Enhance a task with prerequisites or actions. Returns self.
1384
- def enhance(deps = T.unsafe(nil), &block); end
1385
-
1386
- # Execute the actions associated with this task.
1387
- def execute(args = T.unsafe(nil)); end
1388
-
1389
- # Full collection of comments. Multiple comments are separated by
1390
- # newlines.
1391
- def full_comment; end
1392
-
1393
- def inspect; end
1394
-
1395
- # Return a string describing the internal state of a task. Useful for
1396
- # debugging.
1397
- def investigation; end
1398
-
1399
- # Invoke the task if it is needed. Prerequisites are invoked first.
1400
- def invoke(*args); end
1401
-
1402
- # Invoke all the prerequisites of a task.
1403
- def invoke_prerequisites(task_args, invocation_chain); end
1404
-
1405
- # Invoke all the prerequisites of a task in parallel.
1406
- def invoke_prerequisites_concurrently(task_args, invocation_chain); end
1407
-
1408
- # File/Line locations of each of the task definitions for this
1409
- # task (only valid if the task was defined with the detect
1410
- # location option set).
1411
- def locations; end
1412
-
1413
- # Name of the task, including any namespace qualifiers.
1414
- def name; end
1415
-
1416
- # Name of task with argument list description.
1417
- def name_with_args; end
1418
-
1419
- # Is this task needed?
1420
- #
1421
- # @return [Boolean]
1422
- def needed?; end
1423
-
1424
- # List of order only prerequisites for a task.
1425
- def order_only_prerequisites; end
1426
-
1427
- # List of prerequisites for a task.
1428
- def prereqs; end
1429
-
1430
- # List of prerequisite tasks
1431
- def prerequisite_tasks; end
1432
-
1433
- # List of prerequisites for a task.
1434
- def prerequisites; end
1435
-
1436
- # Reenable the task, allowing its tasks to be executed if the task
1437
- # is invoked again.
1438
- def reenable; end
1439
-
1440
- # Array of nested namespaces names used for task lookup by this task.
1441
- def scope; end
1442
-
1443
- # Set the names of the arguments for this task. +args+ should be
1444
- # an array of symbols, one for each argument name.
1445
- def set_arg_names(args); end
1446
-
1447
- # First source from a rule (nil if no sources)
1448
- def source; end
1449
-
1450
- def sources; end
1451
-
1452
- # List of sources for task.
1453
- def sources=(_arg0); end
1454
-
1455
- # Timestamp for this task. Basic tasks return the current time for their
1456
- # time stamp. Other tasks can be more sophisticated.
1457
- def timestamp; end
1458
-
1459
- # Return task name
1460
- def to_s; end
1461
-
1462
- # Add order only dependencies.
1463
- def |(deps); end
1464
-
1465
- protected
1466
-
1467
- def collect_prerequisites(seen); end
1468
-
1469
- # Same as invoke, but explicitly pass a call chain to detect
1470
- # circular dependencies.
1471
- #
1472
- # If multiple tasks depend on this
1473
- # one in parallel, they will all fail if the first execution of
1474
- # this task fails.
1475
- def invoke_with_call_chain(task_args, invocation_chain); end
1476
-
1477
- private
1478
-
1479
- def add_chain_to(exception, new_chain); end
1480
- def add_comment(comment); end
1481
-
1482
- # Get the first sentence in a string. The sentence is terminated
1483
- # by the first period, exclamation mark, or the end of the line.
1484
- # Decimal points do not count as periods.
1485
- def first_sentence(string); end
1486
-
1487
- # Format the trace flags for display.
1488
- def format_trace_flags; end
1489
-
1490
- def lookup_prerequisite(prerequisite_name); end
1491
-
1492
- # Transform the list of comments as specified by the block and
1493
- # join with the separator.
1494
- def transform_comments(separator, &block); end
1495
-
1496
- class << self
1497
- # Return a task with the given name. If the task is not currently
1498
- # known, try to synthesize one from the defined rules. If no rules are
1499
- # found, but an existing file matches the task name, assume it is a file
1500
- # task with no dependencies or actions.
1501
- def [](task_name); end
1502
-
1503
- # Clear the task list. This cause rake to immediately forget all the
1504
- # tasks that have been assigned. (Normally used in the unit tests.)
1505
- def clear; end
1506
-
1507
- # Define a rule for synthesizing tasks.
1508
- def create_rule(*args, &block); end
1509
-
1510
- # Define a task given +args+ and an option block. If a rule with the
1511
- # given name already exists, the prerequisites and actions are added to
1512
- # the existing task. Returns the defined task.
1513
- def define_task(*args, &block); end
1514
-
1515
- # Format dependencies parameter to pass to task.
1516
- def format_deps(deps); end
1517
-
1518
- # Apply the scope to the task name according to the rules for
1519
- # this kind of task. Generic tasks will accept the scope as
1520
- # part of the name.
1521
- def scope_name(scope, task_name); end
1522
-
1523
- # TRUE if the task name is already defined.
1524
- #
1525
- # @return [Boolean]
1526
- def task_defined?(task_name); end
1527
-
1528
- # List of all defined tasks.
1529
- def tasks; end
1530
- end
1531
- end
1532
-
1533
- # Error indicating an ill-formed task declaration.
1534
- class Rake::TaskArgumentError < ::ArgumentError; end
1535
-
1536
- # TaskArguments manage the arguments passed to a task.
1537
- class Rake::TaskArguments
1538
- include ::Enumerable
1539
-
1540
- # Create a TaskArgument object with a list of argument +names+ and a set
1541
- # of associated +values+. +parent+ is the parent argument object.
1542
- #
1543
- # @return [TaskArguments] a new instance of TaskArguments
1544
- def initialize(names, values, parent = T.unsafe(nil)); end
1545
-
1546
- # Find an argument value by name or index.
1547
- def [](index); end
1548
-
1549
- # Enumerates the arguments and their values
1550
- def each(&block); end
1551
-
1552
- # Retrieve the list of values not associated with named arguments
1553
- def extras; end
1554
-
1555
- def fetch(*args, &block); end
1556
-
1557
- # Returns true if +key+ is one of the arguments
1558
- #
1559
- # @return [Boolean]
1560
- def has_key?(key); end
1561
-
1562
- def inspect; end
1563
-
1564
- # Returns true if +key+ is one of the arguments
1565
- #
1566
- # @return [Boolean]
1567
- def key?(key); end
1568
-
1569
- # Returns the value of the given argument via method_missing
1570
- def method_missing(sym, *args); end
1571
-
1572
- # Argument names
1573
- def names; end
1574
-
1575
- # Create a new argument scope using the prerequisite argument
1576
- # names.
1577
- def new_scope(names); end
1578
-
1579
- # Retrieve the complete array of sequential values
1580
- def to_a; end
1581
-
1582
- # Returns a Hash of arguments and their values
1583
- def to_hash; end
1584
-
1585
- def to_s; end
1586
-
1587
- # Extracts the argument values at +keys+
1588
- def values_at(*keys); end
1589
-
1590
- # Specify a hash of default values for task arguments. Use the
1591
- # defaults only if there is no specific value for the given
1592
- # argument.
1593
- def with_defaults(defaults); end
1594
-
1595
- protected
1596
-
1597
- def lookup(name); end
1598
- end
1599
-
1600
- # Base class for Task Libraries.
1601
- class Rake::TaskLib
1602
- include ::Rake::Cloneable
1603
- include ::FileUtils::StreamUtils_
1604
- include ::FileUtils
1605
- include ::Rake::FileUtilsExt
1606
- include ::Rake::DSL
1607
- end
1608
-
1609
- # The TaskManager module is a mixin for managing tasks.
1610
- module Rake::TaskManager
1611
- def initialize; end
1612
-
1613
- # Find a matching task for +task_name+.
1614
- def [](task_name, scopes = T.unsafe(nil)); end
1615
-
1616
- # Clear all tasks in this application.
1617
- def clear; end
1618
-
1619
- def create_rule(*args, &block); end
1620
-
1621
- # Return the list of scope names currently active in the task
1622
- # manager.
1623
- def current_scope; end
1624
-
1625
- def define_task(task_class, *args, &block); end
1626
-
1627
- # If a rule can be found that matches the task name, enhance the
1628
- # task with the prerequisites and actions from the rule. Set the
1629
- # source attribute of the task appropriately for the rule. Return
1630
- # the enhanced task or nil of no rule was found.
1631
- def enhance_with_matching_rule(task_name, level = T.unsafe(nil)); end
1632
-
1633
- def generate_did_you_mean_suggestions(task_name); end
1634
- def generate_message_for_undefined_task(task_name); end
1635
-
1636
- # Evaluate the block in a nested namespace named +name+. Create
1637
- # an anonymous namespace if +name+ is nil.
1638
- def in_namespace(name); end
1639
-
1640
- # Lookup a task. Return an existing task if found, otherwise
1641
- # create a task of the current type.
1642
- def intern(task_class, task_name); end
1643
-
1644
- # Track the last comment made in the Rakefile.
1645
- def last_description; end
1646
-
1647
- # Track the last comment made in the Rakefile.
1648
- def last_description=(_arg0); end
1649
-
1650
- # Lookup a task, using scope and the scope hints in the task name.
1651
- # This method performs straight lookups without trying to
1652
- # synthesize file tasks or rules. Special scope names (e.g. '^')
1653
- # are recognized. If no scope argument is supplied, use the
1654
- # current scope. Return nil if the task cannot be found.
1655
- def lookup(task_name, initial_scope = T.unsafe(nil)); end
1656
-
1657
- # Resolve the arguments for a task/rule. Returns a tuple of
1658
- # [task_name, arg_name_list, prerequisites, order_only_prerequisites].
1659
- def resolve_args(args); end
1660
-
1661
- def synthesize_file_task(task_name); end
1662
-
1663
- # List of all defined tasks in this application.
1664
- def tasks; end
1665
-
1666
- # List of all the tasks defined in the given scope (and its
1667
- # sub-scopes).
1668
- def tasks_in_scope(scope); end
1669
-
1670
- private
1671
-
1672
- # Add a location to the locations field of the given task.
1673
- def add_location(task); end
1674
-
1675
- # Attempt to create a rule given the list of prerequisites.
1676
- def attempt_rule(task_name, task_pattern, args, extensions, block, level); end
1677
-
1678
- # Find the location that called into the dsl layer.
1679
- def find_location; end
1680
-
1681
- # Generate an anonymous namespace name.
1682
- def generate_name; end
1683
-
1684
- # Return the current description, clearing it in the process.
1685
- def get_description(task); end
1686
-
1687
- # Lookup the task name
1688
- def lookup_in_scope(name, scope); end
1689
-
1690
- # Make a list of sources from the list of file name extensions /
1691
- # translation procs.
1692
- def make_sources(task_name, task_pattern, extensions); end
1693
-
1694
- # Resolve task arguments for a task or rule when there are
1695
- # dependencies declared.
1696
- #
1697
- # The patterns recognized by this argument resolving function are:
1698
- #
1699
- # task :t, order_only: [:e]
1700
- # task :t => [:d]
1701
- # task :t => [:d], order_only: [:e]
1702
- # task :t, [a] => [:d]
1703
- # task :t, [a] => [:d], order_only: [:e]
1704
- def resolve_args_with_dependencies(args, hash); end
1705
-
1706
- # Resolve task arguments for a task or rule when there are no
1707
- # dependencies declared.
1708
- #
1709
- # The patterns recognized by this argument resolving function are:
1710
- #
1711
- # task :t
1712
- # task :t, [:a]
1713
- def resolve_args_without_dependencies(args); end
1714
-
1715
- def trace_rule(level, message); end
1716
-
1717
- class << self
1718
- def record_task_metadata; end
1719
- def record_task_metadata=(_arg0); end
1720
- end
1721
- end
1722
-
1723
- class Rake::ThreadHistoryDisplay
1724
- include ::Rake::PrivateReader
1725
- extend ::Rake::PrivateReader::ClassMethods
1726
-
1727
- # @return [ThreadHistoryDisplay] a new instance of ThreadHistoryDisplay
1728
- def initialize(stats); end
1729
-
1730
- def show; end
1731
-
1732
- private
1733
-
1734
- def items; end
1735
- def rename(hash, key, renames); end
1736
- def stats; end
1737
- def threads; end
1738
- end
1739
-
1740
- class Rake::ThreadPool
1741
- # Creates a ThreadPool object. The +thread_count+ parameter is the size
1742
- # of the pool.
1743
- #
1744
- # @return [ThreadPool] a new instance of ThreadPool
1745
- def initialize(thread_count); end
1746
-
1747
- # Creates a future executed by the +ThreadPool+.
1748
- #
1749
- # The args are passed to the block when executing (similarly to
1750
- # Thread#new) The return value is an object representing
1751
- # a future which has been created and added to the queue in the
1752
- # pool. Sending #value to the object will sleep the
1753
- # current thread until the future is finished and will return the
1754
- # result (or raise an exception thrown from the future)
1755
- def future(*args, &block); end
1756
-
1757
- # Enable the gathering of history events.
1758
- def gather_history; end
1759
-
1760
- # Return a array of history events for the thread pool.
1761
- #
1762
- # History gathering must be enabled to be able to see the events
1763
- # (see #gather_history). Best to call this when the job is
1764
- # complete (i.e. after ThreadPool#join is called).
1765
- def history; end
1766
-
1767
- # Waits until the queue of futures is empty and all threads have exited.
1768
- def join; end
1769
-
1770
- # Return a hash of always collected statistics for the thread pool.
1771
- def statistics; end
1772
-
1773
- private
1774
-
1775
- # for testing only
1776
- def __queue__; end
1777
-
1778
- # processes one item on the queue. Returns true if there was an
1779
- # item to process, false if there was no item
1780
- def process_queue_item; end
1781
-
1782
- def safe_thread_count; end
1783
- def start_thread; end
1784
- def stat(event, data = T.unsafe(nil)); end
1785
- end
1786
-
1787
- module Rake::TraceOutput
1788
- # Write trace output to output stream +out+.
1789
- #
1790
- # The write is done as a single IO call (to print) to lessen the
1791
- # chance that the trace output is interrupted by other tasks also
1792
- # producing output.
1793
- def trace_on(out, *strings); end
1794
- end
1795
-
1796
- Rake::VERSION = T.let(T.unsafe(nil), String)
1797
- module Rake::Version; end
1798
- Rake::Version::BUILD = T.let(T.unsafe(nil), String)
1799
- Rake::Version::MAJOR = T.let(T.unsafe(nil), String)
1800
- Rake::Version::MINOR = T.let(T.unsafe(nil), String)
1801
- Rake::Version::NUMBERS = T.let(T.unsafe(nil), Array)
1802
- Rake::Version::OTHER = T.let(T.unsafe(nil), Array)
1803
-
1804
- # Win 32 interface methods for Rake. Windows specific functionality
1805
- # will be placed here to collect that knowledge in one spot.
1806
- module Rake::Win32
1807
- class << self
1808
- # Normalize a win32 path so that the slashes are all forward slashes.
1809
- def normalize(path); end
1810
-
1811
- # The standard directory containing system wide rake files on
1812
- # Win 32 systems. Try the following environment variables (in
1813
- # order):
1814
- #
1815
- # * HOME
1816
- # * HOMEDRIVE + HOMEPATH
1817
- # * APPDATA
1818
- # * USERPROFILE
1819
- #
1820
- # If the above are not defined, the return nil.
1821
- #
1822
- # @raise [Win32HomeError]
1823
- def win32_system_dir; end
1824
-
1825
- # True if running on a windows system.
1826
- #
1827
- # @return [Boolean]
1828
- def windows?; end
1829
- end
1830
- end
1831
-
1832
- # Error indicating a problem in locating the home directory on a
1833
- # Win32 system.
1834
- class Rake::Win32::Win32HomeError < ::RuntimeError; end
1835
-
1836
- RakeFileUtils = Rake::FileUtilsExt
1837
-
1838
- # Enhance the String class with a XML escaped character version of
1839
- # to_s.
1840
- class String
1841
- include ::Comparable
1842
- include ::JSON::Ext::Generator::GeneratorMethods::String
1843
- extend ::JSON::Ext::Generator::GeneratorMethods::String::Extend
1844
-
1845
- def ext(newext = T.unsafe(nil)); end
1846
- def pathmap(spec = T.unsafe(nil), &block); end
1847
-
1848
- protected
1849
-
1850
- def pathmap_explode; end
1851
- def pathmap_partial(n); end
1852
- def pathmap_replace(patterns, &block); end
1853
- end