GitHub PullRequestEvent at 2014-12-23 00:47:41
Repository: hologram
Actor: gpleiss
Payload: {"action":"opened","number":187,"pull_request":{"url":"https://api.github.com/repos/trulia/hologram/pulls/187","id":26490470,"html_url":"https://github.com/trulia/hologram/pull/187","diff_url":"https://github.com/trulia/hologram/pull/187.diff","patch_url":"https://github.com/trulia/hologram/pull/187.patch","issue_url":"https://api.github.com/repos/trulia/hologram/issues/187","number":187,"state":"open","locked":false,"title":"Custom code example","user":{"login":"gpleiss","id":824157,"avatar_url":"https://avatars.githubusercontent.com/u/824157?v=3","gravatar_id":"","url":"https://api.github.com/users/gpleiss","html_url":"https://github.com/gpleiss","followers_url":"https://api.github.com/users/gpleiss/followers","following_url":"https://api.github.com/users/gpleiss/following{/other_user}","gists_url":"https://api.github.com/users/gpleiss/gists{/gist_id}","starred_url":"https://api.github.com/users/gpleiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpleiss/subscriptions","organizations_url":"https://api.github.com/users/gpleiss/orgs","repos_url":"https://api.github.com/users/gpleiss/repos","events_url":"https://api.github.com/users/gpleiss/events{/privacy}","received_events_url":"https://api.github.com/users/gpleiss/received_events","type":"User","site_admin":false},"body":"This PR address #170 \r\n\r\nAdds a new config option: `code_example_templates`. If a user wants to change the way code examples are rendered in the styleguide, they can add custom templates to this folder. Hologram will look for the following 4 templates:\r\n\r\n* `markup_example_template.html.erb` - used for html, haml and slim examples\r\n* `markup_table_template.html.erb` - used for multiple html, haml and slim examples layed out in a table\r\n* `js_example_template.html.erb` - used for js examples\r\n* `jsx_example_template.html.erb` - used for jsx examples\r\n\r\nAs an example, the `markup_example_template` looks like this:\r\n\r\n```erb\r\n<div class=\"codeExample\">\r\n  <div class=\"exampleOutput\">\r\n    <%= rendered_example %>\r\n  </div>\r\n  <div class=\"codeBlock\">\r\n    <div class=\"highlight\">\r\n      <pre>\r\n        <%= code_example %>\r\n      </pre>\r\n    </div>\r\n  </div>\r\n</div>\r\n```\r\n\r\nHologram will fall back on default templates if a user doesn't specify a folder for code_example_templates in their config file (or if certain template files are not found). So this isn't a breaking change :dancer:\r\n\r\nThis PR restructures the `BlockCodeRenderer` (again... :cold_sweat: ), but I think that the code is now much more modular. I think this new code will make it easier to get Hologram to the point where users can add their own languages in a simpler way.\r\n\r\nBest!\r\nGeoff (cc/ @stubbornella @bebepeng @pivotal-plech)","created_at":"2014-12-23T00:47:41Z","updated_at":"2014-12-23T00:47:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/trulia/hologram/pulls/187/commits","review_comments_url":"https://api.github.com/repos/trulia/hologram/pulls/187/comments","review_comment_url":"https://api.github.com/repos/trulia/hologram/pulls/comments/{number}","comments_url":"https://api.github.com/repos/trulia/hologram/issues/187/comments","statuses_url":"https://api.github.com/repos/trulia/hologram/statuses/cf979675923eb0ac0b132e2779df76ac2c2528c0","head":{"label":"gpleiss:custom_code_example","ref":"custom_code_example","sha":"cf979675923eb0ac0b132e2779df76ac2c2528c0","user":{"login":"gpleiss","id":824157,"avatar_url":"https://avatars.githubusercontent.com/u/824157?v=3","gravatar_id":"","url":"https://api.github.com/users/gpleiss","html_url":"https://github.com/gpleiss","followers_url":"https://api.github.com/users/gpleiss/followers","following_url":"https://api.github.com/users/gpleiss/following{/other_user}","gists_url":"https://api.github.com/users/gpleiss/gists{/gist_id}","starred_url":"https://api.github.com/users/gpleiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpleiss/subscriptions","organizations_url":"https://api.github.com/users/gpleiss/orgs","repos_url":"https://api.github.com/users/gpleiss/repos","events_url":"https://api.github.com/users/gpleiss/events{/privacy}","received_events_url":"https://api.github.com/users/gpleiss/received_events","type":"User","site_admin":false},"repo":{"id":24602069,"name":"hologram","full_name":"gpleiss/hologram","owner":{"login":"gpleiss","id":824157,"avatar_url":"https://avatars.githubusercontent.com/u/824157?v=3","gravatar_id":"","url":"https://api.github.com/users/gpleiss","html_url":"https://github.com/gpleiss","followers_url":"https://api.github.com/users/gpleiss/followers","following_url":"https://api.github.com/users/gpleiss/following{/other_user}","gists_url":"https://api.github.com/users/gpleiss/gists{/gist_id}","starred_url":"https://api.github.com/users/gpleiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpleiss/subscriptions","organizations_url":"https://api.github.com/users/gpleiss/orgs","repos_url":"https://api.github.com/users/gpleiss/repos","events_url":"https://api.github.com/users/gpleiss/events{/privacy}","received_events_url":"https://api.github.com/users/gpleiss/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gpleiss/hologram","description":"A markdown based documentation system for style guides.","fork":true,"url":"https://api.github.com/repos/gpleiss/hologram","forks_url":"https://api.github.com/repos/gpleiss/hologram/forks","keys_url":"https://api.github.com/repos/gpleiss/hologram/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gpleiss/hologram/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gpleiss/hologram/teams","hooks_url":"https://api.github.com/repos/gpleiss/hologram/hooks","issue_events_url":"https://api.github.com/repos/gpleiss/hologram/issues/events{/number}","events_url":"https://api.github.com/repos/gpleiss/hologram/events","assignees_url":"https://api.github.com/repos/gpleiss/hologram/assignees{/user}","branches_url":"https://api.github.com/repos/gpleiss/hologram/branches{/branch}","tags_url":"https://api.github.com/repos/gpleiss/hologram/tags","blobs_url":"https://api.github.com/repos/gpleiss/hologram/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gpleiss/hologram/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gpleiss/hologram/git/refs{/sha}","trees_url":"https://api.github.com/repos/gpleiss/hologram/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gpleiss/hologram/statuses/{sha}","languages_url":"https://api.github.com/repos/gpleiss/hologram/languages","stargazers_url":"https://api.github.com/repos/gpleiss/hologram/stargazers","contributors_url":"https://api.github.com/repos/gpleiss/hologram/contributors","subscribers_url":"https://api.github.com/repos/gpleiss/hologram/subscribers","subscription_url":"https://api.github.com/repos/gpleiss/hologram/subscription","commits_url":"https://api.github.com/repos/gpleiss/hologram/commits{/sha}","git_commits_url":"https://api.github.com/repos/gpleiss/hologram/git/commits{/sha}","comments_url":"https://api.github.com/repos/gpleiss/hologram/comments{/number}","issue_comment_url":"https://api.github.com/repos/gpleiss/hologram/issues/comments/{number}","contents_url":"https://api.github.com/repos/gpleiss/hologram/contents/{+path}","compare_url":"https://api.github.com/repos/gpleiss/hologram/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gpleiss/hologram/merges","archive_url":"https://api.github.com/repos/gpleiss/hologram/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gpleiss/hologram/downloads","issues_url":"https://api.github.com/repos/gpleiss/hologram/issues{/number}","pulls_url":"https://api.github.com/repos/gpleiss/hologram/pulls{/number}","milestones_url":"https://api.github.com/repos/gpleiss/hologram/milestones{/number}","notifications_url":"https://api.github.com/repos/gpleiss/hologram/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gpleiss/hologram/labels{/name}","releases_url":"https://api.github.com/repos/gpleiss/hologram/releases{/id}","created_at":"2014-09-29T15:58:57Z","updated_at":"2014-12-22T17:53:28Z","pushed_at":"2014-12-23T00:47:19Z","git_url":"git://github.com/gpleiss/hologram.git","ssh_url":"git@github.com:gpleiss/hologram.git","clone_url":"https://github.com/gpleiss/hologram.git","svn_url":"https://github.com/gpleiss/hologram","homepage":"http://trulia.github.io/hologram","size":1191,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"trulia:master","ref":"master","sha":"91e4a8a8bf5eb8a612a07a6646efa24d85f2ea1d","user":{"login":"trulia","id":538589,"avatar_url":"https://avatars.githubusercontent.com/u/538589?v=3","gravatar_id":"","url":"https://api.github.com/users/trulia","html_url":"https://github.com/trulia","followers_url":"https://api.github.com/users/trulia/followers","following_url":"https://api.github.com/users/trulia/following{/other_user}","gists_url":"https://api.github.com/users/trulia/gists{/gist_id}","starred_url":"https://api.github.com/users/trulia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trulia/subscriptions","organizations_url":"https://api.github.com/users/trulia/orgs","repos_url":"https://api.github.com/users/trulia/repos","events_url":"https://api.github.com/users/trulia/events{/privacy}","received_events_url":"https://api.github.com/users/trulia/received_events","type":"Organization","site_admin":false},"repo":{"id":9228086,"name":"hologram","full_name":"trulia/hologram","owner":{"login":"trulia","id":538589,"avatar_url":"https://avatars.githubusercontent.com/u/538589?v=3","gravatar_id":"","url":"https://api.github.com/users/trulia","html_url":"https://github.com/trulia","followers_url":"https://api.github.com/users/trulia/followers","following_url":"https://api.github.com/users/trulia/following{/other_user}","gists_url":"https://api.github.com/users/trulia/gists{/gist_id}","starred_url":"https://api.github.com/users/trulia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trulia/subscriptions","organizations_url":"https://api.github.com/users/trulia/orgs","repos_url":"https://api.github.com/users/trulia/repos","events_url":"https://api.github.com/users/trulia/events{/privacy}","received_events_url":"https://api.github.com/users/trulia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/trulia/hologram","description":"A markdown based documentation system for style guides.","fork":false,"url":"https://api.github.com/repos/trulia/hologram","forks_url":"https://api.github.com/repos/trulia/hologram/forks","keys_url":"https://api.github.com/repos/trulia/hologram/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trulia/hologram/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trulia/hologram/teams","hooks_url":"https://api.github.com/repos/trulia/hologram/hooks","issue_events_url":"https://api.github.com/repos/trulia/hologram/issues/events{/number}","events_url":"https://api.github.com/repos/trulia/hologram/events","assignees_url":"https://api.github.com/repos/trulia/hologram/assignees{/user}","branches_url":"https://api.github.com/repos/trulia/hologram/branches{/branch}","tags_url":"https://api.github.com/repos/trulia/hologram/tags","blobs_url":"https://api.github.com/repos/trulia/hologram/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trulia/hologram/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trulia/hologram/git/refs{/sha}","trees_url":"https://api.github.com/repos/trulia/hologram/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trulia/hologram/statuses/{sha}","languages_url":"https://api.github.com/repos/trulia/hologram/languages","stargazers_url":"https://api.github.com/repos/trulia/hologram/stargazers","contributors_url":"https://api.github.com/repos/trulia/hologram/contributors","subscribers_url":"https://api.github.com/repos/trulia/hologram/subscribers","subscription_url":"https://api.github.com/repos/trulia/hologram/subscription","commits_url":"https://api.github.com/repos/trulia/hologram/commits{/sha}","git_commits_url":"https://api.github.com/repos/trulia/hologram/git/commits{/sha}","comments_url":"https://api.github.com/repos/trulia/hologram/comments{/number}","issue_comment_url":"https://api.github.com/repos/trulia/hologram/issues/comments/{number}","contents_url":"https://api.github.com/repos/trulia/hologram/contents/{+path}","compare_url":"https://api.github.com/repos/trulia/hologram/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trulia/hologram/merges","archive_url":"https://api.github.com/repos/trulia/hologram/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trulia/hologram/downloads","issues_url":"https://api.github.com/repos/trulia/hologram/issues{/number}","pulls_url":"https://api.github.com/repos/trulia/hologram/pulls{/number}","milestones_url":"https://api.github.com/repos/trulia/hologram/milestones{/number}","notifications_url":"https://api.github.com/repos/trulia/hologram/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trulia/hologram/labels{/name}","releases_url":"https://api.github.com/repos/trulia/hologram/releases{/id}","created_at":"2013-04-04T21:07:57Z","updated_at":"2014-12-22T18:58:11Z","pushed_at":"2014-12-22T18:58:09Z","git_url":"git://github.com/trulia/hologram.git","ssh_url":"git@github.com:trulia/hologram.git","clone_url":"https://github.com/trulia/hologram.git","svn_url":"https://github.com/trulia/hologram","homepage":"http://trulia.github.io/hologram","size":2003,"stargazers_count":902,"watchers_count":902,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":96,"mirror_url":null,"open_issues_count":14,"forks":96,"open_issues":14,"watchers":902,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/trulia/hologram/pulls/187"},"html":{"href":"https://github.com/trulia/hologram/pull/187"},"issue":{"href":"https://api.github.com/repos/trulia/hologram/issues/187"},"comments":{"href":"https://api.github.com/repos/trulia/hologram/issues/187/comments"},"review_comments":{"href":"https://api.github.com/repos/trulia/hologram/pulls/187/comments"},"review_comment":{"href":"https://api.github.com/repos/trulia/hologram/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/trulia/hologram/pulls/187/commits"},"statuses":{"href":"https://api.github.com/repos/trulia/hologram/statuses/cf979675923eb0ac0b132e2779df76ac2c2528c0"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":305,"deletions":113,"changed_files":18}}