GitHub PullRequestReviewCommentEvent at 2014-07-03 22:14:23
Repository: qunit
Actor: leobalter
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/jquery/qunit/pulls/comments/14540467","id":14540467,"diff_hunk":"@@ -0,0 +1,579 @@\n+(function() {\n+\n+// Don't load the HTML Reporter on non-Browser environments\n+if ( typeof window === \"undefined\" ) { return; }\n+\n+var config = QUnit.config,\n+\thasOwn = Object.prototype.hasOwnProperty,\n+\tdefined = {\n+\t\tdocument: typeof window.document !== \"undefined\",\n+\t\tsessionStorage: (function() {\n+\t\t\tvar x = \"qunit-test-string\";\n+\t\t\ttry {\n+\t\t\t\tsessionStorage.setItem( x, x );\n+\t\t\t\tsessionStorage.removeItem( x );\n+\t\t\t\treturn true;\n+\t\t\t} catch ( e ) {\n+\t\t\t\treturn false;\n+\t\t\t}\n+\t\t}())\n+\t};\n+\n+/**\n+* Escape text for attribute or text content.\n+*/\n+function escapeText( s ) {\n+\tif ( !s ) {\n+\t\treturn \"\";\n+\t}\n+\ts = s + \"\";\n+\n+\t// Both single quotes and double quotes (for attributes)\n+\treturn s.replace( /['\"<>&]/g, function( s ) {\n+\t\tswitch ( s ) {\n+\t\t\tcase \"'\":\n+\t\t\t\treturn \"&#039;\";\n+\t\t\tcase \"\\\"\":\n+\t\t\t\treturn \"&quot;\";\n+\t\t\tcase \"<\":\n+\t\t\t\treturn \"&lt;\";\n+\t\t\tcase \">\":\n+\t\t\t\treturn \"&gt;\";\n+\t\t\tcase \"&\":\n+\t\t\t\treturn \"&amp;\";\n+\t\t}\n+\t});\n+}\n+\n+/**\n+ * @param {HTMLElement} elem\n+ * @param {string} type\n+ * @param {Function} fn\n+ */\n+function addEvent( elem, type, fn ) {\n+\tif ( elem.addEventListener ) {\n+\n+\t\t// Standards-based browsers\n+\t\telem.addEventListener( type, fn, false );\n+\t} else if ( elem.attachEvent ) {\n+\n+\t\t// support: IE <9\n+\t\telem.attachEvent( \"on\" + type, fn );\n+\t} else {\n+\n+\t\t// Caller must ensure support for event listeners is present\n+\t\tthrow new Error( \"addEvent() was called in a context without event listener support\" );\n+\t}\n+}\n+\n+/**\n+ * @param {Array|NodeList} elems\n+ * @param {string} type\n+ * @param {Function} fn\n+ */\n+function addEvents( elems, type, fn ) {\n+\tvar i = elems.length;\n+\twhile ( i-- ) {\n+\t\taddEvent( elems[ i ], type, fn );\n+\t}\n+}\n+\n+function hasClass( elem, name ) {\n+\treturn ( \" \" + elem.className + \" \" ).indexOf( \" \" + name + \" \" ) > -1;\n+}\n+\n+function addClass( elem, name ) {\n+\tif ( !hasClass( elem, name ) ) {\n+\t\telem.className += ( elem.className ? \" \" : \"\" ) + name;\n+\t}\n+}\n+\n+function removeClass( elem, name ) {\n+\tvar set = \" \" + elem.className + \" \";\n+\n+\t// Class name may appear multiple times\n+\twhile ( set.indexOf( \" \" + name + \" \" ) > -1 ) {\n+\t\tset = set.replace( \" \" + name + \" \", \" \" );\n+\t}\n+\n+\t// If possible, trim it for prettiness, but not necessarily","path":"src/reporter-html.js","position":99,"original_position":99,"commit_id":"cdd5f10060dc2b846908ea993ff10b5dd380a438","original_commit_id":"cdd5f10060dc2b846908ea993ff10b5dd380a438","user":{"login":"leobalter","id":301201,"avatar_url":"https://avatars.githubusercontent.com/u/301201?","gravatar_id":"7d57b597729e6ef3fc558bb82ff9416c","url":"https://api.github.com/users/leobalter","html_url":"https://github.com/leobalter","followers_url":"https://api.github.com/users/leobalter/followers","following_url":"https://api.github.com/users/leobalter/following{/other_user}","gists_url":"https://api.github.com/users/leobalter/gists{/gist_id}","starred_url":"https://api.github.com/users/leobalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leobalter/subscriptions","organizations_url":"https://api.github.com/users/leobalter/orgs","repos_url":"https://api.github.com/users/leobalter/repos","events_url":"https://api.github.com/users/leobalter/events{/privacy}","received_events_url":"https://api.github.com/users/leobalter/received_events","type":"User","site_admin":false},"body":"exactly the same as hasClass function, this was just code moving from `src/core.js` to this file. I didn't focused here to make code review easier (less diffs). Now that is commented, I'll make these changes. :)","created_at":"2014-07-03T22:14:23Z","updated_at":"2014-07-03T22:14:23Z","html_url":"https://github.com/jquery/qunit/pull/603#discussion_r14540467","pull_request_url":"https://api.github.com/repos/jquery/qunit/pulls/603","_links":{"self":{"href":"https://api.github.com/repos/jquery/qunit/pulls/comments/14540467"},"html":{"href":"https://github.com/jquery/qunit/pull/603#discussion_r14540467"},"pull_request":{"href":"https://api.github.com/repos/jquery/qunit/pulls/603"}}},"pull_request":{"url":"https://api.github.com/repos/jquery/qunit/pulls/603","id":17561188,"html_url":"https://github.com/jquery/qunit/pull/603","diff_url":"https://github.com/jquery/qunit/pull/603.diff","patch_url":"https://github.com/jquery/qunit/pull/603.patch","issue_url":"https://api.github.com/repos/jquery/qunit/issues/603","number":603,"state":"open","title":"Detach the HTML reporter","user":{"login":"leobalter","id":301201,"avatar_url":"https://avatars.githubusercontent.com/u/301201?","gravatar_id":"7d57b597729e6ef3fc558bb82ff9416c","url":"https://api.github.com/users/leobalter","html_url":"https://github.com/leobalter","followers_url":"https://api.github.com/users/leobalter/followers","following_url":"https://api.github.com/users/leobalter/following{/other_user}","gists_url":"https://api.github.com/users/leobalter/gists{/gist_id}","starred_url":"https://api.github.com/users/leobalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leobalter/subscriptions","organizations_url":"https://api.github.com/users/leobalter/orgs","repos_url":"https://api.github.com/users/leobalter/repos","events_url":"https://api.github.com/users/leobalter/events{/privacy}","received_events_url":"https://api.github.com/users/leobalter/received_events","type":"User","site_admin":false},"body":"This is the first step needed to set the reporter interface.\r\n\r\nThere are still a lot of things to do, but I already want to share to allow earlier reviews, because it's necessarily huge.\r\n\r\nIt's still **WIP**, but **every** single commit is **passing** through the tests.\r\n\r\nBtw, the last commit (@7de03f9) is passive of insane memory leak. (fix is coming) ","created_at":"2014-06-24T22:12:55Z","updated_at":"2014-07-03T22:14:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"77df590c45a24521def567b2f9cc18be27f0d0fc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jquery/qunit/pulls/603/commits","review_comments_url":"https://api.github.com/repos/jquery/qunit/pulls/603/comments","review_comment_url":"https://api.github.com/repos/jquery/qunit/pulls/comments/{number}","comments_url":"https://api.github.com/repos/jquery/qunit/issues/603/comments","statuses_url":"https://api.github.com/repos/jquery/qunit/statuses/cdd5f10060dc2b846908ea993ff10b5dd380a438","head":{"label":"leobalter:600-assert-start-stop","ref":"600-assert-start-stop","sha":"cdd5f10060dc2b846908ea993ff10b5dd380a438","user":{"login":"leobalter","id":301201,"avatar_url":"https://avatars.githubusercontent.com/u/301201?","gravatar_id":"7d57b597729e6ef3fc558bb82ff9416c","url":"https://api.github.com/users/leobalter","html_url":"https://github.com/leobalter","followers_url":"https://api.github.com/users/leobalter/followers","following_url":"https://api.github.com/users/leobalter/following{/other_user}","gists_url":"https://api.github.com/users/leobalter/gists{/gist_id}","starred_url":"https://api.github.com/users/leobalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leobalter/subscriptions","organizations_url":"https://api.github.com/users/leobalter/orgs","repos_url":"https://api.github.com/users/leobalter/repos","events_url":"https://api.github.com/users/leobalter/events{/privacy}","received_events_url":"https://api.github.com/users/leobalter/received_events","type":"User","site_admin":false},"repo":{"id":15093934,"name":"qunit","full_name":"leobalter/qunit","owner":{"login":"leobalter","id":301201,"avatar_url":"https://avatars.githubusercontent.com/u/301201?","gravatar_id":"7d57b597729e6ef3fc558bb82ff9416c","url":"https://api.github.com/users/leobalter","html_url":"https://github.com/leobalter","followers_url":"https://api.github.com/users/leobalter/followers","following_url":"https://api.github.com/users/leobalter/following{/other_user}","gists_url":"https://api.github.com/users/leobalter/gists{/gist_id}","starred_url":"https://api.github.com/users/leobalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leobalter/subscriptions","organizations_url":"https://api.github.com/users/leobalter/orgs","repos_url":"https://api.github.com/users/leobalter/repos","events_url":"https://api.github.com/users/leobalter/events{/privacy}","received_events_url":"https://api.github.com/users/leobalter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/leobalter/qunit","description":"An easy-to-use JavaScript Unit Testing framework.","fork":true,"url":"https://api.github.com/repos/leobalter/qunit","forks_url":"https://api.github.com/repos/leobalter/qunit/forks","keys_url":"https://api.github.com/repos/leobalter/qunit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leobalter/qunit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leobalter/qunit/teams","hooks_url":"https://api.github.com/repos/leobalter/qunit/hooks","issue_events_url":"https://api.github.com/repos/leobalter/qunit/issues/events{/number}","events_url":"https://api.github.com/repos/leobalter/qunit/events","assignees_url":"https://api.github.com/repos/leobalter/qunit/assignees{/user}","branches_url":"https://api.github.com/repos/leobalter/qunit/branches{/branch}","tags_url":"https://api.github.com/repos/leobalter/qunit/tags","blobs_url":"https://api.github.com/repos/leobalter/qunit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leobalter/qunit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leobalter/qunit/git/refs{/sha}","trees_url":"https://api.github.com/repos/leobalter/qunit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leobalter/qunit/statuses/{sha}","languages_url":"https://api.github.com/repos/leobalter/qunit/languages","stargazers_url":"https://api.github.com/repos/leobalter/qunit/stargazers","contributors_url":"https://api.github.com/repos/leobalter/qunit/contributors","subscribers_url":"https://api.github.com/repos/leobalter/qunit/subscribers","subscription_url":"https://api.github.com/repos/leobalter/qunit/subscription","commits_url":"https://api.github.com/repos/leobalter/qunit/commits{/sha}","git_commits_url":"https://api.github.com/repos/leobalter/qunit/git/commits{/sha}","comments_url":"https://api.github.com/repos/leobalter/qunit/comments{/number}","issue_comment_url":"https://api.github.com/repos/leobalter/qunit/issues/comments/{number}","contents_url":"https://api.github.com/repos/leobalter/qunit/contents/{+path}","compare_url":"https://api.github.com/repos/leobalter/qunit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leobalter/qunit/merges","archive_url":"https://api.github.com/repos/leobalter/qunit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leobalter/qunit/downloads","issues_url":"https://api.github.com/repos/leobalter/qunit/issues{/number}","pulls_url":"https://api.github.com/repos/leobalter/qunit/pulls{/number}","milestones_url":"https://api.github.com/repos/leobalter/qunit/milestones{/number}","notifications_url":"https://api.github.com/repos/leobalter/qunit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leobalter/qunit/labels{/name}","releases_url":"https://api.github.com/repos/leobalter/qunit/releases{/id}","created_at":"2013-12-11T00:34:30Z","updated_at":"2014-06-27T18:05:37Z","pushed_at":"2014-07-01T22:54:15Z","git_url":"git://github.com/leobalter/qunit.git","ssh_url":"git@github.com:leobalter/qunit.git","clone_url":"https://github.com/leobalter/qunit.git","svn_url":"https://github.com/leobalter/qunit","homepage":"http://qunitjs.com","size":2240,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jquery:master","ref":"master","sha":"fef0e59d8bc178d8f86f2f0a0cd6ed6ad6026b0e","user":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?","gravatar_id":"6906f317a4733f4379b06c32229ef02f","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"repo":{"id":259691,"name":"qunit","full_name":"jquery/qunit","owner":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?","gravatar_id":"6906f317a4733f4379b06c32229ef02f","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jquery/qunit","description":"An easy-to-use JavaScript Unit Testing framework.","fork":false,"url":"https://api.github.com/repos/jquery/qunit","forks_url":"https://api.github.com/repos/jquery/qunit/forks","keys_url":"https://api.github.com/repos/jquery/qunit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jquery/qunit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jquery/qunit/teams","hooks_url":"https://api.github.com/repos/jquery/qunit/hooks","issue_events_url":"https://api.github.com/repos/jquery/qunit/issues/events{/number}","events_url":"https://api.github.com/repos/jquery/qunit/events","assignees_url":"https://api.github.com/repos/jquery/qunit/assignees{/user}","branches_url":"https://api.github.com/repos/jquery/qunit/branches{/branch}","tags_url":"https://api.github.com/repos/jquery/qunit/tags","blobs_url":"https://api.github.com/repos/jquery/qunit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jquery/qunit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jquery/qunit/git/refs{/sha}","trees_url":"https://api.github.com/repos/jquery/qunit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jquery/qunit/statuses/{sha}","languages_url":"https://api.github.com/repos/jquery/qunit/languages","stargazers_url":"https://api.github.com/repos/jquery/qunit/stargazers","contributors_url":"https://api.github.com/repos/jquery/qunit/contributors","subscribers_url":"https://api.github.com/repos/jquery/qunit/subscribers","subscription_url":"https://api.github.com/repos/jquery/qunit/subscription","commits_url":"https://api.github.com/repos/jquery/qunit/commits{/sha}","git_commits_url":"https://api.github.com/repos/jquery/qunit/git/commits{/sha}","comments_url":"https://api.github.com/repos/jquery/qunit/comments{/number}","issue_comment_url":"https://api.github.com/repos/jquery/qunit/issues/comments/{number}","contents_url":"https://api.github.com/repos/jquery/qunit/contents/{+path}","compare_url":"https://api.github.com/repos/jquery/qunit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jquery/qunit/merges","archive_url":"https://api.github.com/repos/jquery/qunit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jquery/qunit/downloads","issues_url":"https://api.github.com/repos/jquery/qunit/issues{/number}","pulls_url":"https://api.github.com/repos/jquery/qunit/pulls{/number}","milestones_url":"https://api.github.com/repos/jquery/qunit/milestones{/number}","notifications_url":"https://api.github.com/repos/jquery/qunit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jquery/qunit/labels{/name}","releases_url":"https://api.github.com/repos/jquery/qunit/releases{/id}","created_at":"2009-07-24T16:26:23Z","updated_at":"2014-07-02T07:36:41Z","pushed_at":"2014-06-30T13:20:27Z","git_url":"git://github.com/jquery/qunit.git","ssh_url":"git@github.com:jquery/qunit.git","clone_url":"https://github.com/jquery/qunit.git","svn_url":"https://github.com/jquery/qunit","homepage":"http://qunitjs.com","size":4793,"stargazers_count":2922,"watchers_count":2922,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":574,"mirror_url":null,"open_issues_count":56,"forks":574,"open_issues":56,"watchers":2922,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jquery/qunit/pulls/603"},"html":{"href":"https://github.com/jquery/qunit/pull/603"},"issue":{"href":"https://api.github.com/repos/jquery/qunit/issues/603"},"comments":{"href":"https://api.github.com/repos/jquery/qunit/issues/603/comments"},"review_comments":{"href":"https://api.github.com/repos/jquery/qunit/pulls/603/comments"},"review_comment":{"href":"https://api.github.com/repos/jquery/qunit/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/jquery/qunit/pulls/603/commits"},"statuses":{"href":"https://api.github.com/repos/jquery/qunit/statuses/cdd5f10060dc2b846908ea993ff10b5dd380a438"}}}}