Module: Tuxedo::Runner
- Defined in:
- lib/tuxedo/runner.rb
Class Method Summary collapse
Class Method Details
.run_cane(cane_opts = nil) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/tuxedo/runner.rb', line 11 def run_cane(cane_opts=nil) cane_opts ||= "--style-glob **/*.rb".split opts = Cane::CLI::Spec.new.parse(cane_opts) runner = Cane::Runner.new(opts) def runner.outputter; @outputter ||= StringIO.new end runner.run violations = runner.send(:violations) violations.map { |v| CaneViolation.from_cane(v)} end |
.run_reek ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/tuxedo/runner.rb', line 23 def run_reek reek_result = Cli.sh("reek -qy .") if reek_failed?(reek_result) if need_mvz_reek?(reek_result.stderr) print_use_mvz_reek else print_reek_failed puts reek_result.stderr end end reek_result.stdout end |