Class: Pronto::Poper

Inherits:
Runner
  • Object
show all
Defined in:
lib/pronto/poper.rb

Instance Method Summary collapse

Instance Method Details

#message_for(error) ⇒ Object



16
17
18
19
# File 'lib/pronto/poper.rb', line 16

def message_for(error)
  Message.new(nil, nil, :warning, error.message.capitalize, error.commit,
              self.class)
end

#runObject



6
7
8
9
10
11
12
13
14
# File 'lib/pronto/poper.rb', line 6

def run
  return [] unless @patches

  poper_runner = ::Poper::Runner.new(@commit, repo_path.to_s)

  poper_runner.run
    .select { |error| error.commit != @commit }
    .map { |error| message_for(error) }
end