{"action":"created","comment":{"url":"https://api.github.com/repos/apiaryio/apiary-client/pulls/comments/30020280","id":30020280,"diff_hunk":"@@ -116,17 +90,49 @@ def write_generated_path(path, outfile)\n         File.write(outfile, File.read(path))\n       end\n \n-      def generate_static(path)\n-        File.open(preview_path(path), \"w\") do |file|\n-          file.write(query_apiary(@options.api_host, path))\n+      def generate\n+        template = load_preview_template()\n+\n+        data = {\n+          title: File.basename(@options.path, \".*\"),\n+          blueprint: load_blueprint()","path":"lib/apiary/command/preview.rb","position":106,"original_position":106,"commit_id":"a72ae7332d3af73c6ae87f7398fc91972d9ee851","original_commit_id":"a72ae7332d3af73c6ae87f7398fc91972d9ee851","user":{"login":"abtris","id":100356,"avatar_url":"https://avatars.githubusercontent.com/u/100356?v=3","gravatar_id":"","url":"https://api.github.com/users/abtris","html_url":"https://github.com/abtris","followers_url":"https://api.github.com/users/abtris/followers","following_url":"https://api.github.com/users/abtris/following{/other_user}","gists_url":"https://api.github.com/users/abtris/gists{/gist_id}","starred_url":"https://api.github.com/users/abtris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abtris/subscriptions","organizations_url":"https://api.github.com/users/abtris/orgs","repos_url":"https://api.github.com/users/abtris/repos","events_url":"https://api.github.com/users/abtris/events{/privacy}","received_events_url":"https://api.github.com/users/abtris/received_events","type":"User","site_admin":false},"body":"Do not use parentheses for method calls with no arguments.","created_at":"2015-05-11T08:25:04Z","updated_at":"2015-05-11T08:25:04Z","html_url":"https://github.com/apiaryio/apiary-client/pull/80#discussion_r30020280","pull_request_url":"https://api.github.com/repos/apiaryio/apiary-client/pulls/80","_links":{"self":{"href":"https://api.github.com/repos/apiaryio/apiary-client/pulls/comments/30020280"},"html":{"href":"https://github.com/apiaryio/apiary-client/pull/80#discussion_r30020280"},"pull_request":{"href":"https://api.github.com/repos/apiaryio/apiary-client/pulls/80"}}},"pull_request":{"url":"https://api.github.com/repos/apiaryio/apiary-client/pulls/80","id":35106007,"html_url":"https://github.com/apiaryio/apiary-client/pull/80","diff_url":"https://github.com/apiaryio/apiary-client/pull/80.diff","patch_url":"https://github.com/apiaryio/apiary-client/pull/80.patch","issue_url":"https://api.github.com/repos/apiaryio/apiary-client/issues/80","number":80,"state":"open","locked":false,"title":"Updated preview command to display new documentation.","user":{"login":"freaz","id":959390,"avatar_url":"https://avatars.githubusercontent.com/u/959390?v=3","gravatar_id":"","url":"https://api.github.com/users/freaz","html_url":"https://github.com/freaz","followers_url":"https://api.github.com/users/freaz/followers","following_url":"https://api.github.com/users/freaz/following{/other_user}","gists_url":"https://api.github.com/users/freaz/gists{/gist_id}","starred_url":"https://api.github.com/users/freaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freaz/subscriptions","organizations_url":"https://api.github.com/users/freaz/orgs","repos_url":"https://api.github.com/users/freaz/repos","events_url":"https://api.github.com/users/freaz/events{/privacy}","received_events_url":"https://api.github.com/users/freaz/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-11T08:18:19Z","updated_at":"2015-05-11T08:25:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"90de309c24bbdb0c8a5137ffc85cba433b240b90","assignee":{"login":"abtris","id":100356,"avatar_url":"https://avatars.githubusercontent.com/u/100356?v=3","gravatar_id":"","url":"https://api.github.com/users/abtris","html_url":"https://github.com/abtris","followers_url":"https://api.github.com/users/abtris/followers","following_url":"https://api.github.com/users/abtris/following{/other_user}","gists_url":"https://api.github.com/users/abtris/gists{/gist_id}","starred_url":"https://api.github.com/users/abtris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abtris/subscriptions","organizations_url":"https://api.github.com/users/abtris/orgs","repos_url":"https://api.github.com/users/abtris/repos","events_url":"https://api.github.com/users/abtris/events{/privacy}","received_events_url":"https://api.github.com/users/abtris/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/apiaryio/apiary-client/pulls/80/commits","review_comments_url":"https://api.github.com/repos/apiaryio/apiary-client/pulls/80/comments","review_comment_url":"https://api.github.com/repos/apiaryio/apiary-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apiaryio/apiary-client/issues/80/comments","statuses_url":"https://api.github.com/repos/apiaryio/apiary-client/statuses/a72ae7332d3af73c6ae87f7398fc91972d9ee851","head":{"label":"apiaryio:freaz/preview-new-documentation","ref":"freaz/preview-new-documentation","sha":"a72ae7332d3af73c6ae87f7398fc91972d9ee851","user":{"login":"apiaryio","id":765943,"avatar_url":"https://avatars.githubusercontent.com/u/765943?v=3","gravatar_id":"","url":"https://api.github.com/users/apiaryio","html_url":"https://github.com/apiaryio","followers_url":"https://api.github.com/users/apiaryio/followers","following_url":"https://api.github.com/users/apiaryio/following{/other_user}","gists_url":"https://api.github.com/users/apiaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/apiaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apiaryio/subscriptions","organizations_url":"https://api.github.com/users/apiaryio/orgs","repos_url":"https://api.github.com/users/apiaryio/repos","events_url":"https://api.github.com/users/apiaryio/events{/privacy}","received_events_url":"https://api.github.com/users/apiaryio/received_events","type":"Organization","site_admin":false},"repo":{"id":4616729,"name":"apiary-client","full_name":"apiaryio/apiary-client","owner":{"login":"apiaryio","id":765943,"avatar_url":"https://avatars.githubusercontent.com/u/765943?v=3","gravatar_id":"","url":"https://api.github.com/users/apiaryio","html_url":"https://github.com/apiaryio","followers_url":"https://api.github.com/users/apiaryio/followers","following_url":"https://api.github.com/users/apiaryio/following{/other_user}","gists_url":"https://api.github.com/users/apiaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/apiaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apiaryio/subscriptions","organizations_url":"https://api.github.com/users/apiaryio/orgs","repos_url":"https://api.github.com/users/apiaryio/repos","events_url":"https://api.github.com/users/apiaryio/events{/privacy}","received_events_url":"https://api.github.com/users/apiaryio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apiaryio/apiary-client","description":"Ruby Gem for Apiary API","fork":false,"url":"https://api.github.com/repos/apiaryio/apiary-client","forks_url":"https://api.github.com/repos/apiaryio/apiary-client/forks","keys_url":"https://api.github.com/repos/apiaryio/apiary-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apiaryio/apiary-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apiaryio/apiary-client/teams","hooks_url":"https://api.github.com/repos/apiaryio/apiary-client/hooks","issue_events_url":"https://api.github.com/repos/apiaryio/apiary-client/issues/events{/number}","events_url":"https://api.github.com/repos/apiaryio/apiary-client/events","assignees_url":"https://api.github.com/repos/apiaryio/apiary-client/assignees{/user}","branches_url":"https://api.github.com/repos/apiaryio/apiary-client/branches{/branch}","tags_url":"https://api.github.com/repos/apiaryio/apiary-client/tags","blobs_url":"https://api.github.com/repos/apiaryio/apiary-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apiaryio/apiary-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apiaryio/apiary-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/apiaryio/apiary-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apiaryio/apiary-client/statuses/{sha}","languages_url":"https://api.github.com/repos/apiaryio/apiary-client/languages","stargazers_url":"https://api.github.com/repos/apiaryio/apiary-client/stargazers","contributors_url":"https://api.github.com/repos/apiaryio/apiary-client/contributors","subscribers_url":"https://api.github.com/repos/apiaryio/apiary-client/subscribers","subscription_url":"https://api.github.com/repos/apiaryio/apiary-client/subscription","commits_url":"https://api.github.com/repos/apiaryio/apiary-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/apiaryio/apiary-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/apiaryio/apiary-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/apiaryio/apiary-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/apiaryio/apiary-client/contents/{+path}","compare_url":"https://api.github.com/repos/apiaryio/apiary-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apiaryio/apiary-client/merges","archive_url":"https://api.github.com/repos/apiaryio/apiary-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apiaryio/apiary-client/downloads","issues_url":"https://api.github.com/repos/apiaryio/apiary-client/issues{/number}","pulls_url":"https://api.github.com/repos/apiaryio/apiary-client/pulls{/number}","milestones_url":"https://api.github.com/repos/apiaryio/apiary-client/milestones{/number}","notifications_url":"https://api.github.com/repos/apiaryio/apiary-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apiaryio/apiary-client/labels{/name}","releases_url":"https://api.github.com/repos/apiaryio/apiary-client/releases{/id}","created_at":"2012-06-10T17:04:20Z","updated_at":"2015-04-28T22:18:51Z","pushed_at":"2015-05-11T08:18:19Z","git_url":"git://github.com/apiaryio/apiary-client.git","ssh_url":"git@github.com:apiaryio/apiary-client.git","clone_url":"https://github.com/apiaryio/apiary-client.git","svn_url":"https://github.com/apiaryio/apiary-client","homepage":"","size":1136,"stargazers_count":96,"watchers_count":96,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":11,"forks":29,"open_issues":11,"watchers":96,"default_branch":"master"}},"base":{"label":"apiaryio:master","ref":"master","sha":"8bf6f6f27a592dcdf2b6fb7b1f5c48bec3307a10","user":{"login":"apiaryio","id":765943,"avatar_url":"https://avatars.githubusercontent.com/u/765943?v=3","gravatar_id":"","url":"https://api.github.com/users/apiaryio","html_url":"https://github.com/apiaryio","followers_url":"https://api.github.com/users/apiaryio/followers","following_url":"https://api.github.com/users/apiaryio/following{/other_user}","gists_url":"https://api.github.com/users/apiaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/apiaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apiaryio/subscriptions","organizations_url":"https://api.github.com/users/apiaryio/orgs","repos_url":"https://api.github.com/users/apiaryio/repos","events_url":"https://api.github.com/users/apiaryio/events{/privacy}","received_events_url":"https://api.github.com/users/apiaryio/received_events","type":"Organization","site_admin":false},"repo":{"id":4616729,"name":"apiary-client","full_name":"apiaryio/apiary-client","owner":{"login":"apiaryio","id":765943,"avatar_url":"https://avatars.githubusercontent.com/u/765943?v=3","gravatar_id":"","url":"https://api.github.com/users/apiaryio","html_url":"https://github.com/apiaryio","followers_url":"https://api.github.com/users/apiaryio/followers","following_url":"https://api.github.com/users/apiaryio/following{/other_user}","gists_url":"https://api.github.com/users/apiaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/apiaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apiaryio/subscriptions","organizations_url":"https://api.github.com/users/apiaryio/orgs","repos_url":"https://api.github.com/users/apiaryio/repos","events_url":"https://api.github.com/users/apiaryio/events{/privacy}","received_events_url":"https://api.github.com/users/apiaryio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apiaryio/apiary-client","description":"Ruby Gem for Apiary API","fork":false,"url":"https://api.github.com/repos/apiaryio/apiary-client","forks_url":"https://api.github.com/repos/apiaryio/apiary-client/forks","keys_url":"https://api.github.com/repos/apiaryio/apiary-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apiaryio/apiary-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apiaryio/apiary-client/teams","hooks_url":"https://api.github.com/repos/apiaryio/apiary-client/hooks","issue_events_url":"https://api.github.com/repos/apiaryio/apiary-client/issues/events{/number}","events_url":"https://api.github.com/repos/apiaryio/apiary-client/events","assignees_url":"https://api.github.com/repos/apiaryio/apiary-client/assignees{/user}","branches_url":"https://api.github.com/repos/apiaryio/apiary-client/branches{/branch}","tags_url":"https://api.github.com/repos/apiaryio/apiary-client/tags","blobs_url":"https://api.github.com/repos/apiaryio/apiary-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apiaryio/apiary-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apiaryio/apiary-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/apiaryio/apiary-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apiaryio/apiary-client/statuses/{sha}","languages_url":"https://api.github.com/repos/apiaryio/apiary-client/languages","stargazers_url":"https://api.github.com/repos/apiaryio/apiary-client/stargazers","contributors_url":"https://api.github.com/repos/apiaryio/apiary-client/contributors","subscribers_url":"https://api.github.com/repos/apiaryio/apiary-client/subscribers","subscription_url":"https://api.github.com/repos/apiaryio/apiary-client/subscription","commits_url":"https://api.github.com/repos/apiaryio/apiary-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/apiaryio/apiary-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/apiaryio/apiary-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/apiaryio/apiary-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/apiaryio/apiary-client/contents/{+path}","compare_url":"https://api.github.com/repos/apiaryio/apiary-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apiaryio/apiary-client/merges","archive_url":"https://api.github.com/repos/apiaryio/apiary-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apiaryio/apiary-client/downloads","issues_url":"https://api.github.com/repos/apiaryio/apiary-client/issues{/number}","pulls_url":"https://api.github.com/repos/apiaryio/apiary-client/pulls{/number}","milestones_url":"https://api.github.com/repos/apiaryio/apiary-client/milestones{/number}","notifications_url":"https://api.github.com/repos/apiaryio/apiary-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apiaryio/apiary-client/labels{/name}","releases_url":"https://api.github.com/repos/apiaryio/apiary-client/releases{/id}","created_at":"2012-06-10T17:04:20Z","updated_at":"2015-04-28T22:18:51Z","pushed_at":"2015-05-11T08:18:19Z","git_url":"git://github.com/apiaryio/apiary-client.git","ssh_url":"git@github.com:apiaryio/apiary-client.git","clone_url":"https://github.com/apiaryio/apiary-client.git","svn_url":"https://github.com/apiaryio/apiary-client","homepage":"","size":1136,"stargazers_count":96,"watchers_count":96,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":11,"forks":29,"open_issues":11,"watchers":96,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apiaryio/apiary-client/pulls/80"},"html":{"href":"https://github.com/apiaryio/apiary-client/pull/80"},"issue":{"href":"https://api.github.com/repos/apiaryio/apiary-client/issues/80"},"comments":{"href":"https://api.github.com/repos/apiaryio/apiary-client/issues/80/comments"},"review_comments":{"href":"https://api.github.com/repos/apiaryio/apiary-client/pulls/80/comments"},"review_comment":{"href":"https://api.github.com/repos/apiaryio/apiary-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apiaryio/apiary-client/pulls/80/commits"},"statuses":{"href":"https://api.github.com/repos/apiaryio/apiary-client/statuses/a72ae7332d3af73c6ae87f7398fc91972d9ee851"}}}}