{"action":"created","comment":{"url":"https://api.github.com/repos/MAPC/developmentdatabase/pulls/comments/55426613","id":55426613,"diff_hunk":"@@ -0,0 +1,47 @@\n+class DigestPresenter < Burgundy::Item\n+\n+  def subscriptions\n+    @subscriptions ||= subscriptions_needing_update\n+  end\n+\n+  def places\n+    @places ||= subscribed('Place')\n+  end\n+\n+  def searches\n+    @searches ||= subscribed('Search')\n+  end\n+\n+  def developments\n+    @developments ||= subscribed('Development')\n+  end\n+\n+  # def unique_developments\n+  #   developments - related_developments\n+  # end\n+\n+  # def related_developments\n+  #   searches.flat_map(&:developments) + places.flat_map(&:developments)\n+  # end\n+\n+  def user\n+    item\n+  end\n+\n+  def user_last_checked\n+    user.last_checked_subscriptions\n+  end\n+\n+  private\n+\n+    def subscribed(class_name)\n+      subs = subscriptions.where(subscribable_type: class_name).map(&:subscribable)","path":"app/presenters/digest_presenter.rb","position":38,"original_position":38,"commit_id":"715f44f2cd0d46fcf13199da4313c76d6b7e03a1","original_commit_id":"715f44f2cd0d46fcf13199da4313c76d6b7e03a1","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":"Line is too long. [83/80]","created_at":"2016-03-08T21:01:41Z","updated_at":"2016-03-08T21:01:41Z","html_url":"https://github.com/MAPC/developmentdatabase/pull/16#discussion_r55426613","pull_request_url":"https://api.github.com/repos/MAPC/developmentdatabase/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/MAPC/developmentdatabase/pulls/comments/55426613"},"html":{"href":"https://github.com/MAPC/developmentdatabase/pull/16#discussion_r55426613"},"pull_request":{"href":"https://api.github.com/repos/MAPC/developmentdatabase/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/MAPC/developmentdatabase/pulls/16","id":59215730,"html_url":"https://github.com/MAPC/developmentdatabase/pull/16","diff_url":"https://github.com/MAPC/developmentdatabase/pull/16.diff","patch_url":"https://github.com/MAPC/developmentdatabase/pull/16.patch","issue_url":"https://api.github.com/repos/MAPC/developmentdatabase/issues/16","number":16,"state":"open","locked":false,"title":"Add subscriptions and reports","user":{"login":"beechnut","id":1887182,"avatar_url":"https://avatars.githubusercontent.com/u/1887182?v=3","gravatar_id":"","url":"https://api.github.com/users/beechnut","html_url":"https://github.com/beechnut","followers_url":"https://api.github.com/users/beechnut/followers","following_url":"https://api.github.com/users/beechnut/following{/other_user}","gists_url":"https://api.github.com/users/beechnut/gists{/gist_id}","starred_url":"https://api.github.com/users/beechnut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beechnut/subscriptions","organizations_url":"https://api.github.com/users/beechnut/orgs","repos_url":"https://api.github.com/users/beechnut/repos","events_url":"https://api.github.com/users/beechnut/events{/privacy}","received_events_url":"https://api.github.com/users/beechnut/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-12T19:00:55Z","updated_at":"2016-03-08T21:01:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"be41af9e707a3c640c78a2fc548c090fc514f27f","assignee":{"login":"allthesignals","id":5004319,"avatar_url":"https://avatars.githubusercontent.com/u/5004319?v=3","gravatar_id":"","url":"https://api.github.com/users/allthesignals","html_url":"https://github.com/allthesignals","followers_url":"https://api.github.com/users/allthesignals/followers","following_url":"https://api.github.com/users/allthesignals/following{/other_user}","gists_url":"https://api.github.com/users/allthesignals/gists{/gist_id}","starred_url":"https://api.github.com/users/allthesignals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allthesignals/subscriptions","organizations_url":"https://api.github.com/users/allthesignals/orgs","repos_url":"https://api.github.com/users/allthesignals/repos","events_url":"https://api.github.com/users/allthesignals/events{/privacy}","received_events_url":"https://api.github.com/users/allthesignals/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/MAPC/developmentdatabase/pulls/16/commits","review_comments_url":"https://api.github.com/repos/MAPC/developmentdatabase/pulls/16/comments","review_comment_url":"https://api.github.com/repos/MAPC/developmentdatabase/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MAPC/developmentdatabase/issues/16/comments","statuses_url":"https://api.github.com/repos/MAPC/developmentdatabase/statuses/715f44f2cd0d46fcf13199da4313c76d6b7e03a1","head":{"label":"MAPC:subscriptions","ref":"subscriptions","sha":"715f44f2cd0d46fcf13199da4313c76d6b7e03a1","user":{"login":"MAPC","id":363825,"avatar_url":"https://avatars.githubusercontent.com/u/363825?v=3","gravatar_id":"","url":"https://api.github.com/users/MAPC","html_url":"https://github.com/MAPC","followers_url":"https://api.github.com/users/MAPC/followers","following_url":"https://api.github.com/users/MAPC/following{/other_user}","gists_url":"https://api.github.com/users/MAPC/gists{/gist_id}","starred_url":"https://api.github.com/users/MAPC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MAPC/subscriptions","organizations_url":"https://api.github.com/users/MAPC/orgs","repos_url":"https://api.github.com/users/MAPC/repos","events_url":"https://api.github.com/users/MAPC/events{/privacy}","received_events_url":"https://api.github.com/users/MAPC/received_events","type":"Organization","site_admin":false},"repo":{"id":47631689,"name":"developmentdatabase","full_name":"MAPC/developmentdatabase","owner":{"login":"MAPC","id":363825,"avatar_url":"https://avatars.githubusercontent.com/u/363825?v=3","gravatar_id":"","url":"https://api.github.com/users/MAPC","html_url":"https://github.com/MAPC","followers_url":"https://api.github.com/users/MAPC/followers","following_url":"https://api.github.com/users/MAPC/following{/other_user}","gists_url":"https://api.github.com/users/MAPC/gists{/gist_id}","starred_url":"https://api.github.com/users/MAPC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MAPC/subscriptions","organizations_url":"https://api.github.com/users/MAPC/orgs","repos_url":"https://api.github.com/users/MAPC/repos","events_url":"https://api.github.com/users/MAPC/events{/privacy}","received_events_url":"https://api.github.com/users/MAPC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MAPC/developmentdatabase","description":"Crowdsourced collection of recent & ongoing developments in Massachusetts.","fork":false,"url":"https://api.github.com/repos/MAPC/developmentdatabase","forks_url":"https://api.github.com/repos/MAPC/developmentdatabase/forks","keys_url":"https://api.github.com/repos/MAPC/developmentdatabase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MAPC/developmentdatabase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MAPC/developmentdatabase/teams","hooks_url":"https://api.github.com/repos/MAPC/developmentdatabase/hooks","issue_events_url":"https://api.github.com/repos/MAPC/developmentdatabase/issues/events{/number}","events_url":"https://api.github.com/repos/MAPC/developmentdatabase/events","assignees_url":"https://api.github.com/repos/MAPC/developmentdatabase/assignees{/user}","branches_url":"https://api.github.com/repos/MAPC/developmentdatabase/branches{/branch}","tags_url":"https://api.github.com/repos/MAPC/developmentdatabase/tags","blobs_url":"https://api.github.com/repos/MAPC/developmentdatabase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MAPC/developmentdatabase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MAPC/developmentdatabase/git/refs{/sha}","trees_url":"https://api.github.com/repos/MAPC/developmentdatabase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MAPC/developmentdatabase/statuses/{sha}","languages_url":"https://api.github.com/repos/MAPC/developmentdatabase/languages","stargazers_url":"https://api.github.com/repos/MAPC/developmentdatabase/stargazers","contributors_url":"https://api.github.com/repos/MAPC/developmentdatabase/contributors","subscribers_url":"https://api.github.com/repos/MAPC/developmentdatabase/subscribers","subscription_url":"https://api.github.com/repos/MAPC/developmentdatabase/subscription","commits_url":"https://api.github.com/repos/MAPC/developmentdatabase/commits{/sha}","git_commits_url":"https://api.github.com/repos/MAPC/developmentdatabase/git/commits{/sha}","comments_url":"https://api.github.com/repos/MAPC/developmentdatabase/comments{/number}","issue_comment_url":"https://api.github.com/repos/MAPC/developmentdatabase/issues/comments{/number}","contents_url":"https://api.github.com/repos/MAPC/developmentdatabase/contents/{+path}","compare_url":"https://api.github.com/repos/MAPC/developmentdatabase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MAPC/developmentdatabase/merges","archive_url":"https://api.github.com/repos/MAPC/developmentdatabase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MAPC/developmentdatabase/downloads","issues_url":"https://api.github.com/repos/MAPC/developmentdatabase/issues{/number}","pulls_url":"https://api.github.com/repos/MAPC/developmentdatabase/pulls{/number}","milestones_url":"https://api.github.com/repos/MAPC/developmentdatabase/milestones{/number}","notifications_url":"https://api.github.com/repos/MAPC/developmentdatabase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MAPC/developmentdatabase/labels{/name}","releases_url":"https://api.github.com/repos/MAPC/developmentdatabase/releases{/id}","deployments_url":"https://api.github.com/repos/MAPC/developmentdatabase/deployments","created_at":"2015-12-08T15:44:48Z","updated_at":"2016-01-26T17:47:58Z","pushed_at":"2016-03-08T21:00:58Z","git_url":"git://github.com/MAPC/developmentdatabase.git","ssh_url":"git@github.com:MAPC/developmentdatabase.git","clone_url":"https://github.com/MAPC/developmentdatabase.git","svn_url":"https://github.com/MAPC/developmentdatabase","homepage":null,"size":513,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"develop"}},"base":{"label":"MAPC:develop","ref":"develop","sha":"9ad69dd0dfb52d7bdfbd1fdab7a15d107023badd","user":{"login":"MAPC","id":363825,"avatar_url":"https://avatars.githubusercontent.com/u/363825?v=3","gravatar_id":"","url":"https://api.github.com/users/MAPC","html_url":"https://github.com/MAPC","followers_url":"https://api.github.com/users/MAPC/followers","following_url":"https://api.github.com/users/MAPC/following{/other_user}","gists_url":"https://api.github.com/users/MAPC/gists{/gist_id}","starred_url":"https://api.github.com/users/MAPC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MAPC/subscriptions","organizations_url":"https://api.github.com/users/MAPC/orgs","repos_url":"https://api.github.com/users/MAPC/repos","events_url":"https://api.github.com/users/MAPC/events{/privacy}","received_events_url":"https://api.github.com/users/MAPC/received_events","type":"Organization","site_admin":false},"repo":{"id":47631689,"name":"developmentdatabase","full_name":"MAPC/developmentdatabase","owner":{"login":"MAPC","id":363825,"avatar_url":"https://avatars.githubusercontent.com/u/363825?v=3","gravatar_id":"","url":"https://api.github.com/users/MAPC","html_url":"https://github.com/MAPC","followers_url":"https://api.github.com/users/MAPC/followers","following_url":"https://api.github.com/users/MAPC/following{/other_user}","gists_url":"https://api.github.com/users/MAPC/gists{/gist_id}","starred_url":"https://api.github.com/users/MAPC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MAPC/subscriptions","organizations_url":"https://api.github.com/users/MAPC/orgs","repos_url":"https://api.github.com/users/MAPC/repos","events_url":"https://api.github.com/users/MAPC/events{/privacy}","received_events_url":"https://api.github.com/users/MAPC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MAPC/developmentdatabase","description":"Crowdsourced collection of recent & ongoing developments in Massachusetts.","fork":false,"url":"https://api.github.com/repos/MAPC/developmentdatabase","forks_url":"https://api.github.com/repos/MAPC/developmentdatabase/forks","keys_url":"https://api.github.com/repos/MAPC/developmentdatabase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MAPC/developmentdatabase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MAPC/developmentdatabase/teams","hooks_url":"https://api.github.com/repos/MAPC/developmentdatabase/hooks","issue_events_url":"https://api.github.com/repos/MAPC/developmentdatabase/issues/events{/number}","events_url":"https://api.github.com/repos/MAPC/developmentdatabase/events","assignees_url":"https://api.github.com/repos/MAPC/developmentdatabase/assignees{/user}","branches_url":"https://api.github.com/repos/MAPC/developmentdatabase/branches{/branch}","tags_url":"https://api.github.com/repos/MAPC/developmentdatabase/tags","blobs_url":"https://api.github.com/repos/MAPC/developmentdatabase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MAPC/developmentdatabase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MAPC/developmentdatabase/git/refs{/sha}","trees_url":"https://api.github.com/repos/MAPC/developmentdatabase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MAPC/developmentdatabase/statuses/{sha}","languages_url":"https://api.github.com/repos/MAPC/developmentdatabase/languages","stargazers_url":"https://api.github.com/repos/MAPC/developmentdatabase/stargazers","contributors_url":"https://api.github.com/repos/MAPC/developmentdatabase/contributors","subscribers_url":"https://api.github.com/repos/MAPC/developmentdatabase/subscribers","subscription_url":"https://api.github.com/repos/MAPC/developmentdatabase/subscription","commits_url":"https://api.github.com/repos/MAPC/developmentdatabase/commits{/sha}","git_commits_url":"https://api.github.com/repos/MAPC/developmentdatabase/git/commits{/sha}","comments_url":"https://api.github.com/repos/MAPC/developmentdatabase/comments{/number}","issue_comment_url":"https://api.github.com/repos/MAPC/developmentdatabase/issues/comments{/number}","contents_url":"https://api.github.com/repos/MAPC/developmentdatabase/contents/{+path}","compare_url":"https://api.github.com/repos/MAPC/developmentdatabase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MAPC/developmentdatabase/merges","archive_url":"https://api.github.com/repos/MAPC/developmentdatabase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MAPC/developmentdatabase/downloads","issues_url":"https://api.github.com/repos/MAPC/developmentdatabase/issues{/number}","pulls_url":"https://api.github.com/repos/MAPC/developmentdatabase/pulls{/number}","milestones_url":"https://api.github.com/repos/MAPC/developmentdatabase/milestones{/number}","notifications_url":"https://api.github.com/repos/MAPC/developmentdatabase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MAPC/developmentdatabase/labels{/name}","releases_url":"https://api.github.com/repos/MAPC/developmentdatabase/releases{/id}","deployments_url":"https://api.github.com/repos/MAPC/developmentdatabase/deployments","created_at":"2015-12-08T15:44:48Z","updated_at":"2016-01-26T17:47:58Z","pushed_at":"2016-03-08T21:00:58Z","git_url":"git://github.com/MAPC/developmentdatabase.git","ssh_url":"git@github.com:MAPC/developmentdatabase.git","clone_url":"https://github.com/MAPC/developmentdatabase.git","svn_url":"https://github.com/MAPC/developmentdatabase","homepage":null,"size":513,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/MAPC/developmentdatabase/pulls/16"},"html":{"href":"https://github.com/MAPC/developmentdatabase/pull/16"},"issue":{"href":"https://api.github.com/repos/MAPC/developmentdatabase/issues/16"},"comments":{"href":"https://api.github.com/repos/MAPC/developmentdatabase/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/MAPC/developmentdatabase/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/MAPC/developmentdatabase/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MAPC/developmentdatabase/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/MAPC/developmentdatabase/statuses/715f44f2cd0d46fcf13199da4313c76d6b7e03a1"}}}}