Class: Kaisoku::Evaluator::Replay

Inherits:
Object
  • Object
show all
Defined in:
lib/kaisoku/evaluator/replay.rb

Defined Under Namespace

Classes: Result

Instance Method Summary collapse

Constructor Details

#initialize(commits:, branch: 'HEAD', full_command: 'ruby -Ilib exe/kaisoku run --all --reporter json', selected_command: 'ruby -Ilib exe/kaisoku run --reporter json') ⇒ Replay

Returns a new instance of Replay.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/kaisoku/evaluator/replay.rb', line 27

def initialize(
  commits:,
  branch: 'HEAD',
  full_command: 'ruby -Ilib exe/kaisoku run --all --reporter json',
  selected_command: 'ruby -Ilib exe/kaisoku run --reporter json'
)
  @commits = commits.to_i
  @branch = branch
  @full_command = full_command
  @selected_command = selected_command
end

Instance Method Details

#reportObject



43
44
45
# File 'lib/kaisoku/evaluator/replay.rb', line 43

def report
  Report.new(run).render
end

#runObject



39
40
41
# File 'lib/kaisoku/evaluator/replay.rb', line 39

def run
  commit_list.map { |commit| evaluate_commit(commit) }
end