{"action":"created","comment":{"url":"https://api.github.com/repos/vlasiak/rails_tada/pulls/comments/35849374","id":35849374,"diff_hunk":"@@ -0,0 +1,33 @@\n+class DailyStatisticNotifier\n+\n+  def initialize statistic\n+    @completed = statistic[:completed]\n+    @remaining = statistic[:remaining]\n+  end\n+\n+  def all_items_completed?\n+    remaining == 0\n+  end\n+\n+  def no_items_done?\n+    completed == 0\n+  end\n+\n+  def completed_number\n+    completed\n+  end","path":"app/view_objects/daily_statistic_notifier.rb","position":18,"original_position":18,"commit_id":"1987dd09b48e01fa674c4c8fc0f563c25c0313e0","original_commit_id":"1987dd09b48e01fa674c4c8fc0f563c25c0313e0","user":{"login":"sergeyradkevich","id":2563629,"avatar_url":"https://avatars.githubusercontent.com/u/2563629?v=3","gravatar_id":"","url":"https://api.github.com/users/sergeyradkevich","html_url":"https://github.com/sergeyradkevich","followers_url":"https://api.github.com/users/sergeyradkevich/followers","following_url":"https://api.github.com/users/sergeyradkevich/following{/other_user}","gists_url":"https://api.github.com/users/sergeyradkevich/gists{/gist_id}","starred_url":"https://api.github.com/users/sergeyradkevich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergeyradkevich/subscriptions","organizations_url":"https://api.github.com/users/sergeyradkevich/orgs","repos_url":"https://api.github.com/users/sergeyradkevich/repos","events_url":"https://api.github.com/users/sergeyradkevich/events{/privacy}","received_events_url":"https://api.github.com/users/sergeyradkevich/received_events","type":"User","site_admin":false},"body":"FYI: `amount` term can be also used instead of number.","created_at":"2015-07-30T08:39:06Z","updated_at":"2015-07-30T08:39:06Z","html_url":"https://github.com/vlasiak/rails_tada/pull/16#discussion_r35849374","pull_request_url":"https://api.github.com/repos/vlasiak/rails_tada/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/vlasiak/rails_tada/pulls/comments/35849374"},"html":{"href":"https://github.com/vlasiak/rails_tada/pull/16#discussion_r35849374"},"pull_request":{"href":"https://api.github.com/repos/vlasiak/rails_tada/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/vlasiak/rails_tada/pulls/16","id":41121954,"html_url":"https://github.com/vlasiak/rails_tada/pull/16","diff_url":"https://github.com/vlasiak/rails_tada/pull/16.diff","patch_url":"https://github.com/vlasiak/rails_tada/pull/16.patch","issue_url":"https://api.github.com/repos/vlasiak/rails_tada/issues/16","number":16,"state":"open","locked":false,"title":"A user should receive daily digest with items statistic","user":{"login":"vlasiak","id":8775700,"avatar_url":"https://avatars.githubusercontent.com/u/8775700?v=3","gravatar_id":"","url":"https://api.github.com/users/vlasiak","html_url":"https://github.com/vlasiak","followers_url":"https://api.github.com/users/vlasiak/followers","following_url":"https://api.github.com/users/vlasiak/following{/other_user}","gists_url":"https://api.github.com/users/vlasiak/gists{/gist_id}","starred_url":"https://api.github.com/users/vlasiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlasiak/subscriptions","organizations_url":"https://api.github.com/users/vlasiak/orgs","repos_url":"https://api.github.com/users/vlasiak/repos","events_url":"https://api.github.com/users/vlasiak/events{/privacy}","received_events_url":"https://api.github.com/users/vlasiak/received_events","type":"User","site_admin":false},"body":"An opportunity to send to users daily digest with items complete/incomplete statistic","created_at":"2015-07-29T13:21:37Z","updated_at":"2015-07-30T08:39:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c49b92889e0426f45e12ddd0c3e044d00f3c5122","assignee":{"login":"vlasiak","id":8775700,"avatar_url":"https://avatars.githubusercontent.com/u/8775700?v=3","gravatar_id":"","url":"https://api.github.com/users/vlasiak","html_url":"https://github.com/vlasiak","followers_url":"https://api.github.com/users/vlasiak/followers","following_url":"https://api.github.com/users/vlasiak/following{/other_user}","gists_url":"https://api.github.com/users/vlasiak/gists{/gist_id}","starred_url":"https://api.github.com/users/vlasiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlasiak/subscriptions","organizations_url":"https://api.github.com/users/vlasiak/orgs","repos_url":"https://api.github.com/users/vlasiak/repos","events_url":"https://api.github.com/users/vlasiak/events{/privacy}","received_events_url":"https://api.github.com/users/vlasiak/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/vlasiak/rails_tada/milestones/5","html_url":"https://github.com/vlasiak/rails_tada/milestones/Digest","labels_url":"https://api.github.com/repos/vlasiak/rails_tada/milestones/5/labels","id":1222010,"number":5,"title":"Digest","description":"Bring notifications to users about daily progress on todos","creator":{"login":"sergeyradkevich","id":2563629,"avatar_url":"https://avatars.githubusercontent.com/u/2563629?v=3","gravatar_id":"","url":"https://api.github.com/users/sergeyradkevich","html_url":"https://github.com/sergeyradkevich","followers_url":"https://api.github.com/users/sergeyradkevich/followers","following_url":"https://api.github.com/users/sergeyradkevich/following{/other_user}","gists_url":"https://api.github.com/users/sergeyradkevich/gists{/gist_id}","starred_url":"https://api.github.com/users/sergeyradkevich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergeyradkevich/subscriptions","organizations_url":"https://api.github.com/users/sergeyradkevich/orgs","repos_url":"https://api.github.com/users/sergeyradkevich/repos","events_url":"https://api.github.com/users/sergeyradkevich/events{/privacy}","received_events_url":"https://api.github.com/users/sergeyradkevich/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":1,"state":"open","created_at":"2015-07-23T12:55:48Z","updated_at":"2015-07-30T07:18:31Z","due_on":"2015-07-29T21:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/vlasiak/rails_tada/pulls/16/commits","review_comments_url":"https://api.github.com/repos/vlasiak/rails_tada/pulls/16/comments","review_comment_url":"https://api.github.com/repos/vlasiak/rails_tada/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vlasiak/rails_tada/issues/16/comments","statuses_url":"https://api.github.com/repos/vlasiak/rails_tada/statuses/1987dd09b48e01fa674c4c8fc0f563c25c0313e0","head":{"label":"vlasiak:16-daily-digest-with-statistic","ref":"16-daily-digest-with-statistic","sha":"1987dd09b48e01fa674c4c8fc0f563c25c0313e0","user":{"login":"vlasiak","id":8775700,"avatar_url":"https://avatars.githubusercontent.com/u/8775700?v=3","gravatar_id":"","url":"https://api.github.com/users/vlasiak","html_url":"https://github.com/vlasiak","followers_url":"https://api.github.com/users/vlasiak/followers","following_url":"https://api.github.com/users/vlasiak/following{/other_user}","gists_url":"https://api.github.com/users/vlasiak/gists{/gist_id}","starred_url":"https://api.github.com/users/vlasiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlasiak/subscriptions","organizations_url":"https://api.github.com/users/vlasiak/orgs","repos_url":"https://api.github.com/users/vlasiak/repos","events_url":"https://api.github.com/users/vlasiak/events{/privacy}","received_events_url":"https://api.github.com/users/vlasiak/received_events","type":"User","site_admin":false},"repo":{"id":37536483,"name":"rails_tada","full_name":"vlasiak/rails_tada","owner":{"login":"vlasiak","id":8775700,"avatar_url":"https://avatars.githubusercontent.com/u/8775700?v=3","gravatar_id":"","url":"https://api.github.com/users/vlasiak","html_url":"https://github.com/vlasiak","followers_url":"https://api.github.com/users/vlasiak/followers","following_url":"https://api.github.com/users/vlasiak/following{/other_user}","gists_url":"https://api.github.com/users/vlasiak/gists{/gist_id}","starred_url":"https://api.github.com/users/vlasiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlasiak/subscriptions","organizations_url":"https://api.github.com/users/vlasiak/orgs","repos_url":"https://api.github.com/users/vlasiak/repos","events_url":"https://api.github.com/users/vlasiak/events{/privacy}","received_events_url":"https://api.github.com/users/vlasiak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vlasiak/rails_tada","description":"","fork":false,"url":"https://api.github.com/repos/vlasiak/rails_tada","forks_url":"https://api.github.com/repos/vlasiak/rails_tada/forks","keys_url":"https://api.github.com/repos/vlasiak/rails_tada/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vlasiak/rails_tada/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vlasiak/rails_tada/teams","hooks_url":"https://api.github.com/repos/vlasiak/rails_tada/hooks","issue_events_url":"https://api.github.com/repos/vlasiak/rails_tada/issues/events{/number}","events_url":"https://api.github.com/repos/vlasiak/rails_tada/events","assignees_url":"https://api.github.com/repos/vlasiak/rails_tada/assignees{/user}","branches_url":"https://api.github.com/repos/vlasiak/rails_tada/branches{/branch}","tags_url":"https://api.github.com/repos/vlasiak/rails_tada/tags","blobs_url":"https://api.github.com/repos/vlasiak/rails_tada/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vlasiak/rails_tada/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vlasiak/rails_tada/git/refs{/sha}","trees_url":"https://api.github.com/repos/vlasiak/rails_tada/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vlasiak/rails_tada/statuses/{sha}","languages_url":"https://api.github.com/repos/vlasiak/rails_tada/languages","stargazers_url":"https://api.github.com/repos/vlasiak/rails_tada/stargazers","contributors_url":"https://api.github.com/repos/vlasiak/rails_tada/contributors","subscribers_url":"https://api.github.com/repos/vlasiak/rails_tada/subscribers","subscription_url":"https://api.github.com/repos/vlasiak/rails_tada/subscription","commits_url":"https://api.github.com/repos/vlasiak/rails_tada/commits{/sha}","git_commits_url":"https://api.github.com/repos/vlasiak/rails_tada/git/commits{/sha}","comments_url":"https://api.github.com/repos/vlasiak/rails_tada/comments{/number}","issue_comment_url":"https://api.github.com/repos/vlasiak/rails_tada/issues/comments{/number}","contents_url":"https://api.github.com/repos/vlasiak/rails_tada/contents/{+path}","compare_url":"https://api.github.com/repos/vlasiak/rails_tada/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vlasiak/rails_tada/merges","archive_url":"https://api.github.com/repos/vlasiak/rails_tada/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vlasiak/rails_tada/downloads","issues_url":"https://api.github.com/repos/vlasiak/rails_tada/issues{/number}","pulls_url":"https://api.github.com/repos/vlasiak/rails_tada/pulls{/number}","milestones_url":"https://api.github.com/repos/vlasiak/rails_tada/milestones{/number}","notifications_url":"https://api.github.com/repos/vlasiak/rails_tada/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vlasiak/rails_tada/labels{/name}","releases_url":"https://api.github.com/repos/vlasiak/rails_tada/releases{/id}","created_at":"2015-06-16T14:48:44Z","updated_at":"2015-06-18T14:08:09Z","pushed_at":"2015-07-29T17:26:18Z","git_url":"git://github.com/vlasiak/rails_tada.git","ssh_url":"git@github.com:vlasiak/rails_tada.git","clone_url":"https://github.com/vlasiak/rails_tada.git","svn_url":"https://github.com/vlasiak/rails_tada","homepage":null,"size":636,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"vlasiak:master","ref":"master","sha":"e0d2f084913568e566b12423f1dee044ade6dd17","user":{"login":"vlasiak","id":8775700,"avatar_url":"https://avatars.githubusercontent.com/u/8775700?v=3","gravatar_id":"","url":"https://api.github.com/users/vlasiak","html_url":"https://github.com/vlasiak","followers_url":"https://api.github.com/users/vlasiak/followers","following_url":"https://api.github.com/users/vlasiak/following{/other_user}","gists_url":"https://api.github.com/users/vlasiak/gists{/gist_id}","starred_url":"https://api.github.com/users/vlasiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlasiak/subscriptions","organizations_url":"https://api.github.com/users/vlasiak/orgs","repos_url":"https://api.github.com/users/vlasiak/repos","events_url":"https://api.github.com/users/vlasiak/events{/privacy}","received_events_url":"https://api.github.com/users/vlasiak/received_events","type":"User","site_admin":false},"repo":{"id":37536483,"name":"rails_tada","full_name":"vlasiak/rails_tada","owner":{"login":"vlasiak","id":8775700,"avatar_url":"https://avatars.githubusercontent.com/u/8775700?v=3","gravatar_id":"","url":"https://api.github.com/users/vlasiak","html_url":"https://github.com/vlasiak","followers_url":"https://api.github.com/users/vlasiak/followers","following_url":"https://api.github.com/users/vlasiak/following{/other_user}","gists_url":"https://api.github.com/users/vlasiak/gists{/gist_id}","starred_url":"https://api.github.com/users/vlasiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlasiak/subscriptions","organizations_url":"https://api.github.com/users/vlasiak/orgs","repos_url":"https://api.github.com/users/vlasiak/repos","events_url":"https://api.github.com/users/vlasiak/events{/privacy}","received_events_url":"https://api.github.com/users/vlasiak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vlasiak/rails_tada","description":"","fork":false,"url":"https://api.github.com/repos/vlasiak/rails_tada","forks_url":"https://api.github.com/repos/vlasiak/rails_tada/forks","keys_url":"https://api.github.com/repos/vlasiak/rails_tada/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vlasiak/rails_tada/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vlasiak/rails_tada/teams","hooks_url":"https://api.github.com/repos/vlasiak/rails_tada/hooks","issue_events_url":"https://api.github.com/repos/vlasiak/rails_tada/issues/events{/number}","events_url":"https://api.github.com/repos/vlasiak/rails_tada/events","assignees_url":"https://api.github.com/repos/vlasiak/rails_tada/assignees{/user}","branches_url":"https://api.github.com/repos/vlasiak/rails_tada/branches{/branch}","tags_url":"https://api.github.com/repos/vlasiak/rails_tada/tags","blobs_url":"https://api.github.com/repos/vlasiak/rails_tada/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vlasiak/rails_tada/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vlasiak/rails_tada/git/refs{/sha}","trees_url":"https://api.github.com/repos/vlasiak/rails_tada/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vlasiak/rails_tada/statuses/{sha}","languages_url":"https://api.github.com/repos/vlasiak/rails_tada/languages","stargazers_url":"https://api.github.com/repos/vlasiak/rails_tada/stargazers","contributors_url":"https://api.github.com/repos/vlasiak/rails_tada/contributors","subscribers_url":"https://api.github.com/repos/vlasiak/rails_tada/subscribers","subscription_url":"https://api.github.com/repos/vlasiak/rails_tada/subscription","commits_url":"https://api.github.com/repos/vlasiak/rails_tada/commits{/sha}","git_commits_url":"https://api.github.com/repos/vlasiak/rails_tada/git/commits{/sha}","comments_url":"https://api.github.com/repos/vlasiak/rails_tada/comments{/number}","issue_comment_url":"https://api.github.com/repos/vlasiak/rails_tada/issues/comments{/number}","contents_url":"https://api.github.com/repos/vlasiak/rails_tada/contents/{+path}","compare_url":"https://api.github.com/repos/vlasiak/rails_tada/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vlasiak/rails_tada/merges","archive_url":"https://api.github.com/repos/vlasiak/rails_tada/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vlasiak/rails_tada/downloads","issues_url":"https://api.github.com/repos/vlasiak/rails_tada/issues{/number}","pulls_url":"https://api.github.com/repos/vlasiak/rails_tada/pulls{/number}","milestones_url":"https://api.github.com/repos/vlasiak/rails_tada/milestones{/number}","notifications_url":"https://api.github.com/repos/vlasiak/rails_tada/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vlasiak/rails_tada/labels{/name}","releases_url":"https://api.github.com/repos/vlasiak/rails_tada/releases{/id}","created_at":"2015-06-16T14:48:44Z","updated_at":"2015-06-18T14:08:09Z","pushed_at":"2015-07-29T17:26:18Z","git_url":"git://github.com/vlasiak/rails_tada.git","ssh_url":"git@github.com:vlasiak/rails_tada.git","clone_url":"https://github.com/vlasiak/rails_tada.git","svn_url":"https://github.com/vlasiak/rails_tada","homepage":null,"size":636,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vlasiak/rails_tada/pulls/16"},"html":{"href":"https://github.com/vlasiak/rails_tada/pull/16"},"issue":{"href":"https://api.github.com/repos/vlasiak/rails_tada/issues/16"},"comments":{"href":"https://api.github.com/repos/vlasiak/rails_tada/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/vlasiak/rails_tada/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/vlasiak/rails_tada/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vlasiak/rails_tada/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/vlasiak/rails_tada/statuses/1987dd09b48e01fa674c4c8fc0f563c25c0313e0"}}}}