Class: MinaRevisioneer::GroupedChangeLog
- Inherits:
-
MessageExtractor
- Object
- MessageExtractor
- MinaRevisioneer::GroupedChangeLog
- Defined in:
- lib/mina_revisioneer/grouped_change_log.rb
Overview
Uses the markers inside the commit message to generate change groups
can be configured by setting
:revisioneer_markers
must be a hash of GroupName => Marker
Instance Attribute Summary
Attributes inherited from MessageExtractor
Instance Method Summary collapse
Methods inherited from MessageExtractor
#initialize, #last_deploy, #last_deploy_date, #last_deploy_sha, #number_of_new_commits, #repo, #sha
Constructor Details
This class inherits a constructor from MinaRevisioneer::MessageExtractor
Instance Method Details
#messages ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/mina_revisioneer/grouped_change_log.rb', line 8 def groups = Hash.new walker = Rugged::Walker.new(repo) walker.push sha walker.hide last_deploy_sha if last_deploy_sha walker.each do |commit| revisioneer_markers.each do |marker, pattern| commit..lines.each do |line| if line =~ pattern (groups[marker] ||= []) << line.strip end end end end = [] groups.each do |key, ms| << "#{key}:\n#{ms.join("\n")}" end end |
#revisioneer_markers ⇒ Object
31 32 33 |
# File 'lib/mina_revisioneer/grouped_change_log.rb', line 31 def revisioneer_markers eval "revisioneer_markers", binding end |