nukadoko 0.5.0 → 0.7.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 +553 -3
- data/README.ja.md +22 -6
- data/README.md +13 -7
- data/docs/ci.ja.md +542 -0
- data/docs/ci.md +635 -0
- data/docs/commands.ja.md +1524 -0
- data/docs/commands.md +1281 -0
- data/docs/engines.json +19 -0
- data/docs/execution-events.ja.md +336 -0
- data/docs/execution-events.md +423 -0
- data/docs/glossary.json +1348 -0
- data/docs/guide.ja.md +733 -0
- data/docs/guide.md +815 -0
- data/docs/intent.ja.md +133 -0
- data/docs/intent.md +156 -0
- data/docs/layout.ja.md +442 -0
- data/docs/layout.md +399 -0
- data/docs/releasing.ja.md +186 -0
- data/docs/releasing.md +237 -0
- data/docs/ruby/reference.ja.md +302 -0
- data/docs/ruby/reference.md +368 -0
- data/docs/spec.ja.md +8916 -0
- data/docs/spec.md +11250 -0
- data/docs/tutorial.ja.md +451 -0
- data/docs/tutorial.md +458 -0
- data/docs/typescript/adopting.ja.md +231 -0
- data/docs/typescript/adopting.md +251 -0
- data/docs/typescript/doors.ja.md +301 -0
- data/docs/typescript/doors.md +329 -0
- data/docs/typescript/migration-playwright-test.ja.md +189 -0
- data/docs/typescript/migration-playwright-test.md +212 -0
- data/docs/typescript/migration.ja.md +391 -0
- data/docs/typescript/migration.md +505 -0
- data/docs/typescript/reference.ja.md +176 -0
- data/docs/typescript/reference.md +197 -0
- data/docs/typescript/upgrading.ja.md +1774 -0
- data/docs/typescript/upgrading.md +2224 -0
- data/docs/web-app.ja.md +627 -0
- data/docs/web-app.md +659 -0
- data/docs/writing-scenarios.ja.md +544 -0
- data/docs/writing-scenarios.md +563 -0
- data/lib/nukadoko/base.rb +12 -5
- data/lib/nukadoko/changed_files.rb +95 -0
- data/lib/nukadoko/check.rb +459 -51
- data/lib/nukadoko/claim_drops.rb +271 -0
- data/lib/nukadoko/claim_line.rb +24 -4
- data/lib/nukadoko/claim_rules.rb +143 -1
- data/lib/nukadoko/claim_sides.rb +157 -9
- data/lib/nukadoko/cli.rb +403 -50
- data/lib/nukadoko/codes.json +246 -21
- data/lib/nukadoko/codes.rb +21 -4
- data/lib/nukadoko/command.rb +120 -13
- data/lib/nukadoko/command_help.rb +128 -0
- data/lib/nukadoko/compat.rb +469 -0
- data/lib/nukadoko/criteria.rb +1 -1
- data/lib/nukadoko/definition.rb +157 -7
- data/lib/nukadoko/error_frames.rb +6 -3
- data/lib/nukadoko/events/count.rb +146 -0
- data/lib/nukadoko/events/counted.rb +114 -0
- data/lib/nukadoko/events/format.rb +257 -0
- data/lib/nukadoko/events/lists.rb +154 -0
- data/lib/nukadoko/events/path.rb +285 -0
- data/lib/nukadoko/events/read.rb +284 -0
- data/lib/nukadoko/events/reader.rb +490 -0
- data/lib/nukadoko/events/selection.rb +252 -0
- data/lib/nukadoko/events/tally.rb +438 -0
- data/lib/nukadoko/features.rb +2 -2
- data/lib/nukadoko/fixtures.rb +160 -35
- data/lib/nukadoko/http_recording.rb +6 -2
- data/lib/nukadoko/intent.rb +364 -0
- data/lib/nukadoko/intent_file.rb +81 -0
- data/lib/nukadoko/intent_view.rb +190 -0
- data/lib/nukadoko/js_json.rb +2 -1
- data/lib/nukadoko/judge.rb +2 -2
- data/lib/nukadoko/judgment_file.rb +22 -1
- data/lib/nukadoko/judgments.rb +33 -3
- data/lib/nukadoko/measure_mcp.rb +202 -0
- data/lib/nukadoko/parts.rb +8 -2
- data/lib/nukadoko/path_view.rb +252 -0
- data/lib/nukadoko/place_rows.rb +161 -0
- data/lib/nukadoko/program.rb +1265 -51
- data/lib/nukadoko/program_log.rb +122 -0
- data/lib/nukadoko/program_shape.rb +385 -0
- data/lib/nukadoko/project_fixtures.rb +43 -10
- data/lib/nukadoko/project_program.rb +5 -4
- data/lib/nukadoko/repeated_prefix.rb +310 -0
- data/lib/nukadoko/report_run.rb +3 -3
- data/lib/nukadoko/run.rb +1156 -159
- data/lib/nukadoko/run_record.rb +70 -46
- data/lib/nukadoko/scaffold.rb +24 -6
- data/lib/nukadoko/schema.rb +15 -2
- data/lib/nukadoko/secrets.rb +55 -5
- data/lib/nukadoko/states.rb +478 -0
- data/lib/nukadoko/step.rb +71 -2
- data/lib/nukadoko/step_fixtures.rb +52 -3
- data/lib/nukadoko/summary.rb +803 -30
- data/lib/nukadoko/table.rb +4 -2
- data/lib/nukadoko/text_fit.rb +20 -7
- data/lib/nukadoko/trace.rb +152 -45
- data/lib/nukadoko/tree_passes.rb +95 -33
- data/lib/nukadoko/underneath.rb +311 -0
- data/lib/nukadoko/verdict.rb +18 -1
- data/lib/nukadoko/version.rb +1 -1
- data/lib/nukadoko/vocabulary.rb +166 -23
- data/lib/nukadoko/walk.rb +2 -2
- data/lib/nukadoko/walk_step.rb +1 -1
- data/lib/nukadoko.rb +23 -0
- data/llms.txt +42 -35
- data/sig/generated/nukadoko/base.rbs +4 -4
- data/sig/generated/nukadoko/changed_files.rbs +42 -0
- data/sig/generated/nukadoko/check.rbs +147 -10
- data/sig/generated/nukadoko/claim_drops.rbs +135 -0
- data/sig/generated/nukadoko/claim_line.rbs +11 -0
- data/sig/generated/nukadoko/claim_rules.rbs +49 -4
- data/sig/generated/nukadoko/claim_sides.rbs +63 -12
- data/sig/generated/nukadoko/cli.rbs +80 -7
- data/sig/generated/nukadoko/codes.rbs +19 -4
- data/sig/generated/nukadoko/command.rbs +68 -1
- data/sig/generated/nukadoko/command_help.rbs +18 -0
- data/sig/generated/nukadoko/compat.rbs +392 -0
- data/sig/generated/nukadoko/criteria.rbs +1 -1
- data/sig/generated/nukadoko/definition.rbs +50 -0
- data/sig/generated/nukadoko/error_frames.rbs +1 -1
- data/sig/generated/nukadoko/events/count.rbs +69 -0
- data/sig/generated/nukadoko/events/counted.rbs +70 -0
- data/sig/generated/nukadoko/events/format.rbs +163 -0
- data/sig/generated/nukadoko/events/lists.rbs +47 -0
- data/sig/generated/nukadoko/events/path.rbs +161 -0
- data/sig/generated/nukadoko/events/read.rbs +109 -0
- data/sig/generated/nukadoko/events/reader.rbs +226 -0
- data/sig/generated/nukadoko/events/selection.rbs +100 -0
- data/sig/generated/nukadoko/events/tally.rbs +227 -0
- data/sig/generated/nukadoko/features.rbs +6 -4
- data/sig/generated/nukadoko/fixtures.rbs +67 -11
- data/sig/generated/nukadoko/http_recording.rbs +1 -1
- data/sig/generated/nukadoko/intent.rbs +132 -0
- data/sig/generated/nukadoko/intent_file.rbs +46 -0
- data/sig/generated/nukadoko/intent_view.rbs +69 -0
- data/sig/generated/nukadoko/judgment_file.rbs +7 -1
- data/sig/generated/nukadoko/judgments.rbs +10 -0
- data/sig/generated/nukadoko/measure_mcp.rbs +104 -0
- data/sig/generated/nukadoko/parts.rbs +2 -2
- data/sig/generated/nukadoko/path_view.rbs +105 -0
- data/sig/generated/nukadoko/place_rows.rbs +43 -0
- data/sig/generated/nukadoko/program.rbs +627 -23
- data/sig/generated/nukadoko/program_log.rbs +67 -0
- data/sig/generated/nukadoko/program_shape.rbs +147 -0
- data/sig/generated/nukadoko/project_fixtures.rbs +16 -3
- data/sig/generated/nukadoko/project_program.rbs +2 -1
- data/sig/generated/nukadoko/repeated_prefix.rbs +172 -0
- data/sig/generated/nukadoko/report_run.rbs +1 -1
- data/sig/generated/nukadoko/run.rbs +286 -41
- data/sig/generated/nukadoko/run_record.rbs +20 -12
- data/sig/generated/nukadoko/scaffold.rbs +3 -0
- data/sig/generated/nukadoko/schema.rbs +5 -0
- data/sig/generated/nukadoko/secrets.rbs +26 -3
- data/sig/generated/nukadoko/states.rbs +214 -0
- data/sig/generated/nukadoko/step.rbs +58 -1
- data/sig/generated/nukadoko/step_fixtures.rbs +39 -0
- data/sig/generated/nukadoko/summary.rbs +256 -2
- data/sig/generated/nukadoko/table.rbs +3 -2
- data/sig/generated/nukadoko/trace.rbs +108 -33
- data/sig/generated/nukadoko/tree_passes.rbs +36 -8
- data/sig/generated/nukadoko/underneath.rbs +141 -0
- data/sig/generated/nukadoko/verdict.rbs +8 -0
- data/sig/generated/nukadoko/vocabulary.rbs +45 -6
- data/skills/nukadoko/SKILL.md +18 -18
- data/skills/nukadoko/references/checking-steps.md +16 -83
- data/skills/nukadoko/references/diagnosing.md +6 -6
- data/skills/nukadoko/references/done.md +22 -0
- data/skills/nukadoko/references/evidence.md +19 -6
- data/skills/nukadoko/references/exploring.md +22 -7
- data/skills/nukadoko/references/fixtures.md +12 -32
- data/skills/nukadoko/references/judgments.md +18 -0
- data/skills/nukadoko/references/maintenance.md +1 -1
- data/skills/nukadoko/references/merge-risk.md +1 -1
- data/skills/nukadoko/references/parts.md +46 -23
- data/skills/nukadoko/references/{perturbed-worlds.md → perturbed-systems.md} +30 -12
- data/skills/nukadoko/references/program.md +168 -169
- data/skills/nukadoko/references/reviewing.md +20 -20
- data/skills/nukadoko/references/ruby/checking-steps.md +106 -0
- data/skills/nukadoko/references/ruby/examples/cli.md +212 -0
- data/skills/nukadoko/references/ruby/fixtures.md +34 -0
- data/skills/nukadoko/references/ruby/program.md +112 -0
- data/skills/nukadoko/references/ruby/step-files.md +115 -0
- data/skills/nukadoko/references/running.md +34 -34
- data/skills/nukadoko/references/scenario-rules.md +7 -6
- data/skills/nukadoko/references/states.md +7 -1
- data/skills/nukadoko/references/step-files.md +41 -120
- data/skills/nukadoko/references/typescript/checking-steps.md +129 -0
- data/skills/nukadoko/references/{examples → typescript/examples}/cli.md +1 -1
- data/skills/nukadoko/references/{examples → typescript/examples}/http-api.md +6 -6
- data/skills/nukadoko/references/{examples → typescript/examples}/workflow.md +1 -1
- data/skills/nukadoko/references/typescript/fixtures.md +56 -0
- data/skills/nukadoko/references/typescript/program.md +111 -0
- data/skills/nukadoko/references/typescript/step-files.md +104 -0
- data/skills/nukadoko/references/verdicts.md +10 -10
- data/skills/nukadoko/references/writing-steps.md +67 -67
- data/skills/nukadoko/references/writing-the-feature.md +1 -1
- data/skills/nukadoko-verification/SKILL.md +13 -8
- metadata +103 -7
- data/skills/nukadoko/references/ruby.md +0 -80
|
@@ -58,8 +58,8 @@ module Nukadoko
|
|
|
58
58
|
|
|
59
59
|
# `selected` is each selected scenario's [feature, line]; `targets` the
|
|
60
60
|
# run's targets without a line, or nil for the features directory.
|
|
61
|
-
# : (project: String, ref: String, commit: String, run_dir: String, selected: Array[[String, Integer]], targets: Array[String]?, envs: Array[String], head_program: Hash[Symbol, untyped]?) -> void
|
|
62
|
-
def initialize: (project: String, ref: String, commit: String, run_dir: String, selected: Array[[ String, Integer ]], targets: Array[String]?, envs: Array[String], head_program: Hash[Symbol, untyped]?) -> void
|
|
61
|
+
# : (project: String, ref: String, commit: String, run_dir: String, selected: Array[[String, Integer]], targets: Array[String]?, envs: Array[String], head_program: Hash[Symbol, untyped]?, ?paths_wanted: bool) -> void
|
|
62
|
+
def initialize: (project: String, ref: String, commit: String, run_dir: String, selected: Array[[ String, Integer ]], targets: Array[String]?, envs: Array[String], head_program: Hash[Symbol, untyped]?, ?paths_wanted: bool) -> void
|
|
63
63
|
|
|
64
64
|
# : () -> void
|
|
65
65
|
def cleanup: () -> void
|
|
@@ -83,9 +83,9 @@ module Nukadoko
|
|
|
83
83
|
# : (Array[[String, Integer]], Array[String]?, Array[String], Hash[Symbol, untyped]?) -> void
|
|
84
84
|
def prepare: (Array[[ String, Integer ]], Array[String]?, Array[String], Hash[Symbol, untyped]?) -> void
|
|
85
85
|
|
|
86
|
-
# The environments the old
|
|
86
|
+
# The environments the old system runs in, with the conditions the ref's
|
|
87
87
|
# program gives each; nil when the ref has no program, so
|
|
88
|
-
# head's environments are the old
|
|
88
|
+
# head's environments are the old system's too.
|
|
89
89
|
# : (Hash[Symbol, untyped]?, Array[String]) -> Array[Environment]?
|
|
90
90
|
def old_environments_of: (Hash[Symbol, untyped]?, Array[String]) -> Array[Environment]?
|
|
91
91
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Generated from lib/nukadoko/changed_files.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
# The list of paths a claim step's `files` key reads: made from an earlier
|
|
4
|
+
# step's record, never from what its code returned. Each of that step's
|
|
5
|
+
# run_command processes lists the paths it added, changed, or removed
|
|
6
|
+
# under its working directory (`observed.processes[].files`); the key
|
|
7
|
+
# selects some changes and a directory. It does not choose the earlier
|
|
8
|
+
# step (the run and `nuka do --use` do) and does not judge a claim.
|
|
9
|
+
#
|
|
10
|
+
# A list is made only where every process of the step was walked whole,
|
|
11
|
+
# so an absence a claim reads is one nukadoko saw. A step that ran no
|
|
12
|
+
# process measured nothing, which is not an empty list.
|
|
13
|
+
module Nukadoko
|
|
14
|
+
module Engine
|
|
15
|
+
module ChangedFiles
|
|
16
|
+
CHANGES: untyped
|
|
17
|
+
|
|
18
|
+
# The step classes a files entry's `of` names.
|
|
19
|
+
# : (Hash[untyped, untyped]) -> Array[singleton(Step)]
|
|
20
|
+
def self?.producers: (Hash[untyped, untyped]) -> Array[singleton(Step)]
|
|
21
|
+
|
|
22
|
+
# : (Hash[untyped, untyped]) -> Array[String]
|
|
23
|
+
def self?.changes: (Hash[untyped, untyped]) -> Array[String]
|
|
24
|
+
|
|
25
|
+
# : (Hash[untyped, untyped]) -> String?
|
|
26
|
+
def self?.under: (Hash[untyped, untyped]) -> String?
|
|
27
|
+
|
|
28
|
+
# : (String) -> String
|
|
29
|
+
def self?.directory: (String) -> String
|
|
30
|
+
|
|
31
|
+
# `added or changed under src/`: how a record names what a key selects.
|
|
32
|
+
# : (Hash[untyped, untyped]) -> String
|
|
33
|
+
def self?.describe: (Hash[untyped, untyped]) -> String
|
|
34
|
+
|
|
35
|
+
# The list `entry` reads from `source`, or why there is none. A source
|
|
36
|
+
# is `{ of:, record: { step_record_id:, processes: } }` for a chosen
|
|
37
|
+
# step, or `{ of:, unchosen: }`.
|
|
38
|
+
# : (Hash[untyped, untyped], Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
|
|
39
|
+
def self?.side: (Hash[untyped, untyped], Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -53,8 +53,12 @@ module Nukadoko
|
|
|
53
53
|
# what the feature loader found that runs nothing.
|
|
54
54
|
# `config` holds what was found in the config and its program before
|
|
55
55
|
# any step loaded, such as an env file that is missing.
|
|
56
|
-
# : (Array[singleton(Step)], Array[Scenario], ?features: bool, ?full: bool, ?conditions: Array[String]?, ?environments: Array[Environment]?, ?problems: Array[FeatureProblem], ?config: Array[Finding]) -> void
|
|
57
|
-
def initialize: (Array[singleton(Step)], Array[Scenario], ?features: bool, ?full: bool, ?conditions: Array[String]?, ?environments: Array[Environment]?, ?problems: Array[FeatureProblem], ?config: Array[Finding]) -> void
|
|
56
|
+
# : (Array[singleton(Step)], Array[Scenario], ?features: bool, ?full: bool, ?conditions: Array[String]?, ?environments: Array[Environment]?, ?problems: Array[FeatureProblem], ?config: Array[Finding], ?systems: (Array[Hash[Symbol, untyped]] | false | nil)) -> void
|
|
57
|
+
def initialize: (Array[singleton(Step)], Array[Scenario], ?features: bool, ?full: bool, ?conditions: Array[String]?, ?environments: Array[Environment]?, ?problems: Array[FeatureProblem], ?config: Array[Finding], ?systems: Array[Hash[Symbol, untyped]] | false | nil) -> void
|
|
58
|
+
|
|
59
|
+
PROBLEM_ORDER: untyped
|
|
60
|
+
|
|
61
|
+
NOTE_ORDER: untyped
|
|
58
62
|
|
|
59
63
|
# : () -> bool
|
|
60
64
|
def passed?: () -> bool
|
|
@@ -71,8 +75,8 @@ module Nukadoko
|
|
|
71
75
|
|
|
72
76
|
# Why the step's pattern cannot be read, as the TypeScript engine says
|
|
73
77
|
# it: the first broken capture, then what cucumber-expressions refuses.
|
|
74
|
-
# : (singleton(Step)) -> [String, String]?
|
|
75
|
-
def pattern_problem: (singleton(Step)) -> [ String, String ]?
|
|
78
|
+
# : (singleton(Step), String) -> [String, String]?
|
|
79
|
+
def pattern_problem: (singleton(Step), String) -> [ String, String ]?
|
|
76
80
|
|
|
77
81
|
NUMBER_TYPES: untyped
|
|
78
82
|
|
|
@@ -80,12 +84,17 @@ module Nukadoko
|
|
|
80
84
|
|
|
81
85
|
# A capture hands the step a number or a string, and an args field of
|
|
82
86
|
# the other kind can never hold it.
|
|
83
|
-
# : (singleton(Step)) -> Array[Array[untyped]]
|
|
84
|
-
def capture_mismatches: (singleton(Step)) -> Array[Array[untyped]]
|
|
87
|
+
# : (singleton(Step), String) -> Array[Array[untyped]]
|
|
88
|
+
def capture_mismatches: (singleton(Step), String) -> Array[Array[untyped]]
|
|
85
89
|
|
|
86
90
|
# : (singleton(Step)) -> void
|
|
87
91
|
def check_contract: (singleton(Step)) -> void
|
|
88
92
|
|
|
93
|
+
# Every wording of one step must hand it the same args, or which line
|
|
94
|
+
# was written would decide what the step receives.
|
|
95
|
+
# : (singleton(Step)) -> void
|
|
96
|
+
def check_alias_keys: (singleton(Step)) -> void
|
|
97
|
+
|
|
89
98
|
# Two patterns that read the same once their names go would match the
|
|
90
99
|
# same lines; the later file is named, with every step that shares it.
|
|
91
100
|
# : () -> void
|
|
@@ -96,6 +105,29 @@ module Nukadoko
|
|
|
96
105
|
# : () -> void
|
|
97
106
|
def check_unbound: () -> void
|
|
98
107
|
|
|
108
|
+
# An MCP client made on a transport built inside its own `new` call,
|
|
109
|
+
# as in `MCP::Client.new(transport: MCP::Client::Stdio.new(...))`.
|
|
110
|
+
# That transport exists nowhere but in the argument, so nothing can
|
|
111
|
+
# wrap it in measure_mcp later, and no call the client sends reaches
|
|
112
|
+
# a step record. Only that one shape can end one way: a transport
|
|
113
|
+
# built first and passed by name may be wrapped on another line. It
|
|
114
|
+
# reads the source text of each step file and each project fixture's
|
|
115
|
+
# block, and never runs one.
|
|
116
|
+
# : () -> void
|
|
117
|
+
def check_unmeasured_mcp: () -> void
|
|
118
|
+
|
|
119
|
+
UNMEASURED: ::Regexp
|
|
120
|
+
|
|
121
|
+
UNMEASURED_FIX: ::String
|
|
122
|
+
|
|
123
|
+
# The transport classes `source` builds inside an MCP client's `new`
|
|
124
|
+
# call, in the order written, comments left out.
|
|
125
|
+
# : (String) -> Array[String]
|
|
126
|
+
def self.transports_built_in_new: (String) -> Array[String]
|
|
127
|
+
|
|
128
|
+
# : (String, Array[String]) -> String
|
|
129
|
+
def self.unmeasured_message: (String, Array[String]) -> String
|
|
130
|
+
|
|
99
131
|
# A config parameter type no pattern names.
|
|
100
132
|
# : () -> void
|
|
101
133
|
def check_unused_parameter_types: () -> void
|
|
@@ -119,6 +151,92 @@ module Nukadoko
|
|
|
119
151
|
# : (Scenario) -> void
|
|
120
152
|
def check_from_order: (Scenario) -> void
|
|
121
153
|
|
|
154
|
+
# A claim step's files chooses its producer by the same order rule:
|
|
155
|
+
# a key whose `of` names no step an earlier line runs, or two that
|
|
156
|
+
# earlier lines run, leaves each claim on the list unjudged. Whether
|
|
157
|
+
# that producer will run a command is not known before it runs (a
|
|
158
|
+
# helper may call run_command), so the check stays silent there.
|
|
159
|
+
# : (Scenario) -> void
|
|
160
|
+
def check_files_order: (Scenario) -> void
|
|
161
|
+
|
|
162
|
+
# Each service an events key of a bound step names, with the step and
|
|
163
|
+
# the key, once each.
|
|
164
|
+
# : (Array[singleton(Step)]) -> Array[Hash[Symbol, String]]
|
|
165
|
+
def services_counted: (Array[singleton(Step)]) -> Array[Hash[Symbol, String]]
|
|
166
|
+
|
|
167
|
+
# `events-inlet-missing` and `events-service-unknown` (errors) and
|
|
168
|
+
# `events-unread` (warnings) for the systems a run starts, when a
|
|
169
|
+
# bound step declares events: a system nukadoko serves whose program
|
|
170
|
+
# names no `{events}`, one whose program has no service an events key
|
|
171
|
+
# names, and a system it does not serve, or a project with no program
|
|
172
|
+
# to start one. The fix is the program's, so one finding per system
|
|
173
|
+
# says it once.
|
|
174
|
+
# : (Array[singleton(Step)]) -> void
|
|
175
|
+
def check_events_systems: (Array[singleton(Step)]) -> void
|
|
176
|
+
|
|
177
|
+
# `setup-result-missing` (errors) and `steps-reach-command` (notes)
|
|
178
|
+
# for the systems a run starts, judged only for steps a selected line
|
|
179
|
+
# binds: a step nothing runs stops no run.
|
|
180
|
+
#
|
|
181
|
+
# setup-result-missing is an error because a bag is a declaration
|
|
182
|
+
# rather than a branch: a step whose bag names setup_result builds it
|
|
183
|
+
# every time it runs, so in a system whose program declares no setup it
|
|
184
|
+
# can only raise. The bag is closed over the project's fixtures, so a
|
|
185
|
+
# fixture that reads setup_result for its step is judged with it.
|
|
186
|
+
#
|
|
187
|
+
# steps-reach-command is a note because the text says only that the
|
|
188
|
+
# call is written, never that it is reached: a branch, or a system the
|
|
189
|
+
# project does not select, may leave it alone. The run refuses the
|
|
190
|
+
# call itself (command-refused), which is what catches a call made
|
|
191
|
+
# through a helper. A job that must not ship such a call runs
|
|
192
|
+
# nuka check --fail-on steps-reach-command.
|
|
193
|
+
# : (Array[[singleton(Step), String, Integer]]) -> void
|
|
194
|
+
def check_steps_reach: (Array[[ singleton(Step), String, Integer ]]) -> void
|
|
195
|
+
|
|
196
|
+
COMMAND_FIX: ::String
|
|
197
|
+
|
|
198
|
+
RUN_COMMAND: ::Regexp
|
|
199
|
+
|
|
200
|
+
# Whether `source` calls the helper that starts a process, comments
|
|
201
|
+
# left out, as the MCP check reads a file. The qualified spelling only:
|
|
202
|
+
# a project's own run_command is not this helper, and naming it would
|
|
203
|
+
# teach a reader to ignore the note.
|
|
204
|
+
# : (String) -> bool
|
|
205
|
+
def self.calls_run_command?: (String) -> bool
|
|
206
|
+
|
|
207
|
+
# : (String, Array[String]) -> String
|
|
208
|
+
def self.command_message: (String, Array[String]) -> String
|
|
209
|
+
|
|
210
|
+
# The systems a finding names: system staging-on, or every one of them.
|
|
211
|
+
# : (Array[String]) -> String
|
|
212
|
+
def self.named_systems: (Array[String]) -> String
|
|
213
|
+
|
|
214
|
+
# A project fixture a bound step needs, whose own lines call the
|
|
215
|
+
# helper: the fixture's text says nothing about which systems would
|
|
216
|
+
# build it, so a step that needs it is what brings it into the check.
|
|
217
|
+
# : (Array[singleton(Step)], Array[String]) -> void
|
|
218
|
+
def check_fixtures_reach: (Array[singleton(Step)], Array[String]) -> void
|
|
219
|
+
|
|
220
|
+
# Whether the step's bag, closed over the project's fixtures, builds
|
|
221
|
+
# the setup_result builtin. A project fixture of that name replaces
|
|
222
|
+
# the builtin unless it names itself, as the resolver reads it.
|
|
223
|
+
# : (singleton(Step)) -> bool
|
|
224
|
+
def reads_setup_result?: (singleton(Step)) -> bool
|
|
225
|
+
|
|
226
|
+
# Every fixture name a bag reaches, its project fixtures' own
|
|
227
|
+
# dependencies included.
|
|
228
|
+
# : (Array[Symbol]) -> Array[Symbol]
|
|
229
|
+
def closed_bag: (Array[Symbol]) -> Array[Symbol]
|
|
230
|
+
|
|
231
|
+
# A reading of an earlier step that a claim step declares by key,
|
|
232
|
+
# each with an `of`: what the findings call it, and what is left
|
|
233
|
+
# unjudged.
|
|
234
|
+
READINGS: Array[Hash[Symbol, untyped]]
|
|
235
|
+
|
|
236
|
+
# `"a"`, `"a" and "b"`, `"a", "b", and "c"`, as the run names candidates.
|
|
237
|
+
# : (Array[String]) -> String
|
|
238
|
+
def producer_names: (Array[String]) -> String
|
|
239
|
+
|
|
122
240
|
# What a claim step's claims read, from the producers of its from
|
|
123
241
|
# values on the earlier lines of the scenario (ClaimCheck).
|
|
124
242
|
# : (Scenario) -> void
|
|
@@ -135,10 +253,13 @@ module Nukadoko
|
|
|
135
253
|
|
|
136
254
|
SCENARIO_ONLY: untyped
|
|
137
255
|
|
|
138
|
-
# Fixture definitions that can never resolve
|
|
139
|
-
#
|
|
140
|
-
|
|
141
|
-
|
|
256
|
+
# Fixture definitions that can never resolve.
|
|
257
|
+
# : () -> void
|
|
258
|
+
def check_fixtures: () -> void
|
|
259
|
+
|
|
260
|
+
# In a whole-project check, a fixture no step reaches.
|
|
261
|
+
# : () -> void
|
|
262
|
+
def check_unused_fixtures: () -> void
|
|
142
263
|
|
|
143
264
|
# A scenario whose condition tags no environment of the selection meets
|
|
144
265
|
# has no required cell, so nothing in the run shows that it holds.
|
|
@@ -172,6 +293,17 @@ module Nukadoko
|
|
|
172
293
|
# : () -> void
|
|
173
294
|
def check_parts: () -> void
|
|
174
295
|
|
|
296
|
+
# A state some steps name with a holder key and others without leaves
|
|
297
|
+
# every line that requires it unjudged, so that is said rather than
|
|
298
|
+
# left silent, pointed at a step of the shape fewer steps use.
|
|
299
|
+
# : () -> void
|
|
300
|
+
def check_state_shapes: () -> void
|
|
301
|
+
|
|
302
|
+
# Per feature file rather than per scenario, so a Background line
|
|
303
|
+
# every scenario reaches the same way is one finding.
|
|
304
|
+
# : () -> void
|
|
305
|
+
def check_state_order: () -> void
|
|
306
|
+
|
|
175
307
|
# Each cycle once, named from the step whose walk first closed it.
|
|
176
308
|
# : () -> Array[Array[singleton(Step)]]
|
|
177
309
|
def part_cycles: () -> Array[Array[singleton(Step)]]
|
|
@@ -208,6 +340,11 @@ module Nukadoko
|
|
|
208
340
|
|
|
209
341
|
KEYWORD: untyped
|
|
210
342
|
|
|
343
|
+
# A compat step has no contract to hold a line to. In Then position it
|
|
344
|
+
# judges by raising or not, which nukadoko cannot see.
|
|
345
|
+
# : (Scenario, PickleStep, untyped) -> void
|
|
346
|
+
def check_compat_line: (Scenario, PickleStep, untyped) -> void
|
|
347
|
+
|
|
211
348
|
# Only a Then judges, so a claim step elsewhere and a step that runs in
|
|
212
349
|
# Then position are both mistakes.
|
|
213
350
|
# : (Scenario, PickleStep, singleton(Step)) -> void
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Generated from lib/nukadoko/claim_drops.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
# Responsibility: why a comparison that came out one way on the values a
|
|
4
|
+
# step's `returns` parsed may have come out otherwise on the values the
|
|
5
|
+
# step returned. A `returns` schema keeps the keys it declares and drops
|
|
6
|
+
# the rest, so a claim that reads such a value judges a copy with keys
|
|
7
|
+
# missing, and a comparison that turns on one of them measures the schema
|
|
8
|
+
# rather than the behaviour. The step record names those keys
|
|
9
|
+
# (`returns_dropped`), and a claim whose answer turns on one is left
|
|
10
|
+
# unjudged with the keys named. The same as the TypeScript engine.
|
|
11
|
+
#
|
|
12
|
+
# Boundary: it reads what a record says and compares the two values it is
|
|
13
|
+
# handed. It takes no value from a step, and it never turns an unjudged
|
|
14
|
+
# claim into a judged one.
|
|
15
|
+
module Nukadoko
|
|
16
|
+
module Engine
|
|
17
|
+
module ClaimDrops
|
|
18
|
+
# One side of a comparison: where its value sits, the args path it
|
|
19
|
+
# sits at, or none (`nil`) for a value the line states, `observe`
|
|
20
|
+
# returned, or a view or a count made, and what the producers of this
|
|
21
|
+
# step's `from` values had their returns drop (`filled`).
|
|
22
|
+
class Side < Data
|
|
23
|
+
attr_reader place(): ClaimSides::Place
|
|
24
|
+
|
|
25
|
+
attr_reader path(): Array[String]?
|
|
26
|
+
|
|
27
|
+
attr_reader filled(): Hash[String, Hash[Symbol, untyped]]
|
|
28
|
+
|
|
29
|
+
def self.new: (ClaimSides::Place place, Array[String]? path, Hash[String, Hash[Symbol, untyped]] filled) -> instance
|
|
30
|
+
| (place: ClaimSides::Place, path: Array[String]?, filled: Hash[String, Hash[Symbol, untyped]]) -> instance
|
|
31
|
+
|
|
32
|
+
def self.members: () -> [ :place, :path, :filled ]
|
|
33
|
+
|
|
34
|
+
def members: () -> [ :place, :path, :filled ]
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# A Data block's methods are its own, but rbs-inline reads only a
|
|
38
|
+
# class body, so they are written in one.
|
|
39
|
+
class Side
|
|
40
|
+
# What was dropped from the object at `rel` inside this side's value.
|
|
41
|
+
# : (Array[String]) -> Hash[Symbol, untyped]?
|
|
42
|
+
def drops: (Array[String]) -> Hash[Symbol, untyped]?
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# : (ClaimSides::Place, Array[String]?, Hash[String, Hash[Symbol, untyped]]) -> Side
|
|
46
|
+
def self.side: (ClaimSides::Place, Array[String]?, Hash[String, Hash[Symbol, untyped]]) -> Side
|
|
47
|
+
|
|
48
|
+
# What the producer of a `from` value had its returns drop from the
|
|
49
|
+
# object at the args path `segments`: the entry of its
|
|
50
|
+
# `returns_dropped` at the place, or nil for a key no earlier step
|
|
51
|
+
# filled and for a place where nothing was dropped. A Ruby returns
|
|
52
|
+
# schema is a declaration this engine walks itself, so there is no
|
|
53
|
+
# place it could not see which keys were dropped.
|
|
54
|
+
# : (Hash[String, Hash[Symbol, untyped]], Array[String]) -> Hash[Symbol, untyped]?
|
|
55
|
+
def self.dropped_keys_at: (Hash[String, Hash[Symbol, untyped]], Array[String]) -> Hash[Symbol, untyped]?
|
|
56
|
+
|
|
57
|
+
# What was dropped from one object, and where the object sits:
|
|
58
|
+
# `place` and `dropped`.
|
|
59
|
+
# : (Side, Array[String], Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
|
|
60
|
+
def self.found_at: (Side, Array[String], Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
|
|
61
|
+
|
|
62
|
+
# Whether `key` is one of the keys `dropped` names.
|
|
63
|
+
# : (Hash[Symbol, untyped], String) -> bool
|
|
64
|
+
def self.dropped?: (Hash[Symbol, untyped], String) -> bool
|
|
65
|
+
|
|
66
|
+
# The first object inside `value`, itself included, that had a key
|
|
67
|
+
# dropped, with where it sits.
|
|
68
|
+
# : (untyped, Side, ?Array[String]) -> Hash[Symbol, untyped]?
|
|
69
|
+
def self.first_drop: (untyped, Side, ?Array[String]) -> Hash[Symbol, untyped]?
|
|
70
|
+
|
|
71
|
+
# An object's keys, or an array's indexes, with their values.
|
|
72
|
+
# : (untyped) -> Array[[String, untyped]]
|
|
73
|
+
def self.pairs: (untyped) -> Array[[ String, untyped ]]
|
|
74
|
+
|
|
75
|
+
EQUAL: Hash[Symbol, untyped]
|
|
76
|
+
|
|
77
|
+
UNEQUAL: Hash[Symbol, untyped]
|
|
78
|
+
|
|
79
|
+
# Whether two values were equal as the steps returned them, before any
|
|
80
|
+
# key was dropped: `equal` or `unequal` for certain, or `unknown`,
|
|
81
|
+
# with the drop the answer turns on (`via`, nil when none does). A
|
|
82
|
+
# dropped key never changes a value's JSON type or an array's length,
|
|
83
|
+
# and a dropped key's value is not known, so two objects can be equal
|
|
84
|
+
# as returned only where each key one of them holds or dropped is a
|
|
85
|
+
# key the other holds or dropped too.
|
|
86
|
+
# : (untyped, untyped, Side, Side, ?Array[String], ?Array[String]) -> Hash[Symbol, untyped]
|
|
87
|
+
def self.raw_equality: (untyped, untyped, Side, Side, ?Array[String], ?Array[String]) -> Hash[Symbol, untyped]
|
|
88
|
+
|
|
89
|
+
# : (Array[untyped], Array[untyped], Side, Side, Array[String], Array[String]) -> Hash[Symbol, untyped]
|
|
90
|
+
def self.array_equality: (Array[untyped], Array[untyped], Side, Side, Array[String], Array[String]) -> Hash[Symbol, untyped]
|
|
91
|
+
|
|
92
|
+
# : (Hash[String, untyped], Hash[String, untyped], Side, Side, Array[String], Array[String]) -> Hash[Symbol, untyped]
|
|
93
|
+
def self.object_equality: (Hash[String, untyped], Hash[String, untyped], Side, Side, Array[String], Array[String]) -> Hash[Symbol, untyped]
|
|
94
|
+
|
|
95
|
+
# Whether the keys one object dropped make the two differ for
|
|
96
|
+
# certain: "unequal" with the drop, or nil with the drop the answer
|
|
97
|
+
# turns on, if any.
|
|
98
|
+
# : (Hash[Symbol, untyped]?, Hash[String, untyped], Hash[Symbol, untyped]?, Side, Array[String]) -> [String?, Hash[Symbol, untyped]?]
|
|
99
|
+
def self.known_drops: (Hash[Symbol, untyped]?, Hash[String, untyped], Hash[Symbol, untyped]?, Side, Array[String]) -> [ String?, Hash[Symbol, untyped]? ]
|
|
100
|
+
|
|
101
|
+
# Why a comparison that came out `holds` on the values the steps'
|
|
102
|
+
# returns parsed may come out otherwise on the values the steps
|
|
103
|
+
# returned, or nil. A dropped key never changes a text, a number, a
|
|
104
|
+
# kind, or an array's length, so only these compares turn on one:
|
|
105
|
+
# `lacks-field` on a field the object dropped, `equal`, `not-equal`,
|
|
106
|
+
# `has-item`, and `has-same-items` where the values as returned may
|
|
107
|
+
# differ in such a key, and `has-fields`, which holds on an actual
|
|
108
|
+
# object with more keys, where the expected object had a key dropped.
|
|
109
|
+
# A broken comparison stays broken, except in a `where` clause, where
|
|
110
|
+
# it decides which items an `each` selects.
|
|
111
|
+
# : (String, bool, Hash[Symbol, untyped], Hash[Symbol, untyped], bool) -> String?
|
|
112
|
+
def self.change: (String, bool, Hash[Symbol, untyped], Hash[Symbol, untyped], bool) -> String?
|
|
113
|
+
|
|
114
|
+
# : (bool, Hash[Symbol, untyped], Hash[Symbol, untyped]) -> String?
|
|
115
|
+
def self.lacks_field_change: (bool, Hash[Symbol, untyped], Hash[Symbol, untyped]) -> String?
|
|
116
|
+
|
|
117
|
+
# : (String, bool, Hash[Symbol, untyped], Hash[Symbol, untyped]) -> String?
|
|
118
|
+
def self.equality_change: (String, bool, Hash[Symbol, untyped], Hash[Symbol, untyped]) -> String?
|
|
119
|
+
|
|
120
|
+
# : (bool, Hash[Symbol, untyped], Hash[Symbol, untyped]) -> String?
|
|
121
|
+
def self.has_item_change: (bool, Hash[Symbol, untyped], Hash[Symbol, untyped]) -> String?
|
|
122
|
+
|
|
123
|
+
# : (bool, Hash[Symbol, untyped], Hash[Symbol, untyped]) -> String?
|
|
124
|
+
def self.same_items_change: (bool, Hash[Symbol, untyped], Hash[Symbol, untyped]) -> String?
|
|
125
|
+
|
|
126
|
+
# : (bool, Hash[Symbol, untyped], Hash[Symbol, untyped]) -> String?
|
|
127
|
+
def self.has_fields_change: (bool, Hash[Symbol, untyped], Hash[Symbol, untyped]) -> String?
|
|
128
|
+
|
|
129
|
+
# The reason a claim is not judged, naming the step, the place, and
|
|
130
|
+
# what it dropped there, then `consequence`.
|
|
131
|
+
# : (Hash[Symbol, untyped], String) -> String
|
|
132
|
+
def self.reason: (Hash[Symbol, untyped], String) -> String
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
end
|
|
@@ -17,6 +17,10 @@ module Nukadoko
|
|
|
17
17
|
|
|
18
18
|
LISTED_ITEMS: ::Integer
|
|
19
19
|
|
|
20
|
+
# JavaScript has one number type, so a line of the TypeScript engine
|
|
21
|
+
# reads a whole number as digits alone. A Ruby step that writes a
|
|
22
|
+
# literal 2.0 states the same number as one that writes 2, and a line
|
|
23
|
+
# that showed `2.0` would read as another value.
|
|
20
24
|
# : (untyped) -> String
|
|
21
25
|
def self?.value_text: (untyped) -> String
|
|
22
26
|
|
|
@@ -126,6 +130,13 @@ module Nukadoko
|
|
|
126
130
|
# : (Hash[Symbol, untyped]) -> String
|
|
127
131
|
def self?.difference_text: (Hash[Symbol, untyped]) -> String
|
|
128
132
|
|
|
133
|
+
# What a count of execution events counted, after its outcome and its
|
|
134
|
+
# reason, under every outcome: a count that held on the wrong table
|
|
135
|
+
# reads as plainly as one that broke on it. Then what it left out,
|
|
136
|
+
# since the program marks their table.
|
|
137
|
+
# : (Hash[Symbol, untyped]) -> String
|
|
138
|
+
def self?.counted_text: (Hash[Symbol, untyped]) -> String
|
|
139
|
+
|
|
129
140
|
# : (Hash[Symbol, untyped]) -> String
|
|
130
141
|
def self?.reason_text: (Hash[Symbol, untyped]) -> String
|
|
131
142
|
|
|
@@ -28,12 +28,25 @@ module Nukadoko
|
|
|
28
28
|
|
|
29
29
|
attr_reader observe(): bool
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
| (patterns: Array[String], args_keys: Array[String], string_args: Array[String], from_keys: Array[String], capture_keys: Array[String], observe: bool) -> instance
|
|
31
|
+
attr_reader files(): Array[String]
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
attr_reader events(): Array[String]
|
|
35
34
|
|
|
36
|
-
|
|
35
|
+
attr_reader events_sentence(): Array[Hash[Symbol, String]]
|
|
36
|
+
|
|
37
|
+
def self.new: (Array[String] patterns, Array[String] args_keys, Array[String] string_args, Array[String] from_keys, Array[String] capture_keys, bool observe, Array[String] files, Array[String] events, Array[Hash[Symbol, String]] events_sentence) -> instance
|
|
38
|
+
| (patterns: Array[String], args_keys: Array[String], string_args: Array[String], from_keys: Array[String], capture_keys: Array[String], observe: bool, files: Array[String], events: Array[String], events_sentence: Array[Hash[Symbol, String]]) -> instance
|
|
39
|
+
|
|
40
|
+
def self.members: () -> [ :patterns, :args_keys, :string_args, :from_keys, :capture_keys, :observe, :files, :events, :events_sentence ]
|
|
41
|
+
|
|
42
|
+
def members: () -> [ :patterns, :args_keys, :string_args, :from_keys, :capture_keys, :observe, :files, :events, :events_sentence ]
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# A Data block's methods are its own, but rbs-inline reads only a class
|
|
46
|
+
# body, so they are written in one.
|
|
47
|
+
class Shape
|
|
48
|
+
# : (?files: Array[String], ?events: Array[String], ?events_sentence: Array[Hash[Symbol, String]], **untyped) -> void
|
|
49
|
+
def initialize: (?files: Array[String], ?events: Array[String], ?events_sentence: Array[Hash[Symbol, String]], **untyped) -> void
|
|
37
50
|
end
|
|
38
51
|
|
|
39
52
|
VIEWS: untyped
|
|
@@ -140,6 +153,38 @@ module Nukadoko
|
|
|
140
153
|
# : (untyped, Shape) -> void
|
|
141
154
|
def self?.validate: (untyped, Shape) -> void
|
|
142
155
|
|
|
156
|
+
# The compares a list of paths can take: a text or order compare
|
|
157
|
+
# breaks on an array on every line, and is-a list holds on every one.
|
|
158
|
+
FILES_COMPARES: untyped
|
|
159
|
+
|
|
160
|
+
FILES_CLAIM_KEYS: untyped
|
|
161
|
+
|
|
162
|
+
# A claim on a files key reads the list nukadoko made from an earlier
|
|
163
|
+
# step's record, so it takes no path, view, or at, and compares the
|
|
164
|
+
# whole list or its count. Its expected value is the sentence's: a
|
|
165
|
+
# list from { from } or { observe } would be one step code chose.
|
|
166
|
+
# : (String, Hash[Symbol, untyped], String, Shape) -> void
|
|
167
|
+
def self?.check_files_claim: (String, Hash[Symbol, untyped], String, Shape) -> void
|
|
168
|
+
|
|
169
|
+
EVENTS_CLAIM_KEYS: untyped
|
|
170
|
+
|
|
171
|
+
# A claim on an events key reads the count nukadoko measured, one
|
|
172
|
+
# number, so it takes no path, view, at, or count, and compares the
|
|
173
|
+
# count with a number the line states.
|
|
174
|
+
# : (String, Hash[Symbol, untyped], String, Shape) -> void
|
|
175
|
+
def self?.check_events_claim: (String, Hash[Symbol, untyped], String, Shape) -> void
|
|
176
|
+
|
|
177
|
+
# An events key that collides with another source of a claim's
|
|
178
|
+
# actual, takes a sentence value an expected sentence key could not
|
|
179
|
+
# be, or names a count no claim reads.
|
|
180
|
+
# : (Array[Hash[Symbol, untyped]], Shape) -> void
|
|
181
|
+
def self?.check_events: (Array[Hash[Symbol, untyped]], Shape) -> void
|
|
182
|
+
|
|
183
|
+
# A files key that collides with another source of a claim's actual,
|
|
184
|
+
# or that no claim reads.
|
|
185
|
+
# : (Array[Hash[Symbol, untyped]], Shape) -> void
|
|
186
|
+
def self?.check_files: (Array[Hash[Symbol, untyped]], Shape) -> void
|
|
187
|
+
|
|
143
188
|
# : (String, untyped, Shape, bool) -> void
|
|
144
189
|
def self?.check_each: (String, untyped, Shape, bool) -> void
|
|
145
190
|
|
|
@@ -70,19 +70,25 @@ module Nukadoko
|
|
|
70
70
|
|
|
71
71
|
attr_reader transformed(): Hash[String, String]
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
| (observed: untyped, args: untyped, observes: bool, from_keys: Array[String], labels: ^(String) -> String, received: Array[String], transformed: Hash[String, String]) -> instance
|
|
73
|
+
attr_reader files(): Hash[String, Hash[Symbol, untyped]]
|
|
75
74
|
|
|
76
|
-
|
|
75
|
+
attr_reader events(): Hash[String, Hash[Symbol, untyped]]
|
|
77
76
|
|
|
78
|
-
|
|
77
|
+
attr_reader from_drops(): Hash[String, Hash[Symbol, untyped]]
|
|
78
|
+
|
|
79
|
+
def self.new: (untyped observed, untyped args, bool observes, Array[String] from_keys, ^(String) -> String labels, Array[String] received, Hash[String, String] transformed, Hash[String, Hash[Symbol, untyped]] files, Hash[String, Hash[Symbol, untyped]] events, Hash[String, Hash[Symbol, untyped]] from_drops) -> instance
|
|
80
|
+
| (observed: untyped, args: untyped, observes: bool, from_keys: Array[String], labels: ^(String) -> String, received: Array[String], transformed: Hash[String, String], files: Hash[String, Hash[Symbol, untyped]], events: Hash[String, Hash[Symbol, untyped]], from_drops: Hash[String, Hash[Symbol, untyped]]) -> instance
|
|
81
|
+
|
|
82
|
+
def self.members: () -> [ :observed, :args, :observes, :from_keys, :labels, :received, :transformed, :files, :events, :from_drops ]
|
|
83
|
+
|
|
84
|
+
def members: () -> [ :observed, :args, :observes, :from_keys, :labels, :received, :transformed, :files, :events, :from_drops ]
|
|
79
85
|
end
|
|
80
86
|
|
|
81
87
|
# A Data block's methods are its own, but rbs-inline reads only a class
|
|
82
88
|
# body, so they are written in one.
|
|
83
89
|
class Inputs
|
|
84
|
-
# : (?transformed: Hash[String, String], **untyped) -> void
|
|
85
|
-
def initialize: (?transformed: Hash[String, String], **untyped) -> void
|
|
90
|
+
# : (?transformed: Hash[String, String], ?files: Hash[String, Hash[Symbol, untyped]], ?events: Hash[String, Hash[Symbol, untyped]], ?from_drops: Hash[String, Hash[Symbol, untyped]], **untyped) -> void
|
|
91
|
+
def initialize: (?transformed: Hash[String, String], ?files: Hash[String, Hash[Symbol, untyped]], ?events: Hash[String, Hash[Symbol, untyped]], ?from_drops: Hash[String, Hash[Symbol, untyped]], **untyped) -> void
|
|
86
92
|
end
|
|
87
93
|
|
|
88
94
|
# : (Place, String?) -> Place
|
|
@@ -149,6 +155,17 @@ module Nukadoko
|
|
|
149
155
|
# : (Hash[Symbol, untyped], Inputs) -> [Side, bool]
|
|
150
156
|
def self.top_side: (Hash[Symbol, untyped], Inputs) -> [ Side, bool ]
|
|
151
157
|
|
|
158
|
+
# The args path of the value a claim's actual reads, or nil for a
|
|
159
|
+
# value no earlier step returned: one observe returned, or one a path
|
|
160
|
+
# with an empty part names, which reads nothing.
|
|
161
|
+
# : (Hash[Symbol, untyped], Inputs) -> Array[String]?
|
|
162
|
+
def self.value_path: (Hash[Symbol, untyped], Inputs) -> Array[String]?
|
|
163
|
+
|
|
164
|
+
# The args path of the value one item claim reads inside item `index`
|
|
165
|
+
# of the array at `array_path`.
|
|
166
|
+
# : (Array[String]?, Integer, Hash[Symbol, untyped]) -> Array[String]?
|
|
167
|
+
def self.item_path: (Array[String]?, Integer, Hash[Symbol, untyped]) -> Array[String]?
|
|
168
|
+
|
|
152
169
|
# The value after a view, or why the view could not read it.
|
|
153
170
|
# : (String?, untyped) -> Hash[Symbol, untyped]
|
|
154
171
|
def self.apply_view: (String?, untyped) -> Hash[Symbol, untyped]
|
|
@@ -175,9 +192,37 @@ module Nukadoko
|
|
|
175
192
|
def self.judge: (Hash[Symbol, untyped], Inputs) -> Hash[Symbol, untyped]
|
|
176
193
|
|
|
177
194
|
# One comparison on a side already read: a top-level claim's, or one
|
|
178
|
-
# item's under an each.
|
|
179
|
-
#
|
|
180
|
-
|
|
195
|
+
# item's under an each. `value_path` is the args path of the actual
|
|
196
|
+
# value before a view and a count, and `where` marks a where clause,
|
|
197
|
+
# whose broken outcome decides which items an each selects.
|
|
198
|
+
# : (Hash[Symbol, untyped], Side, Inputs, ?bool, ?value_path: Array[String]?, ?where: bool) -> Hash[Symbol, untyped]
|
|
199
|
+
def self.judge_comparison: (Hash[Symbol, untyped], Side, Inputs, ?bool, ?value_path: Array[String]?, ?where: bool) -> Hash[Symbol, untyped]
|
|
200
|
+
|
|
201
|
+
# Why a comparison may have come out otherwise on the values the
|
|
202
|
+
# steps returned, before a returns schema dropped keys of them, or
|
|
203
|
+
# nil. A view or a count makes a value of its own, which no returns
|
|
204
|
+
# parsed, so neither side carries a path then.
|
|
205
|
+
# : (Hash[Symbol, untyped], bool, Side, Side, Inputs, Array[String]?, bool) -> String?
|
|
206
|
+
def self.dropped_change: (Hash[Symbol, untyped], bool, Side, Side, Inputs, Array[String]?, bool) -> String?
|
|
207
|
+
|
|
208
|
+
# The args path of a claim's expected value, or nil for one the line
|
|
209
|
+
# states or observe returned.
|
|
210
|
+
# : (Hash[Symbol, untyped]) -> Array[String]?
|
|
211
|
+
def self.expected_path: (Hash[Symbol, untyped]) -> Array[String]?
|
|
212
|
+
|
|
213
|
+
# A claim on a files key reads the list nukadoko made from an earlier
|
|
214
|
+
# step's record, never what observe returned: a key observe returns
|
|
215
|
+
# under the same name breaks the claim, so each name has one source.
|
|
216
|
+
# : (Hash[Symbol, untyped], Hash[Symbol, untyped], Inputs) -> Hash[Symbol, untyped]
|
|
217
|
+
def self.judge_files: (Hash[Symbol, untyped], Hash[Symbol, untyped], Inputs) -> Hash[Symbol, untyped]
|
|
218
|
+
|
|
219
|
+
# A claim on an events key: the range the step read against the
|
|
220
|
+
# expected number. `actual` is the count when the range is one number,
|
|
221
|
+
# and `actual_range` the range otherwise, with the lines it counted,
|
|
222
|
+
# and those it left out, beside it. A key observe returns under the
|
|
223
|
+
# same name breaks the claim, so each name has one source.
|
|
224
|
+
# : (Hash[Symbol, untyped], Hash[Symbol, untyped], Inputs) -> Hash[Symbol, untyped]
|
|
225
|
+
def self.judge_events: (Hash[Symbol, untyped], Hash[Symbol, untyped], Inputs) -> Hash[Symbol, untyped]
|
|
181
226
|
|
|
182
227
|
# : (Hash[Symbol, untyped], StandardError) -> Hash[Symbol, untyped]
|
|
183
228
|
def self.unjudgeable: (Hash[Symbol, untyped], StandardError) -> Hash[Symbol, untyped]
|
|
@@ -186,15 +231,21 @@ module Nukadoko
|
|
|
186
231
|
# : (Hash[Symbol, untyped], Inputs) -> Side
|
|
187
232
|
def self.array_side: (Hash[Symbol, untyped], Inputs) -> Side
|
|
188
233
|
|
|
234
|
+
# The args path of the array an each reads, or nil: after a view, the
|
|
235
|
+
# items are values of the view's own, which no returns parsed.
|
|
236
|
+
# : (Hash[Symbol, untyped], Inputs) -> Array[String]?
|
|
237
|
+
def self.array_path: (Hash[Symbol, untyped], Inputs) -> Array[String]?
|
|
238
|
+
|
|
189
239
|
# The side an item claim reads: the item, or a path inside it. The item
|
|
190
240
|
# is part of a snapshot, so a read inside it finds a value or nothing.
|
|
191
241
|
# : (untyped, Place, Hash[Symbol, untyped]) -> Side
|
|
192
242
|
def self.item_side: (untyped, Place, Hash[Symbol, untyped]) -> Side
|
|
193
243
|
|
|
194
244
|
# What ends an each before any item: a declaration whose expected value
|
|
195
|
-
# observe received, or reads through
|
|
196
|
-
# received the array, does not
|
|
197
|
-
# would hide it. Then a where
|
|
245
|
+
# a transformer made, one observe received, or one that reads through
|
|
246
|
+
# what observe returned while observe received the array, does not
|
|
247
|
+
# depend on an item, and an empty array would hide it. Then a where
|
|
248
|
+
# clause that implies an item claim.
|
|
198
249
|
# : (Hash[Symbol, untyped], Place, Inputs) -> Hash[Symbol, String]?
|
|
199
250
|
def self.each_stop: (Hash[Symbol, untyped], Place, Inputs) -> Hash[Symbol, String]?
|
|
200
251
|
|