taski 0.4.0 → 0.4.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.
- checksums.yaml +4 -4
- data/README.md +49 -110
- data/examples/README.md +8 -5
- data/examples/context_demo.rb +22 -16
- data/lib/taski/context.rb +36 -38
- data/lib/taski/static_analysis/analyzer.rb +17 -5
- data/lib/taski/static_analysis/visitor.rb +22 -6
- data/lib/taski/task.rb +39 -13
- data/lib/taski/version.rb +1 -1
- data/lib/taski.rb +23 -0
- metadata +1 -62
- data/.gem_rbs_collection/ast/2.4/.rbs_meta.yaml +0 -9
- data/.gem_rbs_collection/ast/2.4/ast.rbs +0 -73
- data/.gem_rbs_collection/minitest/5.25/.rbs_meta.yaml +0 -9
- data/.gem_rbs_collection/minitest/5.25/minitest/abstract_reporter.rbs +0 -52
- data/.gem_rbs_collection/minitest/5.25/minitest/assertion.rbs +0 -17
- data/.gem_rbs_collection/minitest/5.25/minitest/assertions.rbs +0 -590
- data/.gem_rbs_collection/minitest/5.25/minitest/backtrace_filter.rbs +0 -23
- data/.gem_rbs_collection/minitest/5.25/minitest/bench_spec.rbs +0 -102
- data/.gem_rbs_collection/minitest/5.25/minitest/benchmark.rbs +0 -259
- data/.gem_rbs_collection/minitest/5.25/minitest/composite_reporter.rbs +0 -25
- data/.gem_rbs_collection/minitest/5.25/minitest/compress.rbs +0 -13
- data/.gem_rbs_collection/minitest/5.25/minitest/error_on_warning.rbs +0 -3
- data/.gem_rbs_collection/minitest/5.25/minitest/expectation.rbs +0 -2
- data/.gem_rbs_collection/minitest/5.25/minitest/expectations.rbs +0 -21
- data/.gem_rbs_collection/minitest/5.25/minitest/guard.rbs +0 -64
- data/.gem_rbs_collection/minitest/5.25/minitest/mock.rbs +0 -64
- data/.gem_rbs_collection/minitest/5.25/minitest/parallel/executor.rbs +0 -46
- data/.gem_rbs_collection/minitest/5.25/minitest/parallel/test/class_methods.rbs +0 -5
- data/.gem_rbs_collection/minitest/5.25/minitest/parallel/test.rbs +0 -3
- data/.gem_rbs_collection/minitest/5.25/minitest/parallel.rbs +0 -2
- data/.gem_rbs_collection/minitest/5.25/minitest/pride_io.rbs +0 -62
- data/.gem_rbs_collection/minitest/5.25/minitest/pride_lol.rbs +0 -19
- data/.gem_rbs_collection/minitest/5.25/minitest/progress_reporter.rbs +0 -11
- data/.gem_rbs_collection/minitest/5.25/minitest/reportable.rbs +0 -53
- data/.gem_rbs_collection/minitest/5.25/minitest/reporter.rbs +0 -5
- data/.gem_rbs_collection/minitest/5.25/minitest/result.rbs +0 -28
- data/.gem_rbs_collection/minitest/5.25/minitest/runnable.rbs +0 -163
- data/.gem_rbs_collection/minitest/5.25/minitest/skip.rbs +0 -6
- data/.gem_rbs_collection/minitest/5.25/minitest/spec/dsl/instance_methods.rbs +0 -48
- data/.gem_rbs_collection/minitest/5.25/minitest/spec/dsl.rbs +0 -129
- data/.gem_rbs_collection/minitest/5.25/minitest/spec.rbs +0 -11
- data/.gem_rbs_collection/minitest/5.25/minitest/statistics_reporter.rbs +0 -81
- data/.gem_rbs_collection/minitest/5.25/minitest/summary_reporter.rbs +0 -18
- data/.gem_rbs_collection/minitest/5.25/minitest/test/lifecycle_hooks.rbs +0 -92
- data/.gem_rbs_collection/minitest/5.25/minitest/test.rbs +0 -69
- data/.gem_rbs_collection/minitest/5.25/minitest/unexpected_error.rbs +0 -12
- data/.gem_rbs_collection/minitest/5.25/minitest/unexpected_warning.rbs +0 -6
- data/.gem_rbs_collection/minitest/5.25/minitest/unit/test_case.rbs +0 -3
- data/.gem_rbs_collection/minitest/5.25/minitest/unit.rbs +0 -4
- data/.gem_rbs_collection/minitest/5.25/minitest.rbs +0 -115
- data/.gem_rbs_collection/parallel/1.20/.rbs_meta.yaml +0 -9
- data/.gem_rbs_collection/parallel/1.20/parallel.rbs +0 -86
- data/.gem_rbs_collection/parser/3.2/.rbs_meta.yaml +0 -9
- data/.gem_rbs_collection/parser/3.2/manifest.yaml +0 -7
- data/.gem_rbs_collection/parser/3.2/parser.rbs +0 -193
- data/.gem_rbs_collection/parser/3.2/polyfill.rbs +0 -4
- data/.gem_rbs_collection/rainbow/3.0/.rbs_meta.yaml +0 -9
- data/.gem_rbs_collection/rainbow/3.0/global.rbs +0 -7
- data/.gem_rbs_collection/rainbow/3.0/presenter.rbs +0 -209
- data/.gem_rbs_collection/rainbow/3.0/rainbow.rbs +0 -5
- data/.gem_rbs_collection/rake/13.0/.rbs_meta.yaml +0 -9
- data/.gem_rbs_collection/rake/13.0/manifest.yaml +0 -2
- data/.gem_rbs_collection/rake/13.0/rake.rbs +0 -39
- data/.gem_rbs_collection/regexp_parser/2.8/.rbs_meta.yaml +0 -9
- data/.gem_rbs_collection/regexp_parser/2.8/regexp_parser.rbs +0 -17
- data/.gem_rbs_collection/rubocop/1.57/.rbs_meta.yaml +0 -9
- data/.gem_rbs_collection/rubocop/1.57/rubocop.rbs +0 -129
- data/.gem_rbs_collection/rubocop-ast/1.30/.rbs_meta.yaml +0 -9
- data/.gem_rbs_collection/rubocop-ast/1.30/rubocop-ast.rbs +0 -771
- data/.gem_rbs_collection/simplecov/0.22/.rbs_meta.yaml +0 -9
- data/.gem_rbs_collection/simplecov/0.22/simplecov.rbs +0 -54
data/lib/taski/task.rb
CHANGED
|
@@ -39,14 +39,14 @@ module Taski
|
|
|
39
39
|
@dependencies_cache = nil
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
def run
|
|
43
|
-
Taski
|
|
42
|
+
def run(context: {})
|
|
43
|
+
Taski.start_context(options: context, root_task: self)
|
|
44
44
|
validate_no_circular_dependencies!
|
|
45
45
|
cached_wrapper.run
|
|
46
46
|
end
|
|
47
47
|
|
|
48
|
-
def clean
|
|
49
|
-
Taski
|
|
48
|
+
def clean(context: {})
|
|
49
|
+
Taski.start_context(options: context, root_task: self)
|
|
50
50
|
validate_no_circular_dependencies!
|
|
51
51
|
cached_wrapper.clean
|
|
52
52
|
end
|
|
@@ -65,37 +65,51 @@ module Taski
|
|
|
65
65
|
def reset!
|
|
66
66
|
registry.reset!
|
|
67
67
|
Taski.reset_global_registry!
|
|
68
|
-
Taski
|
|
68
|
+
Taski.reset_context!
|
|
69
69
|
@coordinator = nil
|
|
70
70
|
@circular_dependency_checked = false
|
|
71
71
|
end
|
|
72
72
|
|
|
73
73
|
def tree
|
|
74
|
-
build_tree(self, "", Set.new)
|
|
74
|
+
build_tree(self, "", Set.new, false)
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
private
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
# ANSI color codes
|
|
80
|
+
COLORS = {
|
|
81
|
+
reset: "\e[0m",
|
|
82
|
+
task: "\e[32m", # green
|
|
83
|
+
section: "\e[34m", # blue
|
|
84
|
+
impl: "\e[33m", # yellow
|
|
85
|
+
tree: "\e[90m", # gray
|
|
86
|
+
name: "\e[1m" # bold
|
|
87
|
+
}.freeze
|
|
88
|
+
|
|
89
|
+
def build_tree(task_class, prefix, visited, is_impl)
|
|
90
|
+
type_label = colored_type_label(task_class)
|
|
91
|
+
impl_prefix = is_impl ? "#{COLORS[:impl]}[impl]#{COLORS[:reset]} " : ""
|
|
92
|
+
name = "#{COLORS[:name]}#{task_class.name}#{COLORS[:reset]}"
|
|
93
|
+
result = "#{impl_prefix}#{name} #{type_label}\n"
|
|
81
94
|
return result if visited.include?(task_class)
|
|
82
95
|
|
|
83
96
|
visited.add(task_class)
|
|
84
97
|
dependencies = task_class.cached_dependencies.to_a
|
|
98
|
+
is_section = section_class?(task_class)
|
|
85
99
|
|
|
86
100
|
dependencies.each_with_index do |dep, index|
|
|
87
101
|
is_last = (index == dependencies.size - 1)
|
|
88
|
-
result += format_dependency_branch(dep, prefix, is_last, visited)
|
|
102
|
+
result += format_dependency_branch(dep, prefix, is_last, visited, is_section)
|
|
89
103
|
end
|
|
90
104
|
|
|
91
105
|
result
|
|
92
106
|
end
|
|
93
107
|
|
|
94
|
-
def format_dependency_branch(dep, prefix, is_last, visited)
|
|
108
|
+
def format_dependency_branch(dep, prefix, is_last, visited, is_impl)
|
|
95
109
|
connector, extension = tree_connector_chars(is_last)
|
|
96
|
-
dep_tree = build_tree(dep, "#{prefix}#{extension}", visited)
|
|
110
|
+
dep_tree = build_tree(dep, "#{prefix}#{extension}", visited, is_impl)
|
|
97
111
|
|
|
98
|
-
result = "#{prefix}#{connector}"
|
|
112
|
+
result = "#{prefix}#{COLORS[:tree]}#{connector}#{COLORS[:reset]}"
|
|
99
113
|
lines = dep_tree.lines
|
|
100
114
|
result += lines.first
|
|
101
115
|
lines.drop(1).each { |line| result += line }
|
|
@@ -110,6 +124,18 @@ module Taski
|
|
|
110
124
|
end
|
|
111
125
|
end
|
|
112
126
|
|
|
127
|
+
def colored_type_label(klass)
|
|
128
|
+
if section_class?(klass)
|
|
129
|
+
"#{COLORS[:section]}(Section)#{COLORS[:reset]}"
|
|
130
|
+
else
|
|
131
|
+
"#{COLORS[:task]}(Task)#{COLORS[:reset]}"
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
def section_class?(klass)
|
|
136
|
+
defined?(Taski::Section) && klass < Taski::Section
|
|
137
|
+
end
|
|
138
|
+
|
|
113
139
|
# Use allocate + initialize instead of new to avoid infinite loop
|
|
114
140
|
# since new is overridden to return TaskWrapper
|
|
115
141
|
def cached_wrapper
|
|
@@ -137,7 +163,7 @@ module Taski
|
|
|
137
163
|
singleton_class.undef_method(method) if singleton_class.method_defined?(method)
|
|
138
164
|
|
|
139
165
|
define_singleton_method(method) do
|
|
140
|
-
Taski
|
|
166
|
+
Taski.start_context(options: {}, root_task: self)
|
|
141
167
|
validate_no_circular_dependencies!
|
|
142
168
|
cached_wrapper.get_exported_value(method)
|
|
143
169
|
end
|
data/lib/taski/version.rb
CHANGED
data/lib/taski.rb
CHANGED
|
@@ -28,6 +28,29 @@ module Taski
|
|
|
28
28
|
end
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
+
@context_monitor = Monitor.new
|
|
32
|
+
|
|
33
|
+
# Get the current execution context
|
|
34
|
+
# @return [Context, nil] The current context or nil if no task is running
|
|
35
|
+
def self.context
|
|
36
|
+
@context_monitor.synchronize { @context }
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Start a new execution context (internal use only)
|
|
40
|
+
# @api private
|
|
41
|
+
def self.start_context(options:, root_task:)
|
|
42
|
+
@context_monitor.synchronize do
|
|
43
|
+
return if @context
|
|
44
|
+
@context = Context.new(options: options, root_task: root_task)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Reset the execution context (internal use only)
|
|
49
|
+
# @api private
|
|
50
|
+
def self.reset_context!
|
|
51
|
+
@context_monitor.synchronize { @context = nil }
|
|
52
|
+
end
|
|
53
|
+
|
|
31
54
|
def self.global_registry
|
|
32
55
|
@global_registry ||= Execution::Registry.new
|
|
33
56
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: taski
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ahogappa
|
|
@@ -49,67 +49,6 @@ executables: []
|
|
|
49
49
|
extensions: []
|
|
50
50
|
extra_rdoc_files: []
|
|
51
51
|
files:
|
|
52
|
-
- ".gem_rbs_collection/ast/2.4/.rbs_meta.yaml"
|
|
53
|
-
- ".gem_rbs_collection/ast/2.4/ast.rbs"
|
|
54
|
-
- ".gem_rbs_collection/minitest/5.25/.rbs_meta.yaml"
|
|
55
|
-
- ".gem_rbs_collection/minitest/5.25/minitest.rbs"
|
|
56
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/abstract_reporter.rbs"
|
|
57
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/assertion.rbs"
|
|
58
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/assertions.rbs"
|
|
59
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/backtrace_filter.rbs"
|
|
60
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/bench_spec.rbs"
|
|
61
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/benchmark.rbs"
|
|
62
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/composite_reporter.rbs"
|
|
63
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/compress.rbs"
|
|
64
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/error_on_warning.rbs"
|
|
65
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/expectation.rbs"
|
|
66
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/expectations.rbs"
|
|
67
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/guard.rbs"
|
|
68
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/mock.rbs"
|
|
69
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/parallel.rbs"
|
|
70
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/parallel/executor.rbs"
|
|
71
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/parallel/test.rbs"
|
|
72
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/parallel/test/class_methods.rbs"
|
|
73
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/pride_io.rbs"
|
|
74
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/pride_lol.rbs"
|
|
75
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/progress_reporter.rbs"
|
|
76
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/reportable.rbs"
|
|
77
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/reporter.rbs"
|
|
78
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/result.rbs"
|
|
79
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/runnable.rbs"
|
|
80
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/skip.rbs"
|
|
81
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/spec.rbs"
|
|
82
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/spec/dsl.rbs"
|
|
83
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/spec/dsl/instance_methods.rbs"
|
|
84
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/statistics_reporter.rbs"
|
|
85
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/summary_reporter.rbs"
|
|
86
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/test.rbs"
|
|
87
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/test/lifecycle_hooks.rbs"
|
|
88
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/unexpected_error.rbs"
|
|
89
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/unexpected_warning.rbs"
|
|
90
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/unit.rbs"
|
|
91
|
-
- ".gem_rbs_collection/minitest/5.25/minitest/unit/test_case.rbs"
|
|
92
|
-
- ".gem_rbs_collection/parallel/1.20/.rbs_meta.yaml"
|
|
93
|
-
- ".gem_rbs_collection/parallel/1.20/parallel.rbs"
|
|
94
|
-
- ".gem_rbs_collection/parser/3.2/.rbs_meta.yaml"
|
|
95
|
-
- ".gem_rbs_collection/parser/3.2/manifest.yaml"
|
|
96
|
-
- ".gem_rbs_collection/parser/3.2/parser.rbs"
|
|
97
|
-
- ".gem_rbs_collection/parser/3.2/polyfill.rbs"
|
|
98
|
-
- ".gem_rbs_collection/rainbow/3.0/.rbs_meta.yaml"
|
|
99
|
-
- ".gem_rbs_collection/rainbow/3.0/global.rbs"
|
|
100
|
-
- ".gem_rbs_collection/rainbow/3.0/presenter.rbs"
|
|
101
|
-
- ".gem_rbs_collection/rainbow/3.0/rainbow.rbs"
|
|
102
|
-
- ".gem_rbs_collection/rake/13.0/.rbs_meta.yaml"
|
|
103
|
-
- ".gem_rbs_collection/rake/13.0/manifest.yaml"
|
|
104
|
-
- ".gem_rbs_collection/rake/13.0/rake.rbs"
|
|
105
|
-
- ".gem_rbs_collection/regexp_parser/2.8/.rbs_meta.yaml"
|
|
106
|
-
- ".gem_rbs_collection/regexp_parser/2.8/regexp_parser.rbs"
|
|
107
|
-
- ".gem_rbs_collection/rubocop-ast/1.30/.rbs_meta.yaml"
|
|
108
|
-
- ".gem_rbs_collection/rubocop-ast/1.30/rubocop-ast.rbs"
|
|
109
|
-
- ".gem_rbs_collection/rubocop/1.57/.rbs_meta.yaml"
|
|
110
|
-
- ".gem_rbs_collection/rubocop/1.57/rubocop.rbs"
|
|
111
|
-
- ".gem_rbs_collection/simplecov/0.22/.rbs_meta.yaml"
|
|
112
|
-
- ".gem_rbs_collection/simplecov/0.22/simplecov.rbs"
|
|
113
52
|
- ".standard.yml"
|
|
114
53
|
- LICENSE
|
|
115
54
|
- README.md
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
module AST
|
|
2
|
-
interface _ToAst
|
|
3
|
-
def to_ast: () -> Node
|
|
4
|
-
end
|
|
5
|
-
|
|
6
|
-
interface _ToSym
|
|
7
|
-
def to_sym: () -> Symbol
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
class Node
|
|
11
|
-
public
|
|
12
|
-
|
|
13
|
-
attr_reader children: Array[untyped]
|
|
14
|
-
attr_reader hash: String
|
|
15
|
-
attr_reader type: Symbol
|
|
16
|
-
|
|
17
|
-
alias + concat
|
|
18
|
-
|
|
19
|
-
alias << append
|
|
20
|
-
|
|
21
|
-
def ==: (untyped other) -> bool
|
|
22
|
-
|
|
23
|
-
def append: (untyped element) -> self
|
|
24
|
-
|
|
25
|
-
alias clone dup
|
|
26
|
-
|
|
27
|
-
def concat: (_ToA[untyped] array) -> self
|
|
28
|
-
|
|
29
|
-
def dup: () -> self
|
|
30
|
-
|
|
31
|
-
def eql?: (untyped other) -> bool
|
|
32
|
-
|
|
33
|
-
def inspect: (?Integer indent) -> String
|
|
34
|
-
|
|
35
|
-
alias to_a children
|
|
36
|
-
|
|
37
|
-
def to_ast: () -> self
|
|
38
|
-
|
|
39
|
-
alias to_s to_sexp
|
|
40
|
-
|
|
41
|
-
def to_sexp: (?Integer indent) -> String
|
|
42
|
-
|
|
43
|
-
def to_sexp_array: () -> Array[untyped]
|
|
44
|
-
|
|
45
|
-
def updated: (?_ToSym? `type`, ?_ToA[untyped]? children, ?Hash[Symbol, untyped]? properties) -> self
|
|
46
|
-
|
|
47
|
-
private
|
|
48
|
-
|
|
49
|
-
def initialize: (_ToSym `type`, ?_ToA[untyped]? children, ?Hash[Symbol, untyped] properties) -> void
|
|
50
|
-
|
|
51
|
-
alias original_dup dup
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
class Processor
|
|
55
|
-
include Mixin
|
|
56
|
-
|
|
57
|
-
module Mixin
|
|
58
|
-
public
|
|
59
|
-
|
|
60
|
-
def handler_missing: (Node node) -> Node?
|
|
61
|
-
|
|
62
|
-
def process: (_ToAst? node) -> Node?
|
|
63
|
-
|
|
64
|
-
def process_all: (Array[_ToAst] nodes) -> Array[Node]
|
|
65
|
-
end
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
module Sexp
|
|
69
|
-
public
|
|
70
|
-
|
|
71
|
-
def s: (_ToSym `type`, *untyped children) -> Node
|
|
72
|
-
end
|
|
73
|
-
end
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# <!-- rdoc-file=lib/minitest.rb -->
|
|
2
|
-
# Defines the API for Reporters. Subclass this and override whatever you want.
|
|
3
|
-
# Go nuts.
|
|
4
|
-
#
|
|
5
|
-
class Minitest::AbstractReporter
|
|
6
|
-
@mutex: untyped
|
|
7
|
-
def initialize: () -> void
|
|
8
|
-
|
|
9
|
-
# <!--
|
|
10
|
-
# rdoc-file=lib/minitest.rb
|
|
11
|
-
# - start()
|
|
12
|
-
# -->
|
|
13
|
-
# Starts reporting on the run.
|
|
14
|
-
#
|
|
15
|
-
def start: () -> nil
|
|
16
|
-
|
|
17
|
-
# <!--
|
|
18
|
-
# rdoc-file=lib/minitest.rb
|
|
19
|
-
# - prerecord(klass, name)
|
|
20
|
-
# -->
|
|
21
|
-
# About to start running a test. This allows a reporter to show that it is
|
|
22
|
-
# starting or that we are in the middle of a test run.
|
|
23
|
-
#
|
|
24
|
-
def prerecord: (untyped klass, untyped name) -> nil
|
|
25
|
-
|
|
26
|
-
# <!--
|
|
27
|
-
# rdoc-file=lib/minitest.rb
|
|
28
|
-
# - record(result)
|
|
29
|
-
# -->
|
|
30
|
-
# Output and record the result of the test. Call
|
|
31
|
-
# [result#result_code](rdoc-ref:Runnable#result_code) to get the result
|
|
32
|
-
# character string. Stores the result of the run if the run did not pass.
|
|
33
|
-
#
|
|
34
|
-
def record: (untyped result) -> nil
|
|
35
|
-
|
|
36
|
-
# <!--
|
|
37
|
-
# rdoc-file=lib/minitest.rb
|
|
38
|
-
# - report()
|
|
39
|
-
# -->
|
|
40
|
-
# Outputs the summary of the run.
|
|
41
|
-
#
|
|
42
|
-
def report: () -> nil
|
|
43
|
-
|
|
44
|
-
# <!--
|
|
45
|
-
# rdoc-file=lib/minitest.rb
|
|
46
|
-
# - passed?()
|
|
47
|
-
# -->
|
|
48
|
-
# Did this run pass?
|
|
49
|
-
#
|
|
50
|
-
def passed?: () -> true
|
|
51
|
-
def synchronize: () { (?) -> untyped } -> untyped
|
|
52
|
-
end
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# <!-- rdoc-file=lib/minitest.rb -->
|
|
2
|
-
# Represents run failures.
|
|
3
|
-
#
|
|
4
|
-
class Minitest::Assertion < ::Exception
|
|
5
|
-
def error: () -> self
|
|
6
|
-
|
|
7
|
-
# <!--
|
|
8
|
-
# rdoc-file=lib/minitest.rb
|
|
9
|
-
# - location()
|
|
10
|
-
# -->
|
|
11
|
-
# Where was this run before an assertion was raised?
|
|
12
|
-
#
|
|
13
|
-
def location: () -> untyped
|
|
14
|
-
def result_code: () -> untyped
|
|
15
|
-
def result_label: () -> "Failure"
|
|
16
|
-
RE: Regexp
|
|
17
|
-
end
|