{"action":"created","comment":{"url":"https://api.github.com/repos/zooniverse/Panoptes/pulls/comments/95818879","pull_request_review_id":16385633,"id":95818879,"diff_hunk":"@@ -0,0 +1,28 @@\n+module Panoptes\n+  module ElastiCache\n+    def self.client\n+      if cluster_name = ENV[\"ELASTIC_CACHE\"]\n+        Dalli::ElastiCache.new(\"#{cluster_name}:11211\")\n+      end\n+    end\n+\n+    def self.options\n+      { expires_in: expires_in, compress: compress }\n+    end\n+\n+    def self.expires_in\n+      ENV.fetch(\"CACHE_EXPIRES_IN\", 5.minutes)\n+    end\n+\n+    def self.compress\n+      ENV.fetch(\"CACHE_COMPRESS\", true)\n+    end\n+  end\n+end\n+\n+# change the ENV cache store config to use AWS Elastic Cache\n+if cache_client = Panoptes::ElastiCache.client\n+  Rails.application.config.cache_store = :dalli_store,\n+    cache_client.servers,\n+    Panotes::ElastiCache.options","path":"config/initializers/cache_store.rb","position":27,"original_position":27,"commit_id":"b9b01931da560b87d2598bd7fcbb8492d48cdecc","original_commit_id":"b9b01931da560b87d2598bd7fcbb8492d48cdecc","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Align the elements of an array literal if they span more than one line.","created_at":"2017-01-12T15:45:01Z","updated_at":"2017-01-12T15:45:01Z","html_url":"https://github.com/zooniverse/Panoptes/pull/2125#discussion_r95818879","pull_request_url":"https://api.github.com/repos/zooniverse/Panoptes/pulls/2125","_links":{"self":{"href":"https://api.github.com/repos/zooniverse/Panoptes/pulls/comments/95818879"},"html":{"href":"https://github.com/zooniverse/Panoptes/pull/2125#discussion_r95818879"},"pull_request":{"href":"https://api.github.com/repos/zooniverse/Panoptes/pulls/2125"}}},"pull_request":{"url":"https://api.github.com/repos/zooniverse/Panoptes/pulls/2125","id":101283988,"html_url":"https://github.com/zooniverse/Panoptes/pull/2125","diff_url":"https://github.com/zooniverse/Panoptes/pull/2125.diff","patch_url":"https://github.com/zooniverse/Panoptes/pull/2125.patch","issue_url":"https://api.github.com/repos/zooniverse/Panoptes/issues/2125","number":2125,"state":"open","locked":false,"title":"elastic cache store integration","user":{"login":"camallen","id":295329,"avatar_url":"https://avatars.githubusercontent.com/u/295329?v=3","gravatar_id":"","url":"https://api.github.com/users/camallen","html_url":"https://github.com/camallen","followers_url":"https://api.github.com/users/camallen/followers","following_url":"https://api.github.com/users/camallen/following{/other_user}","gists_url":"https://api.github.com/users/camallen/gists{/gist_id}","starred_url":"https://api.github.com/users/camallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camallen/subscriptions","organizations_url":"https://api.github.com/users/camallen/orgs","repos_url":"https://api.github.com/users/camallen/repos","events_url":"https://api.github.com/users/camallen/events{/privacy}","received_events_url":"https://api.github.com/users/camallen/received_events","type":"User","site_admin":false},"body":"override default env cache stores with elastic cache store but only if configured via env vars.\r\n\r\n# Review checklist\r\n\r\n- [ ] First, the most important one: is this PR small enough that you can actually review it? Feel free to just reject a branch if the changes are hard to review due to the length of the diff.\r\n- [ ] If there are any migrations, will they the previous version of the app work correctly after they've been run (e.g. the don't remove columns still known about by ActiveRecord).\r\n- [ ] If anything changed with regards to the public API, are those changes also documented in the `apiary.apib` file?\r\n- [ ] Are all the changes covered by tests? Think about any possible edge cases that might be left untested.\r\n","created_at":"2017-01-12T15:44:53Z","updated_at":"2017-01-12T15:45:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d83558ebf0812b57a058230c14a4bf12189cf53a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zooniverse/Panoptes/pulls/2125/commits","review_comments_url":"https://api.github.com/repos/zooniverse/Panoptes/pulls/2125/comments","review_comment_url":"https://api.github.com/repos/zooniverse/Panoptes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zooniverse/Panoptes/issues/2125/comments","statuses_url":"https://api.github.com/repos/zooniverse/Panoptes/statuses/b9b01931da560b87d2598bd7fcbb8492d48cdecc","head":{"label":"camallen:prod_caching","ref":"prod_caching","sha":"b9b01931da560b87d2598bd7fcbb8492d48cdecc","user":{"login":"camallen","id":295329,"avatar_url":"https://avatars.githubusercontent.com/u/295329?v=3","gravatar_id":"","url":"https://api.github.com/users/camallen","html_url":"https://github.com/camallen","followers_url":"https://api.github.com/users/camallen/followers","following_url":"https://api.github.com/users/camallen/following{/other_user}","gists_url":"https://api.github.com/users/camallen/gists{/gist_id}","starred_url":"https://api.github.com/users/camallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camallen/subscriptions","organizations_url":"https://api.github.com/users/camallen/orgs","repos_url":"https://api.github.com/users/camallen/repos","events_url":"https://api.github.com/users/camallen/events{/privacy}","received_events_url":"https://api.github.com/users/camallen/received_events","type":"User","site_admin":false},"repo":{"id":20215459,"name":"Panoptes","full_name":"camallen/Panoptes","owner":{"login":"camallen","id":295329,"avatar_url":"https://avatars.githubusercontent.com/u/295329?v=3","gravatar_id":"","url":"https://api.github.com/users/camallen","html_url":"https://github.com/camallen","followers_url":"https://api.github.com/users/camallen/followers","following_url":"https://api.github.com/users/camallen/following{/other_user}","gists_url":"https://api.github.com/users/camallen/gists{/gist_id}","starred_url":"https://api.github.com/users/camallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camallen/subscriptions","organizations_url":"https://api.github.com/users/camallen/orgs","repos_url":"https://api.github.com/users/camallen/repos","events_url":"https://api.github.com/users/camallen/events{/privacy}","received_events_url":"https://api.github.com/users/camallen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/camallen/Panoptes","description":"It sees everything","fork":true,"url":"https://api.github.com/repos/camallen/Panoptes","forks_url":"https://api.github.com/repos/camallen/Panoptes/forks","keys_url":"https://api.github.com/repos/camallen/Panoptes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/camallen/Panoptes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/camallen/Panoptes/teams","hooks_url":"https://api.github.com/repos/camallen/Panoptes/hooks","issue_events_url":"https://api.github.com/repos/camallen/Panoptes/issues/events{/number}","events_url":"https://api.github.com/repos/camallen/Panoptes/events","assignees_url":"https://api.github.com/repos/camallen/Panoptes/assignees{/user}","branches_url":"https://api.github.com/repos/camallen/Panoptes/branches{/branch}","tags_url":"https://api.github.com/repos/camallen/Panoptes/tags","blobs_url":"https://api.github.com/repos/camallen/Panoptes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/camallen/Panoptes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/camallen/Panoptes/git/refs{/sha}","trees_url":"https://api.github.com/repos/camallen/Panoptes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/camallen/Panoptes/statuses/{sha}","languages_url":"https://api.github.com/repos/camallen/Panoptes/languages","stargazers_url":"https://api.github.com/repos/camallen/Panoptes/stargazers","contributors_url":"https://api.github.com/repos/camallen/Panoptes/contributors","subscribers_url":"https://api.github.com/repos/camallen/Panoptes/subscribers","subscription_url":"https://api.github.com/repos/camallen/Panoptes/subscription","commits_url":"https://api.github.com/repos/camallen/Panoptes/commits{/sha}","git_commits_url":"https://api.github.com/repos/camallen/Panoptes/git/commits{/sha}","comments_url":"https://api.github.com/repos/camallen/Panoptes/comments{/number}","issue_comment_url":"https://api.github.com/repos/camallen/Panoptes/issues/comments{/number}","contents_url":"https://api.github.com/repos/camallen/Panoptes/contents/{+path}","compare_url":"https://api.github.com/repos/camallen/Panoptes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/camallen/Panoptes/merges","archive_url":"https://api.github.com/repos/camallen/Panoptes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/camallen/Panoptes/downloads","issues_url":"https://api.github.com/repos/camallen/Panoptes/issues{/number}","pulls_url":"https://api.github.com/repos/camallen/Panoptes/pulls{/number}","milestones_url":"https://api.github.com/repos/camallen/Panoptes/milestones{/number}","notifications_url":"https://api.github.com/repos/camallen/Panoptes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/camallen/Panoptes/labels{/name}","releases_url":"https://api.github.com/repos/camallen/Panoptes/releases{/id}","deployments_url":"https://api.github.com/repos/camallen/Panoptes/deployments","created_at":"2014-05-27T10:03:15Z","updated_at":"2016-03-02T10:46:36Z","pushed_at":"2017-01-12T15:43:15Z","git_url":"git://github.com/camallen/Panoptes.git","ssh_url":"git@github.com:camallen/Panoptes.git","clone_url":"https://github.com/camallen/Panoptes.git","svn_url":"https://github.com/camallen/Panoptes","homepage":"","size":6226,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"zooniverse:master","ref":"master","sha":"586f239d16a00fd75ef22df8498952e778684072","user":{"login":"zooniverse","id":106856,"avatar_url":"https://avatars.githubusercontent.com/u/106856?v=3","gravatar_id":"","url":"https://api.github.com/users/zooniverse","html_url":"https://github.com/zooniverse","followers_url":"https://api.github.com/users/zooniverse/followers","following_url":"https://api.github.com/users/zooniverse/following{/other_user}","gists_url":"https://api.github.com/users/zooniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/zooniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zooniverse/subscriptions","organizations_url":"https://api.github.com/users/zooniverse/orgs","repos_url":"https://api.github.com/users/zooniverse/repos","events_url":"https://api.github.com/users/zooniverse/events{/privacy}","received_events_url":"https://api.github.com/users/zooniverse/received_events","type":"Organization","site_admin":false},"repo":{"id":19036577,"name":"Panoptes","full_name":"zooniverse/Panoptes","owner":{"login":"zooniverse","id":106856,"avatar_url":"https://avatars.githubusercontent.com/u/106856?v=3","gravatar_id":"","url":"https://api.github.com/users/zooniverse","html_url":"https://github.com/zooniverse","followers_url":"https://api.github.com/users/zooniverse/followers","following_url":"https://api.github.com/users/zooniverse/following{/other_user}","gists_url":"https://api.github.com/users/zooniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/zooniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zooniverse/subscriptions","organizations_url":"https://api.github.com/users/zooniverse/orgs","repos_url":"https://api.github.com/users/zooniverse/repos","events_url":"https://api.github.com/users/zooniverse/events{/privacy}","received_events_url":"https://api.github.com/users/zooniverse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zooniverse/Panoptes","description":"It sees everything","fork":false,"url":"https://api.github.com/repos/zooniverse/Panoptes","forks_url":"https://api.github.com/repos/zooniverse/Panoptes/forks","keys_url":"https://api.github.com/repos/zooniverse/Panoptes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zooniverse/Panoptes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zooniverse/Panoptes/teams","hooks_url":"https://api.github.com/repos/zooniverse/Panoptes/hooks","issue_events_url":"https://api.github.com/repos/zooniverse/Panoptes/issues/events{/number}","events_url":"https://api.github.com/repos/zooniverse/Panoptes/events","assignees_url":"https://api.github.com/repos/zooniverse/Panoptes/assignees{/user}","branches_url":"https://api.github.com/repos/zooniverse/Panoptes/branches{/branch}","tags_url":"https://api.github.com/repos/zooniverse/Panoptes/tags","blobs_url":"https://api.github.com/repos/zooniverse/Panoptes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zooniverse/Panoptes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zooniverse/Panoptes/git/refs{/sha}","trees_url":"https://api.github.com/repos/zooniverse/Panoptes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zooniverse/Panoptes/statuses/{sha}","languages_url":"https://api.github.com/repos/zooniverse/Panoptes/languages","stargazers_url":"https://api.github.com/repos/zooniverse/Panoptes/stargazers","contributors_url":"https://api.github.com/repos/zooniverse/Panoptes/contributors","subscribers_url":"https://api.github.com/repos/zooniverse/Panoptes/subscribers","subscription_url":"https://api.github.com/repos/zooniverse/Panoptes/subscription","commits_url":"https://api.github.com/repos/zooniverse/Panoptes/commits{/sha}","git_commits_url":"https://api.github.com/repos/zooniverse/Panoptes/git/commits{/sha}","comments_url":"https://api.github.com/repos/zooniverse/Panoptes/comments{/number}","issue_comment_url":"https://api.github.com/repos/zooniverse/Panoptes/issues/comments{/number}","contents_url":"https://api.github.com/repos/zooniverse/Panoptes/contents/{+path}","compare_url":"https://api.github.com/repos/zooniverse/Panoptes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zooniverse/Panoptes/merges","archive_url":"https://api.github.com/repos/zooniverse/Panoptes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zooniverse/Panoptes/downloads","issues_url":"https://api.github.com/repos/zooniverse/Panoptes/issues{/number}","pulls_url":"https://api.github.com/repos/zooniverse/Panoptes/pulls{/number}","milestones_url":"https://api.github.com/repos/zooniverse/Panoptes/milestones{/number}","notifications_url":"https://api.github.com/repos/zooniverse/Panoptes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zooniverse/Panoptes/labels{/name}","releases_url":"https://api.github.com/repos/zooniverse/Panoptes/releases{/id}","deployments_url":"https://api.github.com/repos/zooniverse/Panoptes/deployments","created_at":"2014-04-22T16:16:02Z","updated_at":"2016-12-11T16:29:35Z","pushed_at":"2017-01-12T15:44:53Z","git_url":"git://github.com/zooniverse/Panoptes.git","ssh_url":"git@github.com:zooniverse/Panoptes.git","clone_url":"https://github.com/zooniverse/Panoptes.git","svn_url":"https://github.com/zooniverse/Panoptes","homepage":"","size":6218,"stargazers_count":56,"watchers_count":56,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":112,"forks":28,"open_issues":112,"watchers":56,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zooniverse/Panoptes/pulls/2125"},"html":{"href":"https://github.com/zooniverse/Panoptes/pull/2125"},"issue":{"href":"https://api.github.com/repos/zooniverse/Panoptes/issues/2125"},"comments":{"href":"https://api.github.com/repos/zooniverse/Panoptes/issues/2125/comments"},"review_comments":{"href":"https://api.github.com/repos/zooniverse/Panoptes/pulls/2125/comments"},"review_comment":{"href":"https://api.github.com/repos/zooniverse/Panoptes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zooniverse/Panoptes/pulls/2125/commits"},"statuses":{"href":"https://api.github.com/repos/zooniverse/Panoptes/statuses/b9b01931da560b87d2598bd7fcbb8492d48cdecc"}}}}
{"actor":{"display_login":"houndci-bot"}}