class JenkinsPivotal::ChangelogEntry
Attributes
committer[R]
committer_email[R]
committer_name[R]
message[R]
parent[R]
sha1[R]
tree[R]
Public Class Methods
new(data)
click to toggle source
# File lib/jenkins_pivotal/changelog_parser.rb, line 48 def initialize(data) @data = data @message = data.split("\n\n")[1].strip @sha1 = first_from_scan /^commit ([a-f0-9]{40})/ @tree = first_from_scan /^tree ([a-f0-9]{40})/ @parent = first_from_scan /^parent ([a-f0-9]{40})/ @author = first_from_scan /^author ((.+?) <(.+?)>)/ @author_name = first_from_scan /^author (.+?) </ @author_email = first_from_scan /^author .+? <(.+?)>/ @committer = first_from_scan /^committer ((.+?) <(.+?)>)/ @committer_name = first_from_scan /^committer (.+?) </ @committer_email = first_from_scan /^committer .+? <(.+?)>/ end
Private Instance Methods
first_from_scan(matcher)
click to toggle source
# File lib/jenkins_pivotal/changelog_parser.rb, line 64 def first_from_scan(matcher) $1.strip if @data =~ matcher end