{"action":"created","comment":{"url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/comments/27943674","id":27943674,"diff_hunk":"@@ -0,0 +1,56 @@\n+# {:path=>\"README.txt\",\n+#    :mode=>\"100644\",\n+#    :type=>\"blob\",\n+#    :sha=>\"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391\",\n+#    :size=>0,\n+#    :url=>\"\"}\n+\n+# CONVERTED TO\n+\n+# \"[{\\\"id\\\":\\\"README.txt\\\",\\\"parent\\\":\\\"#\\\",\\\"icon\\\":\\\"file\\\",\n+#    \\\"data\\\":{\\\"sha\\\":\\\"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391\\\",\n+#    \\\"type\\\":\\\"file\\\"}}]\"\n+\n+class Node\n+  attr_reader :node\n+\n+  def initialize(node)\n+    @node = node\n+  end\n+\n+  def id\n+    path_names.last\n+  end\n+  \n+  def parent\n+    if root_node?\n+      \"#\"\n+    else\n+      path_names.pop\n+      path_names.join(\"/\")\n+    end\n+  end\n+\n+  def icon\n+    node.type.eql?('tree') ? '' : 'file'","path":"lib/exercism/node.rb","position":35,"original_position":35,"commit_id":"4d68afb79e076928b9010c81aadb9cd0d1c17e73","original_commit_id":"4d68afb79e076928b9010c81aadb9cd0d1c17e73","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":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2015-04-08T05:20:59Z","updated_at":"2015-04-08T05:20:59Z","html_url":"https://github.com/hanumakanthvvn/exercism.io/pull/32#discussion_r27943674","pull_request_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/comments/27943674"},"html":{"href":"https://github.com/hanumakanthvvn/exercism.io/pull/32#discussion_r27943674"},"pull_request":{"href":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/32","id":32489990,"html_url":"https://github.com/hanumakanthvvn/exercism.io/pull/32","diff_url":"https://github.com/hanumakanthvvn/exercism.io/pull/32.diff","patch_url":"https://github.com/hanumakanthvvn/exercism.io/pull/32.patch","issue_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/issues/32","number":32,"state":"open","locked":false,"title":"Git js tree","user":{"login":"SaiVardhan","id":5456598,"avatar_url":"https://avatars.githubusercontent.com/u/5456598?v=3","gravatar_id":"","url":"https://api.github.com/users/SaiVardhan","html_url":"https://github.com/SaiVardhan","followers_url":"https://api.github.com/users/SaiVardhan/followers","following_url":"https://api.github.com/users/SaiVardhan/following{/other_user}","gists_url":"https://api.github.com/users/SaiVardhan/gists{/gist_id}","starred_url":"https://api.github.com/users/SaiVardhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaiVardhan/subscriptions","organizations_url":"https://api.github.com/users/SaiVardhan/orgs","repos_url":"https://api.github.com/users/SaiVardhan/repos","events_url":"https://api.github.com/users/SaiVardhan/events{/privacy}","received_events_url":"https://api.github.com/users/SaiVardhan/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-02T07:56:32Z","updated_at":"2015-04-08T05:20:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a9209067c0e37de642ca8900670a63eb003de6ba","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/32/commits","review_comments_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/32/comments","review_comment_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/issues/32/comments","statuses_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/statuses/4d68afb79e076928b9010c81aadb9cd0d1c17e73","head":{"label":"hanumakanthvvn:git-js-tree","ref":"git-js-tree","sha":"4d68afb79e076928b9010c81aadb9cd0d1c17e73","user":{"login":"hanumakanthvvn","id":219658,"avatar_url":"https://avatars.githubusercontent.com/u/219658?v=3","gravatar_id":"","url":"https://api.github.com/users/hanumakanthvvn","html_url":"https://github.com/hanumakanthvvn","followers_url":"https://api.github.com/users/hanumakanthvvn/followers","following_url":"https://api.github.com/users/hanumakanthvvn/following{/other_user}","gists_url":"https://api.github.com/users/hanumakanthvvn/gists{/gist_id}","starred_url":"https://api.github.com/users/hanumakanthvvn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanumakanthvvn/subscriptions","organizations_url":"https://api.github.com/users/hanumakanthvvn/orgs","repos_url":"https://api.github.com/users/hanumakanthvvn/repos","events_url":"https://api.github.com/users/hanumakanthvvn/events{/privacy}","received_events_url":"https://api.github.com/users/hanumakanthvvn/received_events","type":"User","site_admin":false},"repo":{"id":27079261,"name":"exercism.io","full_name":"hanumakanthvvn/exercism.io","owner":{"login":"hanumakanthvvn","id":219658,"avatar_url":"https://avatars.githubusercontent.com/u/219658?v=3","gravatar_id":"","url":"https://api.github.com/users/hanumakanthvvn","html_url":"https://github.com/hanumakanthvvn","followers_url":"https://api.github.com/users/hanumakanthvvn/followers","following_url":"https://api.github.com/users/hanumakanthvvn/following{/other_user}","gists_url":"https://api.github.com/users/hanumakanthvvn/gists{/gist_id}","starred_url":"https://api.github.com/users/hanumakanthvvn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanumakanthvvn/subscriptions","organizations_url":"https://api.github.com/users/hanumakanthvvn/orgs","repos_url":"https://api.github.com/users/hanumakanthvvn/repos","events_url":"https://api.github.com/users/hanumakanthvvn/events{/privacy}","received_events_url":"https://api.github.com/users/hanumakanthvvn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hanumakanthvvn/exercism.io","description":"Crowd-sourced mentorship.","fork":true,"url":"https://api.github.com/repos/hanumakanthvvn/exercism.io","forks_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/forks","keys_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/teams","hooks_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/hooks","issue_events_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/issues/events{/number}","events_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/events","assignees_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/assignees{/user}","branches_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/branches{/branch}","tags_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/tags","blobs_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/statuses/{sha}","languages_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/languages","stargazers_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/stargazers","contributors_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/contributors","subscribers_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/subscribers","subscription_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/subscription","commits_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/contents/{+path}","compare_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/merges","archive_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/downloads","issues_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/issues{/number}","pulls_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls{/number}","milestones_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/milestones{/number}","notifications_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/labels{/name}","releases_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/releases{/id}","created_at":"2014-11-24T14:32:34Z","updated_at":"2015-04-01T11:10:49Z","pushed_at":"2015-04-08T05:20:52Z","git_url":"git://github.com/hanumakanthvvn/exercism.io.git","ssh_url":"git@github.com:hanumakanthvvn/exercism.io.git","clone_url":"https://github.com/hanumakanthvvn/exercism.io.git","svn_url":"https://github.com/hanumakanthvvn/exercism.io","homepage":"http://exercism.io","size":17024,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"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":"hanumakanthvvn:master","ref":"master","sha":"afc2ec357f5615e1953f66e6aad8df82f4b395d4","user":{"login":"hanumakanthvvn","id":219658,"avatar_url":"https://avatars.githubusercontent.com/u/219658?v=3","gravatar_id":"","url":"https://api.github.com/users/hanumakanthvvn","html_url":"https://github.com/hanumakanthvvn","followers_url":"https://api.github.com/users/hanumakanthvvn/followers","following_url":"https://api.github.com/users/hanumakanthvvn/following{/other_user}","gists_url":"https://api.github.com/users/hanumakanthvvn/gists{/gist_id}","starred_url":"https://api.github.com/users/hanumakanthvvn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanumakanthvvn/subscriptions","organizations_url":"https://api.github.com/users/hanumakanthvvn/orgs","repos_url":"https://api.github.com/users/hanumakanthvvn/repos","events_url":"https://api.github.com/users/hanumakanthvvn/events{/privacy}","received_events_url":"https://api.github.com/users/hanumakanthvvn/received_events","type":"User","site_admin":false},"repo":{"id":27079261,"name":"exercism.io","full_name":"hanumakanthvvn/exercism.io","owner":{"login":"hanumakanthvvn","id":219658,"avatar_url":"https://avatars.githubusercontent.com/u/219658?v=3","gravatar_id":"","url":"https://api.github.com/users/hanumakanthvvn","html_url":"https://github.com/hanumakanthvvn","followers_url":"https://api.github.com/users/hanumakanthvvn/followers","following_url":"https://api.github.com/users/hanumakanthvvn/following{/other_user}","gists_url":"https://api.github.com/users/hanumakanthvvn/gists{/gist_id}","starred_url":"https://api.github.com/users/hanumakanthvvn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanumakanthvvn/subscriptions","organizations_url":"https://api.github.com/users/hanumakanthvvn/orgs","repos_url":"https://api.github.com/users/hanumakanthvvn/repos","events_url":"https://api.github.com/users/hanumakanthvvn/events{/privacy}","received_events_url":"https://api.github.com/users/hanumakanthvvn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hanumakanthvvn/exercism.io","description":"Crowd-sourced mentorship.","fork":true,"url":"https://api.github.com/repos/hanumakanthvvn/exercism.io","forks_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/forks","keys_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/teams","hooks_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/hooks","issue_events_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/issues/events{/number}","events_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/events","assignees_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/assignees{/user}","branches_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/branches{/branch}","tags_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/tags","blobs_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/statuses/{sha}","languages_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/languages","stargazers_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/stargazers","contributors_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/contributors","subscribers_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/subscribers","subscription_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/subscription","commits_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/contents/{+path}","compare_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/merges","archive_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/downloads","issues_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/issues{/number}","pulls_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls{/number}","milestones_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/milestones{/number}","notifications_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/labels{/name}","releases_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/releases{/id}","created_at":"2014-11-24T14:32:34Z","updated_at":"2015-04-01T11:10:49Z","pushed_at":"2015-04-08T05:20:52Z","git_url":"git://github.com/hanumakanthvvn/exercism.io.git","ssh_url":"git@github.com:hanumakanthvvn/exercism.io.git","clone_url":"https://github.com/hanumakanthvvn/exercism.io.git","svn_url":"https://github.com/hanumakanthvvn/exercism.io","homepage":"http://exercism.io","size":17024,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"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/hanumakanthvvn/exercism.io/pulls/32"},"html":{"href":"https://github.com/hanumakanthvvn/exercism.io/pull/32"},"issue":{"href":"https://api.github.com/repos/hanumakanthvvn/exercism.io/issues/32"},"comments":{"href":"https://api.github.com/repos/hanumakanthvvn/exercism.io/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/hanumakanthvvn/exercism.io/statuses/4d68afb79e076928b9010c81aadb9cd0d1c17e73"}}}}