GitHub PullRequestReviewCommentEvent at 2014-04-15 22:39:31
Repository: in-n-out
Actor: countrodrigo
Payload: {"comment":{"url":"https://api.github.com/repos/uber/in-n-out/pulls/comments/11661870","id":11661870,"diff_hunk":"@@ -0,0 +1,38 @@\n+var crypto = require('crypto');\n+var util = require(\"util\");\n+var events = require(\"events\");\n+var Geofence = require('./geofence');\n+\n+\n+function GeofenceCache(options) {\n+    events.EventEmitter.call(this);\n+    options = options || {};\n+    this.logger = options.logger;\n+    this.cacheData = {};\n+}\n+\n+util.inherits(GeofenceCache, events.EventEmitter);\n+\n+\n+GeofenceCache.hashGeo = function hashGeo(coordinates) {\n+    var json = JSON.stringify(coordinates);\n+    var hash = crypto.createHash('sha1');\n+    hash.update(json);\n+    return hash.digest('base64');\n+};\n+\n+\n+GeofenceCache.prototype.buildGeo = function buildGeo(coordinates, options) {","path":"lib/geofence_cache.js","position":25,"original_position":25,"commit_id":"f52a7c8e71def6dc9f32ca7d00cd586a6bd99f6c","original_commit_id":"f52a7c8e71def6dc9f32ca7d00cd586a6bd99f6c","user":{"login":"countrodrigo","id":685424,"avatar_url":"https://avatars.githubusercontent.com/u/685424?","gravatar_id":"54616556bd7ff63533841587766b2451","url":"https://api.github.com/users/countrodrigo","html_url":"https://github.com/countrodrigo","followers_url":"https://api.github.com/users/countrodrigo/followers","following_url":"https://api.github.com/users/countrodrigo/following{/other_user}","gists_url":"https://api.github.com/users/countrodrigo/gists{/gist_id}","starred_url":"https://api.github.com/users/countrodrigo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/countrodrigo/subscriptions","organizations_url":"https://api.github.com/users/countrodrigo/orgs","repos_url":"https://api.github.com/users/countrodrigo/repos","events_url":"https://api.github.com/users/countrodrigo/events{/privacy}","received_events_url":"https://api.github.com/users/countrodrigo/received_events","type":"User","site_admin":false},"body":"I would personally call this method getGeo() since it's weird to ask a cache to build you an object, but that's not a show stopper.","created_at":"2014-04-15T22:39:31Z","updated_at":"2014-04-15T22:39:31Z","html_url":"https://github.com/uber/in-n-out/pull/11#discussion_r11661870","pull_request_url":"https://api.github.com/repos/uber/in-n-out/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/uber/in-n-out/pulls/comments/11661870"},"html":{"href":"https://github.com/uber/in-n-out/pull/11#discussion_r11661870"},"pull_request":{"href":"https://api.github.com/repos/uber/in-n-out/pulls/11"}}}}