GitHub PullRequestReviewCommentEvent at 2014-07-05 20:53:13
Repository: build-tools
Actor: iislucas
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/uProxy/build-tools/pulls/comments/14572702","id":14572702,"diff_hunk":"@@ -0,0 +1,58 @@\n+/// <reference path='../third_party/promise/promise.d.ts' />\n+\n+module Handler {\n+\n+  // The |Aggregator| interface aggregates objects of type |T| to form a\n+  // compound object of type |T2|. It may have internal data, including time\n+  // which it uses as part of the aggregation. The |input| function adds a new\n+  // input, and the |check| function returns an optional aggregated output. If\n+  // the time/aggregate is not ready yet, |check| returns |null|. (Typically,\n+  // calling |check| twice without an |input| in between will result in the null\n+  // the second time; although this is not strictly enforced it is recommended).\n+  export interface Aggregator<T,T2> {\n+    input          :(x:T) => void;\n+    check          :() => T2;  // Note: T2 object returned may be null;\n+  }\n+\n+  // All handle calls get the same result for an aggregated collection of things\n+  // in the queue.\n+  export class AggregateUntil<T,T2> {\n+\n+    // The |nextAggregate| is the Promise for next aggregated value.\n+    public nextAggregate  :Promise<T2>;\n+\n+    // fulfillNextFn_ is the internal function to fulfill the nextAggregate.\n+    private fulfillNextFn_ :(x:T2) => void;\n+\n+    constructor(public aggregator :Aggregator<T,T2>) {","path":"src/handler/aggregate.ts","position":27,"original_position":27,"commit_id":"2eb6ced8171dffdc41b6617445fc69a62ba4ccc5","original_commit_id":"df5469a76a16f1f2d1686b1fb4f0d74ed2f3457a","user":{"login":"iislucas","id":415450,"avatar_url":"https://avatars.githubusercontent.com/u/415450?","gravatar_id":"640a06bb5767daa6d17f9ee000bb8900","url":"https://api.github.com/users/iislucas","html_url":"https://github.com/iislucas","followers_url":"https://api.github.com/users/iislucas/followers","following_url":"https://api.github.com/users/iislucas/following{/other_user}","gists_url":"https://api.github.com/users/iislucas/gists{/gist_id}","starred_url":"https://api.github.com/users/iislucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iislucas/subscriptions","organizations_url":"https://api.github.com/users/iislucas/orgs","repos_url":"https://api.github.com/users/iislucas/repos","events_url":"https://api.github.com/users/iislucas/events{/privacy}","received_events_url":"https://api.github.com/users/iislucas/received_events","type":"User","site_admin":false},"body":"done.","created_at":"2014-07-05T20:53:13Z","updated_at":"2014-07-05T20:53:13Z","html_url":"https://github.com/uProxy/build-tools/pull/8#discussion_r14572702","pull_request_url":"https://api.github.com/repos/uProxy/build-tools/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/uProxy/build-tools/pulls/comments/14572702"},"html":{"href":"https://github.com/uProxy/build-tools/pull/8#discussion_r14572702"},"pull_request":{"href":"https://api.github.com/repos/uProxy/build-tools/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/uProxy/build-tools/pulls/8","id":17457352,"html_url":"https://github.com/uProxy/build-tools/pull/8","diff_url":"https://github.com/uProxy/build-tools/pull/8.diff","patch_url":"https://github.com/uProxy/build-tools/pull/8.patch","issue_url":"https://api.github.com/repos/uProxy/build-tools/issues/8","number":8,"state":"open","title":"Aggregating queues","user":{"login":"iislucas","id":415450,"avatar_url":"https://avatars.githubusercontent.com/u/415450?","gravatar_id":"640a06bb5767daa6d17f9ee000bb8900","url":"https://api.github.com/users/iislucas","html_url":"https://github.com/iislucas","followers_url":"https://api.github.com/users/iislucas/followers","following_url":"https://api.github.com/users/iislucas/following{/other_user}","gists_url":"https://api.github.com/users/iislucas/gists{/gist_id}","starred_url":"https://api.github.com/users/iislucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iislucas/subscriptions","organizations_url":"https://api.github.com/users/iislucas/orgs","repos_url":"https://api.github.com/users/iislucas/repos","events_url":"https://api.github.com/users/iislucas/events{/privacy}","received_events_url":"https://api.github.com/users/iislucas/received_events","type":"User","site_admin":false},"body":"* Added file: `aggregate.ts` to provide a handler that aggregates things until it decides it is ready. \r\n  * This generalization is useful for: grouping signaling messages to avoid throttling (will be used to replace most of the current throttling code and move it to our uProxy networking code)\r\n  * Requiring a TCP connection receive to have a minimal number of bytes before starting trying to parsing those bytes (will fix bugs in parsing that, should TCP packet fragmentation occur, will break SOCKS5).\r\n* Fixed a bug in using the individual result handlers (not all promises were correctly resolved due to binding/loop mistake).  \r\n* Added initial event handlers with traditional add/remove/removeAll. This will allow event handlers to be attached to handler-queues. (not currently used)\r\n* Added tests for aggregating an input queue and using/requiring the result promises to complete.\r\n* Fixed bug in Promise typescript definition for all. \r\n* Updated package number; will publish on merge. \r\n\r\nTESTED: grunt test","created_at":"2014-06-23T05:30:11Z","updated_at":"2014-07-05T20:53:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d08add39ca32e2400be1ecf7616511992554332c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/uProxy/build-tools/pulls/8/commits","review_comments_url":"https://api.github.com/repos/uProxy/build-tools/pulls/8/comments","review_comment_url":"https://api.github.com/repos/uProxy/build-tools/pulls/comments/{number}","comments_url":"https://api.github.com/repos/uProxy/build-tools/issues/8/comments","statuses_url":"https://api.github.com/repos/uProxy/build-tools/statuses/2eb6ced8171dffdc41b6617445fc69a62ba4ccc5","head":{"label":"uProxy:iislucas-events_handlers","ref":"iislucas-events_handlers","sha":"2eb6ced8171dffdc41b6617445fc69a62ba4ccc5","user":{"login":"uProxy","id":6548286,"avatar_url":"https://avatars.githubusercontent.com/u/6548286?","gravatar_id":"f7b74f405eb3b0c3d9cceebb5c59b6f5","url":"https://api.github.com/users/uProxy","html_url":"https://github.com/uProxy","followers_url":"https://api.github.com/users/uProxy/followers","following_url":"https://api.github.com/users/uProxy/following{/other_user}","gists_url":"https://api.github.com/users/uProxy/gists{/gist_id}","starred_url":"https://api.github.com/users/uProxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uProxy/subscriptions","organizations_url":"https://api.github.com/users/uProxy/orgs","repos_url":"https://api.github.com/users/uProxy/repos","events_url":"https://api.github.com/users/uProxy/events{/privacy}","received_events_url":"https://api.github.com/users/uProxy/received_events","type":"Organization","site_admin":false},"repo":{"id":18026324,"name":"build-tools","full_name":"uProxy/build-tools","owner":{"login":"uProxy","id":6548286,"avatar_url":"https://avatars.githubusercontent.com/u/6548286?","gravatar_id":"f7b74f405eb3b0c3d9cceebb5c59b6f5","url":"https://api.github.com/users/uProxy","html_url":"https://github.com/uProxy","followers_url":"https://api.github.com/users/uProxy/followers","following_url":"https://api.github.com/users/uProxy/following{/other_user}","gists_url":"https://api.github.com/users/uProxy/gists{/gist_id}","starred_url":"https://api.github.com/users/uProxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uProxy/subscriptions","organizations_url":"https://api.github.com/users/uProxy/orgs","repos_url":"https://api.github.com/users/uProxy/repos","events_url":"https://api.github.com/users/uProxy/events{/privacy}","received_events_url":"https://api.github.com/users/uProxy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uProxy/build-tools","description":"Generic build tools used by uProxy projects","fork":false,"url":"https://api.github.com/repos/uProxy/build-tools","forks_url":"https://api.github.com/repos/uProxy/build-tools/forks","keys_url":"https://api.github.com/repos/uProxy/build-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uProxy/build-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uProxy/build-tools/teams","hooks_url":"https://api.github.com/repos/uProxy/build-tools/hooks","issue_events_url":"https://api.github.com/repos/uProxy/build-tools/issues/events{/number}","events_url":"https://api.github.com/repos/uProxy/build-tools/events","assignees_url":"https://api.github.com/repos/uProxy/build-tools/assignees{/user}","branches_url":"https://api.github.com/repos/uProxy/build-tools/branches{/branch}","tags_url":"https://api.github.com/repos/uProxy/build-tools/tags","blobs_url":"https://api.github.com/repos/uProxy/build-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uProxy/build-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uProxy/build-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/uProxy/build-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uProxy/build-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/uProxy/build-tools/languages","stargazers_url":"https://api.github.com/repos/uProxy/build-tools/stargazers","contributors_url":"https://api.github.com/repos/uProxy/build-tools/contributors","subscribers_url":"https://api.github.com/repos/uProxy/build-tools/subscribers","subscription_url":"https://api.github.com/repos/uProxy/build-tools/subscription","commits_url":"https://api.github.com/repos/uProxy/build-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/uProxy/build-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/uProxy/build-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/uProxy/build-tools/issues/comments/{number}","contents_url":"https://api.github.com/repos/uProxy/build-tools/contents/{+path}","compare_url":"https://api.github.com/repos/uProxy/build-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uProxy/build-tools/merges","archive_url":"https://api.github.com/repos/uProxy/build-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uProxy/build-tools/downloads","issues_url":"https://api.github.com/repos/uProxy/build-tools/issues{/number}","pulls_url":"https://api.github.com/repos/uProxy/build-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/uProxy/build-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/uProxy/build-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uProxy/build-tools/labels{/name}","releases_url":"https://api.github.com/repos/uProxy/build-tools/releases{/id}","created_at":"2014-03-23T04:17:00Z","updated_at":"2014-06-23T05:30:11Z","pushed_at":"2014-07-02T23:08:58Z","git_url":"git://github.com/uProxy/build-tools.git","ssh_url":"git@github.com:uProxy/build-tools.git","clone_url":"https://github.com/uProxy/build-tools.git","svn_url":"https://github.com/uProxy/build-tools","homepage":null,"size":716,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":2,"default_branch":"master"}},"base":{"label":"uProxy:master","ref":"master","sha":"2a102d901c799832aee1c448097bd6f071ce68c4","user":{"login":"uProxy","id":6548286,"avatar_url":"https://avatars.githubusercontent.com/u/6548286?","gravatar_id":"f7b74f405eb3b0c3d9cceebb5c59b6f5","url":"https://api.github.com/users/uProxy","html_url":"https://github.com/uProxy","followers_url":"https://api.github.com/users/uProxy/followers","following_url":"https://api.github.com/users/uProxy/following{/other_user}","gists_url":"https://api.github.com/users/uProxy/gists{/gist_id}","starred_url":"https://api.github.com/users/uProxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uProxy/subscriptions","organizations_url":"https://api.github.com/users/uProxy/orgs","repos_url":"https://api.github.com/users/uProxy/repos","events_url":"https://api.github.com/users/uProxy/events{/privacy}","received_events_url":"https://api.github.com/users/uProxy/received_events","type":"Organization","site_admin":false},"repo":{"id":18026324,"name":"build-tools","full_name":"uProxy/build-tools","owner":{"login":"uProxy","id":6548286,"avatar_url":"https://avatars.githubusercontent.com/u/6548286?","gravatar_id":"f7b74f405eb3b0c3d9cceebb5c59b6f5","url":"https://api.github.com/users/uProxy","html_url":"https://github.com/uProxy","followers_url":"https://api.github.com/users/uProxy/followers","following_url":"https://api.github.com/users/uProxy/following{/other_user}","gists_url":"https://api.github.com/users/uProxy/gists{/gist_id}","starred_url":"https://api.github.com/users/uProxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uProxy/subscriptions","organizations_url":"https://api.github.com/users/uProxy/orgs","repos_url":"https://api.github.com/users/uProxy/repos","events_url":"https://api.github.com/users/uProxy/events{/privacy}","received_events_url":"https://api.github.com/users/uProxy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uProxy/build-tools","description":"Generic build tools used by uProxy projects","fork":false,"url":"https://api.github.com/repos/uProxy/build-tools","forks_url":"https://api.github.com/repos/uProxy/build-tools/forks","keys_url":"https://api.github.com/repos/uProxy/build-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uProxy/build-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uProxy/build-tools/teams","hooks_url":"https://api.github.com/repos/uProxy/build-tools/hooks","issue_events_url":"https://api.github.com/repos/uProxy/build-tools/issues/events{/number}","events_url":"https://api.github.com/repos/uProxy/build-tools/events","assignees_url":"https://api.github.com/repos/uProxy/build-tools/assignees{/user}","branches_url":"https://api.github.com/repos/uProxy/build-tools/branches{/branch}","tags_url":"https://api.github.com/repos/uProxy/build-tools/tags","blobs_url":"https://api.github.com/repos/uProxy/build-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uProxy/build-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uProxy/build-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/uProxy/build-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uProxy/build-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/uProxy/build-tools/languages","stargazers_url":"https://api.github.com/repos/uProxy/build-tools/stargazers","contributors_url":"https://api.github.com/repos/uProxy/build-tools/contributors","subscribers_url":"https://api.github.com/repos/uProxy/build-tools/subscribers","subscription_url":"https://api.github.com/repos/uProxy/build-tools/subscription","commits_url":"https://api.github.com/repos/uProxy/build-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/uProxy/build-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/uProxy/build-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/uProxy/build-tools/issues/comments/{number}","contents_url":"https://api.github.com/repos/uProxy/build-tools/contents/{+path}","compare_url":"https://api.github.com/repos/uProxy/build-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uProxy/build-tools/merges","archive_url":"https://api.github.com/repos/uProxy/build-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uProxy/build-tools/downloads","issues_url":"https://api.github.com/repos/uProxy/build-tools/issues{/number}","pulls_url":"https://api.github.com/repos/uProxy/build-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/uProxy/build-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/uProxy/build-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uProxy/build-tools/labels{/name}","releases_url":"https://api.github.com/repos/uProxy/build-tools/releases{/id}","created_at":"2014-03-23T04:17:00Z","updated_at":"2014-06-23T05:30:11Z","pushed_at":"2014-07-02T23:08:58Z","git_url":"git://github.com/uProxy/build-tools.git","ssh_url":"git@github.com:uProxy/build-tools.git","clone_url":"https://github.com/uProxy/build-tools.git","svn_url":"https://github.com/uProxy/build-tools","homepage":null,"size":716,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uProxy/build-tools/pulls/8"},"html":{"href":"https://github.com/uProxy/build-tools/pull/8"},"issue":{"href":"https://api.github.com/repos/uProxy/build-tools/issues/8"},"comments":{"href":"https://api.github.com/repos/uProxy/build-tools/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/uProxy/build-tools/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/uProxy/build-tools/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/uProxy/build-tools/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/uProxy/build-tools/statuses/2eb6ced8171dffdc41b6617445fc69a62ba4ccc5"}}}}