branchproof 0.9.0 → 0.11.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/CHANGELOG.md +42 -0
- data/README.md +230 -28
- data/doc/Branchproof/Configuration.md +28 -0
- data/doc/Branchproof/CoveragePolicy.md +27 -0
- data/doc/Branchproof/Evidence.md +3 -0
- data/doc/Branchproof/FocusedReport.md +1 -1
- data/doc/Branchproof/Project.md +4 -1
- data/doc/Branchproof/RSpecAdapter/ClassRunnerGuard.md +11 -0
- data/doc/Branchproof/RSpecAdapter/ContextLifecycle.md +14 -0
- data/doc/Branchproof/RSpecAdapter/DefaultDiscovery.md +11 -0
- data/doc/Branchproof/RSpecAdapter/ExampleLifecycle.md +11 -0
- data/doc/Branchproof/RSpecAdapter/RunnerGuard.md +11 -0
- data/doc/Branchproof/RSpecAdapter/UnsupportedRunner.md +12 -0
- data/doc/Branchproof/RSpecAdapter.md +47 -0
- data/doc/Branchproof/RailsSupport.md +35 -2
- data/doc/Branchproof/Report.md +11 -2
- data/doc/Branchproof/ReportSelection.md +42 -0
- data/doc/Branchproof/Runtime.md +3 -0
- data/doc/Branchproof/Worker.md +8 -1
- data/doc/Branchproof.md +11 -1
- data/doc/CHANGELOG.md +42 -0
- data/doc/README.md +230 -28
- data/lib/branchproof/cli.rb +191 -38
- data/lib/branchproof/comparison.rb +58 -7
- data/lib/branchproof/configuration.rb +111 -0
- data/lib/branchproof/coverage_policy.rb +169 -0
- data/lib/branchproof/evidence.rb +41 -2
- data/lib/branchproof/focused_report.rb +149 -27
- data/lib/branchproof/project.rb +49 -2
- data/lib/branchproof/rails_support.rb +101 -0
- data/lib/branchproof/report.rb +118 -10
- data/lib/branchproof/report_selection.rb +158 -0
- data/lib/branchproof/rspec_adapter.rb +423 -0
- data/lib/branchproof/runtime.rb +4 -0
- data/lib/branchproof/saved_report.rb +38 -5
- data/lib/branchproof/version.rb +1 -1
- data/lib/branchproof/worker.rb +75 -15
- data/lib/branchproof.rb +4 -0
- data/llms.txt +11 -1
- data/sig/branchproof.rbs +63 -4
- metadata +16 -2
data/llms.txt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
| | |
|
|
4
4
|
| --- | --- |
|
|
5
|
-
| **Defined in** | lib/branchproof.rb, lib/branchproof/cli.rb, lib/branchproof/limits.rb, lib/branchproof/loader.rb, lib/branchproof/report.rb, lib/branchproof/source.rb, lib/branchproof/worker.rb, lib/branchproof/project.rb, lib/branchproof/records.rb, lib/branchproof/runtime.rb, lib/branchproof/version.rb, lib/branchproof/analyzer.rb, lib/branchproof/evidence.rb, lib/branchproof/minimizer.rb, lib/branchproof/comparison.rb, lib/branchproof/constraints.rb, lib/branchproof/instrumenter.rb, lib/branchproof/runtime_flow.rb, lib/branchproof/saved_report.rb, lib/branchproof/value_syntax.rb, lib/branchproof/rails_support.rb, lib/branchproof/value_runtime.rb, lib/branchproof/coverage_index.rb, lib/branchproof/decision_table.rb, lib/branchproof/default_syntax.rb, lib/branchproof/focused_report.rb, lib/branchproof/decision_syntax.rb, lib/branchproof/default_runtime.rb, lib/branchproof/exception_syntax.rb, lib/branchproof/iteration_syntax.rb, lib/branchproof/minitest_adapter.rb, lib/branchproof/comparison_report.rb, lib/branchproof/exception_runtime.rb, lib/branchproof/iteration_runtime.rb, lib/branchproof/flow_instrumentation.rb, lib/branchproof/value_instrumentation.rb, lib/branchproof/default_instrumentation.rb, lib/branchproof/exception_instrumentation.rb, lib/branchproof/iteration_instrumentation.rb, lib/branchproof/extended_alternative_runtime.rb |
|
|
5
|
+
| **Defined in** | lib/branchproof.rb, lib/branchproof/cli.rb, lib/branchproof/limits.rb, lib/branchproof/loader.rb, lib/branchproof/report.rb, lib/branchproof/source.rb, lib/branchproof/worker.rb, lib/branchproof/project.rb, lib/branchproof/records.rb, lib/branchproof/runtime.rb, lib/branchproof/version.rb, lib/branchproof/analyzer.rb, lib/branchproof/evidence.rb, lib/branchproof/minimizer.rb, lib/branchproof/comparison.rb, lib/branchproof/constraints.rb, lib/branchproof/instrumenter.rb, lib/branchproof/runtime_flow.rb, lib/branchproof/saved_report.rb, lib/branchproof/value_syntax.rb, lib/branchproof/configuration.rb, lib/branchproof/rails_support.rb, lib/branchproof/rspec_adapter.rb, lib/branchproof/value_runtime.rb, lib/branchproof/coverage_index.rb, lib/branchproof/decision_table.rb, lib/branchproof/default_syntax.rb, lib/branchproof/focused_report.rb, lib/branchproof/coverage_policy.rb, lib/branchproof/decision_syntax.rb, lib/branchproof/default_runtime.rb, lib/branchproof/exception_syntax.rb, lib/branchproof/iteration_syntax.rb, lib/branchproof/minitest_adapter.rb, lib/branchproof/report_selection.rb, lib/branchproof/comparison_report.rb, lib/branchproof/exception_runtime.rb, lib/branchproof/iteration_runtime.rb, lib/branchproof/flow_instrumentation.rb, lib/branchproof/value_instrumentation.rb, lib/branchproof/default_instrumentation.rb, lib/branchproof/exception_instrumentation.rb, lib/branchproof/iteration_instrumentation.rb, lib/branchproof/extended_alternative_runtime.rb |
|
|
6
6
|
|
|
7
7
|
Keep source-boundary and parameter-binding rules together for auditing.
|
|
8
8
|
rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity,
|
|
@@ -18,9 +18,11 @@ Not documented.
|
|
|
18
18
|
- [Branchproof/CLI.md](doc/Branchproof/CLI.md)
|
|
19
19
|
- [Branchproof/Comparison.md](doc/Branchproof/Comparison.md)
|
|
20
20
|
- [Branchproof/ComparisonReport.md](doc/Branchproof/ComparisonReport.md)
|
|
21
|
+
- [Branchproof/Configuration.md](doc/Branchproof/Configuration.md)
|
|
21
22
|
- [Branchproof/Constraints/Solver.md](doc/Branchproof/Constraints/Solver.md)
|
|
22
23
|
- [Branchproof/Constraints.md](doc/Branchproof/Constraints.md)
|
|
23
24
|
- [Branchproof/CoverageIndex.md](doc/Branchproof/CoverageIndex.md)
|
|
25
|
+
- [Branchproof/CoveragePolicy.md](doc/Branchproof/CoveragePolicy.md)
|
|
24
26
|
- [Branchproof/DecisionSyntax.md](doc/Branchproof/DecisionSyntax.md)
|
|
25
27
|
- [Branchproof/DecisionTable.md](doc/Branchproof/DecisionTable.md)
|
|
26
28
|
- [Branchproof/DefaultInstrumentation.md](doc/Branchproof/DefaultInstrumentation.md)
|
|
@@ -43,10 +45,18 @@ Not documented.
|
|
|
43
45
|
- [Branchproof/Minimizer.md](doc/Branchproof/Minimizer.md)
|
|
44
46
|
- [Branchproof/MinitestAdapter.md](doc/Branchproof/MinitestAdapter.md)
|
|
45
47
|
- [Branchproof/Project.md](doc/Branchproof/Project.md)
|
|
48
|
+
- [Branchproof/RSpecAdapter/ClassRunnerGuard.md](doc/Branchproof/RSpecAdapter/ClassRunnerGuard.md)
|
|
49
|
+
- [Branchproof/RSpecAdapter/ContextLifecycle.md](doc/Branchproof/RSpecAdapter/ContextLifecycle.md)
|
|
50
|
+
- [Branchproof/RSpecAdapter/DefaultDiscovery.md](doc/Branchproof/RSpecAdapter/DefaultDiscovery.md)
|
|
51
|
+
- [Branchproof/RSpecAdapter/ExampleLifecycle.md](doc/Branchproof/RSpecAdapter/ExampleLifecycle.md)
|
|
52
|
+
- [Branchproof/RSpecAdapter/RunnerGuard.md](doc/Branchproof/RSpecAdapter/RunnerGuard.md)
|
|
53
|
+
- [Branchproof/RSpecAdapter/UnsupportedRunner.md](doc/Branchproof/RSpecAdapter/UnsupportedRunner.md)
|
|
54
|
+
- [Branchproof/RSpecAdapter.md](doc/Branchproof/RSpecAdapter.md)
|
|
46
55
|
- [Branchproof/RailsSupport/Error.md](doc/Branchproof/RailsSupport/Error.md)
|
|
47
56
|
- [Branchproof/RailsSupport.md](doc/Branchproof/RailsSupport.md)
|
|
48
57
|
- [Branchproof/Records.md](doc/Branchproof/Records.md)
|
|
49
58
|
- [Branchproof/Report.md](doc/Branchproof/Report.md)
|
|
59
|
+
- [Branchproof/ReportSelection.md](doc/Branchproof/ReportSelection.md)
|
|
50
60
|
- [Branchproof/Runtime.md](doc/Branchproof/Runtime.md)
|
|
51
61
|
- [Branchproof/RuntimeFlow.md](doc/Branchproof/RuntimeFlow.md)
|
|
52
62
|
- [Branchproof/SavedReport.md](doc/Branchproof/SavedReport.md)
|
data/sig/branchproof.rbs
CHANGED
|
@@ -34,13 +34,24 @@ module Branchproof
|
|
|
34
34
|
|
|
35
35
|
class Project
|
|
36
36
|
MODES: Array[String]
|
|
37
|
+
FRAMEWORKS: Array[String]
|
|
37
38
|
RAILS_ENVIRONMENT: record
|
|
38
|
-
def initialize: (root: String, ?mode: String) -> void
|
|
39
|
+
def initialize: (root: String, ?mode: String, ?framework: String) -> void
|
|
39
40
|
def to_h: () -> record
|
|
40
41
|
end
|
|
41
42
|
|
|
43
|
+
class Configuration
|
|
44
|
+
SCHEMA_VERSION: Integer
|
|
45
|
+
PROJECTS: Array[String]
|
|
46
|
+
FRAMEWORKS: Array[String]
|
|
47
|
+
MINIMUM_CRITERIA: Array[String]
|
|
48
|
+
FIELDS: Array[String]
|
|
49
|
+
def self.load: (path: String, root: String, ?explicit: bool, ?disabled: bool) -> record?
|
|
50
|
+
end
|
|
51
|
+
|
|
42
52
|
module RailsSupport
|
|
43
53
|
def self.boot: (project: record) -> record
|
|
54
|
+
def self.validate_rspec!: (project: record) -> record?
|
|
44
55
|
end
|
|
45
56
|
|
|
46
57
|
class Instrumenter
|
|
@@ -57,6 +68,8 @@ module Branchproof
|
|
|
57
68
|
end
|
|
58
69
|
|
|
59
70
|
module Runtime
|
|
71
|
+
def self.register_test: (test: record) -> record?
|
|
72
|
+
def self.test_phase_counts: () -> Hash[String, Hash[String, Integer]]
|
|
60
73
|
def self.boot: (evidence: Evidence) -> nil
|
|
61
74
|
def self.enter: (String decision_id) -> nil
|
|
62
75
|
def self.condition: (String decision_id, Integer index, untyped value) -> untyped
|
|
@@ -100,6 +113,7 @@ module Branchproof
|
|
|
100
113
|
def register_test: (test: record) -> record
|
|
101
114
|
def record: (execution: record) -> record
|
|
102
115
|
def diagnose: (diagnostic: record) -> nil
|
|
116
|
+
def test_phase_counts: () -> Hash[String, Hash[String, Integer]]
|
|
103
117
|
def snapshot: () -> record
|
|
104
118
|
def merge: (snapshot: record) -> record
|
|
105
119
|
end
|
|
@@ -112,6 +126,14 @@ module Branchproof
|
|
|
112
126
|
def missing: (decision_id: String, condition_index: Integer) -> record?
|
|
113
127
|
end
|
|
114
128
|
|
|
129
|
+
class CoveragePolicy
|
|
130
|
+
CRITERIA: Hash[String, Hash[Symbol, String]]
|
|
131
|
+
COMPLETENESS_FIELDS: Array[String]
|
|
132
|
+
def self.normalize: (Hash[String | Symbol, untyped] minimum) -> Hash[String, Integer | Float]
|
|
133
|
+
def initialize: (minimum: Hash[String | Symbol, untyped]) -> void
|
|
134
|
+
def call: (document: document?) -> record
|
|
135
|
+
end
|
|
136
|
+
|
|
115
137
|
module Constraints
|
|
116
138
|
VERSION: Integer
|
|
117
139
|
NUMERIC_OPERATORS: Array[String]
|
|
@@ -164,17 +186,41 @@ module Branchproof
|
|
|
164
186
|
def run: (test_files: Array[String], runner_args: Array[String], on_complete: ^(record) -> untyped, ?before_load: ^() -> untyped?) -> nil
|
|
165
187
|
end
|
|
166
188
|
|
|
189
|
+
class RSpecAdapter
|
|
190
|
+
class UnsupportedRunner < ArgumentError
|
|
191
|
+
def diagnostic_code: () -> String
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
FORBIDDEN_OPTIONS: Hash[Symbol, String]
|
|
195
|
+
attr_reader tests: Hash[String, record]
|
|
196
|
+
def self.active_adapter: () -> RSpecAdapter?
|
|
197
|
+
def self.active_adapter=: (RSpecAdapter?) -> RSpecAdapter?
|
|
198
|
+
def self.runner_adapter: () -> RSpecAdapter?
|
|
199
|
+
def self.runner_adapter=: (RSpecAdapter?) -> RSpecAdapter?
|
|
200
|
+
attr_reader late_execution_error: ArgumentError?
|
|
201
|
+
def initialize: (runtime: untyped) -> void
|
|
202
|
+
def reject_execution!: (String message) -> bot
|
|
203
|
+
def enter_runner!: (untyped runner) -> bool
|
|
204
|
+
def example_started: (untyped notification) -> untyped
|
|
205
|
+
def example_finished: (untyped notification) -> untyped
|
|
206
|
+
def run: (test_files: Array[String], runner_args: Array[String], on_complete: ^(record) -> untyped, ?before_load: ^() -> untyped?, ?after_load: ^() -> untyped?, ?test_selection_explicit: bool) -> untyped
|
|
207
|
+
def validate_runner!: () -> nil
|
|
208
|
+
end
|
|
209
|
+
|
|
167
210
|
class Report
|
|
168
211
|
SCHEMA_VERSION: String
|
|
169
212
|
CRITERION_VERSION: String
|
|
170
213
|
VIEWS: Array[Symbol]
|
|
171
|
-
def initialize: (inventory: document, evidence: document, analysis: document?, minima: Array[document], baseline: document, diagnostics: Array[document], ?level: Integer, ?missing_only: bool, ?view: Symbol, ?run_metadata: document, ?saved_document: document?) -> void
|
|
172
|
-
def self.from_document: (document: document, ?level: Integer?, ?view: Symbol, ?missing_only: bool) -> Report
|
|
214
|
+
def initialize: (inventory: document, evidence: document, analysis: document?, minima: Array[document], baseline: document, diagnostics: Array[document], ?level: Integer, ?missing_only: bool, ?view: Symbol, ?run_metadata: document, ?saved_document: document?, ?focus: String?, ?top: (Integer | String)?, ?minimum: document?) -> void
|
|
215
|
+
def self.from_document: (document: document, ?level: Integer?, ?view: Symbol, ?missing_only: bool, ?focus: String?, ?top: (Integer | String)?, ?minimum: document?) -> Report
|
|
173
216
|
def diagnostic_message: (Hash[Symbol | String, untyped] diagnostic) -> String
|
|
174
217
|
def condition_explanation: (decision_id: String, condition_id: String) -> String
|
|
175
218
|
def decision_table_requirement: (untyped value) -> String?
|
|
176
219
|
def decision_table_reachability: (document rule) -> String
|
|
177
220
|
def decision_table_expected_heading: (document decision) -> String
|
|
221
|
+
def coverage_policy: () -> record
|
|
222
|
+
def coverage_policy_lines: () -> Array[String]
|
|
223
|
+
def rerun_command: (String test_id) -> String?
|
|
178
224
|
def write: (io: _WriteIO, format: Symbol | String) -> nil
|
|
179
225
|
def exit_code: () -> Integer
|
|
180
226
|
end
|
|
@@ -188,10 +234,23 @@ module Branchproof
|
|
|
188
234
|
end
|
|
189
235
|
|
|
190
236
|
class FocusedReport
|
|
191
|
-
def initialize: (document: document, view: Symbol, level: Integer, ?missing_only: bool) -> void
|
|
237
|
+
def initialize: (document: document, view: Symbol, level: Integer, ?missing_only: bool, ?coordinator: Report?, ?focus: String?, ?top: (Integer | String)?, ?selection: ReportSelection?) -> void
|
|
192
238
|
def render: () -> String
|
|
193
239
|
end
|
|
194
240
|
|
|
241
|
+
class ReportSelection
|
|
242
|
+
attr_reader focus: record?
|
|
243
|
+
attr_reader top: Integer?
|
|
244
|
+
def initialize: (?focus: String?, ?top: (Integer | String)?) -> void
|
|
245
|
+
def active?: () -> bool
|
|
246
|
+
def focus_active?: () -> bool
|
|
247
|
+
def focus_label: () -> String?
|
|
248
|
+
def matching_decision_ids: (document: document) -> Array[String]
|
|
249
|
+
def filter_decisions: (Array[record] decisions, ?inventory: document) -> Array[record]
|
|
250
|
+
def limit: (Array[record] items) -> [Array[record], Integer]
|
|
251
|
+
def sort_key: (record decision, ?inventory: document) -> [String, Integer, Integer, String]
|
|
252
|
+
end
|
|
253
|
+
|
|
195
254
|
class SavedReport
|
|
196
255
|
def self.read: (String path) -> document
|
|
197
256
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: branchproof
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.11.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lucian Ghinda
|
|
@@ -50,7 +50,7 @@ dependencies:
|
|
|
50
50
|
- !ruby/object:Gem::Version
|
|
51
51
|
version: '2'
|
|
52
52
|
description: Inventory Ruby decisions and report masking MC/DC evidence from Minitest
|
|
53
|
-
runs.
|
|
53
|
+
or RSpec runs.
|
|
54
54
|
email:
|
|
55
55
|
- lucianghinda@users.noreply.github.com
|
|
56
56
|
executables:
|
|
@@ -70,9 +70,11 @@ files:
|
|
|
70
70
|
- doc/Branchproof/CLI.md
|
|
71
71
|
- doc/Branchproof/Comparison.md
|
|
72
72
|
- doc/Branchproof/ComparisonReport.md
|
|
73
|
+
- doc/Branchproof/Configuration.md
|
|
73
74
|
- doc/Branchproof/Constraints.md
|
|
74
75
|
- doc/Branchproof/Constraints/Solver.md
|
|
75
76
|
- doc/Branchproof/CoverageIndex.md
|
|
77
|
+
- doc/Branchproof/CoveragePolicy.md
|
|
76
78
|
- doc/Branchproof/DecisionSyntax.md
|
|
77
79
|
- doc/Branchproof/DecisionTable.md
|
|
78
80
|
- doc/Branchproof/DefaultInstrumentation.md
|
|
@@ -95,10 +97,18 @@ files:
|
|
|
95
97
|
- doc/Branchproof/Minimizer.md
|
|
96
98
|
- doc/Branchproof/MinitestAdapter.md
|
|
97
99
|
- doc/Branchproof/Project.md
|
|
100
|
+
- doc/Branchproof/RSpecAdapter.md
|
|
101
|
+
- doc/Branchproof/RSpecAdapter/ClassRunnerGuard.md
|
|
102
|
+
- doc/Branchproof/RSpecAdapter/ContextLifecycle.md
|
|
103
|
+
- doc/Branchproof/RSpecAdapter/DefaultDiscovery.md
|
|
104
|
+
- doc/Branchproof/RSpecAdapter/ExampleLifecycle.md
|
|
105
|
+
- doc/Branchproof/RSpecAdapter/RunnerGuard.md
|
|
106
|
+
- doc/Branchproof/RSpecAdapter/UnsupportedRunner.md
|
|
98
107
|
- doc/Branchproof/RailsSupport.md
|
|
99
108
|
- doc/Branchproof/RailsSupport/Error.md
|
|
100
109
|
- doc/Branchproof/Records.md
|
|
101
110
|
- doc/Branchproof/Report.md
|
|
111
|
+
- doc/Branchproof/ReportSelection.md
|
|
102
112
|
- doc/Branchproof/Runtime.md
|
|
103
113
|
- doc/Branchproof/RuntimeFlow.md
|
|
104
114
|
- doc/Branchproof/SavedReport.md
|
|
@@ -116,8 +126,10 @@ files:
|
|
|
116
126
|
- lib/branchproof/cli.rb
|
|
117
127
|
- lib/branchproof/comparison.rb
|
|
118
128
|
- lib/branchproof/comparison_report.rb
|
|
129
|
+
- lib/branchproof/configuration.rb
|
|
119
130
|
- lib/branchproof/constraints.rb
|
|
120
131
|
- lib/branchproof/coverage_index.rb
|
|
132
|
+
- lib/branchproof/coverage_policy.rb
|
|
121
133
|
- lib/branchproof/decision_syntax.rb
|
|
122
134
|
- lib/branchproof/decision_table.rb
|
|
123
135
|
- lib/branchproof/default_instrumentation.rb
|
|
@@ -142,6 +154,8 @@ files:
|
|
|
142
154
|
- lib/branchproof/rails_support.rb
|
|
143
155
|
- lib/branchproof/records.rb
|
|
144
156
|
- lib/branchproof/report.rb
|
|
157
|
+
- lib/branchproof/report_selection.rb
|
|
158
|
+
- lib/branchproof/rspec_adapter.rb
|
|
145
159
|
- lib/branchproof/runtime.rb
|
|
146
160
|
- lib/branchproof/runtime_flow.rb
|
|
147
161
|
- lib/branchproof/saved_report.rb
|