taski 0.3.0 → 0.4.0
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.
- checksums.yaml +4 -4
- data/.gem_rbs_collection/ast/2.4/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/ast/2.4/ast.rbs +73 -0
- data/.gem_rbs_collection/minitest/5.25/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/abstract_reporter.rbs +52 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/assertion.rbs +17 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/assertions.rbs +590 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/backtrace_filter.rbs +23 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/bench_spec.rbs +102 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/benchmark.rbs +259 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/composite_reporter.rbs +25 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/compress.rbs +13 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/error_on_warning.rbs +3 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/expectation.rbs +2 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/expectations.rbs +21 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/guard.rbs +64 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/mock.rbs +64 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/parallel/executor.rbs +46 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/parallel/test/class_methods.rbs +5 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/parallel/test.rbs +3 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/parallel.rbs +2 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/pride_io.rbs +62 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/pride_lol.rbs +19 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/progress_reporter.rbs +11 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/reportable.rbs +53 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/reporter.rbs +5 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/result.rbs +28 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/runnable.rbs +163 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/skip.rbs +6 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/spec/dsl/instance_methods.rbs +48 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/spec/dsl.rbs +129 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/spec.rbs +11 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/statistics_reporter.rbs +81 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/summary_reporter.rbs +18 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/test/lifecycle_hooks.rbs +92 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/test.rbs +69 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/unexpected_error.rbs +12 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/unexpected_warning.rbs +6 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/unit/test_case.rbs +3 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/unit.rbs +4 -0
- data/.gem_rbs_collection/minitest/5.25/minitest.rbs +115 -0
- data/.gem_rbs_collection/parallel/1.20/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/parallel/1.20/parallel.rbs +86 -0
- data/.gem_rbs_collection/parser/3.2/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/parser/3.2/manifest.yaml +7 -0
- data/.gem_rbs_collection/parser/3.2/parser.rbs +193 -0
- data/.gem_rbs_collection/parser/3.2/polyfill.rbs +4 -0
- data/.gem_rbs_collection/rainbow/3.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rainbow/3.0/global.rbs +7 -0
- data/.gem_rbs_collection/rainbow/3.0/presenter.rbs +209 -0
- data/.gem_rbs_collection/rainbow/3.0/rainbow.rbs +5 -0
- data/.gem_rbs_collection/rake/13.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rake/13.0/manifest.yaml +2 -0
- data/.gem_rbs_collection/rake/13.0/rake.rbs +39 -0
- data/.gem_rbs_collection/regexp_parser/2.8/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/regexp_parser/2.8/regexp_parser.rbs +17 -0
- data/.gem_rbs_collection/rubocop/1.57/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rubocop/1.57/rubocop.rbs +129 -0
- data/.gem_rbs_collection/rubocop-ast/1.30/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rubocop-ast/1.30/rubocop-ast.rbs +771 -0
- data/.gem_rbs_collection/simplecov/0.22/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/simplecov/0.22/simplecov.rbs +54 -0
- data/README.md +137 -248
- data/Steepfile +19 -0
- data/docs/advanced-features.md +625 -0
- data/docs/api-guide.md +509 -0
- data/docs/error-handling.md +684 -0
- data/examples/README.md +95 -42
- data/examples/context_demo.rb +112 -0
- data/examples/data_pipeline_demo.rb +231 -0
- data/examples/parallel_progress_demo.rb +72 -0
- data/examples/quick_start.rb +4 -4
- data/examples/reexecution_demo.rb +127 -0
- data/examples/{section_configuration.rb → section_demo.rb} +49 -66
- data/lib/taski/context.rb +52 -0
- data/lib/taski/execution/coordinator.rb +63 -0
- data/lib/taski/execution/parallel_progress_display.rb +201 -0
- data/lib/taski/execution/registry.rb +72 -0
- data/lib/taski/execution/task_wrapper.rb +255 -0
- data/lib/taski/section.rb +26 -250
- data/lib/taski/static_analysis/analyzer.rb +34 -0
- data/lib/taski/static_analysis/dependency_graph.rb +90 -0
- data/lib/taski/static_analysis/visitor.rb +114 -0
- data/lib/taski/task.rb +173 -0
- data/lib/taski/version.rb +1 -1
- data/lib/taski.rb +45 -39
- data/rbs_collection.lock.yaml +116 -0
- data/rbs_collection.yaml +19 -0
- data/sig/taski.rbs +269 -62
- metadata +97 -32
- data/examples/advanced_patterns.rb +0 -119
- data/examples/progress_demo.rb +0 -166
- data/examples/tree_demo.rb +0 -205
- data/lib/taski/dependency_analyzer.rb +0 -231
- data/lib/taski/exceptions.rb +0 -17
- data/lib/taski/logger.rb +0 -158
- data/lib/taski/logging/formatter_factory.rb +0 -34
- data/lib/taski/logging/formatter_interface.rb +0 -19
- data/lib/taski/logging/json_formatter.rb +0 -26
- data/lib/taski/logging/simple_formatter.rb +0 -16
- data/lib/taski/logging/structured_formatter.rb +0 -44
- data/lib/taski/progress/display_colors.rb +0 -17
- data/lib/taski/progress/display_manager.rb +0 -115
- data/lib/taski/progress/output_capture.rb +0 -105
- data/lib/taski/progress/spinner_animation.rb +0 -46
- data/lib/taski/progress/task_formatter.rb +0 -25
- data/lib/taski/progress/task_status.rb +0 -38
- data/lib/taski/progress/terminal_controller.rb +0 -35
- data/lib/taski/progress_display.rb +0 -59
- data/lib/taski/reference.rb +0 -40
- data/lib/taski/task/base.rb +0 -90
- data/lib/taski/task/define_api.rb +0 -154
- data/lib/taski/task/dependency_resolver.rb +0 -73
- data/lib/taski/task/exports_api.rb +0 -31
- data/lib/taski/task/instance_management.rb +0 -203
- data/lib/taski/tree_colors.rb +0 -91
- data/lib/taski/utils/dependency_resolver_helper.rb +0 -85
- data/lib/taski/utils/tree_display_helper.rb +0 -71
- data/lib/taski/utils.rb +0 -107
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
module Rake
|
|
2
|
+
class TaskLib
|
|
3
|
+
include Rake::DSL
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
class Task
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
class TaskArguments
|
|
10
|
+
include Enumerable[untyped]
|
|
11
|
+
|
|
12
|
+
def []: (untyped index) -> untyped
|
|
13
|
+
def each: () ?{ (untyped, untyped) -> void } -> void
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
module DSL
|
|
17
|
+
private
|
|
18
|
+
|
|
19
|
+
include FileUtils
|
|
20
|
+
|
|
21
|
+
def desc: (String description) -> void
|
|
22
|
+
def directory: (*untyped args) ?{ () -> void } -> void
|
|
23
|
+
def file: (*untyped args) ?{ () -> void } -> void
|
|
24
|
+
def file_create: (*untyped args) ?{ () -> void } -> void
|
|
25
|
+
def import: (*String fns) -> void
|
|
26
|
+
def multitask: (*untyped args) ?{ () -> void } -> void
|
|
27
|
+
def namespace: (?untyped name) ?{ () -> void } -> void
|
|
28
|
+
def rule: (*untyped args) ?{ () -> void } -> void
|
|
29
|
+
def task: (*untyped args) ?{ (Rake::Task, Rake::TaskArguments) -> void } -> void
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
module FileUtils
|
|
34
|
+
def sh: (*String cmd, **untyped options) ?{ (bool, Process::Status) -> void } -> void
|
|
35
|
+
| (Hash[String, String] env, *String cmd, **untyped options) ?{ (bool, Process::Status) -> void } -> void
|
|
36
|
+
def ruby: (*String args, **untyped options) ?{ (bool, Process::Status) -> void } -> void
|
|
37
|
+
def safe_ln: (*untyped args, **untyped options) -> void
|
|
38
|
+
def split_all: (String path) -> Array[String]
|
|
39
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
class Regexp::Parser
|
|
2
|
+
def parse: [T] (Regexp | String input, ?String? syntax, ?options: Integer?) { (Regexp::Expression::Root) -> T } -> T
|
|
3
|
+
| (Regexp | String input, ?String? syntax, ?options: Integer?) -> Regexp::Expression::Root
|
|
4
|
+
def self.parse: [T] (Regexp | String input, ?String? syntax, ?options: Integer?) { (Regexp::Expression::Root) -> T } -> T
|
|
5
|
+
| (Regexp | String input, ?String? syntax, ?options: Integer?) -> Regexp::Expression::Root
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
module Regexp::Expression
|
|
9
|
+
class Root < Subexpression
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
class Subexpression < Base
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
class Base
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
module RuboCop
|
|
2
|
+
class ConfigLoader
|
|
3
|
+
def self.debug?: () -> boolish
|
|
4
|
+
def self.merge_with_default: (Config, String) -> Config
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
class Config
|
|
8
|
+
def initialize: (Hash[untyped, untyped], String) -> void
|
|
9
|
+
def for_cop: (String cop) -> Hash[String, untyped]
|
|
10
|
+
def for_enabled_cop: (String cop) -> Hash[String, untyped]
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
module Cop
|
|
14
|
+
class Base
|
|
15
|
+
extend AST::NodePattern::Macros
|
|
16
|
+
include Util
|
|
17
|
+
include IgnoredNode
|
|
18
|
+
include AutocorrectLogic
|
|
19
|
+
|
|
20
|
+
def self.exclude_from_registry: () -> void
|
|
21
|
+
def self.department: () -> Symbol
|
|
22
|
+
def self.cop_name: () -> String
|
|
23
|
+
def self.documentation_url: (?Config?) -> String
|
|
24
|
+
def self.requires_gem: (String gem_name, *String version_requirements) -> void
|
|
25
|
+
|
|
26
|
+
attr_reader config: Config
|
|
27
|
+
|
|
28
|
+
def add_offense: (untyped node, ?message: String, ?severity: Symbol) -> void
|
|
29
|
+
| (untyped node, ?message: String, ?severity: Symbol) { (Corrector) -> void } -> void
|
|
30
|
+
def cop_config: () -> Hash[String, untyped]
|
|
31
|
+
def target_ruby_version: () -> Float
|
|
32
|
+
def processed_source: () -> AST::ProcessedSource
|
|
33
|
+
def target_gem_version: (String gem_name) -> Gem::Version
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
module AutocorrectLogic
|
|
37
|
+
def autocorrect?: () -> bool
|
|
38
|
+
def autocorrect_with_disable_uncorrectable?: () -> bool
|
|
39
|
+
def autocorrect_requested?: () -> bool
|
|
40
|
+
def correctable?: () -> bool
|
|
41
|
+
def disable_uncorrectable?: () -> bool
|
|
42
|
+
def safe_autocorrect?: () -> bool
|
|
43
|
+
def autocorrect_enabled?: () -> bool
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
class Corrector < Parser::Source::TreeRewriter
|
|
47
|
+
def replace: ((Parser::Source::Range | RuboCop::AST::Node) range, String content) -> self
|
|
48
|
+
def wrap: ((Parser::Source::Range | RuboCop::AST::Node) range, String? insert_before, String? insert_after) -> self
|
|
49
|
+
def remove: ((Parser::Source::Range | RuboCop::AST::Node) range) -> self
|
|
50
|
+
def insert_before: ((Parser::Source::Range | RuboCop::AST::Node) range, String content) -> self
|
|
51
|
+
def insert_after: ((Parser::Source::Range | RuboCop::AST::Node) range, String content) -> self
|
|
52
|
+
def remove_preceding: ((Parser::Source::Range | RuboCop::AST::Node) node_or_range, Integer size) -> self
|
|
53
|
+
def remove_leading: ((Parser::Source::Range | RuboCop::AST::Node) node_or_range, Integer size) -> self
|
|
54
|
+
def remove_trailing: ((Parser::Source::Range | RuboCop::AST::Node) node_or_range, Integer size) -> self
|
|
55
|
+
def swap: ((Parser::Source::Range | RuboCop::AST::Node) node_or_range1, (Parser::Source::Range | RuboCop::AST::Node) node_or_range2) -> self
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
module Alignment
|
|
59
|
+
def configured_indentation_width: () -> Integer
|
|
60
|
+
def indentation: (RuboCop::AST::Node node) -> String
|
|
61
|
+
def offset: (RuboCop::AST::Node node) -> String
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
module ConfigurableEnforcedStyle
|
|
65
|
+
def style: () -> Symbol
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
module CommentsHelp
|
|
69
|
+
def source_range_with_comment: (RuboCop::AST::Node node) -> Parser::Source::Range
|
|
70
|
+
def contains_comments?: (RuboCop::AST::Node node) -> bool
|
|
71
|
+
def comments_in_range: (RuboCop::AST::Node node) -> Array[Parser::Source::Comment]
|
|
72
|
+
def comments_contain_disables?: (RuboCop::AST::Node node, String cop_name) -> bool
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
module RangeHelp
|
|
76
|
+
def source_range: (Parser::Source::Buffer source_buffer, Integer line_number, Integer column, ?Integer length) -> Parser::Source::Range
|
|
77
|
+
def range_between: (Integer start_pos, Integer end_pos) -> Parser::Source::Range
|
|
78
|
+
def range_with_surrounding_space: (?Parser::Source::Range range_positional,
|
|
79
|
+
?range: Parser::Source::Range, ?side: Symbol, ?newlines: bool,
|
|
80
|
+
?whitespace: bool, ?continuations: bool,
|
|
81
|
+
?buffer: Parser::Source::Buffer) -> Parser::Source::Range
|
|
82
|
+
def range_by_whole_lines: (Parser::Source::Range range,
|
|
83
|
+
?include_final_newline: bool,
|
|
84
|
+
?buffer: Parser::Source::Buffer) -> Parser::Source::Range
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
module IgnoredNode
|
|
88
|
+
def ignore_node: (RuboCop::AST::Node node) -> void
|
|
89
|
+
def part_of_ignored_node?: (RuboCop::AST::Node node) -> bool
|
|
90
|
+
def ignored_node?: (RuboCop::AST::Node node) -> bool
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
module TargetRubyVersion
|
|
94
|
+
def minimum_target_ruby_version: (Float) -> void
|
|
95
|
+
def maximum_target_ruby_version: (Float) -> void
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
module Util
|
|
99
|
+
include PathUtil
|
|
100
|
+
def line_range: (RuboCop::AST::Node node) -> ::Range[Integer]
|
|
101
|
+
def parentheses?: (RuboCop::AST::Node node) -> bool
|
|
102
|
+
def add_parentheses: (RuboCop::AST::Node node, Corrector corrector) -> void
|
|
103
|
+
def any_descendant?: (RuboCop::AST::Node node, *Symbol types) -> bool
|
|
104
|
+
def args_begin: (RuboCop::AST::Node node) -> Parser::Source::Range
|
|
105
|
+
def args_end: (RuboCop::AST::Node node) -> Parser::Source::Range
|
|
106
|
+
def begins_its_line?: (Parser::Source::Range range) -> bool
|
|
107
|
+
def first_part_of_call_chain: (RuboCop::AST::Node node) -> RuboCop::AST::Node
|
|
108
|
+
def double_quotes_required?: (String string) -> bool
|
|
109
|
+
def needs_escaping?: (String string) -> bool
|
|
110
|
+
def escape_string: (String string) -> String
|
|
111
|
+
def to_string_literal: (String string) -> String
|
|
112
|
+
def trim_string_interpolation_escape_character: (String str) -> String
|
|
113
|
+
def interpret_string_escapes: (String string) -> String
|
|
114
|
+
def line: ((RuboCop::AST::Node | Parser::Source::Range) node_or_range) -> Integer
|
|
115
|
+
def same_line?: ((RuboCop::AST::Node | Parser::Source::Range) node1, (RuboCop::AST::Node | Parser::Source::Range) node2) -> bool
|
|
116
|
+
def indent: (RuboCop::AST::Node node, ?offset: Integer) -> String
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
class ProcessedSource = AST::ProcessedSource
|
|
121
|
+
|
|
122
|
+
module AutoCorrector
|
|
123
|
+
def support_autocorrect?: () -> true
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
module PathUtil
|
|
127
|
+
def smart_path: (String path) -> String
|
|
128
|
+
end
|
|
129
|
+
end
|