GitHub PullRequestReviewCommentEvent at 2014-03-28 18:55:05
Repository: uber-cache-helpers
Actor: pdehaan
Payload: {"comment":{"url":"https://api.github.com/repos/mozilla-services/uber-cache-helpers/pulls/comments/11080637","id":11080637,"diff_hunk":"@@ -0,0 +1,40 @@\n+/* This Source Code Form is subject to the terms of the Mozilla Public\n+ * License, v. 2.0. If a copy of the MPL was not distributed with this\n+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n+\"use strict\";\n+\n+var uberCache = require('uber-cache');\n+\n+var engines = {\n+  memory: \"uber-cache/lib/memory-engine\",\n+  mongodb: \"./proxies/mongodb\",\n+  redis: \"uber-cache-redis\",\n+  memcached: \"uber-cache-memcached\"\n+}\n+\n+\n+function getCacheBackend(options) {\n+  if (!options.hasOwnProperty(\"engine\")) {\n+    throw new Error(\"You must to specify the engine.\");\n+  }\n+\n+  var enginesAvailable = Object.keys(engines);\n+  if (enginesAvailable.indexOf(options.engine) === -1) {\n+    throw new Error(\"We don't know this \" + options.engine +\n+                    \" backend. Should be one of: \" + enginesAvailable);\n+  }\n+\n+  var DatabaseBackend = require(engines[options.engine])","path":"cache-backend.js","position":27,"original_position":27,"commit_id":"4d147175f75d31d1ad15e40a769df25b360d04b6","original_commit_id":"4d147175f75d31d1ad15e40a769df25b360d04b6","user":{"login":"pdehaan","id":557895,"avatar_url":"https://avatars.githubusercontent.com/u/557895?","gravatar_id":"e04f525530dafcf4f5bda069d6d59790","url":"https://api.github.com/users/pdehaan","html_url":"https://github.com/pdehaan","followers_url":"https://api.github.com/users/pdehaan/followers","following_url":"https://api.github.com/users/pdehaan/following{/other_user}","gists_url":"https://api.github.com/users/pdehaan/gists{/gist_id}","starred_url":"https://api.github.com/users/pdehaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdehaan/subscriptions","organizations_url":"https://api.github.com/users/pdehaan/orgs","repos_url":"https://api.github.com/users/pdehaan/repos","events_url":"https://api.github.com/users/pdehaan/events{/privacy}","received_events_url":"https://api.github.com/users/pdehaan/received_events","type":"User","site_admin":false},"body":"Add `;`","created_at":"2014-03-28T18:55:05Z","updated_at":"2014-03-28T18:55:05Z","html_url":"https://github.com/mozilla-services/uber-cache-helpers/pull/1#discussion_r11080637","pull_request_url":"https://api.github.com/repos/mozilla-services/uber-cache-helpers/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/uber-cache-helpers/pulls/comments/11080637"},"html":{"href":"https://github.com/mozilla-services/uber-cache-helpers/pull/1#discussion_r11080637"},"pull_request":{"href":"https://api.github.com/repos/mozilla-services/uber-cache-helpers/pulls/1"}}}}