class PTLog::Wrappers::Release

Public Class Methods

new(tag, changelog) click to toggle source
# File lib/ptlog/wrappers/release.rb, line 3
def initialize(tag, changelog)
  @tag = tag
  @initial_commit = changelog.tags.prev_to(tag)
  @git = changelog.git
  @commit = @git.gcommit(tag)
end

Public Instance Methods

commits(num) click to toggle source
# File lib/ptlog/wrappers/release.rb, line 25
def commits(num)
  @git.log.between(@initial_commit, @tag).select do |commit|
    commit.message =~ (/\##{num}/)
  end
end
date() click to toggle source
# File lib/ptlog/wrappers/release.rb, line 14
def date
  @commit.date.utc.strftime('%I:%M%P %D UTC')
end
get_binding() click to toggle source
# File lib/ptlog/wrappers/release.rb, line 31
def get_binding
  binding
end
stories() click to toggle source
# File lib/ptlog/wrappers/release.rb, line 18
def stories
  ids = @git.log.between(@initial_commit, @tag).map do |commit|
    commit.message.scan(/\#(\d+)/)
  end
  ids.flatten.uniq.map{ |num| PTLog::Pivotal::Story.get(num) }
end
title() click to toggle source
# File lib/ptlog/wrappers/release.rb, line 10
def title
  @tag
end