{"action":"created","comment":{"url":"https://api.github.com/repos/sanjcho/Flashcards/pulls/comments/52593015","id":52593015,"diff_hunk":"@@ -41,11 +41,13 @@ def destroy\n   end\n \n   def compare\n-    #compared_text = params[:compared_text]\n-    if CardComparator.call(card: card, compared_text: params[:compared_text])\n+    difference = CardComparator.call(card: card, compared_text: params[:compared_text])\n+    if difference == 0   # absolutely right\n       flash[:success] = t(\"success\")\n-    else\n-      flash[:danger] = t(\"wrong\")   # answer is not correct\n+    elsif difference <= 2   # right, but some type errors\n+      flash[:warning] = t(\"success_with_type_error\") + params[:compared_text] + t(\"what_is_need_to_be_typed\") + card.original_text","path":"app/controllers/cards_controller.rb","position":12,"original_position":12,"commit_id":"95e9e18114dba4bc5fac8dc7117216630a673db9","original_commit_id":"95e9e18114dba4bc5fac8dc7117216630a673db9","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":"Line is too long. [130/80]","created_at":"2016-02-11T12:09:10Z","updated_at":"2016-02-11T12:09:10Z","html_url":"https://github.com/sanjcho/Flashcards/pull/15#discussion_r52593015","pull_request_url":"https://api.github.com/repos/sanjcho/Flashcards/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/sanjcho/Flashcards/pulls/comments/52593015"},"html":{"href":"https://github.com/sanjcho/Flashcards/pull/15#discussion_r52593015"},"pull_request":{"href":"https://api.github.com/repos/sanjcho/Flashcards/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/sanjcho/Flashcards/pulls/15","id":59022088,"html_url":"https://github.com/sanjcho/Flashcards/pull/15","diff_url":"https://github.com/sanjcho/Flashcards/pull/15.diff","patch_url":"https://github.com/sanjcho/Flashcards/pull/15.patch","issue_url":"https://api.github.com/repos/sanjcho/Flashcards/issues/15","number":15,"state":"open","locked":false,"title":"14th task","user":{"login":"sanjcho","id":11830303,"avatar_url":"https://avatars.githubusercontent.com/u/11830303?v=3","gravatar_id":"","url":"https://api.github.com/users/sanjcho","html_url":"https://github.com/sanjcho","followers_url":"https://api.github.com/users/sanjcho/followers","following_url":"https://api.github.com/users/sanjcho/following{/other_user}","gists_url":"https://api.github.com/users/sanjcho/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjcho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjcho/subscriptions","organizations_url":"https://api.github.com/users/sanjcho/orgs","repos_url":"https://api.github.com/users/sanjcho/repos","events_url":"https://api.github.com/users/sanjcho/events{/privacy}","received_events_url":"https://api.github.com/users/sanjcho/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-11T12:08:35Z","updated_at":"2016-02-11T12:09:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e7d5a7632a0cbc6d6767d35db07e9294ed951acf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sanjcho/Flashcards/pulls/15/commits","review_comments_url":"https://api.github.com/repos/sanjcho/Flashcards/pulls/15/comments","review_comment_url":"https://api.github.com/repos/sanjcho/Flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sanjcho/Flashcards/issues/15/comments","statuses_url":"https://api.github.com/repos/sanjcho/Flashcards/statuses/95e9e18114dba4bc5fac8dc7117216630a673db9","head":{"label":"sanjcho:14th-task","ref":"14th-task","sha":"95e9e18114dba4bc5fac8dc7117216630a673db9","user":{"login":"sanjcho","id":11830303,"avatar_url":"https://avatars.githubusercontent.com/u/11830303?v=3","gravatar_id":"","url":"https://api.github.com/users/sanjcho","html_url":"https://github.com/sanjcho","followers_url":"https://api.github.com/users/sanjcho/followers","following_url":"https://api.github.com/users/sanjcho/following{/other_user}","gists_url":"https://api.github.com/users/sanjcho/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjcho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjcho/subscriptions","organizations_url":"https://api.github.com/users/sanjcho/orgs","repos_url":"https://api.github.com/users/sanjcho/repos","events_url":"https://api.github.com/users/sanjcho/events{/privacy}","received_events_url":"https://api.github.com/users/sanjcho/received_events","type":"User","site_admin":false},"repo":{"id":49260824,"name":"Flashcards","full_name":"sanjcho/Flashcards","owner":{"login":"sanjcho","id":11830303,"avatar_url":"https://avatars.githubusercontent.com/u/11830303?v=3","gravatar_id":"","url":"https://api.github.com/users/sanjcho","html_url":"https://github.com/sanjcho","followers_url":"https://api.github.com/users/sanjcho/followers","following_url":"https://api.github.com/users/sanjcho/following{/other_user}","gists_url":"https://api.github.com/users/sanjcho/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjcho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjcho/subscriptions","organizations_url":"https://api.github.com/users/sanjcho/orgs","repos_url":"https://api.github.com/users/sanjcho/repos","events_url":"https://api.github.com/users/sanjcho/events{/privacy}","received_events_url":"https://api.github.com/users/sanjcho/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sanjcho/Flashcards","description":"","fork":false,"url":"https://api.github.com/repos/sanjcho/Flashcards","forks_url":"https://api.github.com/repos/sanjcho/Flashcards/forks","keys_url":"https://api.github.com/repos/sanjcho/Flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sanjcho/Flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sanjcho/Flashcards/teams","hooks_url":"https://api.github.com/repos/sanjcho/Flashcards/hooks","issue_events_url":"https://api.github.com/repos/sanjcho/Flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/sanjcho/Flashcards/events","assignees_url":"https://api.github.com/repos/sanjcho/Flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/sanjcho/Flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/sanjcho/Flashcards/tags","blobs_url":"https://api.github.com/repos/sanjcho/Flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sanjcho/Flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sanjcho/Flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/sanjcho/Flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sanjcho/Flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/sanjcho/Flashcards/languages","stargazers_url":"https://api.github.com/repos/sanjcho/Flashcards/stargazers","contributors_url":"https://api.github.com/repos/sanjcho/Flashcards/contributors","subscribers_url":"https://api.github.com/repos/sanjcho/Flashcards/subscribers","subscription_url":"https://api.github.com/repos/sanjcho/Flashcards/subscription","commits_url":"https://api.github.com/repos/sanjcho/Flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/sanjcho/Flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/sanjcho/Flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/sanjcho/Flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/sanjcho/Flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/sanjcho/Flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sanjcho/Flashcards/merges","archive_url":"https://api.github.com/repos/sanjcho/Flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sanjcho/Flashcards/downloads","issues_url":"https://api.github.com/repos/sanjcho/Flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/sanjcho/Flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/sanjcho/Flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/sanjcho/Flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sanjcho/Flashcards/labels{/name}","releases_url":"https://api.github.com/repos/sanjcho/Flashcards/releases{/id}","deployments_url":"https://api.github.com/repos/sanjcho/Flashcards/deployments","created_at":"2016-01-08T08:46:54Z","updated_at":"2016-01-12T07:41:12Z","pushed_at":"2016-02-11T12:08:36Z","git_url":"git://github.com/sanjcho/Flashcards.git","ssh_url":"git@github.com:sanjcho/Flashcards.git","clone_url":"https://github.com/sanjcho/Flashcards.git","svn_url":"https://github.com/sanjcho/Flashcards","homepage":null,"size":376,"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":"sanjcho:master","ref":"master","sha":"8d50925f4b8f6ff34f4e9a51b1c50d02ed24af9c","user":{"login":"sanjcho","id":11830303,"avatar_url":"https://avatars.githubusercontent.com/u/11830303?v=3","gravatar_id":"","url":"https://api.github.com/users/sanjcho","html_url":"https://github.com/sanjcho","followers_url":"https://api.github.com/users/sanjcho/followers","following_url":"https://api.github.com/users/sanjcho/following{/other_user}","gists_url":"https://api.github.com/users/sanjcho/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjcho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjcho/subscriptions","organizations_url":"https://api.github.com/users/sanjcho/orgs","repos_url":"https://api.github.com/users/sanjcho/repos","events_url":"https://api.github.com/users/sanjcho/events{/privacy}","received_events_url":"https://api.github.com/users/sanjcho/received_events","type":"User","site_admin":false},"repo":{"id":49260824,"name":"Flashcards","full_name":"sanjcho/Flashcards","owner":{"login":"sanjcho","id":11830303,"avatar_url":"https://avatars.githubusercontent.com/u/11830303?v=3","gravatar_id":"","url":"https://api.github.com/users/sanjcho","html_url":"https://github.com/sanjcho","followers_url":"https://api.github.com/users/sanjcho/followers","following_url":"https://api.github.com/users/sanjcho/following{/other_user}","gists_url":"https://api.github.com/users/sanjcho/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjcho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjcho/subscriptions","organizations_url":"https://api.github.com/users/sanjcho/orgs","repos_url":"https://api.github.com/users/sanjcho/repos","events_url":"https://api.github.com/users/sanjcho/events{/privacy}","received_events_url":"https://api.github.com/users/sanjcho/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sanjcho/Flashcards","description":"","fork":false,"url":"https://api.github.com/repos/sanjcho/Flashcards","forks_url":"https://api.github.com/repos/sanjcho/Flashcards/forks","keys_url":"https://api.github.com/repos/sanjcho/Flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sanjcho/Flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sanjcho/Flashcards/teams","hooks_url":"https://api.github.com/repos/sanjcho/Flashcards/hooks","issue_events_url":"https://api.github.com/repos/sanjcho/Flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/sanjcho/Flashcards/events","assignees_url":"https://api.github.com/repos/sanjcho/Flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/sanjcho/Flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/sanjcho/Flashcards/tags","blobs_url":"https://api.github.com/repos/sanjcho/Flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sanjcho/Flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sanjcho/Flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/sanjcho/Flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sanjcho/Flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/sanjcho/Flashcards/languages","stargazers_url":"https://api.github.com/repos/sanjcho/Flashcards/stargazers","contributors_url":"https://api.github.com/repos/sanjcho/Flashcards/contributors","subscribers_url":"https://api.github.com/repos/sanjcho/Flashcards/subscribers","subscription_url":"https://api.github.com/repos/sanjcho/Flashcards/subscription","commits_url":"https://api.github.com/repos/sanjcho/Flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/sanjcho/Flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/sanjcho/Flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/sanjcho/Flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/sanjcho/Flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/sanjcho/Flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sanjcho/Flashcards/merges","archive_url":"https://api.github.com/repos/sanjcho/Flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sanjcho/Flashcards/downloads","issues_url":"https://api.github.com/repos/sanjcho/Flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/sanjcho/Flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/sanjcho/Flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/sanjcho/Flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sanjcho/Flashcards/labels{/name}","releases_url":"https://api.github.com/repos/sanjcho/Flashcards/releases{/id}","deployments_url":"https://api.github.com/repos/sanjcho/Flashcards/deployments","created_at":"2016-01-08T08:46:54Z","updated_at":"2016-01-12T07:41:12Z","pushed_at":"2016-02-11T12:08:36Z","git_url":"git://github.com/sanjcho/Flashcards.git","ssh_url":"git@github.com:sanjcho/Flashcards.git","clone_url":"https://github.com/sanjcho/Flashcards.git","svn_url":"https://github.com/sanjcho/Flashcards","homepage":null,"size":376,"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/sanjcho/Flashcards/pulls/15"},"html":{"href":"https://github.com/sanjcho/Flashcards/pull/15"},"issue":{"href":"https://api.github.com/repos/sanjcho/Flashcards/issues/15"},"comments":{"href":"https://api.github.com/repos/sanjcho/Flashcards/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/sanjcho/Flashcards/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/sanjcho/Flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sanjcho/Flashcards/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/sanjcho/Flashcards/statuses/95e9e18114dba4bc5fac8dc7117216630a673db9"}}}}