{"action":"created","comment":{"url":"https://api.github.com/repos/Wikia/pandora/pulls/comments/27209275","id":27209275,"diff_hunk":"@@ -0,0 +1,49 @@\n+package com.wikia.userpreference;\n+\n+import com.wikia.dropwizard.consul.bundle.ConsulModule;\n+import com.wikia.dropwizard.consul.bundle.ProvidesConsulConfiguration;\n+import com.wikia.userpreference.configuration.UserPreferenceConfiguration;\n+import com.wikia.userpreference.dao.WikiCities;\n+import com.wikia.userpreference.dao.WikiCitiesDAO;\n+\n+import com.google.inject.AbstractModule;\n+import com.google.inject.Provides;\n+import com.netflix.governator.guice.lazy.LazySingleton;\n+import io.dropwizard.setup.Environment;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import java.util.List;\n+\n+import javax.sql.DataSource;\n+\n+public class UserPreferenceModule extends AbstractModule {\n+\n+  private final Logger logger = LoggerFactory.getLogger(UserPreferenceModule.class);\n+\n+  protected void configure() {\n+    logger.info(\"configuring the UserPreferenceModule\");\n+    bind(ProvidesConsulConfiguration.class).to(UserPreferenceConfiguration.class);\n+    binder().install(new ConsulModule());\n+    bind(WikiCities.class).to(WikiCitiesDAO.class);","path":"service/user-preference/src/main/java/com/wikia/userpreference/UserPreferenceModule.java","position":28,"original_position":28,"commit_id":"9982b6567b48b912216c3d9ae6f863bf1b5cc6a8","original_commit_id":"9982b6567b48b912216c3d9ae6f863bf1b5cc6a8","user":{"login":"sqreek","id":6649776,"avatar_url":"https://avatars.githubusercontent.com/u/6649776?v=3","gravatar_id":"","url":"https://api.github.com/users/sqreek","html_url":"https://github.com/sqreek","followers_url":"https://api.github.com/users/sqreek/followers","following_url":"https://api.github.com/users/sqreek/following{/other_user}","gists_url":"https://api.github.com/users/sqreek/gists{/gist_id}","starred_url":"https://api.github.com/users/sqreek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sqreek/subscriptions","organizations_url":"https://api.github.com/users/sqreek/orgs","repos_url":"https://api.github.com/users/sqreek/repos","events_url":"https://api.github.com/users/sqreek/events{/privacy}","received_events_url":"https://api.github.com/users/sqreek/received_events","type":"User","site_admin":false},"body":"minor: sort bind and binder.install for clarification","created_at":"2015-03-26T12:52:52Z","updated_at":"2015-03-26T12:52:52Z","html_url":"https://github.com/Wikia/pandora/pull/117#discussion_r27209275","pull_request_url":"https://api.github.com/repos/Wikia/pandora/pulls/117","_links":{"self":{"href":"https://api.github.com/repos/Wikia/pandora/pulls/comments/27209275"},"html":{"href":"https://github.com/Wikia/pandora/pull/117#discussion_r27209275"},"pull_request":{"href":"https://api.github.com/repos/Wikia/pandora/pulls/117"}}},"pull_request":{"url":"https://api.github.com/repos/Wikia/pandora/pulls/117","id":31779795,"html_url":"https://github.com/Wikia/pandora/pull/117","diff_url":"https://github.com/Wikia/pandora/pull/117.diff","patch_url":"https://github.com/Wikia/pandora/pull/117.patch","issue_url":"https://api.github.com/repos/Wikia/pandora/issues/117","number":117,"state":"open","locked":false,"title":"User preferences service","user":{"login":"drsnyder","id":21621,"avatar_url":"https://avatars.githubusercontent.com/u/21621?v=3","gravatar_id":"","url":"https://api.github.com/users/drsnyder","html_url":"https://github.com/drsnyder","followers_url":"https://api.github.com/users/drsnyder/followers","following_url":"https://api.github.com/users/drsnyder/following{/other_user}","gists_url":"https://api.github.com/users/drsnyder/gists{/gist_id}","starred_url":"https://api.github.com/users/drsnyder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drsnyder/subscriptions","organizations_url":"https://api.github.com/users/drsnyder/orgs","repos_url":"https://api.github.com/users/drsnyder/repos","events_url":"https://api.github.com/users/drsnyder/events{/privacy}","received_events_url":"https://api.github.com/users/drsnyder/received_events","type":"User","site_admin":false},"body":"This service provides limited access to global user preferences via `/preferences/{userid}/global`. The set of preferences supported is white listed via the service configuration file.\r\n\r\nThe service accesses the wikicities database through the handy jooq module provided by @nmonterroso. \r\n\r\nApologies in advance for the additional service related additions. This PR also includes:\r\n * Support for a standard problem response class to help aid compliance with the [guidelines](https://github.com/Wikia/guidelines/tree/master/APIDesign#error-handling).\r\n * A `StandardResponses` helper class for generating common responses (e.g. 404s)\r\n * A helper for enabling CORS (thanks @jogura)\r\n\r\nhttps://wikia-inc.atlassian.net/browse/SERVICES-136\r\n\r\n/cc @pchojnacki @sqreek @nmonterroso ","created_at":"2015-03-23T22:16:39Z","updated_at":"2015-03-26T12:52:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ad48e5e64996176a5d9b2330d05aece2e0dec68c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Wikia/pandora/pulls/117/commits","review_comments_url":"https://api.github.com/repos/Wikia/pandora/pulls/117/comments","review_comment_url":"https://api.github.com/repos/Wikia/pandora/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Wikia/pandora/issues/117/comments","statuses_url":"https://api.github.com/repos/Wikia/pandora/statuses/9982b6567b48b912216c3d9ae6f863bf1b5cc6a8","head":{"label":"Wikia:user-preferences","ref":"user-preferences","sha":"9982b6567b48b912216c3d9ae6f863bf1b5cc6a8","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":26663749,"name":"pandora","full_name":"Wikia/pandora","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/pandora","description":"API Service","fork":false,"url":"https://api.github.com/repos/Wikia/pandora","forks_url":"https://api.github.com/repos/Wikia/pandora/forks","keys_url":"https://api.github.com/repos/Wikia/pandora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/pandora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/pandora/teams","hooks_url":"https://api.github.com/repos/Wikia/pandora/hooks","issue_events_url":"https://api.github.com/repos/Wikia/pandora/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/pandora/events","assignees_url":"https://api.github.com/repos/Wikia/pandora/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/pandora/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/pandora/tags","blobs_url":"https://api.github.com/repos/Wikia/pandora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/pandora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/pandora/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/pandora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/pandora/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/pandora/languages","stargazers_url":"https://api.github.com/repos/Wikia/pandora/stargazers","contributors_url":"https://api.github.com/repos/Wikia/pandora/contributors","subscribers_url":"https://api.github.com/repos/Wikia/pandora/subscribers","subscription_url":"https://api.github.com/repos/Wikia/pandora/subscription","commits_url":"https://api.github.com/repos/Wikia/pandora/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/pandora/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/pandora/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/pandora/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/pandora/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/pandora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/pandora/merges","archive_url":"https://api.github.com/repos/Wikia/pandora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/pandora/downloads","issues_url":"https://api.github.com/repos/Wikia/pandora/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/pandora/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/pandora/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/pandora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/pandora/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/pandora/releases{/id}","created_at":"2014-11-15T00:29:06Z","updated_at":"2015-03-26T12:39:45Z","pushed_at":"2015-03-26T12:39:48Z","git_url":"git://github.com/Wikia/pandora.git","ssh_url":"git@github.com:Wikia/pandora.git","clone_url":"https://github.com/Wikia/pandora.git","svn_url":"https://github.com/Wikia/pandora","homepage":null,"size":6114,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":3,"default_branch":"master"}},"base":{"label":"Wikia:master","ref":"master","sha":"26fb19ad1ca4cef26dcae587520f8ce09a9ddd91","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":26663749,"name":"pandora","full_name":"Wikia/pandora","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/pandora","description":"API Service","fork":false,"url":"https://api.github.com/repos/Wikia/pandora","forks_url":"https://api.github.com/repos/Wikia/pandora/forks","keys_url":"https://api.github.com/repos/Wikia/pandora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/pandora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/pandora/teams","hooks_url":"https://api.github.com/repos/Wikia/pandora/hooks","issue_events_url":"https://api.github.com/repos/Wikia/pandora/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/pandora/events","assignees_url":"https://api.github.com/repos/Wikia/pandora/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/pandora/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/pandora/tags","blobs_url":"https://api.github.com/repos/Wikia/pandora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/pandora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/pandora/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/pandora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/pandora/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/pandora/languages","stargazers_url":"https://api.github.com/repos/Wikia/pandora/stargazers","contributors_url":"https://api.github.com/repos/Wikia/pandora/contributors","subscribers_url":"https://api.github.com/repos/Wikia/pandora/subscribers","subscription_url":"https://api.github.com/repos/Wikia/pandora/subscription","commits_url":"https://api.github.com/repos/Wikia/pandora/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/pandora/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/pandora/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/pandora/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/pandora/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/pandora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/pandora/merges","archive_url":"https://api.github.com/repos/Wikia/pandora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/pandora/downloads","issues_url":"https://api.github.com/repos/Wikia/pandora/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/pandora/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/pandora/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/pandora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/pandora/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/pandora/releases{/id}","created_at":"2014-11-15T00:29:06Z","updated_at":"2015-03-26T12:39:45Z","pushed_at":"2015-03-26T12:39:48Z","git_url":"git://github.com/Wikia/pandora.git","ssh_url":"git@github.com:Wikia/pandora.git","clone_url":"https://github.com/Wikia/pandora.git","svn_url":"https://github.com/Wikia/pandora","homepage":null,"size":6114,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Wikia/pandora/pulls/117"},"html":{"href":"https://github.com/Wikia/pandora/pull/117"},"issue":{"href":"https://api.github.com/repos/Wikia/pandora/issues/117"},"comments":{"href":"https://api.github.com/repos/Wikia/pandora/issues/117/comments"},"review_comments":{"href":"https://api.github.com/repos/Wikia/pandora/pulls/117/comments"},"review_comment":{"href":"https://api.github.com/repos/Wikia/pandora/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Wikia/pandora/pulls/117/commits"},"statuses":{"href":"https://api.github.com/repos/Wikia/pandora/statuses/9982b6567b48b912216c3d9ae6f863bf1b5cc6a8"}}}}