lib/onebox/engine/github_pullrequest_onebox.rb in onebox-1.9.15 vs lib/onebox/engine/github_pullrequest_onebox.rb in onebox-1.9.16
- old
+ new
@@ -21,10 +21,15 @@
end
def data
result = raw.clone
result['link'] = link
- result['created_at'] = Time.parse(result['created_at']).strftime("%I:%M%p - %d %b %y %Z")
+
+ created_at = Time.parse(result['created_at'])
+ result['created_at'] = created_at.strftime("%I:%M%p - %d %b %y %Z")
+ result['created_at_date'] = created_at.strftime("%F")
+ result['created_at_time'] = created_at.strftime("%T")
+
ulink = URI(link)
result['domain'] = "#{ulink.host}/#{ulink.path.split('/')[1]}/#{ulink.path.split('/')[2]}"
result
end
end