GitHub PullRequestReviewCommentEvent at 2014-09-23 17:17:07
Repository: teste_tw
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/gabrielcaires/teste_tw/pulls/comments/17923199","id":17923199,"diff_hunk":"@@ -0,0 +1,52 @@\n+require 'base_number'\r\n+require 'roman_digit'\r\n+\r\n+class RomanNumber < BaseNumber\r\n+\tdef value\r\n+\t\t@digits = from_string(@raw_digits)\r\n+\t\tcalculate(@digits)\r\n+\tend\r\n+\r\n+\tdef valid?(raw_value)\r\n+\t\tRomanNumber.is_roman? raw_value\r\n+  end\r\n+\r\n+  private def calculate(digits)\r\n+\t\tresult = 0\r\n+  \tdigits.each do |digit|\r\n+  \t\tif digit.prev?\r\n+  \t\t\tif digit.value <= digit.prev.value\r\n+  \t\t\t\tresult += digit.value\r\n+  \t\t\telse\r\n+  \t\t\t\tresult = result - digit.prev.value if result > 0\r\n+  \t\t\t\tresult += (digit.value - digit.prev.value)\r\n+  \t\t\tend\r\n+  \t\telse\r\n+  \t\t\tresult+= digit.value\r\n+  \t\tend\r\n+  \tend\r\n+  \tresult\r\n+  end\r\n+\r\n+  def literal_value\r\n+  \t@digits = from_string(@raw_digits)\r\n+\t\tresult = (@digits.map {|digit| digit.literal_value}).join(\"\")\r\n+\t\tresult\r\n+\tend\r\n+\r\n+\tprivate def from_string(raw_value)\r\n+\t\tresult = []\r\n+\t\tprev = nil\r\n+\t\traw_value.each_char do |char|\r\n+\t\t\tdigit = RomanDigit.new(char)\r\n+\t\t\tdigit.prev = prev if prev\r\n+\t\t\tprev = digit\r\n+\t\t\tresult << digit\r\n+\t\tend\r","path":"lib/numbers/roman_number.rb","position":45,"original_position":45,"commit_id":"b6cefbf82d9ca6ff953a8d6e45db14ad1a5ec11c","original_commit_id":"b6cefbf82d9ca6ff953a8d6e45db14ad1a5ec11c","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=2","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":"Tab detected.","created_at":"2014-09-23T17:17:07Z","updated_at":"2014-09-23T17:17:07Z","html_url":"https://github.com/gabrielcaires/teste_tw/pull/2#discussion_r17923199","pull_request_url":"https://api.github.com/repos/gabrielcaires/teste_tw/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/gabrielcaires/teste_tw/pulls/comments/17923199"},"html":{"href":"https://github.com/gabrielcaires/teste_tw/pull/2#discussion_r17923199"},"pull_request":{"href":"https://api.github.com/repos/gabrielcaires/teste_tw/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/gabrielcaires/teste_tw/pulls/2","id":21661280,"html_url":"https://github.com/gabrielcaires/teste_tw/pull/2","diff_url":"https://github.com/gabrielcaires/teste_tw/pull/2.diff","patch_url":"https://github.com/gabrielcaires/teste_tw/pull/2.patch","issue_url":"https://api.github.com/repos/gabrielcaires/teste_tw/issues/2","number":2,"state":"open","locked":false,"title":"files","user":{"login":"gabrielcaires","id":38718,"avatar_url":"https://avatars.githubusercontent.com/u/38718?v=2","gravatar_id":"","url":"https://api.github.com/users/gabrielcaires","html_url":"https://github.com/gabrielcaires","followers_url":"https://api.github.com/users/gabrielcaires/followers","following_url":"https://api.github.com/users/gabrielcaires/following{/other_user}","gists_url":"https://api.github.com/users/gabrielcaires/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielcaires/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielcaires/subscriptions","organizations_url":"https://api.github.com/users/gabrielcaires/orgs","repos_url":"https://api.github.com/users/gabrielcaires/repos","events_url":"https://api.github.com/users/gabrielcaires/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielcaires/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-09-23T17:16:16Z","updated_at":"2014-09-23T17:17:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8ce1f4c0905971d6cb3423eb675c033dba143806","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gabrielcaires/teste_tw/pulls/2/commits","review_comments_url":"https://api.github.com/repos/gabrielcaires/teste_tw/pulls/2/comments","review_comment_url":"https://api.github.com/repos/gabrielcaires/teste_tw/pulls/comments/{number}","comments_url":"https://api.github.com/repos/gabrielcaires/teste_tw/issues/2/comments","statuses_url":"https://api.github.com/repos/gabrielcaires/teste_tw/statuses/b6cefbf82d9ca6ff953a8d6e45db14ad1a5ec11c","head":{"label":"gabrielcaires:dev_lint","ref":"dev_lint","sha":"b6cefbf82d9ca6ff953a8d6e45db14ad1a5ec11c","user":{"login":"gabrielcaires","id":38718,"avatar_url":"https://avatars.githubusercontent.com/u/38718?v=2","gravatar_id":"","url":"https://api.github.com/users/gabrielcaires","html_url":"https://github.com/gabrielcaires","followers_url":"https://api.github.com/users/gabrielcaires/followers","following_url":"https://api.github.com/users/gabrielcaires/following{/other_user}","gists_url":"https://api.github.com/users/gabrielcaires/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielcaires/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielcaires/subscriptions","organizations_url":"https://api.github.com/users/gabrielcaires/orgs","repos_url":"https://api.github.com/users/gabrielcaires/repos","events_url":"https://api.github.com/users/gabrielcaires/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielcaires/received_events","type":"User","site_admin":false},"repo":{"id":24380401,"name":"teste_tw","full_name":"gabrielcaires/teste_tw","owner":{"login":"gabrielcaires","id":38718,"avatar_url":"https://avatars.githubusercontent.com/u/38718?v=2","gravatar_id":"","url":"https://api.github.com/users/gabrielcaires","html_url":"https://github.com/gabrielcaires","followers_url":"https://api.github.com/users/gabrielcaires/followers","following_url":"https://api.github.com/users/gabrielcaires/following{/other_user}","gists_url":"https://api.github.com/users/gabrielcaires/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielcaires/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielcaires/subscriptions","organizations_url":"https://api.github.com/users/gabrielcaires/orgs","repos_url":"https://api.github.com/users/gabrielcaires/repos","events_url":"https://api.github.com/users/gabrielcaires/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielcaires/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gabrielcaires/teste_tw","description":null,"fork":false,"url":"https://api.github.com/repos/gabrielcaires/teste_tw","forks_url":"https://api.github.com/repos/gabrielcaires/teste_tw/forks","keys_url":"https://api.github.com/repos/gabrielcaires/teste_tw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gabrielcaires/teste_tw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gabrielcaires/teste_tw/teams","hooks_url":"https://api.github.com/repos/gabrielcaires/teste_tw/hooks","issue_events_url":"https://api.github.com/repos/gabrielcaires/teste_tw/issues/events{/number}","events_url":"https://api.github.com/repos/gabrielcaires/teste_tw/events","assignees_url":"https://api.github.com/repos/gabrielcaires/teste_tw/assignees{/user}","branches_url":"https://api.github.com/repos/gabrielcaires/teste_tw/branches{/branch}","tags_url":"https://api.github.com/repos/gabrielcaires/teste_tw/tags","blobs_url":"https://api.github.com/repos/gabrielcaires/teste_tw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gabrielcaires/teste_tw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gabrielcaires/teste_tw/git/refs{/sha}","trees_url":"https://api.github.com/repos/gabrielcaires/teste_tw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gabrielcaires/teste_tw/statuses/{sha}","languages_url":"https://api.github.com/repos/gabrielcaires/teste_tw/languages","stargazers_url":"https://api.github.com/repos/gabrielcaires/teste_tw/stargazers","contributors_url":"https://api.github.com/repos/gabrielcaires/teste_tw/contributors","subscribers_url":"https://api.github.com/repos/gabrielcaires/teste_tw/subscribers","subscription_url":"https://api.github.com/repos/gabrielcaires/teste_tw/subscription","commits_url":"https://api.github.com/repos/gabrielcaires/teste_tw/commits{/sha}","git_commits_url":"https://api.github.com/repos/gabrielcaires/teste_tw/git/commits{/sha}","comments_url":"https://api.github.com/repos/gabrielcaires/teste_tw/comments{/number}","issue_comment_url":"https://api.github.com/repos/gabrielcaires/teste_tw/issues/comments/{number}","contents_url":"https://api.github.com/repos/gabrielcaires/teste_tw/contents/{+path}","compare_url":"https://api.github.com/repos/gabrielcaires/teste_tw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gabrielcaires/teste_tw/merges","archive_url":"https://api.github.com/repos/gabrielcaires/teste_tw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gabrielcaires/teste_tw/downloads","issues_url":"https://api.github.com/repos/gabrielcaires/teste_tw/issues{/number}","pulls_url":"https://api.github.com/repos/gabrielcaires/teste_tw/pulls{/number}","milestones_url":"https://api.github.com/repos/gabrielcaires/teste_tw/milestones{/number}","notifications_url":"https://api.github.com/repos/gabrielcaires/teste_tw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gabrielcaires/teste_tw/labels{/name}","releases_url":"https://api.github.com/repos/gabrielcaires/teste_tw/releases{/id}","created_at":"2014-09-23T16:48:12Z","updated_at":"2014-09-23T16:48:26Z","pushed_at":"2014-09-23T17:15:31Z","git_url":"git://github.com/gabrielcaires/teste_tw.git","ssh_url":"git@github.com:gabrielcaires/teste_tw.git","clone_url":"https://github.com/gabrielcaires/teste_tw.git","svn_url":"https://github.com/gabrielcaires/teste_tw","homepage":null,"size":0,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"gabrielcaires:master","ref":"master","sha":"25441369bc77a3fb8b4865b483fd4500902cdd44","user":{"login":"gabrielcaires","id":38718,"avatar_url":"https://avatars.githubusercontent.com/u/38718?v=2","gravatar_id":"","url":"https://api.github.com/users/gabrielcaires","html_url":"https://github.com/gabrielcaires","followers_url":"https://api.github.com/users/gabrielcaires/followers","following_url":"https://api.github.com/users/gabrielcaires/following{/other_user}","gists_url":"https://api.github.com/users/gabrielcaires/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielcaires/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielcaires/subscriptions","organizations_url":"https://api.github.com/users/gabrielcaires/orgs","repos_url":"https://api.github.com/users/gabrielcaires/repos","events_url":"https://api.github.com/users/gabrielcaires/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielcaires/received_events","type":"User","site_admin":false},"repo":{"id":24380401,"name":"teste_tw","full_name":"gabrielcaires/teste_tw","owner":{"login":"gabrielcaires","id":38718,"avatar_url":"https://avatars.githubusercontent.com/u/38718?v=2","gravatar_id":"","url":"https://api.github.com/users/gabrielcaires","html_url":"https://github.com/gabrielcaires","followers_url":"https://api.github.com/users/gabrielcaires/followers","following_url":"https://api.github.com/users/gabrielcaires/following{/other_user}","gists_url":"https://api.github.com/users/gabrielcaires/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielcaires/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielcaires/subscriptions","organizations_url":"https://api.github.com/users/gabrielcaires/orgs","repos_url":"https://api.github.com/users/gabrielcaires/repos","events_url":"https://api.github.com/users/gabrielcaires/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielcaires/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gabrielcaires/teste_tw","description":null,"fork":false,"url":"https://api.github.com/repos/gabrielcaires/teste_tw","forks_url":"https://api.github.com/repos/gabrielcaires/teste_tw/forks","keys_url":"https://api.github.com/repos/gabrielcaires/teste_tw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gabrielcaires/teste_tw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gabrielcaires/teste_tw/teams","hooks_url":"https://api.github.com/repos/gabrielcaires/teste_tw/hooks","issue_events_url":"https://api.github.com/repos/gabrielcaires/teste_tw/issues/events{/number}","events_url":"https://api.github.com/repos/gabrielcaires/teste_tw/events","assignees_url":"https://api.github.com/repos/gabrielcaires/teste_tw/assignees{/user}","branches_url":"https://api.github.com/repos/gabrielcaires/teste_tw/branches{/branch}","tags_url":"https://api.github.com/repos/gabrielcaires/teste_tw/tags","blobs_url":"https://api.github.com/repos/gabrielcaires/teste_tw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gabrielcaires/teste_tw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gabrielcaires/teste_tw/git/refs{/sha}","trees_url":"https://api.github.com/repos/gabrielcaires/teste_tw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gabrielcaires/teste_tw/statuses/{sha}","languages_url":"https://api.github.com/repos/gabrielcaires/teste_tw/languages","stargazers_url":"https://api.github.com/repos/gabrielcaires/teste_tw/stargazers","contributors_url":"https://api.github.com/repos/gabrielcaires/teste_tw/contributors","subscribers_url":"https://api.github.com/repos/gabrielcaires/teste_tw/subscribers","subscription_url":"https://api.github.com/repos/gabrielcaires/teste_tw/subscription","commits_url":"https://api.github.com/repos/gabrielcaires/teste_tw/commits{/sha}","git_commits_url":"https://api.github.com/repos/gabrielcaires/teste_tw/git/commits{/sha}","comments_url":"https://api.github.com/repos/gabrielcaires/teste_tw/comments{/number}","issue_comment_url":"https://api.github.com/repos/gabrielcaires/teste_tw/issues/comments/{number}","contents_url":"https://api.github.com/repos/gabrielcaires/teste_tw/contents/{+path}","compare_url":"https://api.github.com/repos/gabrielcaires/teste_tw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gabrielcaires/teste_tw/merges","archive_url":"https://api.github.com/repos/gabrielcaires/teste_tw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gabrielcaires/teste_tw/downloads","issues_url":"https://api.github.com/repos/gabrielcaires/teste_tw/issues{/number}","pulls_url":"https://api.github.com/repos/gabrielcaires/teste_tw/pulls{/number}","milestones_url":"https://api.github.com/repos/gabrielcaires/teste_tw/milestones{/number}","notifications_url":"https://api.github.com/repos/gabrielcaires/teste_tw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gabrielcaires/teste_tw/labels{/name}","releases_url":"https://api.github.com/repos/gabrielcaires/teste_tw/releases{/id}","created_at":"2014-09-23T16:48:12Z","updated_at":"2014-09-23T16:48:26Z","pushed_at":"2014-09-23T17:15:31Z","git_url":"git://github.com/gabrielcaires/teste_tw.git","ssh_url":"git@github.com:gabrielcaires/teste_tw.git","clone_url":"https://github.com/gabrielcaires/teste_tw.git","svn_url":"https://github.com/gabrielcaires/teste_tw","homepage":null,"size":0,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gabrielcaires/teste_tw/pulls/2"},"html":{"href":"https://github.com/gabrielcaires/teste_tw/pull/2"},"issue":{"href":"https://api.github.com/repos/gabrielcaires/teste_tw/issues/2"},"comments":{"href":"https://api.github.com/repos/gabrielcaires/teste_tw/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/gabrielcaires/teste_tw/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/gabrielcaires/teste_tw/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/gabrielcaires/teste_tw/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/gabrielcaires/teste_tw/statuses/b6cefbf82d9ca6ff953a8d6e45db14ad1a5ec11c"}}}}