{"action":"created","comment":{"url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/comments/23745789","id":23745789,"diff_hunk":"@@ -0,0 +1,26 @@\n+# Interface to the Redis-backed cache store used by the Repository model\n+class RepositoryCache\n+  attr_reader :namespace\n+\n+  def initialize(namespace, backend = Rails.cache)\n+    @namespace = namespace\n+    @backend = backend\n+  end\n+\n+  def cache_key(type)\n+    \"#{type}:#{namespace}\"\n+  end\n+\n+  def expire(key)\n+    backend.delete(cache_key(key))\n+  end\n+\n+  def fetch(key, &block)\n+    backend.fetch(cache_key(key), &block)\n+  end\n+\n+  private\n+\n+  attr_reader :backend\n+end\n+","path":"lib/repository_cache.rb","position":26,"original_position":26,"commit_id":"e790cf26fc366d26ba3c3196ff6c29dcf2120f9d","original_commit_id":"e790cf26fc366d26ba3c3196ff6c29dcf2120f9d","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"1 trailing blank lines detected.","created_at":"2015-01-29T04:14:28Z","updated_at":"2015-01-29T04:14:28Z","html_url":"https://github.com/gitlabhq/gitlabhq/pull/8676#discussion_r23745789","pull_request_url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/8676","_links":{"self":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/comments/23745789"},"html":{"href":"https://github.com/gitlabhq/gitlabhq/pull/8676#discussion_r23745789"},"pull_request":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/8676"}}},"pull_request":{"url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/8676","id":28252648,"html_url":"https://github.com/gitlabhq/gitlabhq/pull/8676","diff_url":"https://github.com/gitlabhq/gitlabhq/pull/8676.diff","patch_url":"https://github.com/gitlabhq/gitlabhq/pull/8676.patch","issue_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/8676","number":8676,"state":"open","locked":false,"title":"Refactor Repository to use new RepositoryCache class","user":{"login":"tsigo","id":16124,"avatar_url":"https://avatars.githubusercontent.com/u/16124?v=3","gravatar_id":"","url":"https://api.github.com/users/tsigo","html_url":"https://github.com/tsigo","followers_url":"https://api.github.com/users/tsigo/followers","following_url":"https://api.github.com/users/tsigo/following{/other_user}","gists_url":"https://api.github.com/users/tsigo/gists{/gist_id}","starred_url":"https://api.github.com/users/tsigo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsigo/subscriptions","organizations_url":"https://api.github.com/users/tsigo/orgs","repos_url":"https://api.github.com/users/tsigo/repos","events_url":"https://api.github.com/users/tsigo/events{/privacy}","received_events_url":"https://api.github.com/users/tsigo/received_events","type":"User","site_admin":false},"body":"Abstracts away the lower-level implementation details from the Repository model.","created_at":"2015-01-29T04:14:24Z","updated_at":"2015-01-29T04:14:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88c8927d2e5512d80fe430f4e69d702a86e8f890","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/8676/commits","review_comments_url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/8676/comments","review_comment_url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/comments/{number}","comments_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/8676/comments","statuses_url":"https://api.github.com/repos/gitlabhq/gitlabhq/statuses/e790cf26fc366d26ba3c3196ff6c29dcf2120f9d","head":{"label":"tsigo:rs-repository-cache","ref":"rs-repository-cache","sha":"e790cf26fc366d26ba3c3196ff6c29dcf2120f9d","user":{"login":"tsigo","id":16124,"avatar_url":"https://avatars.githubusercontent.com/u/16124?v=3","gravatar_id":"","url":"https://api.github.com/users/tsigo","html_url":"https://github.com/tsigo","followers_url":"https://api.github.com/users/tsigo/followers","following_url":"https://api.github.com/users/tsigo/following{/other_user}","gists_url":"https://api.github.com/users/tsigo/gists{/gist_id}","starred_url":"https://api.github.com/users/tsigo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsigo/subscriptions","organizations_url":"https://api.github.com/users/tsigo/orgs","repos_url":"https://api.github.com/users/tsigo/repos","events_url":"https://api.github.com/users/tsigo/events{/privacy}","received_events_url":"https://api.github.com/users/tsigo/received_events","type":"User","site_admin":false},"repo":{"id":5349886,"name":"gitlabhq","full_name":"tsigo/gitlabhq","owner":{"login":"tsigo","id":16124,"avatar_url":"https://avatars.githubusercontent.com/u/16124?v=3","gravatar_id":"","url":"https://api.github.com/users/tsigo","html_url":"https://github.com/tsigo","followers_url":"https://api.github.com/users/tsigo/followers","following_url":"https://api.github.com/users/tsigo/following{/other_user}","gists_url":"https://api.github.com/users/tsigo/gists{/gist_id}","starred_url":"https://api.github.com/users/tsigo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsigo/subscriptions","organizations_url":"https://api.github.com/users/tsigo/orgs","repos_url":"https://api.github.com/users/tsigo/repos","events_url":"https://api.github.com/users/tsigo/events{/privacy}","received_events_url":"https://api.github.com/users/tsigo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tsigo/gitlabhq","description":"Project management and code hosting  application. Follow us on twitter @gitlabhq","fork":true,"url":"https://api.github.com/repos/tsigo/gitlabhq","forks_url":"https://api.github.com/repos/tsigo/gitlabhq/forks","keys_url":"https://api.github.com/repos/tsigo/gitlabhq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tsigo/gitlabhq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tsigo/gitlabhq/teams","hooks_url":"https://api.github.com/repos/tsigo/gitlabhq/hooks","issue_events_url":"https://api.github.com/repos/tsigo/gitlabhq/issues/events{/number}","events_url":"https://api.github.com/repos/tsigo/gitlabhq/events","assignees_url":"https://api.github.com/repos/tsigo/gitlabhq/assignees{/user}","branches_url":"https://api.github.com/repos/tsigo/gitlabhq/branches{/branch}","tags_url":"https://api.github.com/repos/tsigo/gitlabhq/tags","blobs_url":"https://api.github.com/repos/tsigo/gitlabhq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tsigo/gitlabhq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tsigo/gitlabhq/git/refs{/sha}","trees_url":"https://api.github.com/repos/tsigo/gitlabhq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tsigo/gitlabhq/statuses/{sha}","languages_url":"https://api.github.com/repos/tsigo/gitlabhq/languages","stargazers_url":"https://api.github.com/repos/tsigo/gitlabhq/stargazers","contributors_url":"https://api.github.com/repos/tsigo/gitlabhq/contributors","subscribers_url":"https://api.github.com/repos/tsigo/gitlabhq/subscribers","subscription_url":"https://api.github.com/repos/tsigo/gitlabhq/subscription","commits_url":"https://api.github.com/repos/tsigo/gitlabhq/commits{/sha}","git_commits_url":"https://api.github.com/repos/tsigo/gitlabhq/git/commits{/sha}","comments_url":"https://api.github.com/repos/tsigo/gitlabhq/comments{/number}","issue_comment_url":"https://api.github.com/repos/tsigo/gitlabhq/issues/comments/{number}","contents_url":"https://api.github.com/repos/tsigo/gitlabhq/contents/{+path}","compare_url":"https://api.github.com/repos/tsigo/gitlabhq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tsigo/gitlabhq/merges","archive_url":"https://api.github.com/repos/tsigo/gitlabhq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tsigo/gitlabhq/downloads","issues_url":"https://api.github.com/repos/tsigo/gitlabhq/issues{/number}","pulls_url":"https://api.github.com/repos/tsigo/gitlabhq/pulls{/number}","milestones_url":"https://api.github.com/repos/tsigo/gitlabhq/milestones{/number}","notifications_url":"https://api.github.com/repos/tsigo/gitlabhq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tsigo/gitlabhq/labels{/name}","releases_url":"https://api.github.com/repos/tsigo/gitlabhq/releases{/id}","created_at":"2012-08-09T01:45:28Z","updated_at":"2015-01-28T08:41:27Z","pushed_at":"2015-01-29T04:12:26Z","git_url":"git://github.com/tsigo/gitlabhq.git","ssh_url":"git@github.com:tsigo/gitlabhq.git","clone_url":"https://github.com/tsigo/gitlabhq.git","svn_url":"https://github.com/tsigo/gitlabhq","homepage":"gitlabhq.com","size":87882,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"gitlabhq:master","ref":"master","sha":"953c1fff8f242f09f3f16998112931d48d6a5ecc","user":{"login":"gitlabhq","id":1086321,"avatar_url":"https://avatars.githubusercontent.com/u/1086321?v=3","gravatar_id":"","url":"https://api.github.com/users/gitlabhq","html_url":"https://github.com/gitlabhq","followers_url":"https://api.github.com/users/gitlabhq/followers","following_url":"https://api.github.com/users/gitlabhq/following{/other_user}","gists_url":"https://api.github.com/users/gitlabhq/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlabhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlabhq/subscriptions","organizations_url":"https://api.github.com/users/gitlabhq/orgs","repos_url":"https://api.github.com/users/gitlabhq/repos","events_url":"https://api.github.com/users/gitlabhq/events{/privacy}","received_events_url":"https://api.github.com/users/gitlabhq/received_events","type":"Organization","site_admin":false},"repo":{"id":2500088,"name":"gitlabhq","full_name":"gitlabhq/gitlabhq","owner":{"login":"gitlabhq","id":1086321,"avatar_url":"https://avatars.githubusercontent.com/u/1086321?v=3","gravatar_id":"","url":"https://api.github.com/users/gitlabhq","html_url":"https://github.com/gitlabhq","followers_url":"https://api.github.com/users/gitlabhq/followers","following_url":"https://api.github.com/users/gitlabhq/following{/other_user}","gists_url":"https://api.github.com/users/gitlabhq/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlabhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlabhq/subscriptions","organizations_url":"https://api.github.com/users/gitlabhq/orgs","repos_url":"https://api.github.com/users/gitlabhq/repos","events_url":"https://api.github.com/users/gitlabhq/events{/privacy}","received_events_url":"https://api.github.com/users/gitlabhq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gitlabhq/gitlabhq","description":"Open source software to collaborate on code. Follow us on twitter @gitlab","fork":false,"url":"https://api.github.com/repos/gitlabhq/gitlabhq","forks_url":"https://api.github.com/repos/gitlabhq/gitlabhq/forks","keys_url":"https://api.github.com/repos/gitlabhq/gitlabhq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gitlabhq/gitlabhq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gitlabhq/gitlabhq/teams","hooks_url":"https://api.github.com/repos/gitlabhq/gitlabhq/hooks","issue_events_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/events{/number}","events_url":"https://api.github.com/repos/gitlabhq/gitlabhq/events","assignees_url":"https://api.github.com/repos/gitlabhq/gitlabhq/assignees{/user}","branches_url":"https://api.github.com/repos/gitlabhq/gitlabhq/branches{/branch}","tags_url":"https://api.github.com/repos/gitlabhq/gitlabhq/tags","blobs_url":"https://api.github.com/repos/gitlabhq/gitlabhq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gitlabhq/gitlabhq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gitlabhq/gitlabhq/git/refs{/sha}","trees_url":"https://api.github.com/repos/gitlabhq/gitlabhq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gitlabhq/gitlabhq/statuses/{sha}","languages_url":"https://api.github.com/repos/gitlabhq/gitlabhq/languages","stargazers_url":"https://api.github.com/repos/gitlabhq/gitlabhq/stargazers","contributors_url":"https://api.github.com/repos/gitlabhq/gitlabhq/contributors","subscribers_url":"https://api.github.com/repos/gitlabhq/gitlabhq/subscribers","subscription_url":"https://api.github.com/repos/gitlabhq/gitlabhq/subscription","commits_url":"https://api.github.com/repos/gitlabhq/gitlabhq/commits{/sha}","git_commits_url":"https://api.github.com/repos/gitlabhq/gitlabhq/git/commits{/sha}","comments_url":"https://api.github.com/repos/gitlabhq/gitlabhq/comments{/number}","issue_comment_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/comments/{number}","contents_url":"https://api.github.com/repos/gitlabhq/gitlabhq/contents/{+path}","compare_url":"https://api.github.com/repos/gitlabhq/gitlabhq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gitlabhq/gitlabhq/merges","archive_url":"https://api.github.com/repos/gitlabhq/gitlabhq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gitlabhq/gitlabhq/downloads","issues_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues{/number}","pulls_url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls{/number}","milestones_url":"https://api.github.com/repos/gitlabhq/gitlabhq/milestones{/number}","notifications_url":"https://api.github.com/repos/gitlabhq/gitlabhq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gitlabhq/gitlabhq/labels{/name}","releases_url":"https://api.github.com/repos/gitlabhq/gitlabhq/releases{/id}","created_at":"2011-10-02T16:25:27Z","updated_at":"2015-01-29T01:00:52Z","pushed_at":"2015-01-29T01:00:52Z","git_url":"git://github.com/gitlabhq/gitlabhq.git","ssh_url":"git@github.com:gitlabhq/gitlabhq.git","clone_url":"https://github.com/gitlabhq/gitlabhq.git","svn_url":"https://github.com/gitlabhq/gitlabhq","homepage":"https://about.gitlab.com/","size":144087,"stargazers_count":14753,"watchers_count":14753,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3873,"mirror_url":null,"open_issues_count":740,"forks":3873,"open_issues":740,"watchers":14753,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/8676"},"html":{"href":"https://github.com/gitlabhq/gitlabhq/pull/8676"},"issue":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/8676"},"comments":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/8676/comments"},"review_comments":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/8676/comments"},"review_comment":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/8676/commits"},"statuses":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/statuses/e790cf26fc366d26ba3c3196ff6c29dcf2120f9d"}}}}