summaryrefslogtreecommitdiff
path: root/lib/commit_ext.rb
blob: 0e0459118438007dda6814e76ef829bfdcf0f73b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module CommitExt
  attr_accessor :head
  attr_accessor :refs

  def safe_message
    message.force_encoding(Encoding::UTF_8)
  end

  def created_at
    committed_date
  end

  def author_email
    author.email.force_encoding(Encoding::UTF_8)
  end

  def author_name
    author.name.force_encoding(Encoding::UTF_8)
  end
end