{"action":"created","comment":{"url":"https://api.github.com/repos/ember-fastboot/fastboot/pulls/comments/83967525","pull_request_review_id":4772531,"id":83967525,"diff_hunk":"@@ -46,6 +47,24 @@ class Result {\n   }\n \n   /**\n+   * Returns the serialized representation of the HEAD.\n+   *\n+   * @returns {String} serialized version of the DOM HEAD\n+  */\n+  getHead() {","path":"src/result.js","position":16,"original_position":16,"commit_id":"6510f5467cb4ac05ba80723d1fd24ce2bf8d332c","original_commit_id":"6510f5467cb4ac05ba80723d1fd24ce2bf8d332c","user":{"login":"rwjblue","id":12637,"avatar_url":"https://avatars.githubusercontent.com/u/12637?v=3","gravatar_id":"","url":"https://api.github.com/users/rwjblue","html_url":"https://github.com/rwjblue","followers_url":"https://api.github.com/users/rwjblue/followers","following_url":"https://api.github.com/users/rwjblue/following{/other_user}","gists_url":"https://api.github.com/users/rwjblue/gists{/gist_id}","starred_url":"https://api.github.com/users/rwjblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwjblue/subscriptions","organizations_url":"https://api.github.com/users/rwjblue/orgs","repos_url":"https://api.github.com/users/rwjblue/repos","events_url":"https://api.github.com/users/rwjblue/events{/privacy}","received_events_url":"https://api.github.com/users/rwjblue/received_events","type":"User","site_admin":false},"body":"Should this (and `getBody`) be a real getter instead? I ever so _slightly_ dislike the `get***` and `set***` pattern when we can just use native getters/setters if that works the same for us...","created_at":"2016-10-18T22:50:35Z","updated_at":"2016-10-18T22:55:10Z","html_url":"https://github.com/ember-fastboot/fastboot/pull/91#discussion_r83967525","pull_request_url":"https://api.github.com/repos/ember-fastboot/fastboot/pulls/91","_links":{"self":{"href":"https://api.github.com/repos/ember-fastboot/fastboot/pulls/comments/83967525"},"html":{"href":"https://github.com/ember-fastboot/fastboot/pull/91#discussion_r83967525"},"pull_request":{"href":"https://api.github.com/repos/ember-fastboot/fastboot/pulls/91"}}},"pull_request":{"url":"https://api.github.com/repos/ember-fastboot/fastboot/pulls/91","id":89758567,"html_url":"https://github.com/ember-fastboot/fastboot/pull/91","diff_url":"https://github.com/ember-fastboot/fastboot/pull/91.diff","patch_url":"https://github.com/ember-fastboot/fastboot/pull/91.patch","issue_url":"https://api.github.com/repos/ember-fastboot/fastboot/issues/91","number":91,"state":"open","locked":false,"title":"Refactor Fastboot's visit API to take additional options","user":{"login":"kratiahuja","id":4064295,"avatar_url":"https://avatars.githubusercontent.com/u/4064295?v=3","gravatar_id":"","url":"https://api.github.com/users/kratiahuja","html_url":"https://github.com/kratiahuja","followers_url":"https://api.github.com/users/kratiahuja/followers","following_url":"https://api.github.com/users/kratiahuja/following{/other_user}","gists_url":"https://api.github.com/users/kratiahuja/gists{/gist_id}","starred_url":"https://api.github.com/users/kratiahuja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kratiahuja/subscriptions","organizations_url":"https://api.github.com/users/kratiahuja/orgs","repos_url":"https://api.github.com/users/kratiahuja/repos","events_url":"https://api.github.com/users/kratiahuja/events{/privacy}","received_events_url":"https://api.github.com/users/kratiahuja/received_events","type":"User","site_admin":false},"body":"## Motivation\r\nFastboot today renders the application on the server side and exposes an API to serve the base page as well via [fastboot-app-server](https://github.com/ember-fastboot/fastboot-app-server). Various companies may chose to use their own proprietary infrastructure to serve the base page (with doing other things on top of it). While they serve the base page using a different infrastructure, they may want use this fastboot library with serving the  ember app on the server side as is.\r\n\r\nThis PR adds a bunch of options to the `FastBoot` so that we can use this library can be used as a standalone without needing to serve the base page to the browser using this library. It also now allows apps to be served in \"routing-only\" mode (aka bigpipe).\r\n\r\n## Public API\r\nIn order to address the above, following are the additional options exposed via the `visit` method:\r\n- [x] `metaData`: Allows to pass per request meta data (as `metaData`) for every `visit` and exposes it via the fastboot [service](https://github.com/ember-fastboot/ember-cli-fastboot/pull/280). This allows apps to pass in any additional data and use it in the app when routing/rendering on server side. \r\n- [x] `shouldRender`: Passes `shouldRender` option via `visit` which should allow the app to be executed in [\"routing-only\"](https://github.com/emberjs/ember.js/blob/aeeddf7c00b42a340494465252481b5414d87009/packages/ember-application/lib/system/application-instance.js#L378) mode. This can allow an app to disable rendering on per request basis and use bigpipe as we do at LinkedIn. It is more performant than a full render if you only plan to use the shoebox from server side rendered app.\r\n- [x] `disableShoebox`: Allows apps to not send API data in the shoebox. Apps may be sending API data via different means.\r\n- [x] `destroyAppInstanceInMs`: Allows apps to set an time in ms after which an app instance will forcefully be destroyed. This is a more for a failure mechanism and fixes this [issue](https://github.com/ember-fastboot/fastboot/issues/90)\r\n- [x] Expose `getHead` and `getBody` methods from the result object. This will allow an app using a different infrastructure to read this library and get the data of the rendered route. \r\n\r\n## TODO\r\n- [ ] Update the fastboot-website with all of the above public API\r\n- [ ] Update fastboot README.md with this API\r\n\r\n## Notes\r\nOnce this PR is merged we need to close the following issues/ merge these PRs in order for an app to use any infrastructure to serve the base page and still use server side rendering perfomantly: \r\n1. We need the parallel PR to this to be merged. The PR is [here](https://github.com/ember-fastboot/ember-cli-fastboot/pull/280).\r\n2. We need to fix the fastboot build performance issues. The related RFC in `ember-cli` is [here](https://github.com/ember-cli/ember-cli/issues/6350).\r\n3. We need to expose an API during build time to allow addons to add other assets to be loaded in fastboot. This issue is being tracked [here](https://github.com/ember-fastboot/ember-cli-fastboot/issues/270).\r\n\r\nOnce the above issues are fixed in addition to this PR, at LinkedIn we will be able to simply use:\r\n```javascript\r\n  var fastbootServer = new FastbootServer({\r\n     distPath: '/foo',\r\n    sandbox: <mysandboxclass>\r\n  });\r\n  fastbootServer.visit(route, {\r\n     shouldRender: false,\r\n     metaData: {...},\r\n     request: {\r\n       headers: {...}\r\n     },\r\n     disableShoebox: false,\r\n     destroyAppInstanceInMs: <some number>\r\n  });\r\n```\r\nThis will allow us to remove usage of all private APIs that will be initially used from this library.\r\n\r\ncc: @tomdale @arjansingh @danmcclain @kristoferbaxter @ryanone @masonwan @melmerp @chadhietala","created_at":"2016-10-18T07:14:57Z","updated_at":"2016-10-18T22:55:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c123ff16a4c32e21d11c0c68afceb99a6243d231","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ember-fastboot/fastboot/pulls/91/commits","review_comments_url":"https://api.github.com/repos/ember-fastboot/fastboot/pulls/91/comments","review_comment_url":"https://api.github.com/repos/ember-fastboot/fastboot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ember-fastboot/fastboot/issues/91/comments","statuses_url":"https://api.github.com/repos/ember-fastboot/fastboot/statuses/6510f5467cb4ac05ba80723d1fd24ce2bf8d332c","head":{"label":"kratiahuja:li-refactor","ref":"li-refactor","sha":"6510f5467cb4ac05ba80723d1fd24ce2bf8d332c","user":{"login":"kratiahuja","id":4064295,"avatar_url":"https://avatars.githubusercontent.com/u/4064295?v=3","gravatar_id":"","url":"https://api.github.com/users/kratiahuja","html_url":"https://github.com/kratiahuja","followers_url":"https://api.github.com/users/kratiahuja/followers","following_url":"https://api.github.com/users/kratiahuja/following{/other_user}","gists_url":"https://api.github.com/users/kratiahuja/gists{/gist_id}","starred_url":"https://api.github.com/users/kratiahuja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kratiahuja/subscriptions","organizations_url":"https://api.github.com/users/kratiahuja/orgs","repos_url":"https://api.github.com/users/kratiahuja/repos","events_url":"https://api.github.com/users/kratiahuja/events{/privacy}","received_events_url":"https://api.github.com/users/kratiahuja/received_events","type":"User","site_admin":false},"repo":{"id":71087872,"name":"fastboot","full_name":"kratiahuja/fastboot","owner":{"login":"kratiahuja","id":4064295,"avatar_url":"https://avatars.githubusercontent.com/u/4064295?v=3","gravatar_id":"","url":"https://api.github.com/users/kratiahuja","html_url":"https://github.com/kratiahuja","followers_url":"https://api.github.com/users/kratiahuja/followers","following_url":"https://api.github.com/users/kratiahuja/following{/other_user}","gists_url":"https://api.github.com/users/kratiahuja/gists{/gist_id}","starred_url":"https://api.github.com/users/kratiahuja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kratiahuja/subscriptions","organizations_url":"https://api.github.com/users/kratiahuja/orgs","repos_url":"https://api.github.com/users/kratiahuja/repos","events_url":"https://api.github.com/users/kratiahuja/events{/privacy}","received_events_url":"https://api.github.com/users/kratiahuja/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kratiahuja/fastboot","description":"FastBoot is a library for rendering Ember.js applications in Node.js.","fork":true,"url":"https://api.github.com/repos/kratiahuja/fastboot","forks_url":"https://api.github.com/repos/kratiahuja/fastboot/forks","keys_url":"https://api.github.com/repos/kratiahuja/fastboot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kratiahuja/fastboot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kratiahuja/fastboot/teams","hooks_url":"https://api.github.com/repos/kratiahuja/fastboot/hooks","issue_events_url":"https://api.github.com/repos/kratiahuja/fastboot/issues/events{/number}","events_url":"https://api.github.com/repos/kratiahuja/fastboot/events","assignees_url":"https://api.github.com/repos/kratiahuja/fastboot/assignees{/user}","branches_url":"https://api.github.com/repos/kratiahuja/fastboot/branches{/branch}","tags_url":"https://api.github.com/repos/kratiahuja/fastboot/tags","blobs_url":"https://api.github.com/repos/kratiahuja/fastboot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kratiahuja/fastboot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kratiahuja/fastboot/git/refs{/sha}","trees_url":"https://api.github.com/repos/kratiahuja/fastboot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kratiahuja/fastboot/statuses/{sha}","languages_url":"https://api.github.com/repos/kratiahuja/fastboot/languages","stargazers_url":"https://api.github.com/repos/kratiahuja/fastboot/stargazers","contributors_url":"https://api.github.com/repos/kratiahuja/fastboot/contributors","subscribers_url":"https://api.github.com/repos/kratiahuja/fastboot/subscribers","subscription_url":"https://api.github.com/repos/kratiahuja/fastboot/subscription","commits_url":"https://api.github.com/repos/kratiahuja/fastboot/commits{/sha}","git_commits_url":"https://api.github.com/repos/kratiahuja/fastboot/git/commits{/sha}","comments_url":"https://api.github.com/repos/kratiahuja/fastboot/comments{/number}","issue_comment_url":"https://api.github.com/repos/kratiahuja/fastboot/issues/comments{/number}","contents_url":"https://api.github.com/repos/kratiahuja/fastboot/contents/{+path}","compare_url":"https://api.github.com/repos/kratiahuja/fastboot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kratiahuja/fastboot/merges","archive_url":"https://api.github.com/repos/kratiahuja/fastboot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kratiahuja/fastboot/downloads","issues_url":"https://api.github.com/repos/kratiahuja/fastboot/issues{/number}","pulls_url":"https://api.github.com/repos/kratiahuja/fastboot/pulls{/number}","milestones_url":"https://api.github.com/repos/kratiahuja/fastboot/milestones{/number}","notifications_url":"https://api.github.com/repos/kratiahuja/fastboot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kratiahuja/fastboot/labels{/name}","releases_url":"https://api.github.com/repos/kratiahuja/fastboot/releases{/id}","deployments_url":"https://api.github.com/repos/kratiahuja/fastboot/deployments","created_at":"2016-10-17T01:06:36Z","updated_at":"2016-10-17T01:06:37Z","pushed_at":"2016-10-18T06:41:46Z","git_url":"git://github.com/kratiahuja/fastboot.git","ssh_url":"git@github.com:kratiahuja/fastboot.git","clone_url":"https://github.com/kratiahuja/fastboot.git","svn_url":"https://github.com/kratiahuja/fastboot","homepage":"","size":1685,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ember-fastboot:master","ref":"master","sha":"904f30da8e46c5ad0d5ccd7f342e67454086f362","user":{"login":"ember-fastboot","id":14139940,"avatar_url":"https://avatars.githubusercontent.com/u/14139940?v=3","gravatar_id":"","url":"https://api.github.com/users/ember-fastboot","html_url":"https://github.com/ember-fastboot","followers_url":"https://api.github.com/users/ember-fastboot/followers","following_url":"https://api.github.com/users/ember-fastboot/following{/other_user}","gists_url":"https://api.github.com/users/ember-fastboot/gists{/gist_id}","starred_url":"https://api.github.com/users/ember-fastboot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ember-fastboot/subscriptions","organizations_url":"https://api.github.com/users/ember-fastboot/orgs","repos_url":"https://api.github.com/users/ember-fastboot/repos","events_url":"https://api.github.com/users/ember-fastboot/events{/privacy}","received_events_url":"https://api.github.com/users/ember-fastboot/received_events","type":"Organization","site_admin":false},"repo":{"id":41966600,"name":"fastboot","full_name":"ember-fastboot/fastboot","owner":{"login":"ember-fastboot","id":14139940,"avatar_url":"https://avatars.githubusercontent.com/u/14139940?v=3","gravatar_id":"","url":"https://api.github.com/users/ember-fastboot","html_url":"https://github.com/ember-fastboot","followers_url":"https://api.github.com/users/ember-fastboot/followers","following_url":"https://api.github.com/users/ember-fastboot/following{/other_user}","gists_url":"https://api.github.com/users/ember-fastboot/gists{/gist_id}","starred_url":"https://api.github.com/users/ember-fastboot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ember-fastboot/subscriptions","organizations_url":"https://api.github.com/users/ember-fastboot/orgs","repos_url":"https://api.github.com/users/ember-fastboot/repos","events_url":"https://api.github.com/users/ember-fastboot/events{/privacy}","received_events_url":"https://api.github.com/users/ember-fastboot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ember-fastboot/fastboot","description":"FastBoot is a library for rendering Ember.js applications in Node.js.","fork":false,"url":"https://api.github.com/repos/ember-fastboot/fastboot","forks_url":"https://api.github.com/repos/ember-fastboot/fastboot/forks","keys_url":"https://api.github.com/repos/ember-fastboot/fastboot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ember-fastboot/fastboot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ember-fastboot/fastboot/teams","hooks_url":"https://api.github.com/repos/ember-fastboot/fastboot/hooks","issue_events_url":"https://api.github.com/repos/ember-fastboot/fastboot/issues/events{/number}","events_url":"https://api.github.com/repos/ember-fastboot/fastboot/events","assignees_url":"https://api.github.com/repos/ember-fastboot/fastboot/assignees{/user}","branches_url":"https://api.github.com/repos/ember-fastboot/fastboot/branches{/branch}","tags_url":"https://api.github.com/repos/ember-fastboot/fastboot/tags","blobs_url":"https://api.github.com/repos/ember-fastboot/fastboot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ember-fastboot/fastboot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ember-fastboot/fastboot/git/refs{/sha}","trees_url":"https://api.github.com/repos/ember-fastboot/fastboot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ember-fastboot/fastboot/statuses/{sha}","languages_url":"https://api.github.com/repos/ember-fastboot/fastboot/languages","stargazers_url":"https://api.github.com/repos/ember-fastboot/fastboot/stargazers","contributors_url":"https://api.github.com/repos/ember-fastboot/fastboot/contributors","subscribers_url":"https://api.github.com/repos/ember-fastboot/fastboot/subscribers","subscription_url":"https://api.github.com/repos/ember-fastboot/fastboot/subscription","commits_url":"https://api.github.com/repos/ember-fastboot/fastboot/commits{/sha}","git_commits_url":"https://api.github.com/repos/ember-fastboot/fastboot/git/commits{/sha}","comments_url":"https://api.github.com/repos/ember-fastboot/fastboot/comments{/number}","issue_comment_url":"https://api.github.com/repos/ember-fastboot/fastboot/issues/comments{/number}","contents_url":"https://api.github.com/repos/ember-fastboot/fastboot/contents/{+path}","compare_url":"https://api.github.com/repos/ember-fastboot/fastboot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ember-fastboot/fastboot/merges","archive_url":"https://api.github.com/repos/ember-fastboot/fastboot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ember-fastboot/fastboot/downloads","issues_url":"https://api.github.com/repos/ember-fastboot/fastboot/issues{/number}","pulls_url":"https://api.github.com/repos/ember-fastboot/fastboot/pulls{/number}","milestones_url":"https://api.github.com/repos/ember-fastboot/fastboot/milestones{/number}","notifications_url":"https://api.github.com/repos/ember-fastboot/fastboot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ember-fastboot/fastboot/labels{/name}","releases_url":"https://api.github.com/repos/ember-fastboot/fastboot/releases{/id}","deployments_url":"https://api.github.com/repos/ember-fastboot/fastboot/deployments","created_at":"2015-09-05T15:46:46Z","updated_at":"2016-10-18T22:26:40Z","pushed_at":"2016-10-18T07:14:58Z","git_url":"git://github.com/ember-fastboot/fastboot.git","ssh_url":"git@github.com:ember-fastboot/fastboot.git","clone_url":"https://github.com/ember-fastboot/fastboot.git","svn_url":"https://github.com/ember-fastboot/fastboot","homepage":"","size":1708,"stargazers_count":84,"watchers_count":84,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":14,"forks":30,"open_issues":14,"watchers":84,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ember-fastboot/fastboot/pulls/91"},"html":{"href":"https://github.com/ember-fastboot/fastboot/pull/91"},"issue":{"href":"https://api.github.com/repos/ember-fastboot/fastboot/issues/91"},"comments":{"href":"https://api.github.com/repos/ember-fastboot/fastboot/issues/91/comments"},"review_comments":{"href":"https://api.github.com/repos/ember-fastboot/fastboot/pulls/91/comments"},"review_comment":{"href":"https://api.github.com/repos/ember-fastboot/fastboot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ember-fastboot/fastboot/pulls/91/commits"},"statuses":{"href":"https://api.github.com/repos/ember-fastboot/fastboot/statuses/6510f5467cb4ac05ba80723d1fd24ce2bf8d332c"}}}}
{"actor":{"display_login":"rwjblue"}}