{"action":"created","comment":{"url":"https://api.github.com/repos/incuna/incuna-surveys/pulls/comments/74920327","id":74920327,"diff_hunk":"@@ -17,10 +22,16 @@ export const api = function ($http, PROJECT_SETTINGS) {\n     }\n };\n \n-export const service = [\n-    '$http',\n-    'PROJECT_SETTINGS',\n-    api\n-];\n+export const module = {\n+    moduleName: 'incuna.surveys-api',\n+    componentName: 'API'\n+};\n+\n+angular.module(module.moduleName, [ProjectConfig.moduleName])\n+    .service([\n+        '$http',\n+        ProjectConfig.componentName,\n+        API","path":"web/app/scripts/src/services/api.es.js","position":34,"original_position":34,"commit_id":"3da20531f4cf265f5fb8ecbd6ccdf65a3e91c986","original_commit_id":"3da20531f4cf265f5fb8ecbd6ccdf65a3e91c986","user":{"login":"wytrych","id":10600101,"avatar_url":"https://avatars.githubusercontent.com/u/10600101?v=3","gravatar_id":"","url":"https://api.github.com/users/wytrych","html_url":"https://github.com/wytrych","followers_url":"https://api.github.com/users/wytrych/followers","following_url":"https://api.github.com/users/wytrych/following{/other_user}","gists_url":"https://api.github.com/users/wytrych/gists{/gist_id}","starred_url":"https://api.github.com/users/wytrych/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wytrych/subscriptions","organizations_url":"https://api.github.com/users/wytrych/orgs","repos_url":"https://api.github.com/users/wytrych/repos","events_url":"https://api.github.com/users/wytrych/events{/privacy}","received_events_url":"https://api.github.com/users/wytrych/received_events","type":"User","site_admin":false},"body":"I expose it for easier mocking, I think it's a bit easier to just pass in a mock module than to use the `injector()` syntax.\r\n\r\nI'm not bothered too much with this syntax:\r\n1) you have one indendation level less if you define it as a function\r\n2) you still see the modules being imported where the function is defined\r\n\r\nI would like to keep it this way","created_at":"2016-08-16T11:56:39Z","updated_at":"2016-08-16T11:56:39Z","html_url":"https://github.com/incuna/incuna-surveys/pull/19#discussion_r74920327","pull_request_url":"https://api.github.com/repos/incuna/incuna-surveys/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/incuna/incuna-surveys/pulls/comments/74920327"},"html":{"href":"https://github.com/incuna/incuna-surveys/pull/19#discussion_r74920327"},"pull_request":{"href":"https://api.github.com/repos/incuna/incuna-surveys/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/incuna/incuna-surveys/pulls/19","id":81292056,"html_url":"https://github.com/incuna/incuna-surveys/pull/19","diff_url":"https://github.com/incuna/incuna-surveys/pull/19.diff","patch_url":"https://github.com/incuna/incuna-surveys/pull/19.patch","issue_url":"https://api.github.com/repos/incuna/incuna-surveys/issues/19","number":19,"state":"open","locked":false,"title":"Use a ProjectConfig module instead of PROJECT_SETTINGS","user":{"login":"wytrych","id":10600101,"avatar_url":"https://avatars.githubusercontent.com/u/10600101?v=3","gravatar_id":"","url":"https://api.github.com/users/wytrych","html_url":"https://github.com/wytrych","followers_url":"https://api.github.com/users/wytrych/followers","following_url":"https://api.github.com/users/wytrych/following{/other_user}","gists_url":"https://api.github.com/users/wytrych/gists{/gist_id}","starred_url":"https://api.github.com/users/wytrych/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wytrych/subscriptions","organizations_url":"https://api.github.com/users/wytrych/orgs","repos_url":"https://api.github.com/users/wytrych/repos","events_url":"https://api.github.com/users/wytrych/events{/privacy}","received_events_url":"https://api.github.com/users/wytrych/received_events","type":"User","site_admin":false},"body":"Relying on an external settings file is prone to be buggy","created_at":"2016-08-15T09:58:45Z","updated_at":"2016-08-16T11:56:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0b1f01042f6b03777a3f46fd747b57f4f6873151","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/incuna/incuna-surveys/pulls/19/commits","review_comments_url":"https://api.github.com/repos/incuna/incuna-surveys/pulls/19/comments","review_comment_url":"https://api.github.com/repos/incuna/incuna-surveys/pulls/comments{/number}","comments_url":"https://api.github.com/repos/incuna/incuna-surveys/issues/19/comments","statuses_url":"https://api.github.com/repos/incuna/incuna-surveys/statuses/3da20531f4cf265f5fb8ecbd6ccdf65a3e91c986","head":{"label":"incuna:project-config","ref":"project-config","sha":"3da20531f4cf265f5fb8ecbd6ccdf65a3e91c986","user":{"login":"incuna","id":55510,"avatar_url":"https://avatars.githubusercontent.com/u/55510?v=3","gravatar_id":"","url":"https://api.github.com/users/incuna","html_url":"https://github.com/incuna","followers_url":"https://api.github.com/users/incuna/followers","following_url":"https://api.github.com/users/incuna/following{/other_user}","gists_url":"https://api.github.com/users/incuna/gists{/gist_id}","starred_url":"https://api.github.com/users/incuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incuna/subscriptions","organizations_url":"https://api.github.com/users/incuna/orgs","repos_url":"https://api.github.com/users/incuna/repos","events_url":"https://api.github.com/users/incuna/events{/privacy}","received_events_url":"https://api.github.com/users/incuna/received_events","type":"Organization","site_admin":false},"repo":{"id":64744169,"name":"incuna-surveys","full_name":"incuna/incuna-surveys","owner":{"login":"incuna","id":55510,"avatar_url":"https://avatars.githubusercontent.com/u/55510?v=3","gravatar_id":"","url":"https://api.github.com/users/incuna","html_url":"https://github.com/incuna","followers_url":"https://api.github.com/users/incuna/followers","following_url":"https://api.github.com/users/incuna/following{/other_user}","gists_url":"https://api.github.com/users/incuna/gists{/gist_id}","starred_url":"https://api.github.com/users/incuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incuna/subscriptions","organizations_url":"https://api.github.com/users/incuna/orgs","repos_url":"https://api.github.com/users/incuna/repos","events_url":"https://api.github.com/users/incuna/events{/privacy}","received_events_url":"https://api.github.com/users/incuna/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/incuna/incuna-surveys","description":"Allows the creation of custom questionnaires and surveys via the Django admin.","fork":false,"url":"https://api.github.com/repos/incuna/incuna-surveys","forks_url":"https://api.github.com/repos/incuna/incuna-surveys/forks","keys_url":"https://api.github.com/repos/incuna/incuna-surveys/keys{/key_id}","collaborators_url":"https://api.github.com/repos/incuna/incuna-surveys/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/incuna/incuna-surveys/teams","hooks_url":"https://api.github.com/repos/incuna/incuna-surveys/hooks","issue_events_url":"https://api.github.com/repos/incuna/incuna-surveys/issues/events{/number}","events_url":"https://api.github.com/repos/incuna/incuna-surveys/events","assignees_url":"https://api.github.com/repos/incuna/incuna-surveys/assignees{/user}","branches_url":"https://api.github.com/repos/incuna/incuna-surveys/branches{/branch}","tags_url":"https://api.github.com/repos/incuna/incuna-surveys/tags","blobs_url":"https://api.github.com/repos/incuna/incuna-surveys/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/incuna/incuna-surveys/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/incuna/incuna-surveys/git/refs{/sha}","trees_url":"https://api.github.com/repos/incuna/incuna-surveys/git/trees{/sha}","statuses_url":"https://api.github.com/repos/incuna/incuna-surveys/statuses/{sha}","languages_url":"https://api.github.com/repos/incuna/incuna-surveys/languages","stargazers_url":"https://api.github.com/repos/incuna/incuna-surveys/stargazers","contributors_url":"https://api.github.com/repos/incuna/incuna-surveys/contributors","subscribers_url":"https://api.github.com/repos/incuna/incuna-surveys/subscribers","subscription_url":"https://api.github.com/repos/incuna/incuna-surveys/subscription","commits_url":"https://api.github.com/repos/incuna/incuna-surveys/commits{/sha}","git_commits_url":"https://api.github.com/repos/incuna/incuna-surveys/git/commits{/sha}","comments_url":"https://api.github.com/repos/incuna/incuna-surveys/comments{/number}","issue_comment_url":"https://api.github.com/repos/incuna/incuna-surveys/issues/comments{/number}","contents_url":"https://api.github.com/repos/incuna/incuna-surveys/contents/{+path}","compare_url":"https://api.github.com/repos/incuna/incuna-surveys/compare/{base}...{head}","merges_url":"https://api.github.com/repos/incuna/incuna-surveys/merges","archive_url":"https://api.github.com/repos/incuna/incuna-surveys/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/incuna/incuna-surveys/downloads","issues_url":"https://api.github.com/repos/incuna/incuna-surveys/issues{/number}","pulls_url":"https://api.github.com/repos/incuna/incuna-surveys/pulls{/number}","milestones_url":"https://api.github.com/repos/incuna/incuna-surveys/milestones{/number}","notifications_url":"https://api.github.com/repos/incuna/incuna-surveys/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/incuna/incuna-surveys/labels{/name}","releases_url":"https://api.github.com/repos/incuna/incuna-surveys/releases{/id}","deployments_url":"https://api.github.com/repos/incuna/incuna-surveys/deployments","created_at":"2016-08-02T09:38:09Z","updated_at":"2016-08-09T20:36:12Z","pushed_at":"2016-08-16T11:49:10Z","git_url":"git://github.com/incuna/incuna-surveys.git","ssh_url":"git@github.com:incuna/incuna-surveys.git","clone_url":"https://github.com/incuna/incuna-surveys.git","svn_url":"https://github.com/incuna/incuna-surveys","homepage":"","size":372,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":2,"default_branch":"master"}},"base":{"label":"incuna:master","ref":"master","sha":"d6217fbc3feb0e13755b3263ace80ad8ca4c38e8","user":{"login":"incuna","id":55510,"avatar_url":"https://avatars.githubusercontent.com/u/55510?v=3","gravatar_id":"","url":"https://api.github.com/users/incuna","html_url":"https://github.com/incuna","followers_url":"https://api.github.com/users/incuna/followers","following_url":"https://api.github.com/users/incuna/following{/other_user}","gists_url":"https://api.github.com/users/incuna/gists{/gist_id}","starred_url":"https://api.github.com/users/incuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incuna/subscriptions","organizations_url":"https://api.github.com/users/incuna/orgs","repos_url":"https://api.github.com/users/incuna/repos","events_url":"https://api.github.com/users/incuna/events{/privacy}","received_events_url":"https://api.github.com/users/incuna/received_events","type":"Organization","site_admin":false},"repo":{"id":64744169,"name":"incuna-surveys","full_name":"incuna/incuna-surveys","owner":{"login":"incuna","id":55510,"avatar_url":"https://avatars.githubusercontent.com/u/55510?v=3","gravatar_id":"","url":"https://api.github.com/users/incuna","html_url":"https://github.com/incuna","followers_url":"https://api.github.com/users/incuna/followers","following_url":"https://api.github.com/users/incuna/following{/other_user}","gists_url":"https://api.github.com/users/incuna/gists{/gist_id}","starred_url":"https://api.github.com/users/incuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incuna/subscriptions","organizations_url":"https://api.github.com/users/incuna/orgs","repos_url":"https://api.github.com/users/incuna/repos","events_url":"https://api.github.com/users/incuna/events{/privacy}","received_events_url":"https://api.github.com/users/incuna/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/incuna/incuna-surveys","description":"Allows the creation of custom questionnaires and surveys via the Django admin.","fork":false,"url":"https://api.github.com/repos/incuna/incuna-surveys","forks_url":"https://api.github.com/repos/incuna/incuna-surveys/forks","keys_url":"https://api.github.com/repos/incuna/incuna-surveys/keys{/key_id}","collaborators_url":"https://api.github.com/repos/incuna/incuna-surveys/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/incuna/incuna-surveys/teams","hooks_url":"https://api.github.com/repos/incuna/incuna-surveys/hooks","issue_events_url":"https://api.github.com/repos/incuna/incuna-surveys/issues/events{/number}","events_url":"https://api.github.com/repos/incuna/incuna-surveys/events","assignees_url":"https://api.github.com/repos/incuna/incuna-surveys/assignees{/user}","branches_url":"https://api.github.com/repos/incuna/incuna-surveys/branches{/branch}","tags_url":"https://api.github.com/repos/incuna/incuna-surveys/tags","blobs_url":"https://api.github.com/repos/incuna/incuna-surveys/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/incuna/incuna-surveys/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/incuna/incuna-surveys/git/refs{/sha}","trees_url":"https://api.github.com/repos/incuna/incuna-surveys/git/trees{/sha}","statuses_url":"https://api.github.com/repos/incuna/incuna-surveys/statuses/{sha}","languages_url":"https://api.github.com/repos/incuna/incuna-surveys/languages","stargazers_url":"https://api.github.com/repos/incuna/incuna-surveys/stargazers","contributors_url":"https://api.github.com/repos/incuna/incuna-surveys/contributors","subscribers_url":"https://api.github.com/repos/incuna/incuna-surveys/subscribers","subscription_url":"https://api.github.com/repos/incuna/incuna-surveys/subscription","commits_url":"https://api.github.com/repos/incuna/incuna-surveys/commits{/sha}","git_commits_url":"https://api.github.com/repos/incuna/incuna-surveys/git/commits{/sha}","comments_url":"https://api.github.com/repos/incuna/incuna-surveys/comments{/number}","issue_comment_url":"https://api.github.com/repos/incuna/incuna-surveys/issues/comments{/number}","contents_url":"https://api.github.com/repos/incuna/incuna-surveys/contents/{+path}","compare_url":"https://api.github.com/repos/incuna/incuna-surveys/compare/{base}...{head}","merges_url":"https://api.github.com/repos/incuna/incuna-surveys/merges","archive_url":"https://api.github.com/repos/incuna/incuna-surveys/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/incuna/incuna-surveys/downloads","issues_url":"https://api.github.com/repos/incuna/incuna-surveys/issues{/number}","pulls_url":"https://api.github.com/repos/incuna/incuna-surveys/pulls{/number}","milestones_url":"https://api.github.com/repos/incuna/incuna-surveys/milestones{/number}","notifications_url":"https://api.github.com/repos/incuna/incuna-surveys/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/incuna/incuna-surveys/labels{/name}","releases_url":"https://api.github.com/repos/incuna/incuna-surveys/releases{/id}","deployments_url":"https://api.github.com/repos/incuna/incuna-surveys/deployments","created_at":"2016-08-02T09:38:09Z","updated_at":"2016-08-09T20:36:12Z","pushed_at":"2016-08-16T11:49:10Z","git_url":"git://github.com/incuna/incuna-surveys.git","ssh_url":"git@github.com:incuna/incuna-surveys.git","clone_url":"https://github.com/incuna/incuna-surveys.git","svn_url":"https://github.com/incuna/incuna-surveys","homepage":"","size":372,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"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/incuna/incuna-surveys/pulls/19"},"html":{"href":"https://github.com/incuna/incuna-surveys/pull/19"},"issue":{"href":"https://api.github.com/repos/incuna/incuna-surveys/issues/19"},"comments":{"href":"https://api.github.com/repos/incuna/incuna-surveys/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/incuna/incuna-surveys/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/incuna/incuna-surveys/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/incuna/incuna-surveys/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/incuna/incuna-surveys/statuses/3da20531f4cf265f5fb8ecbd6ccdf65a3e91c986"}}}}
{"actor":{"display_login":"wytrych"}}