{"action":"created","comment":{"url":"https://api.github.com/repos/mrvovanness/flashcard/pulls/comments/27649143","id":27649143,"diff_hunk":"@@ -20,15 +22,45 @@ def the_text_cannot_be_the_same\n     end\n   end\n \n-  def shift_date\n-    self.review_date = Date.today + 3.days\n+  def set_review_date\n+    self.review_date = DateTime.now\n   end\n \n   def check_translation(user_translation)\n     if user_translation.mb_chars.downcase.strip == original_text.mb_chars.downcase.strip\n-      update_attributes(review_date: Date.today + 3.days)\n+      update_attributes(review_date: review_shift,\n+                        number_of_reviews: number_of_reviews_shift,\n+                        fail_count: 0)\n     else\n+      update_attributes(fail_count: fail_count + 1)\n+      if fail_count == 3\n+        update_attributes(review_date: DateTime.now,\n+                          number_of_reviews: 0,\n+                          fail_count: 0)\n+      end\n       return false\n     end\n   end\n+\n+  def review_shift\n+    if number_of_reviews == 0\n+      DateTime.now + 12.hours\n+    elsif number_of_reviews == 1\n+      DateTime.now + 3.days\n+    elsif number_of_reviews == 2\n+      DateTime.now + 1.weeks\n+    elsif number_of_reviews == 3\n+      DateTime.now + 2.weeks\n+    elsif number_of_reviews == 4\n+      DateTime.now + 1.months","path":"app/models/card.rb","position":57,"original_position":57,"commit_id":"efa63b2aebb886f70580c388199dfd8a24b0b120","original_commit_id":"efa63b2aebb886f70580c388199dfd8a24b0b120","user":{"login":"Fodoj","id":78866,"avatar_url":"https://avatars.githubusercontent.com/u/78866?v=3","gravatar_id":"","url":"https://api.github.com/users/Fodoj","html_url":"https://github.com/Fodoj","followers_url":"https://api.github.com/users/Fodoj/followers","following_url":"https://api.github.com/users/Fodoj/following{/other_user}","gists_url":"https://api.github.com/users/Fodoj/gists{/gist_id}","starred_url":"https://api.github.com/users/Fodoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fodoj/subscriptions","organizations_url":"https://api.github.com/users/Fodoj/orgs","repos_url":"https://api.github.com/users/Fodoj/repos","events_url":"https://api.github.com/users/Fodoj/events{/privacy}","received_events_url":"https://api.github.com/users/Fodoj/received_events","type":"User","site_admin":false},"body":"else?","created_at":"2015-04-02T11:27:13Z","updated_at":"2015-04-02T11:27:13Z","html_url":"https://github.com/mrvovanness/flashcard/pull/13#discussion_r27649143","pull_request_url":"https://api.github.com/repos/mrvovanness/flashcard/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/mrvovanness/flashcard/pulls/comments/27649143"},"html":{"href":"https://github.com/mrvovanness/flashcard/pull/13#discussion_r27649143"},"pull_request":{"href":"https://api.github.com/repos/mrvovanness/flashcard/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/mrvovanness/flashcard/pulls/13","id":32439471,"html_url":"https://github.com/mrvovanness/flashcard/pull/13","diff_url":"https://github.com/mrvovanness/flashcard/pull/13.diff","patch_url":"https://github.com/mrvovanness/flashcard/pull/13.patch","issue_url":"https://api.github.com/repos/mrvovanness/flashcard/issues/13","number":13,"state":"open","locked":false,"title":"Leitner system","user":{"login":"mrvovanness","id":10726270,"avatar_url":"https://avatars.githubusercontent.com/u/10726270?v=3","gravatar_id":"","url":"https://api.github.com/users/mrvovanness","html_url":"https://github.com/mrvovanness","followers_url":"https://api.github.com/users/mrvovanness/followers","following_url":"https://api.github.com/users/mrvovanness/following{/other_user}","gists_url":"https://api.github.com/users/mrvovanness/gists{/gist_id}","starred_url":"https://api.github.com/users/mrvovanness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrvovanness/subscriptions","organizations_url":"https://api.github.com/users/mrvovanness/orgs","repos_url":"https://api.github.com/users/mrvovanness/repos","events_url":"https://api.github.com/users/mrvovanness/events{/privacy}","received_events_url":"https://api.github.com/users/mrvovanness/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-01T17:10:17Z","updated_at":"2015-04-02T11:27:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1388a1799dc5be1719c2ea2ba48285ebb533996d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mrvovanness/flashcard/pulls/13/commits","review_comments_url":"https://api.github.com/repos/mrvovanness/flashcard/pulls/13/comments","review_comment_url":"https://api.github.com/repos/mrvovanness/flashcard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mrvovanness/flashcard/issues/13/comments","statuses_url":"https://api.github.com/repos/mrvovanness/flashcard/statuses/efa63b2aebb886f70580c388199dfd8a24b0b120","head":{"label":"mrvovanness:thirteenth-task","ref":"thirteenth-task","sha":"efa63b2aebb886f70580c388199dfd8a24b0b120","user":{"login":"mrvovanness","id":10726270,"avatar_url":"https://avatars.githubusercontent.com/u/10726270?v=3","gravatar_id":"","url":"https://api.github.com/users/mrvovanness","html_url":"https://github.com/mrvovanness","followers_url":"https://api.github.com/users/mrvovanness/followers","following_url":"https://api.github.com/users/mrvovanness/following{/other_user}","gists_url":"https://api.github.com/users/mrvovanness/gists{/gist_id}","starred_url":"https://api.github.com/users/mrvovanness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrvovanness/subscriptions","organizations_url":"https://api.github.com/users/mrvovanness/orgs","repos_url":"https://api.github.com/users/mrvovanness/repos","events_url":"https://api.github.com/users/mrvovanness/events{/privacy}","received_events_url":"https://api.github.com/users/mrvovanness/received_events","type":"User","site_admin":false},"repo":{"id":31216808,"name":"flashcard","full_name":"mrvovanness/flashcard","owner":{"login":"mrvovanness","id":10726270,"avatar_url":"https://avatars.githubusercontent.com/u/10726270?v=3","gravatar_id":"","url":"https://api.github.com/users/mrvovanness","html_url":"https://github.com/mrvovanness","followers_url":"https://api.github.com/users/mrvovanness/followers","following_url":"https://api.github.com/users/mrvovanness/following{/other_user}","gists_url":"https://api.github.com/users/mrvovanness/gists{/gist_id}","starred_url":"https://api.github.com/users/mrvovanness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrvovanness/subscriptions","organizations_url":"https://api.github.com/users/mrvovanness/orgs","repos_url":"https://api.github.com/users/mrvovanness/repos","events_url":"https://api.github.com/users/mrvovanness/events{/privacy}","received_events_url":"https://api.github.com/users/mrvovanness/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrvovanness/flashcard","description":"","fork":false,"url":"https://api.github.com/repos/mrvovanness/flashcard","forks_url":"https://api.github.com/repos/mrvovanness/flashcard/forks","keys_url":"https://api.github.com/repos/mrvovanness/flashcard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrvovanness/flashcard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrvovanness/flashcard/teams","hooks_url":"https://api.github.com/repos/mrvovanness/flashcard/hooks","issue_events_url":"https://api.github.com/repos/mrvovanness/flashcard/issues/events{/number}","events_url":"https://api.github.com/repos/mrvovanness/flashcard/events","assignees_url":"https://api.github.com/repos/mrvovanness/flashcard/assignees{/user}","branches_url":"https://api.github.com/repos/mrvovanness/flashcard/branches{/branch}","tags_url":"https://api.github.com/repos/mrvovanness/flashcard/tags","blobs_url":"https://api.github.com/repos/mrvovanness/flashcard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrvovanness/flashcard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrvovanness/flashcard/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrvovanness/flashcard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrvovanness/flashcard/statuses/{sha}","languages_url":"https://api.github.com/repos/mrvovanness/flashcard/languages","stargazers_url":"https://api.github.com/repos/mrvovanness/flashcard/stargazers","contributors_url":"https://api.github.com/repos/mrvovanness/flashcard/contributors","subscribers_url":"https://api.github.com/repos/mrvovanness/flashcard/subscribers","subscription_url":"https://api.github.com/repos/mrvovanness/flashcard/subscription","commits_url":"https://api.github.com/repos/mrvovanness/flashcard/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrvovanness/flashcard/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrvovanness/flashcard/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrvovanness/flashcard/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrvovanness/flashcard/contents/{+path}","compare_url":"https://api.github.com/repos/mrvovanness/flashcard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrvovanness/flashcard/merges","archive_url":"https://api.github.com/repos/mrvovanness/flashcard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrvovanness/flashcard/downloads","issues_url":"https://api.github.com/repos/mrvovanness/flashcard/issues{/number}","pulls_url":"https://api.github.com/repos/mrvovanness/flashcard/pulls{/number}","milestones_url":"https://api.github.com/repos/mrvovanness/flashcard/milestones{/number}","notifications_url":"https://api.github.com/repos/mrvovanness/flashcard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrvovanness/flashcard/labels{/name}","releases_url":"https://api.github.com/repos/mrvovanness/flashcard/releases{/id}","created_at":"2015-02-23T16:24:41Z","updated_at":"2015-04-01T09:54:41Z","pushed_at":"2015-04-02T11:21:40Z","git_url":"git://github.com/mrvovanness/flashcard.git","ssh_url":"git@github.com:mrvovanness/flashcard.git","clone_url":"https://github.com/mrvovanness/flashcard.git","svn_url":"https://github.com/mrvovanness/flashcard","homepage":null,"size":592,"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":"mrvovanness:master","ref":"master","sha":"beac8800d52be326f7325a106ab202a74596f8a2","user":{"login":"mrvovanness","id":10726270,"avatar_url":"https://avatars.githubusercontent.com/u/10726270?v=3","gravatar_id":"","url":"https://api.github.com/users/mrvovanness","html_url":"https://github.com/mrvovanness","followers_url":"https://api.github.com/users/mrvovanness/followers","following_url":"https://api.github.com/users/mrvovanness/following{/other_user}","gists_url":"https://api.github.com/users/mrvovanness/gists{/gist_id}","starred_url":"https://api.github.com/users/mrvovanness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrvovanness/subscriptions","organizations_url":"https://api.github.com/users/mrvovanness/orgs","repos_url":"https://api.github.com/users/mrvovanness/repos","events_url":"https://api.github.com/users/mrvovanness/events{/privacy}","received_events_url":"https://api.github.com/users/mrvovanness/received_events","type":"User","site_admin":false},"repo":{"id":31216808,"name":"flashcard","full_name":"mrvovanness/flashcard","owner":{"login":"mrvovanness","id":10726270,"avatar_url":"https://avatars.githubusercontent.com/u/10726270?v=3","gravatar_id":"","url":"https://api.github.com/users/mrvovanness","html_url":"https://github.com/mrvovanness","followers_url":"https://api.github.com/users/mrvovanness/followers","following_url":"https://api.github.com/users/mrvovanness/following{/other_user}","gists_url":"https://api.github.com/users/mrvovanness/gists{/gist_id}","starred_url":"https://api.github.com/users/mrvovanness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrvovanness/subscriptions","organizations_url":"https://api.github.com/users/mrvovanness/orgs","repos_url":"https://api.github.com/users/mrvovanness/repos","events_url":"https://api.github.com/users/mrvovanness/events{/privacy}","received_events_url":"https://api.github.com/users/mrvovanness/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrvovanness/flashcard","description":"","fork":false,"url":"https://api.github.com/repos/mrvovanness/flashcard","forks_url":"https://api.github.com/repos/mrvovanness/flashcard/forks","keys_url":"https://api.github.com/repos/mrvovanness/flashcard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrvovanness/flashcard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrvovanness/flashcard/teams","hooks_url":"https://api.github.com/repos/mrvovanness/flashcard/hooks","issue_events_url":"https://api.github.com/repos/mrvovanness/flashcard/issues/events{/number}","events_url":"https://api.github.com/repos/mrvovanness/flashcard/events","assignees_url":"https://api.github.com/repos/mrvovanness/flashcard/assignees{/user}","branches_url":"https://api.github.com/repos/mrvovanness/flashcard/branches{/branch}","tags_url":"https://api.github.com/repos/mrvovanness/flashcard/tags","blobs_url":"https://api.github.com/repos/mrvovanness/flashcard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrvovanness/flashcard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrvovanness/flashcard/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrvovanness/flashcard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrvovanness/flashcard/statuses/{sha}","languages_url":"https://api.github.com/repos/mrvovanness/flashcard/languages","stargazers_url":"https://api.github.com/repos/mrvovanness/flashcard/stargazers","contributors_url":"https://api.github.com/repos/mrvovanness/flashcard/contributors","subscribers_url":"https://api.github.com/repos/mrvovanness/flashcard/subscribers","subscription_url":"https://api.github.com/repos/mrvovanness/flashcard/subscription","commits_url":"https://api.github.com/repos/mrvovanness/flashcard/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrvovanness/flashcard/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrvovanness/flashcard/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrvovanness/flashcard/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrvovanness/flashcard/contents/{+path}","compare_url":"https://api.github.com/repos/mrvovanness/flashcard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrvovanness/flashcard/merges","archive_url":"https://api.github.com/repos/mrvovanness/flashcard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrvovanness/flashcard/downloads","issues_url":"https://api.github.com/repos/mrvovanness/flashcard/issues{/number}","pulls_url":"https://api.github.com/repos/mrvovanness/flashcard/pulls{/number}","milestones_url":"https://api.github.com/repos/mrvovanness/flashcard/milestones{/number}","notifications_url":"https://api.github.com/repos/mrvovanness/flashcard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrvovanness/flashcard/labels{/name}","releases_url":"https://api.github.com/repos/mrvovanness/flashcard/releases{/id}","created_at":"2015-02-23T16:24:41Z","updated_at":"2015-04-01T09:54:41Z","pushed_at":"2015-04-02T11:21:40Z","git_url":"git://github.com/mrvovanness/flashcard.git","ssh_url":"git@github.com:mrvovanness/flashcard.git","clone_url":"https://github.com/mrvovanness/flashcard.git","svn_url":"https://github.com/mrvovanness/flashcard","homepage":null,"size":592,"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/mrvovanness/flashcard/pulls/13"},"html":{"href":"https://github.com/mrvovanness/flashcard/pull/13"},"issue":{"href":"https://api.github.com/repos/mrvovanness/flashcard/issues/13"},"comments":{"href":"https://api.github.com/repos/mrvovanness/flashcard/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/mrvovanness/flashcard/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/mrvovanness/flashcard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mrvovanness/flashcard/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/mrvovanness/flashcard/statuses/efa63b2aebb886f70580c388199dfd8a24b0b120"}}}}