{"action":"created","issue":{"url":"https://api.github.com/repos/cibernox/ember-cpm/issues/132","labels_url":"https://api.github.com/repos/cibernox/ember-cpm/issues/132/labels{/name}","comments_url":"https://api.github.com/repos/cibernox/ember-cpm/issues/132/comments","events_url":"https://api.github.com/repos/cibernox/ember-cpm/issues/132/events","html_url":"https://github.com/cibernox/ember-cpm/pull/132","id":125015241,"number":132,"title":"Add computed promise macro","user":{"login":"rondale-sc","id":75710,"avatar_url":"https://avatars.githubusercontent.com/u/75710?v=3","gravatar_id":"","url":"https://api.github.com/users/rondale-sc","html_url":"https://github.com/rondale-sc","followers_url":"https://api.github.com/users/rondale-sc/followers","following_url":"https://api.github.com/users/rondale-sc/following{/other_user}","gists_url":"https://api.github.com/users/rondale-sc/gists{/gist_id}","starred_url":"https://api.github.com/users/rondale-sc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rondale-sc/subscriptions","organizations_url":"https://api.github.com/users/rondale-sc/orgs","repos_url":"https://api.github.com/users/rondale-sc/repos","events_url":"https://api.github.com/users/rondale-sc/events{/privacy}","received_events_url":"https://api.github.com/users/rondale-sc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-05T17:39:53Z","updated_at":"2016-01-05T20:13:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cibernox/ember-cpm/pulls/132","html_url":"https://github.com/cibernox/ember-cpm/pull/132","diff_url":"https://github.com/cibernox/ember-cpm/pull/132.diff","patch_url":"https://github.com/cibernox/ember-cpm/pull/132.patch"},"body":"Updates computed property when supplied callback (which must return a promise) is resolved.\r\n\r\nExample\r\n\r\n```javascript\r\nmyObject = Ember.Object.extend({\r\n  data: promiseObject('dep', function(){\r\n    return ajax('/data.json');\r\n  })\r\n})\r\n\r\nmyObject.get('data') // => undefined\r\n\r\n// once resolved\r\n\r\nmyObject.get('data') // => { foo: 'bar' };\r\n```\r\n\r\nFor example, if you have a template that renders `data` when the promise is resolved the template will be updated.\r\n\r\n/ht @rwjblue (for help / pairing time) :beers:"},"comment":{"url":"https://api.github.com/repos/cibernox/ember-cpm/issues/comments/169118476","html_url":"https://github.com/cibernox/ember-cpm/pull/132#issuecomment-169118476","issue_url":"https://api.github.com/repos/cibernox/ember-cpm/issues/132","id":169118476,"user":{"login":"rwjblue","id":12637,"avatar_url":"https://avatars.githubusercontent.com/u/12637?v=3","gravatar_id":"","url":"https://api.github.com/users/rwjblue","html_url":"https://github.com/rwjblue","followers_url":"https://api.github.com/users/rwjblue/followers","following_url":"https://api.github.com/users/rwjblue/following{/other_user}","gists_url":"https://api.github.com/users/rwjblue/gists{/gist_id}","starred_url":"https://api.github.com/users/rwjblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwjblue/subscriptions","organizations_url":"https://api.github.com/users/rwjblue/orgs","repos_url":"https://api.github.com/users/rwjblue/repos","events_url":"https://api.github.com/users/rwjblue/events{/privacy}","received_events_url":"https://api.github.com/users/rwjblue/received_events","type":"User","site_admin":false},"created_at":"2016-01-05T20:13:20Z","updated_at":"2016-01-05T20:13:20Z","body":"Firstly, that is what @rondale-sc had before I made him change it :smiling_imp: (hopefully he isn't angry :stuck_out_tongue_closed_eyes:)...\r\n\r\nSecondly, it isn't terribly different, but it does avoid using a proxy object which has some negative performance implications.  It also allows the resulting value to actually be the promise resolution value instead of the proxy object (which you then have to peal off `.content` on to get the raw value)."}}