{"action":"created","comment":{"url":"https://api.github.com/repos/bundler/bundler-api/pulls/comments/34427490","id":34427490,"diff_hunk":"@@ -142,27 +143,25 @@ def json_payload(payload)\n \n   get \"/names\" do\n     etag_response_for(\"names\") do\n-      output = \"---\\n\"\n-      @gem_info.names.each do |n|\n-        output << n << \"\\n\"\n-      end\n-      output\n+      CompactIndex.names(@gem_info.names)\n     end\n   end\n \n   get \"/versions\" do\n     etag_response_for(\"versions\") do\n-      @versions_file.with_new_gems\n+      from_date = @versions_file.updated_at\n+      extra_gems = @gem_info.versions(from_date)\n+      CompactIndex.versions(@versions_file, extra_gems)\n     end\n   end\n \n   get \"/info/:name\" do\n     etag_response_for(params[:name]) do\n-      output = \"---\\n\"\n-      deps_for(params[:name]).each do |row|\n-        output << version_line(row) << \"\\n\"\n+      deps = deps_for([params[:name]])\n+      deps.each do |dep|\n+        dep[:dependencies] = dep[:dependencies].map { |d| { gem: d[0], version: d[1] } }","path":"lib/bundler_api/web.rb","position":52,"original_position":52,"commit_id":"e3823bceb4c61d5c1a41eb513a46bdba9b708219","original_commit_id":"e3823bceb4c61d5c1a41eb513a46bdba9b708219","user":{"login":"indirect","id":78,"avatar_url":"https://avatars.githubusercontent.com/u/78?v=3","gravatar_id":"","url":"https://api.github.com/users/indirect","html_url":"https://github.com/indirect","followers_url":"https://api.github.com/users/indirect/followers","following_url":"https://api.github.com/users/indirect/following{/other_user}","gists_url":"https://api.github.com/users/indirect/gists{/gist_id}","starred_url":"https://api.github.com/users/indirect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indirect/subscriptions","organizations_url":"https://api.github.com/users/indirect/orgs","repos_url":"https://api.github.com/users/indirect/repos","events_url":"https://api.github.com/users/indirect/events{/privacy}","received_events_url":"https://api.github.com/users/indirect/received_events","type":"User","site_admin":false},"body":"you can use `map!` here to avoid the `dep[:dependencies] =`","created_at":"2015-07-13T00:06:51Z","updated_at":"2015-07-13T00:06:51Z","html_url":"https://github.com/bundler/bundler-api/pull/88#discussion_r34427490","pull_request_url":"https://api.github.com/repos/bundler/bundler-api/pulls/88","_links":{"self":{"href":"https://api.github.com/repos/bundler/bundler-api/pulls/comments/34427490"},"html":{"href":"https://github.com/bundler/bundler-api/pull/88#discussion_r34427490"},"pull_request":{"href":"https://api.github.com/repos/bundler/bundler-api/pulls/88"}}},"pull_request":{"url":"https://api.github.com/repos/bundler/bundler-api/pulls/88","id":39231620,"html_url":"https://github.com/bundler/bundler-api/pull/88","diff_url":"https://github.com/bundler/bundler-api/pull/88.diff","patch_url":"https://github.com/bundler/bundler-api/pull/88.patch","issue_url":"https://api.github.com/repos/bundler/bundler-api/issues/88","number":88,"state":"open","locked":false,"title":"Using new compact index format","user":{"login":"fotanus","id":215018,"avatar_url":"https://avatars.githubusercontent.com/u/215018?v=3","gravatar_id":"","url":"https://api.github.com/users/fotanus","html_url":"https://github.com/fotanus","followers_url":"https://api.github.com/users/fotanus/followers","following_url":"https://api.github.com/users/fotanus/following{/other_user}","gists_url":"https://api.github.com/users/fotanus/gists{/gist_id}","starred_url":"https://api.github.com/users/fotanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fotanus/subscriptions","organizations_url":"https://api.github.com/users/fotanus/orgs","repos_url":"https://api.github.com/users/fotanus/repos","events_url":"https://api.github.com/users/fotanus/events{/privacy}","received_events_url":"https://api.github.com/users/fotanus/received_events","type":"User","site_admin":false},"body":"This makes use of compact-index for version file handling and responses.","created_at":"2015-07-06T02:11:45Z","updated_at":"2015-07-13T00:06:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c727e3a9b8c41ffbc8eb623401b154d86e6ab2bb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bundler/bundler-api/pulls/88/commits","review_comments_url":"https://api.github.com/repos/bundler/bundler-api/pulls/88/comments","review_comment_url":"https://api.github.com/repos/bundler/bundler-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bundler/bundler-api/issues/88/comments","statuses_url":"https://api.github.com/repos/bundler/bundler-api/statuses/e3823bceb4c61d5c1a41eb513a46bdba9b708219","head":{"label":"fotanus:compact-index","ref":"compact-index","sha":"e3823bceb4c61d5c1a41eb513a46bdba9b708219","user":{"login":"fotanus","id":215018,"avatar_url":"https://avatars.githubusercontent.com/u/215018?v=3","gravatar_id":"","url":"https://api.github.com/users/fotanus","html_url":"https://github.com/fotanus","followers_url":"https://api.github.com/users/fotanus/followers","following_url":"https://api.github.com/users/fotanus/following{/other_user}","gists_url":"https://api.github.com/users/fotanus/gists{/gist_id}","starred_url":"https://api.github.com/users/fotanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fotanus/subscriptions","organizations_url":"https://api.github.com/users/fotanus/orgs","repos_url":"https://api.github.com/users/fotanus/repos","events_url":"https://api.github.com/users/fotanus/events{/privacy}","received_events_url":"https://api.github.com/users/fotanus/received_events","type":"User","site_admin":false},"repo":{"id":35182414,"name":"bundler-api","full_name":"fotanus/bundler-api","owner":{"login":"fotanus","id":215018,"avatar_url":"https://avatars.githubusercontent.com/u/215018?v=3","gravatar_id":"","url":"https://api.github.com/users/fotanus","html_url":"https://github.com/fotanus","followers_url":"https://api.github.com/users/fotanus/followers","following_url":"https://api.github.com/users/fotanus/following{/other_user}","gists_url":"https://api.github.com/users/fotanus/gists{/gist_id}","starred_url":"https://api.github.com/users/fotanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fotanus/subscriptions","organizations_url":"https://api.github.com/users/fotanus/orgs","repos_url":"https://api.github.com/users/fotanus/repos","events_url":"https://api.github.com/users/fotanus/events{/privacy}","received_events_url":"https://api.github.com/users/fotanus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fotanus/bundler-api","description":"Bundler 1.1+ API","fork":true,"url":"https://api.github.com/repos/fotanus/bundler-api","forks_url":"https://api.github.com/repos/fotanus/bundler-api/forks","keys_url":"https://api.github.com/repos/fotanus/bundler-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fotanus/bundler-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fotanus/bundler-api/teams","hooks_url":"https://api.github.com/repos/fotanus/bundler-api/hooks","issue_events_url":"https://api.github.com/repos/fotanus/bundler-api/issues/events{/number}","events_url":"https://api.github.com/repos/fotanus/bundler-api/events","assignees_url":"https://api.github.com/repos/fotanus/bundler-api/assignees{/user}","branches_url":"https://api.github.com/repos/fotanus/bundler-api/branches{/branch}","tags_url":"https://api.github.com/repos/fotanus/bundler-api/tags","blobs_url":"https://api.github.com/repos/fotanus/bundler-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fotanus/bundler-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fotanus/bundler-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/fotanus/bundler-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fotanus/bundler-api/statuses/{sha}","languages_url":"https://api.github.com/repos/fotanus/bundler-api/languages","stargazers_url":"https://api.github.com/repos/fotanus/bundler-api/stargazers","contributors_url":"https://api.github.com/repos/fotanus/bundler-api/contributors","subscribers_url":"https://api.github.com/repos/fotanus/bundler-api/subscribers","subscription_url":"https://api.github.com/repos/fotanus/bundler-api/subscription","commits_url":"https://api.github.com/repos/fotanus/bundler-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/fotanus/bundler-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/fotanus/bundler-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/fotanus/bundler-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/fotanus/bundler-api/contents/{+path}","compare_url":"https://api.github.com/repos/fotanus/bundler-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fotanus/bundler-api/merges","archive_url":"https://api.github.com/repos/fotanus/bundler-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fotanus/bundler-api/downloads","issues_url":"https://api.github.com/repos/fotanus/bundler-api/issues{/number}","pulls_url":"https://api.github.com/repos/fotanus/bundler-api/pulls{/number}","milestones_url":"https://api.github.com/repos/fotanus/bundler-api/milestones{/number}","notifications_url":"https://api.github.com/repos/fotanus/bundler-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fotanus/bundler-api/labels{/name}","releases_url":"https://api.github.com/repos/fotanus/bundler-api/releases{/id}","created_at":"2015-05-06T20:54:31Z","updated_at":"2015-05-06T21:30:36Z","pushed_at":"2015-07-08T13:23:10Z","git_url":"git://github.com/fotanus/bundler-api.git","ssh_url":"git@github.com:fotanus/bundler-api.git","clone_url":"https://github.com/fotanus/bundler-api.git","svn_url":"https://github.com/fotanus/bundler-api","homepage":null,"size":616,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bundler:new_index_format","ref":"new_index_format","sha":"c6788f45c5fbcae88a78c0ab17094926c9d448b0","user":{"login":"bundler","id":1137638,"avatar_url":"https://avatars.githubusercontent.com/u/1137638?v=3","gravatar_id":"","url":"https://api.github.com/users/bundler","html_url":"https://github.com/bundler","followers_url":"https://api.github.com/users/bundler/followers","following_url":"https://api.github.com/users/bundler/following{/other_user}","gists_url":"https://api.github.com/users/bundler/gists{/gist_id}","starred_url":"https://api.github.com/users/bundler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bundler/subscriptions","organizations_url":"https://api.github.com/users/bundler/orgs","repos_url":"https://api.github.com/users/bundler/repos","events_url":"https://api.github.com/users/bundler/events{/privacy}","received_events_url":"https://api.github.com/users/bundler/received_events","type":"Organization","site_admin":false},"repo":{"id":6304323,"name":"bundler-api","full_name":"bundler/bundler-api","owner":{"login":"bundler","id":1137638,"avatar_url":"https://avatars.githubusercontent.com/u/1137638?v=3","gravatar_id":"","url":"https://api.github.com/users/bundler","html_url":"https://github.com/bundler","followers_url":"https://api.github.com/users/bundler/followers","following_url":"https://api.github.com/users/bundler/following{/other_user}","gists_url":"https://api.github.com/users/bundler/gists{/gist_id}","starred_url":"https://api.github.com/users/bundler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bundler/subscriptions","organizations_url":"https://api.github.com/users/bundler/orgs","repos_url":"https://api.github.com/users/bundler/repos","events_url":"https://api.github.com/users/bundler/events{/privacy}","received_events_url":"https://api.github.com/users/bundler/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bundler/bundler-api","description":"Bundler 1.1+ API","fork":false,"url":"https://api.github.com/repos/bundler/bundler-api","forks_url":"https://api.github.com/repos/bundler/bundler-api/forks","keys_url":"https://api.github.com/repos/bundler/bundler-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bundler/bundler-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bundler/bundler-api/teams","hooks_url":"https://api.github.com/repos/bundler/bundler-api/hooks","issue_events_url":"https://api.github.com/repos/bundler/bundler-api/issues/events{/number}","events_url":"https://api.github.com/repos/bundler/bundler-api/events","assignees_url":"https://api.github.com/repos/bundler/bundler-api/assignees{/user}","branches_url":"https://api.github.com/repos/bundler/bundler-api/branches{/branch}","tags_url":"https://api.github.com/repos/bundler/bundler-api/tags","blobs_url":"https://api.github.com/repos/bundler/bundler-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bundler/bundler-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bundler/bundler-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/bundler/bundler-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bundler/bundler-api/statuses/{sha}","languages_url":"https://api.github.com/repos/bundler/bundler-api/languages","stargazers_url":"https://api.github.com/repos/bundler/bundler-api/stargazers","contributors_url":"https://api.github.com/repos/bundler/bundler-api/contributors","subscribers_url":"https://api.github.com/repos/bundler/bundler-api/subscribers","subscription_url":"https://api.github.com/repos/bundler/bundler-api/subscription","commits_url":"https://api.github.com/repos/bundler/bundler-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/bundler/bundler-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/bundler/bundler-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/bundler/bundler-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/bundler/bundler-api/contents/{+path}","compare_url":"https://api.github.com/repos/bundler/bundler-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bundler/bundler-api/merges","archive_url":"https://api.github.com/repos/bundler/bundler-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bundler/bundler-api/downloads","issues_url":"https://api.github.com/repos/bundler/bundler-api/issues{/number}","pulls_url":"https://api.github.com/repos/bundler/bundler-api/pulls{/number}","milestones_url":"https://api.github.com/repos/bundler/bundler-api/milestones{/number}","notifications_url":"https://api.github.com/repos/bundler/bundler-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bundler/bundler-api/labels{/name}","releases_url":"https://api.github.com/repos/bundler/bundler-api/releases{/id}","created_at":"2012-10-20T01:55:07Z","updated_at":"2015-07-06T13:10:01Z","pushed_at":"2015-07-08T13:23:10Z","git_url":"git://github.com/bundler/bundler-api.git","ssh_url":"git@github.com:bundler/bundler-api.git","clone_url":"https://github.com/bundler/bundler-api.git","svn_url":"https://github.com/bundler/bundler-api","homepage":null,"size":2860,"stargazers_count":41,"watchers_count":41,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":13,"forks":23,"open_issues":13,"watchers":41,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bundler/bundler-api/pulls/88"},"html":{"href":"https://github.com/bundler/bundler-api/pull/88"},"issue":{"href":"https://api.github.com/repos/bundler/bundler-api/issues/88"},"comments":{"href":"https://api.github.com/repos/bundler/bundler-api/issues/88/comments"},"review_comments":{"href":"https://api.github.com/repos/bundler/bundler-api/pulls/88/comments"},"review_comment":{"href":"https://api.github.com/repos/bundler/bundler-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bundler/bundler-api/pulls/88/commits"},"statuses":{"href":"https://api.github.com/repos/bundler/bundler-api/statuses/e3823bceb4c61d5c1a41eb513a46bdba9b708219"}}}}