{"action":"created","comment":{"url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/pulls/comments/79246409","id":79246409,"diff_hunk":"@@ -92,33 +92,64 @@ describe('$httpoll service', function () {\n             expectHTTPCount(1);\n         })\n \n+        describe('util option', function(){\n+\n+            it ('should get overriden by timeout', function() {\n+                var result = $httpoll({\n+                    method: 'get',\n+                    url: route,\n+                    timeout: 1000,\n+                    delay: 1200,\n+                    retries: 9,\n+                    until: function(){\n+                        return false;\n+                    }\n+                })\n+                expectTimeout(result);\n+                expectHTTPCount(1);\n+            })\n \n-        it ('should override until if timeout is set', function() {\n-            var result = $httpoll({\n-                method: 'get',\n-                url: route,\n-                timeout: 1000,\n-                delay: 1200,\n-                retries: 9,\n-                until: function(){\n-                    return false;\n-                }\n+            it ('should continue polling until condition is satisfied', function (){\n+                var result = $httpoll({\n+                    method: 'get',\n+                    url: route,\n+                    retries: 9,\n+                    until: function (response, config, state) {\n+                        return state.retryCount > 5;\n+                    }\n+                });\n+                expectHTTPCount(7);\n             })\n-            expectTimeout(result);\n-            expectHTTPCount(1);\n-        })\n \n-        it ('should continue polling until condition is satisfied', function (){\n-            var result = $httpoll({\n-                method: 'get',\n-                url: route,\n-                retries: 9,\n-                until: function (response, config, state) {\n-                    return state.remaining < 4;\n-                }\n+            it ('should defer to default logic', function () {\n+                var result = $httpoll({\n+                    method: 'get',\n+                    url: route,\n+                    retries: 9,\n+                    until: function (response, config, state, actions) {\n+                        return actions.pass();","path":"test/httpoll.spec.js","position":60,"original_position":60,"commit_id":"77803e1edb7078e8a7e6809002eacf16a24003c5","original_commit_id":"20b77a062e41066db9938842832bd90d02b8480a","user":{"login":"liammccartney","id":8420028,"avatar_url":"https://avatars.githubusercontent.com/u/8420028?v=3","gravatar_id":"","url":"https://api.github.com/users/liammccartney","html_url":"https://github.com/liammccartney","followers_url":"https://api.github.com/users/liammccartney/followers","following_url":"https://api.github.com/users/liammccartney/following{/other_user}","gists_url":"https://api.github.com/users/liammccartney/gists{/gist_id}","starred_url":"https://api.github.com/users/liammccartney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liammccartney/subscriptions","organizations_url":"https://api.github.com/users/liammccartney/orgs","repos_url":"https://api.github.com/users/liammccartney/repos","events_url":"https://api.github.com/users/liammccartney/events{/privacy}","received_events_url":"https://api.github.com/users/liammccartney/received_events","type":"User","site_admin":false},"body":"Doesn't the `untilFunc` default to `defaultUntil` (which is what `actions.pass()` returns)  if no `config.until` is provided anyway?","created_at":"2016-09-16T20:35:43Z","updated_at":"2016-09-16T20:46:52Z","html_url":"https://github.com/successacademycharterschools/angular-http-polling/pull/6#discussion_r79246409","pull_request_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/pulls/comments/79246409"},"html":{"href":"https://github.com/successacademycharterschools/angular-http-polling/pull/6#discussion_r79246409"},"pull_request":{"href":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/pulls/6","id":85633023,"html_url":"https://github.com/successacademycharterschools/angular-http-polling/pull/6","diff_url":"https://github.com/successacademycharterschools/angular-http-polling/pull/6.diff","patch_url":"https://github.com/successacademycharterschools/angular-http-polling/pull/6.patch","issue_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/issues/6","number":6,"state":"open","locked":false,"title":"Until Actions","user":{"login":"fivepapertigers","id":14054011,"avatar_url":"https://avatars.githubusercontent.com/u/14054011?v=3","gravatar_id":"","url":"https://api.github.com/users/fivepapertigers","html_url":"https://github.com/fivepapertigers","followers_url":"https://api.github.com/users/fivepapertigers/followers","following_url":"https://api.github.com/users/fivepapertigers/following{/other_user}","gists_url":"https://api.github.com/users/fivepapertigers/gists{/gist_id}","starred_url":"https://api.github.com/users/fivepapertigers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fivepapertigers/subscriptions","organizations_url":"https://api.github.com/users/fivepapertigers/orgs","repos_url":"https://api.github.com/users/fivepapertigers/repos","events_url":"https://api.github.com/users/fivepapertigers/events{/privacy}","received_events_url":"https://api.github.com/users/fivepapertigers/received_events","type":"User","site_admin":false},"body":"Adds `actions` parameter to the `until` function that gives user access to methods that do the following:\r\n\r\n`reConfig`: changes the config options for future requests\r\n`pass`: defers to the default `until` functionality","created_at":"2016-09-16T20:13:49Z","updated_at":"2016-09-16T20:46:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c5f67e4c9d27d3dc96af74b007a49cda29500cd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/pulls/6/commits","review_comments_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/pulls/6/comments","review_comment_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/pulls/comments{/number}","comments_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/issues/6/comments","statuses_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/statuses/77803e1edb7078e8a7e6809002eacf16a24003c5","head":{"label":"successacademycharterschools:until-actions","ref":"until-actions","sha":"77803e1edb7078e8a7e6809002eacf16a24003c5","user":{"login":"successacademycharterschools","id":9572557,"avatar_url":"https://avatars.githubusercontent.com/u/9572557?v=3","gravatar_id":"","url":"https://api.github.com/users/successacademycharterschools","html_url":"https://github.com/successacademycharterschools","followers_url":"https://api.github.com/users/successacademycharterschools/followers","following_url":"https://api.github.com/users/successacademycharterschools/following{/other_user}","gists_url":"https://api.github.com/users/successacademycharterschools/gists{/gist_id}","starred_url":"https://api.github.com/users/successacademycharterschools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/successacademycharterschools/subscriptions","organizations_url":"https://api.github.com/users/successacademycharterschools/orgs","repos_url":"https://api.github.com/users/successacademycharterschools/repos","events_url":"https://api.github.com/users/successacademycharterschools/events{/privacy}","received_events_url":"https://api.github.com/users/successacademycharterschools/received_events","type":"Organization","site_admin":false},"repo":{"id":68015233,"name":"angular-http-polling","full_name":"successacademycharterschools/angular-http-polling","owner":{"login":"successacademycharterschools","id":9572557,"avatar_url":"https://avatars.githubusercontent.com/u/9572557?v=3","gravatar_id":"","url":"https://api.github.com/users/successacademycharterschools","html_url":"https://github.com/successacademycharterschools","followers_url":"https://api.github.com/users/successacademycharterschools/followers","following_url":"https://api.github.com/users/successacademycharterschools/following{/other_user}","gists_url":"https://api.github.com/users/successacademycharterschools/gists{/gist_id}","starred_url":"https://api.github.com/users/successacademycharterschools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/successacademycharterschools/subscriptions","organizations_url":"https://api.github.com/users/successacademycharterschools/orgs","repos_url":"https://api.github.com/users/successacademycharterschools/repos","events_url":"https://api.github.com/users/successacademycharterschools/events{/privacy}","received_events_url":"https://api.github.com/users/successacademycharterschools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/successacademycharterschools/angular-http-polling","description":"An AngularJS service that allows for continuously polling an remote server.","fork":false,"url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling","forks_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/forks","keys_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/keys{/key_id}","collaborators_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/teams","hooks_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/hooks","issue_events_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/issues/events{/number}","events_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/events","assignees_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/assignees{/user}","branches_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/branches{/branch}","tags_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/tags","blobs_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/git/refs{/sha}","trees_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/git/trees{/sha}","statuses_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/statuses/{sha}","languages_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/languages","stargazers_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/stargazers","contributors_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/contributors","subscribers_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/subscribers","subscription_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/subscription","commits_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/commits{/sha}","git_commits_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/git/commits{/sha}","comments_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/comments{/number}","issue_comment_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/issues/comments{/number}","contents_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/contents/{+path}","compare_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/compare/{base}...{head}","merges_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/merges","archive_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/downloads","issues_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/issues{/number}","pulls_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/pulls{/number}","milestones_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/milestones{/number}","notifications_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/labels{/name}","releases_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/releases{/id}","deployments_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/deployments","created_at":"2016-09-12T14:12:53Z","updated_at":"2016-09-12T15:14:23Z","pushed_at":"2016-09-16T20:30:52Z","git_url":"git://github.com/successacademycharterschools/angular-http-polling.git","ssh_url":"git@github.com:successacademycharterschools/angular-http-polling.git","clone_url":"https://github.com/successacademycharterschools/angular-http-polling.git","svn_url":"https://github.com/successacademycharterschools/angular-http-polling","homepage":null,"size":38,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"successacademycharterschools:master","ref":"master","sha":"fafc5677166a67935f50561334e35ffea211b396","user":{"login":"successacademycharterschools","id":9572557,"avatar_url":"https://avatars.githubusercontent.com/u/9572557?v=3","gravatar_id":"","url":"https://api.github.com/users/successacademycharterschools","html_url":"https://github.com/successacademycharterschools","followers_url":"https://api.github.com/users/successacademycharterschools/followers","following_url":"https://api.github.com/users/successacademycharterschools/following{/other_user}","gists_url":"https://api.github.com/users/successacademycharterschools/gists{/gist_id}","starred_url":"https://api.github.com/users/successacademycharterschools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/successacademycharterschools/subscriptions","organizations_url":"https://api.github.com/users/successacademycharterschools/orgs","repos_url":"https://api.github.com/users/successacademycharterschools/repos","events_url":"https://api.github.com/users/successacademycharterschools/events{/privacy}","received_events_url":"https://api.github.com/users/successacademycharterschools/received_events","type":"Organization","site_admin":false},"repo":{"id":68015233,"name":"angular-http-polling","full_name":"successacademycharterschools/angular-http-polling","owner":{"login":"successacademycharterschools","id":9572557,"avatar_url":"https://avatars.githubusercontent.com/u/9572557?v=3","gravatar_id":"","url":"https://api.github.com/users/successacademycharterschools","html_url":"https://github.com/successacademycharterschools","followers_url":"https://api.github.com/users/successacademycharterschools/followers","following_url":"https://api.github.com/users/successacademycharterschools/following{/other_user}","gists_url":"https://api.github.com/users/successacademycharterschools/gists{/gist_id}","starred_url":"https://api.github.com/users/successacademycharterschools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/successacademycharterschools/subscriptions","organizations_url":"https://api.github.com/users/successacademycharterschools/orgs","repos_url":"https://api.github.com/users/successacademycharterschools/repos","events_url":"https://api.github.com/users/successacademycharterschools/events{/privacy}","received_events_url":"https://api.github.com/users/successacademycharterschools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/successacademycharterschools/angular-http-polling","description":"An AngularJS service that allows for continuously polling an remote server.","fork":false,"url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling","forks_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/forks","keys_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/keys{/key_id}","collaborators_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/teams","hooks_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/hooks","issue_events_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/issues/events{/number}","events_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/events","assignees_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/assignees{/user}","branches_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/branches{/branch}","tags_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/tags","blobs_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/git/refs{/sha}","trees_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/git/trees{/sha}","statuses_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/statuses/{sha}","languages_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/languages","stargazers_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/stargazers","contributors_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/contributors","subscribers_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/subscribers","subscription_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/subscription","commits_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/commits{/sha}","git_commits_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/git/commits{/sha}","comments_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/comments{/number}","issue_comment_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/issues/comments{/number}","contents_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/contents/{+path}","compare_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/compare/{base}...{head}","merges_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/merges","archive_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/downloads","issues_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/issues{/number}","pulls_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/pulls{/number}","milestones_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/milestones{/number}","notifications_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/labels{/name}","releases_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/releases{/id}","deployments_url":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/deployments","created_at":"2016-09-12T14:12:53Z","updated_at":"2016-09-12T15:14:23Z","pushed_at":"2016-09-16T20:30:52Z","git_url":"git://github.com/successacademycharterschools/angular-http-polling.git","ssh_url":"git@github.com:successacademycharterschools/angular-http-polling.git","clone_url":"https://github.com/successacademycharterschools/angular-http-polling.git","svn_url":"https://github.com/successacademycharterschools/angular-http-polling","homepage":null,"size":38,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/pulls/6"},"html":{"href":"https://github.com/successacademycharterschools/angular-http-polling/pull/6"},"issue":{"href":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/issues/6"},"comments":{"href":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/successacademycharterschools/angular-http-polling/statuses/77803e1edb7078e8a7e6809002eacf16a24003c5"}}}}
{"actor":{"display_login":"liammccartney"}}