Class: Poper2::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/poper2/runner.rb

Instance Method Summary collapse

Constructor Details

#initialize(commit, repo_path = '.') ⇒ Runner

Returns a new instance of Runner.



5
6
7
8
9
# File 'lib/poper2/runner.rb', line 5

def initialize(commit, repo_path = '.')
  @repo = Rugged::Repository.new(repo_path)
  oid = @repo.rev_parse_oid(commit)
  @commit = @repo.lookup(oid)
end

Instance Method Details

#runObject



11
12
13
# File 'lib/poper2/runner.rb', line 11

def run
  commits.flat_map { |c| check(c) }.compact
end