Module: Legion::Extensions::Validator::Helpers::TestRunner
- Defined in:
- lib/legion/extensions/validator/helpers/test_runner.rb
Class Method Summary collapse
- .run_lint(worktree_path:, **_kwargs) ⇒ Object
- .run_security_scan(file_paths:, worktree_path:, **_kwargs) ⇒ Object
- .run_tests(worktree_path:, **_kwargs) ⇒ Object
Class Method Details
.run_lint(worktree_path:, **_kwargs) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/legion/extensions/validator/helpers/test_runner.rb', line 26 def run_lint(worktree_path:, **_kwargs) # In production, delegates to: # Legion::Extensions::Exec::Runners::Bundler.exec_rubocop(path: worktree_path) # Stubbed here — depends on lex-exec being available. # Phase 1: Ruby only (bundle exec rubocop). { success: true, offenses: 0, clean: true, output: '', worktree_path: worktree_path } end |
.run_security_scan(file_paths:, worktree_path:, **_kwargs) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/legion/extensions/validator/helpers/test_runner.rb', line 40 def run_security_scan(file_paths:, worktree_path:, **_kwargs) # In production, delegates to: # Legion::Extensions::Eval::Evaluators::SecurityEvaluator.new.check(code: content) # for each changed file. Phase 1: Ruby-only patterns. # For non-Ruby repos, skip and note in review. { success: true, findings: [], clean: true, files_scanned: file_paths.size, worktree_path: worktree_path } end |
.run_tests(worktree_path:, **_kwargs) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/legion/extensions/validator/helpers/test_runner.rb', line 10 def run_tests(worktree_path:, **_kwargs) # In production, delegates to: # Legion::Extensions::Exec::Runners::Bundler.exec_rspec(path: worktree_path) # Stubbed here — depends on lex-exec being available. # Phase 1: Ruby only (bundle exec rspec). { success: true, total: 0, passed: 0, failures: 0, pass_rate: 1.0, output: '', worktree_path: worktree_path } end |