From 7bdb73bcb09d0abba84700d157a4b1174ba37359 Mon Sep 17 00:00:00 2001 From: Chris Hunt Date: Sun, 9 Jun 2013 21:31:48 -0700 Subject: [PATCH 1/2] Update github commit onebox to match pr onebox --- .../templates/github_commit_onebox.hbrs | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/lib/oneboxer/templates/github_commit_onebox.hbrs b/lib/oneboxer/templates/github_commit_onebox.hbrs index 6d8363b79ca..85c73f0e0cb 100644 --- a/lib/oneboxer/templates/github_commit_onebox.hbrs +++ b/lib/oneboxer/templates/github_commit_onebox.hbrs @@ -3,18 +3,35 @@
{{/host}} +
- {{#author.avatar_url}}{{author.login}}{{/author.avatar_url}} -

{{author.login}}

- {{{commit.message}}} -
Changed {{files.length}} files with {{stats.additions}} additions and {{stats.deletions}} deletions.
+ {{#author.avatar_url}} + + {{author.login}} + + {{/author.avatar_url}} + +

+ {{commit.message}} +

+ + +
+ changed {{files.length}} files + with {{stats.additions}} additions + and {{stats.deletions}} deletions.
From 15efecd536db6f92dbd358779cfb195707def460 Mon Sep 17 00:00:00 2001 From: Chris Hunt Date: Sun, 9 Jun 2013 21:32:13 -0700 Subject: [PATCH 2/2] Remove html rendering test for commit onebox This is a very brittle test. We want to be able to change our markup without breaking tests. --- .../oneboxer/github_commit_onebox_spec.rb | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/spec/components/oneboxer/github_commit_onebox_spec.rb b/spec/components/oneboxer/github_commit_onebox_spec.rb index 7d0c962c1bf..a1c075a873f 100644 --- a/spec/components/oneboxer/github_commit_onebox_spec.rb +++ b/spec/components/oneboxer/github_commit_onebox_spec.rb @@ -13,33 +13,4 @@ describe Oneboxer::GithubCommitOnebox do it "translates the URL" do @o.translate_url.should == "https://api.github.com/repos/discourse/discourse/commits/ee76f1926defa8309b3a7ea64a25707519529a13" end - - it "generates the expected onebox for GitHub Commit" do - @o.onebox.should == expected_github_commit_result - end - -private - def expected_github_commit_result - < - -
- eviltrout -

eviltrout

- Debugging Tool for Hot Topics -
Changed 16 files with 245 additions and 43 deletions.
- -
-
- -EXPECTED - end end