{"action":"created","comment":{"url":"https://api.github.com/repos/adesege/HelloBooks/pulls/comments/157355135","pull_request_review_id":83987482,"id":157355135,"diff_hunk":"@@ -0,0 +1,169 @@\n+/**\n+ * energize.js v0.1.0\n+ *\n+ * Speeds up click events on mobile devices.\n+ * https://github.com/davidcalhoun/energize.js\n+ */\n+\n+(function() {  // Sandbox\n+  /**\n+   * Don't add to non-touch devices, which don't need to be sped up\n+   */\n+  if(!('ontouchstart' in window)) return;\n+\n+  var lastClick = {},\n+      isThresholdReached, touchstart, touchmove, touchend,\n+      click, closest;\n+  \n+  /**\n+   * isThresholdReached\n+   *\n+   * Compare touchstart with touchend xy coordinates,\n+   * and only fire simulated click event if the coordinates\n+   * are nearby. (don't want clicking to be confused with a swipe)\n+   */\n+  isThresholdReached = function(startXY, xy) {\n+    return Math.abs(startXY[0] - xy[0]) > 5 || Math.abs(startXY[1] - xy[1]) > 5;\n+  };\n+\n+  /**\n+   * touchstart\n+   *\n+   * Save xy coordinates when the user starts touching the screen\n+   */\n+  touchstart = function(e) {\n+    this.startXY = [e.touches[0].clientX, e.touches[0].clientY];\n+    this.threshold = false;\n+  };\n+\n+  /**\n+   * touchmove\n+   *\n+   * Check if the user is scrolling past the threshold.\n+   * Have to check here because touchend will not always fire\n+   * on some tested devices (Kindle Fire?)\n+   */\n+  touchmove = function(e) {\n+    // NOOP if the threshold has already been reached\n+    if(this.threshold) return false;\n+\n+    this.threshold = isThresholdReached(this.startXY, [e.touches[0].clientX, e.touches[0].clientY]);\n+  };\n+\n+  /**\n+   * touchend\n+   *\n+   * If the user didn't scroll past the threshold between\n+   * touchstart and touchend, fire a simulated click.\n+   *\n+   * (This will fire before a native click)\n+   */\n+  touchend = function(e) {\n+    // Don't fire a click if the user scrolled past the threshold\n+    if(this.threshold || isThresholdReached(this.startXY, [e.changedTouches[0].clientX, e.changedTouches[0].clientY])) {\n+      return;\n+    }\n+    \n+    /**\n+     * Create and fire a click event on the target element\n+     * https://developer.mozilla.org/en/DOM/event.initMouseEvent\n+     */\n+    var touch = e.changedTouches[0],\n+        evt = document.createEvent('MouseEvents');\n+    evt.initMouseEvent('click', true, true, window, 0, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);\n+    evt.simulated = true;   // distinguish from a normal (nonsimulated) click\n+    e.target.dispatchEvent(evt);\n+  };\n+  \n+  /**\n+   * click\n+   *\n+   * Because we've already fired a click event in touchend,\n+   * we need to listed for all native click events here\n+   * and suppress them as necessary.\n+   */  \n+  click = function(e) {\n+    /**\n+     * Prevent ghost clicks by only allowing clicks we created\n+     * in the click event we fired (look for e.simulated)\n+     */\n+    var time = Date.now(),\n+        timeDiff = time - lastClick.time,\n+        x = e.clientX,\n+        y = e.clientY,\n+        xyDiff = [Math.abs(lastClick.x - x), Math.abs(lastClick.y - y)],\n+        target = closest(e.target, 'A') || e.target,  // needed for standalone apps\n+        nodeName = target.nodeName,\n+        isLink = nodeName === 'A',\n+        standAlone = window.navigator.standalone && isLink && e.target.getAttribute(\"href\");\n+    \n+    lastClick.time = time;\n+    lastClick.x = x;\n+    lastClick.y = y;\n+\n+    /**\n+     * Unfortunately Android sometimes fires click events without touch events (seen on Kindle Fire),\n+     * so we have to add more logic to determine the time of the last click.  Not perfect...\n+     *\n+     * Older, simpler check: if((!e.simulated) || standAlone)\n+     */\n+    if((!e.simulated && (timeDiff < 500 || (timeDiff < 1500 && xyDiff[0] < 50 && xyDiff[1] < 50))) || standAlone) {\n+      e.preventDefault();\n+      e.stopPropagation();\n+      if(!standAlone) return false;\n+    }\n+\n+    /** \n+     * Special logic for standalone web apps\n+     * See http://stackoverflow.com/questions/2898740/iphone-safari-web-app-opens-links-in-new-window\n+     */\n+    if(standAlone) {\n+      window.location = target.getAttribute(\"href\");\n+    }\n+\n+    /**\n+     * Add an energize-focus class to the targeted link (mimics :focus behavior)\n+     * TODO: test and/or remove?  Does this work?\n+     */\n+    if(!target || !target.classList) return;\n+    target.classList.add(\"energize-focus\");\n+    window.setTimeout(function(){\n+      target.classList.remove(\"energize-focus\");\n+    }, 150);\n+  };\n+\n+  /**\n+   * closest\n+   * @param {HTMLElement} node current node to start searching from.\n+   * @param {string} tagName the (uppercase) name of the tag you're looking for.\n+   *\n+   * Find the closest ancestor tag of a given node.\n+   *\n+   * Starts at node and goes up the DOM tree looking for a\n+   * matching nodeName, continuing until hitting document.body\n+   */\n+  closest = function(node, tagName){\n+    var curNode = node;\n+\n+    while(curNode !== document.body) {  // go up the dom until we find the tag we're after\n+      if(!curNode || curNode.nodeName === tagName) { return curNode; } // found\n+      curNode = curNode.parentNode;     // not found, so keep going up\n+    }\n+    \n+    return null;  // not found\n+  };\n+\n+  /**\n+   * Add all delegated event listeners\n+   * \n+   * All the events we care about bubble up to document,\n+   * so we can take advantage of event delegation.\n+   *\n+   * Note: no need to wait for DOMContentLoaded here\n+   */\n+  document.addEventListener('touchstart', touchstart, false);\n+  document.addEventListener('touchmove', touchmove, false);\n+  document.addEventListener('touchend', touchend, false);\n+  document.addEventListener('click', click, true);  // TODO: why does this use capture?\n+  ","path":"slate/source/javascripts/lib/_energize.js","position":168,"original_position":168,"commit_id":"2c08b538602bfe3850f216c809c7df6fa7c0b00b","original_commit_id":"2c08b538602bfe3850f216c809c7df6fa7c0b00b","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Trailing spaces not allowed                                      no-trailing-spaces","created_at":"2017-12-17T00:45:27Z","updated_at":"2017-12-17T00:45:27Z","html_url":"https://github.com/adesege/HelloBooks/pull/78#discussion_r157355135","pull_request_url":"https://api.github.com/repos/adesege/HelloBooks/pulls/78","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/adesege/HelloBooks/pulls/comments/157355135"},"html":{"href":"https://github.com/adesege/HelloBooks/pull/78#discussion_r157355135"},"pull_request":{"href":"https://api.github.com/repos/adesege/HelloBooks/pulls/78"}}},"pull_request":{"url":"https://api.github.com/repos/adesege/HelloBooks/pulls/78","id":157969877,"html_url":"https://github.com/adesege/HelloBooks/pull/78","diff_url":"https://github.com/adesege/HelloBooks/pull/78.diff","patch_url":"https://github.com/adesege/HelloBooks/pull/78.patch","issue_url":"https://api.github.com/repos/adesege/HelloBooks/issues/78","number":78,"state":"open","locked":false,"title":"chore(refactor-server-test): refactor server test naming convention","user":{"login":"adesege","id":20769821,"avatar_url":"https://avatars3.githubusercontent.com/u/20769821?v=4","gravatar_id":"","url":"https://api.github.com/users/adesege","html_url":"https://github.com/adesege","followers_url":"https://api.github.com/users/adesege/followers","following_url":"https://api.github.com/users/adesege/following{/other_user}","gists_url":"https://api.github.com/users/adesege/gists{/gist_id}","starred_url":"https://api.github.com/users/adesege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adesege/subscriptions","organizations_url":"https://api.github.com/users/adesege/orgs","repos_url":"https://api.github.com/users/adesege/repos","events_url":"https://api.github.com/users/adesege/events{/privacy}","received_events_url":"https://api.github.com/users/adesege/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nThis PR will implement scorecard feedback implementation\r\n\r\n#### Description of Task to be completed?\r\nN/A\r\n\r\n#### How should this be manually tested?\r\nN/A\r\n\r\n#### Any background context you want to provide?\r\nN/A\r\n\r\n#### What are the relevant pivotal tracker stories?\r\n#153550278\r\n\r\n#### Screenshots (if appropriate)\r\nN/A\r\n\r\n#### Questions: \r\nN/A\r\n","created_at":"2017-12-12T23:49:46Z","updated_at":"2017-12-17T00:45:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"10ecf888d88b3ed68692b768f8ed9dd40835ffa4","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/adesege/HelloBooks/pulls/78/commits","review_comments_url":"https://api.github.com/repos/adesege/HelloBooks/pulls/78/comments","review_comment_url":"https://api.github.com/repos/adesege/HelloBooks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/adesege/HelloBooks/issues/78/comments","statuses_url":"https://api.github.com/repos/adesege/HelloBooks/statuses/2c08b538602bfe3850f216c809c7df6fa7c0b00b","head":{"label":"adesege:chore/153550278/feedback-implementation","ref":"chore/153550278/feedback-implementation","sha":"2c08b538602bfe3850f216c809c7df6fa7c0b00b","user":{"login":"adesege","id":20769821,"avatar_url":"https://avatars3.githubusercontent.com/u/20769821?v=4","gravatar_id":"","url":"https://api.github.com/users/adesege","html_url":"https://github.com/adesege","followers_url":"https://api.github.com/users/adesege/followers","following_url":"https://api.github.com/users/adesege/following{/other_user}","gists_url":"https://api.github.com/users/adesege/gists{/gist_id}","starred_url":"https://api.github.com/users/adesege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adesege/subscriptions","organizations_url":"https://api.github.com/users/adesege/orgs","repos_url":"https://api.github.com/users/adesege/repos","events_url":"https://api.github.com/users/adesege/events{/privacy}","received_events_url":"https://api.github.com/users/adesege/received_events","type":"User","site_admin":false},"repo":{"id":98338255,"name":"HelloBooks","full_name":"adesege/HelloBooks","owner":{"login":"adesege","id":20769821,"avatar_url":"https://avatars3.githubusercontent.com/u/20769821?v=4","gravatar_id":"","url":"https://api.github.com/users/adesege","html_url":"https://github.com/adesege","followers_url":"https://api.github.com/users/adesege/followers","following_url":"https://api.github.com/users/adesege/following{/other_user}","gists_url":"https://api.github.com/users/adesege/gists{/gist_id}","starred_url":"https://api.github.com/users/adesege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adesege/subscriptions","organizations_url":"https://api.github.com/users/adesege/orgs","repos_url":"https://api.github.com/users/adesege/repos","events_url":"https://api.github.com/users/adesege/events{/privacy}","received_events_url":"https://api.github.com/users/adesege/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adesege/HelloBooks","description":"A simple application that helps manage a library and its processes like stocking, tracking and renting books","fork":false,"url":"https://api.github.com/repos/adesege/HelloBooks","forks_url":"https://api.github.com/repos/adesege/HelloBooks/forks","keys_url":"https://api.github.com/repos/adesege/HelloBooks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adesege/HelloBooks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adesege/HelloBooks/teams","hooks_url":"https://api.github.com/repos/adesege/HelloBooks/hooks","issue_events_url":"https://api.github.com/repos/adesege/HelloBooks/issues/events{/number}","events_url":"https://api.github.com/repos/adesege/HelloBooks/events","assignees_url":"https://api.github.com/repos/adesege/HelloBooks/assignees{/user}","branches_url":"https://api.github.com/repos/adesege/HelloBooks/branches{/branch}","tags_url":"https://api.github.com/repos/adesege/HelloBooks/tags","blobs_url":"https://api.github.com/repos/adesege/HelloBooks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adesege/HelloBooks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adesege/HelloBooks/git/refs{/sha}","trees_url":"https://api.github.com/repos/adesege/HelloBooks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adesege/HelloBooks/statuses/{sha}","languages_url":"https://api.github.com/repos/adesege/HelloBooks/languages","stargazers_url":"https://api.github.com/repos/adesege/HelloBooks/stargazers","contributors_url":"https://api.github.com/repos/adesege/HelloBooks/contributors","subscribers_url":"https://api.github.com/repos/adesege/HelloBooks/subscribers","subscription_url":"https://api.github.com/repos/adesege/HelloBooks/subscription","commits_url":"https://api.github.com/repos/adesege/HelloBooks/commits{/sha}","git_commits_url":"https://api.github.com/repos/adesege/HelloBooks/git/commits{/sha}","comments_url":"https://api.github.com/repos/adesege/HelloBooks/comments{/number}","issue_comment_url":"https://api.github.com/repos/adesege/HelloBooks/issues/comments{/number}","contents_url":"https://api.github.com/repos/adesege/HelloBooks/contents/{+path}","compare_url":"https://api.github.com/repos/adesege/HelloBooks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adesege/HelloBooks/merges","archive_url":"https://api.github.com/repos/adesege/HelloBooks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adesege/HelloBooks/downloads","issues_url":"https://api.github.com/repos/adesege/HelloBooks/issues{/number}","pulls_url":"https://api.github.com/repos/adesege/HelloBooks/pulls{/number}","milestones_url":"https://api.github.com/repos/adesege/HelloBooks/milestones{/number}","notifications_url":"https://api.github.com/repos/adesege/HelloBooks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adesege/HelloBooks/labels{/name}","releases_url":"https://api.github.com/repos/adesege/HelloBooks/releases{/id}","deployments_url":"https://api.github.com/repos/adesege/HelloBooks/deployments","created_at":"2017-07-25T18:35:25Z","updated_at":"2017-12-13T22:18:46Z","pushed_at":"2017-12-17T00:44:11Z","git_url":"git://github.com/adesege/HelloBooks.git","ssh_url":"git@github.com:adesege/HelloBooks.git","clone_url":"https://github.com/adesege/HelloBooks.git","svn_url":"https://github.com/adesege/HelloBooks","homepage":"http://hellobooks.herokuapp.com","size":14113,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2,"open_issues":1,"watchers":1,"default_branch":"chore/153550278/feedback-implementation"}},"base":{"label":"adesege:development","ref":"development","sha":"2db088836316c095be0e30efaaec4e3301b23255","user":{"login":"adesege","id":20769821,"avatar_url":"https://avatars3.githubusercontent.com/u/20769821?v=4","gravatar_id":"","url":"https://api.github.com/users/adesege","html_url":"https://github.com/adesege","followers_url":"https://api.github.com/users/adesege/followers","following_url":"https://api.github.com/users/adesege/following{/other_user}","gists_url":"https://api.github.com/users/adesege/gists{/gist_id}","starred_url":"https://api.github.com/users/adesege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adesege/subscriptions","organizations_url":"https://api.github.com/users/adesege/orgs","repos_url":"https://api.github.com/users/adesege/repos","events_url":"https://api.github.com/users/adesege/events{/privacy}","received_events_url":"https://api.github.com/users/adesege/received_events","type":"User","site_admin":false},"repo":{"id":98338255,"name":"HelloBooks","full_name":"adesege/HelloBooks","owner":{"login":"adesege","id":20769821,"avatar_url":"https://avatars3.githubusercontent.com/u/20769821?v=4","gravatar_id":"","url":"https://api.github.com/users/adesege","html_url":"https://github.com/adesege","followers_url":"https://api.github.com/users/adesege/followers","following_url":"https://api.github.com/users/adesege/following{/other_user}","gists_url":"https://api.github.com/users/adesege/gists{/gist_id}","starred_url":"https://api.github.com/users/adesege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adesege/subscriptions","organizations_url":"https://api.github.com/users/adesege/orgs","repos_url":"https://api.github.com/users/adesege/repos","events_url":"https://api.github.com/users/adesege/events{/privacy}","received_events_url":"https://api.github.com/users/adesege/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adesege/HelloBooks","description":"A simple application that helps manage a library and its processes like stocking, tracking and renting books","fork":false,"url":"https://api.github.com/repos/adesege/HelloBooks","forks_url":"https://api.github.com/repos/adesege/HelloBooks/forks","keys_url":"https://api.github.com/repos/adesege/HelloBooks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adesege/HelloBooks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adesege/HelloBooks/teams","hooks_url":"https://api.github.com/repos/adesege/HelloBooks/hooks","issue_events_url":"https://api.github.com/repos/adesege/HelloBooks/issues/events{/number}","events_url":"https://api.github.com/repos/adesege/HelloBooks/events","assignees_url":"https://api.github.com/repos/adesege/HelloBooks/assignees{/user}","branches_url":"https://api.github.com/repos/adesege/HelloBooks/branches{/branch}","tags_url":"https://api.github.com/repos/adesege/HelloBooks/tags","blobs_url":"https://api.github.com/repos/adesege/HelloBooks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adesege/HelloBooks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adesege/HelloBooks/git/refs{/sha}","trees_url":"https://api.github.com/repos/adesege/HelloBooks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adesege/HelloBooks/statuses/{sha}","languages_url":"https://api.github.com/repos/adesege/HelloBooks/languages","stargazers_url":"https://api.github.com/repos/adesege/HelloBooks/stargazers","contributors_url":"https://api.github.com/repos/adesege/HelloBooks/contributors","subscribers_url":"https://api.github.com/repos/adesege/HelloBooks/subscribers","subscription_url":"https://api.github.com/repos/adesege/HelloBooks/subscription","commits_url":"https://api.github.com/repos/adesege/HelloBooks/commits{/sha}","git_commits_url":"https://api.github.com/repos/adesege/HelloBooks/git/commits{/sha}","comments_url":"https://api.github.com/repos/adesege/HelloBooks/comments{/number}","issue_comment_url":"https://api.github.com/repos/adesege/HelloBooks/issues/comments{/number}","contents_url":"https://api.github.com/repos/adesege/HelloBooks/contents/{+path}","compare_url":"https://api.github.com/repos/adesege/HelloBooks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adesege/HelloBooks/merges","archive_url":"https://api.github.com/repos/adesege/HelloBooks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adesege/HelloBooks/downloads","issues_url":"https://api.github.com/repos/adesege/HelloBooks/issues{/number}","pulls_url":"https://api.github.com/repos/adesege/HelloBooks/pulls{/number}","milestones_url":"https://api.github.com/repos/adesege/HelloBooks/milestones{/number}","notifications_url":"https://api.github.com/repos/adesege/HelloBooks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adesege/HelloBooks/labels{/name}","releases_url":"https://api.github.com/repos/adesege/HelloBooks/releases{/id}","deployments_url":"https://api.github.com/repos/adesege/HelloBooks/deployments","created_at":"2017-07-25T18:35:25Z","updated_at":"2017-12-13T22:18:46Z","pushed_at":"2017-12-17T00:44:11Z","git_url":"git://github.com/adesege/HelloBooks.git","ssh_url":"git@github.com:adesege/HelloBooks.git","clone_url":"https://github.com/adesege/HelloBooks.git","svn_url":"https://github.com/adesege/HelloBooks","homepage":"http://hellobooks.herokuapp.com","size":14113,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2,"open_issues":1,"watchers":1,"default_branch":"chore/153550278/feedback-implementation"}},"_links":{"self":{"href":"https://api.github.com/repos/adesege/HelloBooks/pulls/78"},"html":{"href":"https://github.com/adesege/HelloBooks/pull/78"},"issue":{"href":"https://api.github.com/repos/adesege/HelloBooks/issues/78"},"comments":{"href":"https://api.github.com/repos/adesege/HelloBooks/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/adesege/HelloBooks/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/adesege/HelloBooks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/adesege/HelloBooks/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/adesege/HelloBooks/statuses/2c08b538602bfe3850f216c809c7df6fa7c0b00b"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}