class MineShipper::IssueComment
Public Instance Methods
body()
click to toggle source
# File lib/mine-shipper/issue_comment.rb, line 42 def body raise NotImplemented end
corresponding?(comment)
click to toggle source
# File lib/mine-shipper/issue_comment.rb, line 58 def corresponding?(comment) escaped_url = Regexp.escape(comment.url) escaped_time = Regexp.escape("#{comment.created_at.getlocal}") if body.match(/^### \[#{comment.user} commented on #{escaped_time}\]\(#{escaped_url}\)\n/) true else false end end
created_at()
click to toggle source
# File lib/mine-shipper/issue_comment.rb, line 26 def created_at raise NotImplemented end
render()
click to toggle source
# File lib/mine-shipper/issue_comment.rb, line 46 def render title = "#{user} commented on #{created_at.getlocal}" result = "### [#{title}](#{url})\n" result += "{{collapse(More...)\n" result += "* created_at: \"#{created_at.getlocal}\"\n" result += "* updated_at: \"#{updated_at.getlocal}\"\n" result += "}}\n" result += "\n" result += body result end
tracker()
click to toggle source
# File lib/mine-shipper/issue_comment.rb, line 22 def tracker "Unknown" end
updated?(comment)
click to toggle source
# File lib/mine-shipper/issue_comment.rb, line 68 def updated?(comment) lines = body.split("\n", 6) return false if lines[1] != "{{collapse(More...)" return false if lines[4] != "}}" timestr = lines[3].match(/^\* updated_at: \"(.*)\"$/).to_a[1] return false if timestr.nil? updated_time = Time.parse(timestr) updated_time >= comment.updated_at end
updated_at()
click to toggle source
# File lib/mine-shipper/issue_comment.rb, line 30 def updated_at raise NotImplemented end
url()
click to toggle source
# File lib/mine-shipper/issue_comment.rb, line 34 def url raise NotImplemented end
user()
click to toggle source
# File lib/mine-shipper/issue_comment.rb, line 38 def user raise NotImplemented end