{"action":"created","comment":{"url":"https://api.github.com/repos/emberjs/ember.js/pulls/comments/22759631","id":22759631,"diff_hunk":"@@ -693,9 +693,15 @@ var Application = Namespace.extend(DeferredMixin, {\n     var namespace = this;\n     var initializer;\n \n+    var makeGraphValue = function(initializer) {\n+      return function() {\n+        return initializer.initialize.apply(initializer, arguments);","path":"packages/ember-application/lib/system/application.js","position":6,"original_position":6,"commit_id":"a97c19e667c23bfea6162e582122204d4fa66050","original_commit_id":"a97c19e667c23bfea6162e582122204d4fa66050","user":{"login":"manoharank","id":1687297,"avatar_url":"https://avatars.githubusercontent.com/u/1687297?v=3","gravatar_id":"","url":"https://api.github.com/users/manoharank","html_url":"https://github.com/manoharank","followers_url":"https://api.github.com/users/manoharank/followers","following_url":"https://api.github.com/users/manoharank/following{/other_user}","gists_url":"https://api.github.com/users/manoharank/gists{/gist_id}","starred_url":"https://api.github.com/users/manoharank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manoharank/subscriptions","organizations_url":"https://api.github.com/users/manoharank/orgs","repos_url":"https://api.github.com/users/manoharank/repos","events_url":"https://api.github.com/users/manoharank/events{/privacy}","received_events_url":"https://api.github.com/users/manoharank/received_events","type":"User","site_admin":false},"body":"@rwjblue It may may helpful when changing the arguments of initialize function in future (not sure).","created_at":"2015-01-10T15:40:27Z","updated_at":"2015-01-10T15:40:27Z","html_url":"https://github.com/emberjs/ember.js/pull/10179#discussion_r22759631","pull_request_url":"https://api.github.com/repos/emberjs/ember.js/pulls/10179","_links":{"self":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/comments/22759631"},"html":{"href":"https://github.com/emberjs/ember.js/pull/10179#discussion_r22759631"},"pull_request":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/10179"}}},"pull_request":{"url":"https://api.github.com/repos/emberjs/ember.js/pulls/10179","id":27128878,"html_url":"https://github.com/emberjs/ember.js/pull/10179","diff_url":"https://github.com/emberjs/ember.js/pull/10179.diff","patch_url":"https://github.com/emberjs/ember.js/pull/10179.patch","issue_url":"https://api.github.com/repos/emberjs/ember.js/issues/10179","number":10179,"state":"open","locked":false,"title":"Execute initializers in their respective context","user":{"login":"gf3","id":18397,"avatar_url":"https://avatars.githubusercontent.com/u/18397?v=3","gravatar_id":"","url":"https://api.github.com/users/gf3","html_url":"https://github.com/gf3","followers_url":"https://api.github.com/users/gf3/followers","following_url":"https://api.github.com/users/gf3/following{/other_user}","gists_url":"https://api.github.com/users/gf3/gists{/gist_id}","starred_url":"https://api.github.com/users/gf3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gf3/subscriptions","organizations_url":"https://api.github.com/users/gf3/orgs","repos_url":"https://api.github.com/users/gf3/repos","events_url":"https://api.github.com/users/gf3/events{/privacy}","received_events_url":"https://api.github.com/users/gf3/received_events","type":"User","site_admin":false},"body":"Currently initializers are executed in the global context; this small but useful change will execute the `initialize` function in the context of its object. Below is an example of where something like this would come in handy. In the example sometimes it's useful (especially with testing) to be able to reset `app-state` or to switch out various app states at different times.\r\n\r\n``` javascript\r\nimport Ember from 'ember';\r\n\r\nexport default {\r\n  name: 'app-state',\r\n\r\n  state() {\r\n    return Ember.Object.create({\r\n      components:  Ember.Object.create(),\r\n      controllers: Ember.Object.create(),\r\n      routes:      Ember.Object.create(),\r\n      views:       Ember.Object.create(),\r\n    });\r\n  },\r\n\r\n  initialize(container, app) {\r\n    app.register('state:main', this.state(), { instantiate: false });\r\n\r\n    app.inject('component',  'app-state', 'state:main');\r\n    app.inject('controller', 'app-state', 'state:main');\r\n    app.inject('route',      'app-state', 'state:main');\r\n    app.inject('view',       'app-state', 'state:main');\r\n  }\r\n};\r\n```","created_at":"2015-01-09T21:01:22Z","updated_at":"2015-01-10T15:40:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6743ce42f6e7e31f2bd6e67bc9942b9a7c31231b","assignee":{"login":"trek","id":9736,"avatar_url":"https://avatars.githubusercontent.com/u/9736?v=3","gravatar_id":"","url":"https://api.github.com/users/trek","html_url":"https://github.com/trek","followers_url":"https://api.github.com/users/trek/followers","following_url":"https://api.github.com/users/trek/following{/other_user}","gists_url":"https://api.github.com/users/trek/gists{/gist_id}","starred_url":"https://api.github.com/users/trek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trek/subscriptions","organizations_url":"https://api.github.com/users/trek/orgs","repos_url":"https://api.github.com/users/trek/repos","events_url":"https://api.github.com/users/trek/events{/privacy}","received_events_url":"https://api.github.com/users/trek/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/emberjs/ember.js/pulls/10179/commits","review_comments_url":"https://api.github.com/repos/emberjs/ember.js/pulls/10179/comments","review_comment_url":"https://api.github.com/repos/emberjs/ember.js/pulls/comments/{number}","comments_url":"https://api.github.com/repos/emberjs/ember.js/issues/10179/comments","statuses_url":"https://api.github.com/repos/emberjs/ember.js/statuses/a97c19e667c23bfea6162e582122204d4fa66050","head":{"label":"gf3:initializer-context","ref":"initializer-context","sha":"a97c19e667c23bfea6162e582122204d4fa66050","user":{"login":"gf3","id":18397,"avatar_url":"https://avatars.githubusercontent.com/u/18397?v=3","gravatar_id":"","url":"https://api.github.com/users/gf3","html_url":"https://github.com/gf3","followers_url":"https://api.github.com/users/gf3/followers","following_url":"https://api.github.com/users/gf3/following{/other_user}","gists_url":"https://api.github.com/users/gf3/gists{/gist_id}","starred_url":"https://api.github.com/users/gf3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gf3/subscriptions","organizations_url":"https://api.github.com/users/gf3/orgs","repos_url":"https://api.github.com/users/gf3/repos","events_url":"https://api.github.com/users/gf3/events{/privacy}","received_events_url":"https://api.github.com/users/gf3/received_events","type":"User","site_admin":false},"repo":{"id":29030119,"name":"ember.js","full_name":"gf3/ember.js","owner":{"login":"gf3","id":18397,"avatar_url":"https://avatars.githubusercontent.com/u/18397?v=3","gravatar_id":"","url":"https://api.github.com/users/gf3","html_url":"https://github.com/gf3","followers_url":"https://api.github.com/users/gf3/followers","following_url":"https://api.github.com/users/gf3/following{/other_user}","gists_url":"https://api.github.com/users/gf3/gists{/gist_id}","starred_url":"https://api.github.com/users/gf3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gf3/subscriptions","organizations_url":"https://api.github.com/users/gf3/orgs","repos_url":"https://api.github.com/users/gf3/repos","events_url":"https://api.github.com/users/gf3/events{/privacy}","received_events_url":"https://api.github.com/users/gf3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gf3/ember.js","description":"Ember.js - A JavaScript framework for creating ambitious web applications","fork":true,"url":"https://api.github.com/repos/gf3/ember.js","forks_url":"https://api.github.com/repos/gf3/ember.js/forks","keys_url":"https://api.github.com/repos/gf3/ember.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gf3/ember.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gf3/ember.js/teams","hooks_url":"https://api.github.com/repos/gf3/ember.js/hooks","issue_events_url":"https://api.github.com/repos/gf3/ember.js/issues/events{/number}","events_url":"https://api.github.com/repos/gf3/ember.js/events","assignees_url":"https://api.github.com/repos/gf3/ember.js/assignees{/user}","branches_url":"https://api.github.com/repos/gf3/ember.js/branches{/branch}","tags_url":"https://api.github.com/repos/gf3/ember.js/tags","blobs_url":"https://api.github.com/repos/gf3/ember.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gf3/ember.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gf3/ember.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/gf3/ember.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gf3/ember.js/statuses/{sha}","languages_url":"https://api.github.com/repos/gf3/ember.js/languages","stargazers_url":"https://api.github.com/repos/gf3/ember.js/stargazers","contributors_url":"https://api.github.com/repos/gf3/ember.js/contributors","subscribers_url":"https://api.github.com/repos/gf3/ember.js/subscribers","subscription_url":"https://api.github.com/repos/gf3/ember.js/subscription","commits_url":"https://api.github.com/repos/gf3/ember.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/gf3/ember.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/gf3/ember.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/gf3/ember.js/issues/comments/{number}","contents_url":"https://api.github.com/repos/gf3/ember.js/contents/{+path}","compare_url":"https://api.github.com/repos/gf3/ember.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gf3/ember.js/merges","archive_url":"https://api.github.com/repos/gf3/ember.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gf3/ember.js/downloads","issues_url":"https://api.github.com/repos/gf3/ember.js/issues{/number}","pulls_url":"https://api.github.com/repos/gf3/ember.js/pulls{/number}","milestones_url":"https://api.github.com/repos/gf3/ember.js/milestones{/number}","notifications_url":"https://api.github.com/repos/gf3/ember.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gf3/ember.js/labels{/name}","releases_url":"https://api.github.com/repos/gf3/ember.js/releases{/id}","created_at":"2015-01-09T18:46:34Z","updated_at":"2015-01-09T18:46:37Z","pushed_at":"2015-01-09T20:55:50Z","git_url":"git://github.com/gf3/ember.js.git","ssh_url":"git@github.com:gf3/ember.js.git","clone_url":"https://github.com/gf3/ember.js.git","svn_url":"https://github.com/gf3/ember.js","homepage":"http://www.emberjs.com","size":65053,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"emberjs:master","ref":"master","sha":"7a4a281749fcf623c3c771eb1dece1e43caf61a3","user":{"login":"emberjs","id":1253363,"avatar_url":"https://avatars.githubusercontent.com/u/1253363?v=3","gravatar_id":"","url":"https://api.github.com/users/emberjs","html_url":"https://github.com/emberjs","followers_url":"https://api.github.com/users/emberjs/followers","following_url":"https://api.github.com/users/emberjs/following{/other_user}","gists_url":"https://api.github.com/users/emberjs/gists{/gist_id}","starred_url":"https://api.github.com/users/emberjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emberjs/subscriptions","organizations_url":"https://api.github.com/users/emberjs/orgs","repos_url":"https://api.github.com/users/emberjs/repos","events_url":"https://api.github.com/users/emberjs/events{/privacy}","received_events_url":"https://api.github.com/users/emberjs/received_events","type":"Organization","site_admin":false},"repo":{"id":1801829,"name":"ember.js","full_name":"emberjs/ember.js","owner":{"login":"emberjs","id":1253363,"avatar_url":"https://avatars.githubusercontent.com/u/1253363?v=3","gravatar_id":"","url":"https://api.github.com/users/emberjs","html_url":"https://github.com/emberjs","followers_url":"https://api.github.com/users/emberjs/followers","following_url":"https://api.github.com/users/emberjs/following{/other_user}","gists_url":"https://api.github.com/users/emberjs/gists{/gist_id}","starred_url":"https://api.github.com/users/emberjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emberjs/subscriptions","organizations_url":"https://api.github.com/users/emberjs/orgs","repos_url":"https://api.github.com/users/emberjs/repos","events_url":"https://api.github.com/users/emberjs/events{/privacy}","received_events_url":"https://api.github.com/users/emberjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/emberjs/ember.js","description":"Ember.js - A JavaScript framework for creating ambitious web applications","fork":false,"url":"https://api.github.com/repos/emberjs/ember.js","forks_url":"https://api.github.com/repos/emberjs/ember.js/forks","keys_url":"https://api.github.com/repos/emberjs/ember.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emberjs/ember.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emberjs/ember.js/teams","hooks_url":"https://api.github.com/repos/emberjs/ember.js/hooks","issue_events_url":"https://api.github.com/repos/emberjs/ember.js/issues/events{/number}","events_url":"https://api.github.com/repos/emberjs/ember.js/events","assignees_url":"https://api.github.com/repos/emberjs/ember.js/assignees{/user}","branches_url":"https://api.github.com/repos/emberjs/ember.js/branches{/branch}","tags_url":"https://api.github.com/repos/emberjs/ember.js/tags","blobs_url":"https://api.github.com/repos/emberjs/ember.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emberjs/ember.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emberjs/ember.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/emberjs/ember.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emberjs/ember.js/statuses/{sha}","languages_url":"https://api.github.com/repos/emberjs/ember.js/languages","stargazers_url":"https://api.github.com/repos/emberjs/ember.js/stargazers","contributors_url":"https://api.github.com/repos/emberjs/ember.js/contributors","subscribers_url":"https://api.github.com/repos/emberjs/ember.js/subscribers","subscription_url":"https://api.github.com/repos/emberjs/ember.js/subscription","commits_url":"https://api.github.com/repos/emberjs/ember.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/emberjs/ember.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/emberjs/ember.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/emberjs/ember.js/issues/comments/{number}","contents_url":"https://api.github.com/repos/emberjs/ember.js/contents/{+path}","compare_url":"https://api.github.com/repos/emberjs/ember.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emberjs/ember.js/merges","archive_url":"https://api.github.com/repos/emberjs/ember.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emberjs/ember.js/downloads","issues_url":"https://api.github.com/repos/emberjs/ember.js/issues{/number}","pulls_url":"https://api.github.com/repos/emberjs/ember.js/pulls{/number}","milestones_url":"https://api.github.com/repos/emberjs/ember.js/milestones{/number}","notifications_url":"https://api.github.com/repos/emberjs/ember.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emberjs/ember.js/labels{/name}","releases_url":"https://api.github.com/repos/emberjs/ember.js/releases{/id}","created_at":"2011-05-25T23:39:40Z","updated_at":"2015-01-10T15:21:13Z","pushed_at":"2015-01-10T00:39:21Z","git_url":"git://github.com/emberjs/ember.js.git","ssh_url":"git@github.com:emberjs/ember.js.git","clone_url":"https://github.com/emberjs/ember.js.git","svn_url":"https://github.com/emberjs/ember.js","homepage":"http://www.emberjs.com","size":65053,"stargazers_count":12337,"watchers_count":12337,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2659,"mirror_url":null,"open_issues_count":233,"forks":2659,"open_issues":233,"watchers":12337,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/10179"},"html":{"href":"https://github.com/emberjs/ember.js/pull/10179"},"issue":{"href":"https://api.github.com/repos/emberjs/ember.js/issues/10179"},"comments":{"href":"https://api.github.com/repos/emberjs/ember.js/issues/10179/comments"},"review_comments":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/10179/comments"},"review_comment":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/10179/commits"},"statuses":{"href":"https://api.github.com/repos/emberjs/ember.js/statuses/a97c19e667c23bfea6162e582122204d4fa66050"}}}}