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
Unit gate क्या जाँचता है
- unit record हुआ है, और recording से छेड़छाड़ नहीं हुई (edited
cases.jsonlfail होता है); - recording ताज़ा है (original बदल गया: दोबारा record करें);
- Ruby syntax सही है और method defined है;
- कोई
NotImplementedError/TODOstubs नहीं और कोई debugger calls नहीं; - results compute किए जाते हैं: code में लिखे गए recorded जवाब fail होते हैं;
- port ज़्यादा से ज़्यादा original की lines का 3 गुना plus 50 है;
- original का हर
raise/throwकिसी recorded case से reach होता है (gate नाम बताए तोrecord --inputsसे एक case जोड़ें); - tests और assertions पिछले pass हुए gate से कभी कम नहीं होते;
- rubocop clean है;
- हर recorded case मेल खाता है।
हर fail हुई जाँच के साथ एक fix आता है: पहले उसे चलाएँ।
CI में
साथ आने वाला GitHub Action हर pull request पर gate चलाता है: देखें CI।