Gate
sh
ruby-anything gate <repo> <unit-id> # one unit
ruby-anything gate <repo> --all # every bridged unit
ruby-anything gate <repo> --app # the whole app: units, bin/rails test, rubocop, brakeman, replay
What a unit gate checks
- the unit is recorded, and the recording is untouched (an edited
cases.jsonlfails); - the recording is fresh (the original changed: record again);
- Ruby syntax is valid and the method is defined;
- no
NotImplementedError/TODOstubs and no debugger calls; - results are computed: recorded answers written into the code fail;
- the port is at most 3x the original's lines plus 50;
- every
raise/throwin the original is reached by a recorded case (add one withrecord --inputswhen gate names it); - tests and assertions are never fewer than at the last passing gate;
- rubocop is clean;
- every recorded case matches.
Each failed check carries a fix: run that first.
In CI
The bundled GitHub Action runs gate on every pull request: see CI.