{"action":"created","comment":{"url":"https://api.github.com/repos/ember-cli/ember-ajax/pulls/comments/49267508","id":49267508,"diff_hunk":"@@ -113,9 +113,9 @@ export default Ember.Service.extend({\n         );\n \n         if (response instanceof AjaxError) {\n-          reject(response);\n+          Ember.run.join(null, reject, response);","path":"addon/services/ajax.js","position":5,"original_position":5,"commit_id":"a789ec480e903f2760dbb9efa53174faa6304b6b","original_commit_id":"a789ec480e903f2760dbb9efa53174faa6304b6b","user":{"login":"stefanpenner","id":1377,"avatar_url":"https://avatars.githubusercontent.com/u/1377?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanpenner","html_url":"https://github.com/stefanpenner","followers_url":"https://api.github.com/users/stefanpenner/followers","following_url":"https://api.github.com/users/stefanpenner/following{/other_user}","gists_url":"https://api.github.com/users/stefanpenner/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanpenner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanpenner/subscriptions","organizations_url":"https://api.github.com/users/stefanpenner/orgs","repos_url":"https://api.github.com/users/stefanpenner/repos","events_url":"https://api.github.com/users/stefanpenner/events{/privacy}","received_events_url":"https://api.github.com/users/stefanpenner/received_events","type":"User","site_admin":false},"body":"> @rwjblue create wait() for this purpose. This helper relies on the run loop to know if all scheduled timers have been cleared before resolving the wait()\r\n\r\nthis isn't correct,  `wait` doesn't detect run-lops rather explicitly detects promises async https://github.com/emberjs/ember.js/blob/master/packages/ember-runtime/lib/ext/rsvp.js#L28 ","created_at":"2016-01-09T19:44:58Z","updated_at":"2016-01-09T19:44:58Z","html_url":"https://github.com/ember-cli/ember-ajax/pull/40#discussion_r49267508","pull_request_url":"https://api.github.com/repos/ember-cli/ember-ajax/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/ember-cli/ember-ajax/pulls/comments/49267508"},"html":{"href":"https://github.com/ember-cli/ember-ajax/pull/40#discussion_r49267508"},"pull_request":{"href":"https://api.github.com/repos/ember-cli/ember-ajax/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/ember-cli/ember-ajax/pulls/40","id":55181462,"html_url":"https://github.com/ember-cli/ember-ajax/pull/40","diff_url":"https://github.com/ember-cli/ember-ajax/pull/40.diff","patch_url":"https://github.com/ember-cli/ember-ajax/pull/40.patch","issue_url":"https://api.github.com/repos/ember-cli/ember-ajax/issues/40","number":40,"state":"open","locked":false,"title":"Wrap request handlers in Ember run loop","user":{"login":"alexlafroscia","id":1645881,"avatar_url":"https://avatars.githubusercontent.com/u/1645881?v=3","gravatar_id":"","url":"https://api.github.com/users/alexlafroscia","html_url":"https://github.com/alexlafroscia","followers_url":"https://api.github.com/users/alexlafroscia/followers","following_url":"https://api.github.com/users/alexlafroscia/following{/other_user}","gists_url":"https://api.github.com/users/alexlafroscia/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlafroscia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlafroscia/subscriptions","organizations_url":"https://api.github.com/users/alexlafroscia/orgs","repos_url":"https://api.github.com/users/alexlafroscia/repos","events_url":"https://api.github.com/users/alexlafroscia/events{/privacy}","received_events_url":"https://api.github.com/users/alexlafroscia/received_events","type":"User","site_admin":false},"body":"- Re-implements `Ember.run` wrapping of handler code, as mentioned here -> https://github.com/ember-cli/ember-ajax/issues/19#issuecomment-169190521\n- Adds documentation regarding run loop wrapping, as well as other general cleanup of the Readme","created_at":"2016-01-06T06:30:56Z","updated_at":"2016-01-09T19:44:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51df9957e8e64e2c94ea9862486f2a51db8ab002","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ember-cli/ember-ajax/pulls/40/commits","review_comments_url":"https://api.github.com/repos/ember-cli/ember-ajax/pulls/40/comments","review_comment_url":"https://api.github.com/repos/ember-cli/ember-ajax/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ember-cli/ember-ajax/issues/40/comments","statuses_url":"https://api.github.com/repos/ember-cli/ember-ajax/statuses/a789ec480e903f2760dbb9efa53174faa6304b6b","head":{"label":"alexlafroscia:add-ember-run-wrapper","ref":"add-ember-run-wrapper","sha":"a789ec480e903f2760dbb9efa53174faa6304b6b","user":{"login":"alexlafroscia","id":1645881,"avatar_url":"https://avatars.githubusercontent.com/u/1645881?v=3","gravatar_id":"","url":"https://api.github.com/users/alexlafroscia","html_url":"https://github.com/alexlafroscia","followers_url":"https://api.github.com/users/alexlafroscia/followers","following_url":"https://api.github.com/users/alexlafroscia/following{/other_user}","gists_url":"https://api.github.com/users/alexlafroscia/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlafroscia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlafroscia/subscriptions","organizations_url":"https://api.github.com/users/alexlafroscia/orgs","repos_url":"https://api.github.com/users/alexlafroscia/repos","events_url":"https://api.github.com/users/alexlafroscia/events{/privacy}","received_events_url":"https://api.github.com/users/alexlafroscia/received_events","type":"User","site_admin":false},"repo":{"id":49034356,"name":"ember-ajax","full_name":"alexlafroscia/ember-ajax","owner":{"login":"alexlafroscia","id":1645881,"avatar_url":"https://avatars.githubusercontent.com/u/1645881?v=3","gravatar_id":"","url":"https://api.github.com/users/alexlafroscia","html_url":"https://github.com/alexlafroscia","followers_url":"https://api.github.com/users/alexlafroscia/followers","following_url":"https://api.github.com/users/alexlafroscia/following{/other_user}","gists_url":"https://api.github.com/users/alexlafroscia/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlafroscia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlafroscia/subscriptions","organizations_url":"https://api.github.com/users/alexlafroscia/orgs","repos_url":"https://api.github.com/users/alexlafroscia/repos","events_url":"https://api.github.com/users/alexlafroscia/events{/privacy}","received_events_url":"https://api.github.com/users/alexlafroscia/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexlafroscia/ember-ajax","description":"","fork":true,"url":"https://api.github.com/repos/alexlafroscia/ember-ajax","forks_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/forks","keys_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/teams","hooks_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/hooks","issue_events_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/issues/events{/number}","events_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/events","assignees_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/assignees{/user}","branches_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/branches{/branch}","tags_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/tags","blobs_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/statuses/{sha}","languages_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/languages","stargazers_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/stargazers","contributors_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/contributors","subscribers_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/subscribers","subscription_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/subscription","commits_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/contents/{+path}","compare_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/merges","archive_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/downloads","issues_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/issues{/number}","pulls_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/pulls{/number}","milestones_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/milestones{/number}","notifications_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/labels{/name}","releases_url":"https://api.github.com/repos/alexlafroscia/ember-ajax/releases{/id}","created_at":"2016-01-05T01:37:26Z","updated_at":"2016-01-05T01:37:27Z","pushed_at":"2016-01-09T03:56:43Z","git_url":"git://github.com/alexlafroscia/ember-ajax.git","ssh_url":"git@github.com:alexlafroscia/ember-ajax.git","clone_url":"https://github.com/alexlafroscia/ember-ajax.git","svn_url":"https://github.com/alexlafroscia/ember-ajax","homepage":null,"size":119,"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-cli:master","ref":"master","sha":"ae43bfa9009fdcff782948d9aca9fe35d3b15621","user":{"login":"ember-cli","id":10262982,"avatar_url":"https://avatars.githubusercontent.com/u/10262982?v=3","gravatar_id":"","url":"https://api.github.com/users/ember-cli","html_url":"https://github.com/ember-cli","followers_url":"https://api.github.com/users/ember-cli/followers","following_url":"https://api.github.com/users/ember-cli/following{/other_user}","gists_url":"https://api.github.com/users/ember-cli/gists{/gist_id}","starred_url":"https://api.github.com/users/ember-cli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ember-cli/subscriptions","organizations_url":"https://api.github.com/users/ember-cli/orgs","repos_url":"https://api.github.com/users/ember-cli/repos","events_url":"https://api.github.com/users/ember-cli/events{/privacy}","received_events_url":"https://api.github.com/users/ember-cli/received_events","type":"Organization","site_admin":false},"repo":{"id":32269638,"name":"ember-ajax","full_name":"ember-cli/ember-ajax","owner":{"login":"ember-cli","id":10262982,"avatar_url":"https://avatars.githubusercontent.com/u/10262982?v=3","gravatar_id":"","url":"https://api.github.com/users/ember-cli","html_url":"https://github.com/ember-cli","followers_url":"https://api.github.com/users/ember-cli/followers","following_url":"https://api.github.com/users/ember-cli/following{/other_user}","gists_url":"https://api.github.com/users/ember-cli/gists{/gist_id}","starred_url":"https://api.github.com/users/ember-cli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ember-cli/subscriptions","organizations_url":"https://api.github.com/users/ember-cli/orgs","repos_url":"https://api.github.com/users/ember-cli/repos","events_url":"https://api.github.com/users/ember-cli/events{/privacy}","received_events_url":"https://api.github.com/users/ember-cli/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ember-cli/ember-ajax","description":"","fork":false,"url":"https://api.github.com/repos/ember-cli/ember-ajax","forks_url":"https://api.github.com/repos/ember-cli/ember-ajax/forks","keys_url":"https://api.github.com/repos/ember-cli/ember-ajax/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ember-cli/ember-ajax/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ember-cli/ember-ajax/teams","hooks_url":"https://api.github.com/repos/ember-cli/ember-ajax/hooks","issue_events_url":"https://api.github.com/repos/ember-cli/ember-ajax/issues/events{/number}","events_url":"https://api.github.com/repos/ember-cli/ember-ajax/events","assignees_url":"https://api.github.com/repos/ember-cli/ember-ajax/assignees{/user}","branches_url":"https://api.github.com/repos/ember-cli/ember-ajax/branches{/branch}","tags_url":"https://api.github.com/repos/ember-cli/ember-ajax/tags","blobs_url":"https://api.github.com/repos/ember-cli/ember-ajax/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ember-cli/ember-ajax/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ember-cli/ember-ajax/git/refs{/sha}","trees_url":"https://api.github.com/repos/ember-cli/ember-ajax/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ember-cli/ember-ajax/statuses/{sha}","languages_url":"https://api.github.com/repos/ember-cli/ember-ajax/languages","stargazers_url":"https://api.github.com/repos/ember-cli/ember-ajax/stargazers","contributors_url":"https://api.github.com/repos/ember-cli/ember-ajax/contributors","subscribers_url":"https://api.github.com/repos/ember-cli/ember-ajax/subscribers","subscription_url":"https://api.github.com/repos/ember-cli/ember-ajax/subscription","commits_url":"https://api.github.com/repos/ember-cli/ember-ajax/commits{/sha}","git_commits_url":"https://api.github.com/repos/ember-cli/ember-ajax/git/commits{/sha}","comments_url":"https://api.github.com/repos/ember-cli/ember-ajax/comments{/number}","issue_comment_url":"https://api.github.com/repos/ember-cli/ember-ajax/issues/comments{/number}","contents_url":"https://api.github.com/repos/ember-cli/ember-ajax/contents/{+path}","compare_url":"https://api.github.com/repos/ember-cli/ember-ajax/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ember-cli/ember-ajax/merges","archive_url":"https://api.github.com/repos/ember-cli/ember-ajax/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ember-cli/ember-ajax/downloads","issues_url":"https://api.github.com/repos/ember-cli/ember-ajax/issues{/number}","pulls_url":"https://api.github.com/repos/ember-cli/ember-ajax/pulls{/number}","milestones_url":"https://api.github.com/repos/ember-cli/ember-ajax/milestones{/number}","notifications_url":"https://api.github.com/repos/ember-cli/ember-ajax/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ember-cli/ember-ajax/labels{/name}","releases_url":"https://api.github.com/repos/ember-cli/ember-ajax/releases{/id}","created_at":"2015-03-15T16:05:32Z","updated_at":"2016-01-05T20:14:33Z","pushed_at":"2016-01-09T03:58:11Z","git_url":"git://github.com/ember-cli/ember-ajax.git","ssh_url":"git@github.com:ember-cli/ember-ajax.git","clone_url":"https://github.com/ember-cli/ember-ajax.git","svn_url":"https://github.com/ember-cli/ember-ajax","homepage":null,"size":93,"stargazers_count":33,"watchers_count":33,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":16,"forks":15,"open_issues":16,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ember-cli/ember-ajax/pulls/40"},"html":{"href":"https://github.com/ember-cli/ember-ajax/pull/40"},"issue":{"href":"https://api.github.com/repos/ember-cli/ember-ajax/issues/40"},"comments":{"href":"https://api.github.com/repos/ember-cli/ember-ajax/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/ember-cli/ember-ajax/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/ember-cli/ember-ajax/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ember-cli/ember-ajax/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/ember-cli/ember-ajax/statuses/a789ec480e903f2760dbb9efa53174faa6304b6b"}}}}