{"action":"created","comment":{"url":"https://api.github.com/repos/honestweb/flashcards/pulls/comments/43479313","id":43479313,"diff_hunk":"@@ -47,6 +53,31 @@ def self.take_for_review(user_id)\n     end\n   end\n \n+  def set_interval\n+    interval = case correct_answers\n+      when 1 then 12.hours\n+      when 2 then 3.days\n+      when 3 then 1.week\n+      when 4 then 2.weeks\n+      when 5..(1.0 / 0.0) then 1.month # 5 and more","path":"app/models/card.rb","position":32,"original_position":32,"commit_id":"afc1202676a31226ae66a9885ff9976fc1747dba","original_commit_id":"afc1202676a31226ae66a9885ff9976fc1747dba","user":{"login":"mkdev-mentor-1","id":11962702,"avatar_url":"https://avatars.githubusercontent.com/u/11962702?v=3","gravatar_id":"","url":"https://api.github.com/users/mkdev-mentor-1","html_url":"https://github.com/mkdev-mentor-1","followers_url":"https://api.github.com/users/mkdev-mentor-1/followers","following_url":"https://api.github.com/users/mkdev-mentor-1/following{/other_user}","gists_url":"https://api.github.com/users/mkdev-mentor-1/gists{/gist_id}","starred_url":"https://api.github.com/users/mkdev-mentor-1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkdev-mentor-1/subscriptions","organizations_url":"https://api.github.com/users/mkdev-mentor-1/orgs","repos_url":"https://api.github.com/users/mkdev-mentor-1/repos","events_url":"https://api.github.com/users/mkdev-mentor-1/events{/privacy}","received_events_url":"https://api.github.com/users/mkdev-mentor-1/received_events","type":"User","site_admin":false},"body":"хаунд прав\r\n\r\nи почему ты тут делишь на ноль? :) ","created_at":"2015-10-30T08:04:32Z","updated_at":"2015-10-30T08:04:32Z","html_url":"https://github.com/honestweb/flashcards/pull/13#discussion_r43479313","pull_request_url":"https://api.github.com/repos/honestweb/flashcards/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/honestweb/flashcards/pulls/comments/43479313"},"html":{"href":"https://github.com/honestweb/flashcards/pull/13#discussion_r43479313"},"pull_request":{"href":"https://api.github.com/repos/honestweb/flashcards/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/honestweb/flashcards/pulls/13","id":49135100,"html_url":"https://github.com/honestweb/flashcards/pull/13","diff_url":"https://github.com/honestweb/flashcards/pull/13.diff","patch_url":"https://github.com/honestweb/flashcards/pull/13.patch","issue_url":"https://api.github.com/repos/honestweb/flashcards/issues/13","number":13,"state":"open","locked":false,"title":"Spaced repetition","user":{"login":"honestweb","id":8902399,"avatar_url":"https://avatars.githubusercontent.com/u/8902399?v=3","gravatar_id":"","url":"https://api.github.com/users/honestweb","html_url":"https://github.com/honestweb","followers_url":"https://api.github.com/users/honestweb/followers","following_url":"https://api.github.com/users/honestweb/following{/other_user}","gists_url":"https://api.github.com/users/honestweb/gists{/gist_id}","starred_url":"https://api.github.com/users/honestweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/honestweb/subscriptions","organizations_url":"https://api.github.com/users/honestweb/orgs","repos_url":"https://api.github.com/users/honestweb/repos","events_url":"https://api.github.com/users/honestweb/events{/privacy}","received_events_url":"https://api.github.com/users/honestweb/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-29T12:54:47Z","updated_at":"2015-10-30T08:04:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5b1c2d5b970a81d4f7cc70b39bcd05b788581c02","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/honestweb/flashcards/pulls/13/commits","review_comments_url":"https://api.github.com/repos/honestweb/flashcards/pulls/13/comments","review_comment_url":"https://api.github.com/repos/honestweb/flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/honestweb/flashcards/issues/13/comments","statuses_url":"https://api.github.com/repos/honestweb/flashcards/statuses/afc1202676a31226ae66a9885ff9976fc1747dba","head":{"label":"honestweb:thirteenth-task","ref":"thirteenth-task","sha":"afc1202676a31226ae66a9885ff9976fc1747dba","user":{"login":"honestweb","id":8902399,"avatar_url":"https://avatars.githubusercontent.com/u/8902399?v=3","gravatar_id":"","url":"https://api.github.com/users/honestweb","html_url":"https://github.com/honestweb","followers_url":"https://api.github.com/users/honestweb/followers","following_url":"https://api.github.com/users/honestweb/following{/other_user}","gists_url":"https://api.github.com/users/honestweb/gists{/gist_id}","starred_url":"https://api.github.com/users/honestweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/honestweb/subscriptions","organizations_url":"https://api.github.com/users/honestweb/orgs","repos_url":"https://api.github.com/users/honestweb/repos","events_url":"https://api.github.com/users/honestweb/events{/privacy}","received_events_url":"https://api.github.com/users/honestweb/received_events","type":"User","site_admin":false},"repo":{"id":42043123,"name":"flashcards","full_name":"honestweb/flashcards","owner":{"login":"honestweb","id":8902399,"avatar_url":"https://avatars.githubusercontent.com/u/8902399?v=3","gravatar_id":"","url":"https://api.github.com/users/honestweb","html_url":"https://github.com/honestweb","followers_url":"https://api.github.com/users/honestweb/followers","following_url":"https://api.github.com/users/honestweb/following{/other_user}","gists_url":"https://api.github.com/users/honestweb/gists{/gist_id}","starred_url":"https://api.github.com/users/honestweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/honestweb/subscriptions","organizations_url":"https://api.github.com/users/honestweb/orgs","repos_url":"https://api.github.com/users/honestweb/repos","events_url":"https://api.github.com/users/honestweb/events{/privacy}","received_events_url":"https://api.github.com/users/honestweb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/honestweb/flashcards","description":"Flashcards manager","fork":false,"url":"https://api.github.com/repos/honestweb/flashcards","forks_url":"https://api.github.com/repos/honestweb/flashcards/forks","keys_url":"https://api.github.com/repos/honestweb/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/honestweb/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/honestweb/flashcards/teams","hooks_url":"https://api.github.com/repos/honestweb/flashcards/hooks","issue_events_url":"https://api.github.com/repos/honestweb/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/honestweb/flashcards/events","assignees_url":"https://api.github.com/repos/honestweb/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/honestweb/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/honestweb/flashcards/tags","blobs_url":"https://api.github.com/repos/honestweb/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/honestweb/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/honestweb/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/honestweb/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/honestweb/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/honestweb/flashcards/languages","stargazers_url":"https://api.github.com/repos/honestweb/flashcards/stargazers","contributors_url":"https://api.github.com/repos/honestweb/flashcards/contributors","subscribers_url":"https://api.github.com/repos/honestweb/flashcards/subscribers","subscription_url":"https://api.github.com/repos/honestweb/flashcards/subscription","commits_url":"https://api.github.com/repos/honestweb/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/honestweb/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/honestweb/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/honestweb/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/honestweb/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/honestweb/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/honestweb/flashcards/merges","archive_url":"https://api.github.com/repos/honestweb/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/honestweb/flashcards/downloads","issues_url":"https://api.github.com/repos/honestweb/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/honestweb/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/honestweb/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/honestweb/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/honestweb/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/honestweb/flashcards/releases{/id}","created_at":"2015-09-07T09:12:04Z","updated_at":"2015-10-24T18:35:45Z","pushed_at":"2015-10-29T22:13:54Z","git_url":"git://github.com/honestweb/flashcards.git","ssh_url":"git@github.com:honestweb/flashcards.git","clone_url":"https://github.com/honestweb/flashcards.git","svn_url":"https://github.com/honestweb/flashcards","homepage":"https://honestcards.herokuapp.com/","size":684,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"honestweb:master","ref":"master","sha":"a82a2ba3923c880c2930ffe02b72d99abacde114","user":{"login":"honestweb","id":8902399,"avatar_url":"https://avatars.githubusercontent.com/u/8902399?v=3","gravatar_id":"","url":"https://api.github.com/users/honestweb","html_url":"https://github.com/honestweb","followers_url":"https://api.github.com/users/honestweb/followers","following_url":"https://api.github.com/users/honestweb/following{/other_user}","gists_url":"https://api.github.com/users/honestweb/gists{/gist_id}","starred_url":"https://api.github.com/users/honestweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/honestweb/subscriptions","organizations_url":"https://api.github.com/users/honestweb/orgs","repos_url":"https://api.github.com/users/honestweb/repos","events_url":"https://api.github.com/users/honestweb/events{/privacy}","received_events_url":"https://api.github.com/users/honestweb/received_events","type":"User","site_admin":false},"repo":{"id":42043123,"name":"flashcards","full_name":"honestweb/flashcards","owner":{"login":"honestweb","id":8902399,"avatar_url":"https://avatars.githubusercontent.com/u/8902399?v=3","gravatar_id":"","url":"https://api.github.com/users/honestweb","html_url":"https://github.com/honestweb","followers_url":"https://api.github.com/users/honestweb/followers","following_url":"https://api.github.com/users/honestweb/following{/other_user}","gists_url":"https://api.github.com/users/honestweb/gists{/gist_id}","starred_url":"https://api.github.com/users/honestweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/honestweb/subscriptions","organizations_url":"https://api.github.com/users/honestweb/orgs","repos_url":"https://api.github.com/users/honestweb/repos","events_url":"https://api.github.com/users/honestweb/events{/privacy}","received_events_url":"https://api.github.com/users/honestweb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/honestweb/flashcards","description":"Flashcards manager","fork":false,"url":"https://api.github.com/repos/honestweb/flashcards","forks_url":"https://api.github.com/repos/honestweb/flashcards/forks","keys_url":"https://api.github.com/repos/honestweb/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/honestweb/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/honestweb/flashcards/teams","hooks_url":"https://api.github.com/repos/honestweb/flashcards/hooks","issue_events_url":"https://api.github.com/repos/honestweb/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/honestweb/flashcards/events","assignees_url":"https://api.github.com/repos/honestweb/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/honestweb/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/honestweb/flashcards/tags","blobs_url":"https://api.github.com/repos/honestweb/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/honestweb/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/honestweb/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/honestweb/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/honestweb/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/honestweb/flashcards/languages","stargazers_url":"https://api.github.com/repos/honestweb/flashcards/stargazers","contributors_url":"https://api.github.com/repos/honestweb/flashcards/contributors","subscribers_url":"https://api.github.com/repos/honestweb/flashcards/subscribers","subscription_url":"https://api.github.com/repos/honestweb/flashcards/subscription","commits_url":"https://api.github.com/repos/honestweb/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/honestweb/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/honestweb/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/honestweb/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/honestweb/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/honestweb/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/honestweb/flashcards/merges","archive_url":"https://api.github.com/repos/honestweb/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/honestweb/flashcards/downloads","issues_url":"https://api.github.com/repos/honestweb/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/honestweb/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/honestweb/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/honestweb/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/honestweb/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/honestweb/flashcards/releases{/id}","created_at":"2015-09-07T09:12:04Z","updated_at":"2015-10-24T18:35:45Z","pushed_at":"2015-10-29T22:13:54Z","git_url":"git://github.com/honestweb/flashcards.git","ssh_url":"git@github.com:honestweb/flashcards.git","clone_url":"https://github.com/honestweb/flashcards.git","svn_url":"https://github.com/honestweb/flashcards","homepage":"https://honestcards.herokuapp.com/","size":684,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/honestweb/flashcards/pulls/13"},"html":{"href":"https://github.com/honestweb/flashcards/pull/13"},"issue":{"href":"https://api.github.com/repos/honestweb/flashcards/issues/13"},"comments":{"href":"https://api.github.com/repos/honestweb/flashcards/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/honestweb/flashcards/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/honestweb/flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/honestweb/flashcards/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/honestweb/flashcards/statuses/afc1202676a31226ae66a9885ff9976fc1747dba"}}}}