GitHub PullRequestReviewCommentEvent at 2014-08-27 22:35:46
Repository: gitlab_git
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/gitlabhq/gitlab_git/pulls/comments/16809728","id":16809728,"diff_hunk":"@@ -189,4 +189,105 @@\n   describe :archive_repo do\n     it { repository.archive_repo('master', '/tmp').should == '/tmp/testme.git/testme-5937ac0a7beb003549fc5fd26fc247adbce4a52e.tar.gz' }\n   end\n+\n+  describe \"#log\" do\n+    commit_with_old_name = nil\n+    commit_with_new_name = nil\n+    rename_commit = nil\n+\n+    before(:all) do\n+      # Add new commits so that there's a renamed file in the commit history\n+      repo = Gitlab::Git::Repository.new(TEST_REPO_PATH).rugged\n+\n+      commit_with_old_name = new_commit_edit_old_file(repo)\n+      rename_commit = new_commit_move_file(repo)\n+      commit_with_new_name = new_commit_edit_new_file(repo)\n+    end\n+\n+    context \"where 'follow' == true\" do\n+      options = { ref: \"master\", follow: true }\n+\n+      context \"and 'path' is a directory\" do\n+        let(:log_commits) do\n+          repository.log(options.merge({ path: \"encoding\" }))\n+        end\n+\n+        it \"should not follow renames\" do\n+          expect(log_commits).to include(commit_with_new_name)\n+          expect(log_commits).to include(rename_commit)\n+          expect(log_commits).not_to include(commit_with_old_name)\n+        end\n+      end\n+\n+      context \"and 'path' is a file that matches the new filename\" do\n+        let(:log_commits) do\n+          repository.log(options.merge({ path: \"encoding/CHANGELOG\" }))\n+        end\n+\n+        it \"should follow renames\" do\n+          expect(log_commits).to include(commit_with_new_name)\n+          expect(log_commits).to include(rename_commit)\n+          expect(log_commits).to include(commit_with_old_name)\n+        end\n+      end\n+\n+      context \"and 'path' is a file that matches the old filename\" do\n+        let(:log_commits) do\n+          repository.log(options.merge({ path: \"CHANGELOG\" }))","path":"spec/repository_spec.rb","position":48,"original_position":48,"commit_id":"6a0b6c2f0ae038cca2c97dcc37b2bd154fb17e90","original_commit_id":"6a0b6c2f0ae038cca2c97dcc37b2bd154fb17e90","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=2","gravatar_id":"38d9cefd9971a05bf447f07c6cd332cc","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":"Redundant curly braces around a hash parameter.","created_at":"2014-08-27T22:35:46Z","updated_at":"2014-08-27T22:35:46Z","html_url":"https://github.com/gitlabhq/gitlab_git/pull/40#discussion_r16809728","pull_request_url":"https://api.github.com/repos/gitlabhq/gitlab_git/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/gitlabhq/gitlab_git/pulls/comments/16809728"},"html":{"href":"https://github.com/gitlabhq/gitlab_git/pull/40#discussion_r16809728"},"pull_request":{"href":"https://api.github.com/repos/gitlabhq/gitlab_git/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/gitlabhq/gitlab_git/pulls/40","id":20312137,"html_url":"https://github.com/gitlabhq/gitlab_git/pull/40","diff_url":"https://github.com/gitlabhq/gitlab_git/pull/40.diff","patch_url":"https://github.com/gitlabhq/gitlab_git/pull/40.patch","issue_url":"https://api.github.com/repos/gitlabhq/gitlab_git/issues/40","number":40,"state":"open","locked":false,"title":"Use Rugged in Commit, Diff, and Repository.log()","user":{"login":"mr-vinn","id":2551678,"avatar_url":"https://avatars.githubusercontent.com/u/2551678?v=2","gravatar_id":null,"url":"https://api.github.com/users/mr-vinn","html_url":"https://github.com/mr-vinn","followers_url":"https://api.github.com/users/mr-vinn/followers","following_url":"https://api.github.com/users/mr-vinn/following{/other_user}","gists_url":"https://api.github.com/users/mr-vinn/gists{/gist_id}","starred_url":"https://api.github.com/users/mr-vinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mr-vinn/subscriptions","organizations_url":"https://api.github.com/users/mr-vinn/orgs","repos_url":"https://api.github.com/users/mr-vinn/repos","events_url":"https://api.github.com/users/mr-vinn/events{/privacy}","received_events_url":"https://api.github.com/users/mr-vinn/received_events","type":"User","site_admin":false},"body":"I gave the Commit and Diff objects the ability to wrap either a Rugged object or a Grit object.  That allows the `Repository.log()` method to use Rugged instead of Grit and return an array of Rugged commit objects.\r\n\r\n### Breaking changes\r\n* __`Gitlab::Git::Commit.parents` returns an array of `Gitlab::Git::Commit` objects instead of Rugged commits__\r\n    I did this to be consistent with the existing `diffs` method.  You can still get the Rugged parent commits with `raw_commit`.\r\n\r\n* __The new `CommitStats` class doesn't implement a `files` method__\r\n    The `files` method isn't used internally or by Gitlab CE.\r\n\r\n* __`Repository.log` no longer uses the `follow` option__\r\n    This option isn't used internally or by Gitlab CE.\r\n\r\n* __The `raw_commit` or `raw_diff` object might be a Rugged object, while callers may be expecting a Grit object.__\r\n    This seemed acceptable; callers shouldn't expect to access Grit objects if the library is being removed from gitlab_git.","created_at":"2014-08-26T14:28:40Z","updated_at":"2014-08-27T22:35:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca1774567b2abb55d61b5a071e689c0bcee463c0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gitlabhq/gitlab_git/pulls/40/commits","review_comments_url":"https://api.github.com/repos/gitlabhq/gitlab_git/pulls/40/comments","review_comment_url":"https://api.github.com/repos/gitlabhq/gitlab_git/pulls/comments/{number}","comments_url":"https://api.github.com/repos/gitlabhq/gitlab_git/issues/40/comments","statuses_url":"https://api.github.com/repos/gitlabhq/gitlab_git/statuses/6a0b6c2f0ae038cca2c97dcc37b2bd154fb17e90","head":{"label":"mr-vinn:use-more-rugged","ref":"use-more-rugged","sha":"6a0b6c2f0ae038cca2c97dcc37b2bd154fb17e90","user":{"login":"mr-vinn","id":2551678,"avatar_url":"https://avatars.githubusercontent.com/u/2551678?v=2","gravatar_id":null,"url":"https://api.github.com/users/mr-vinn","html_url":"https://github.com/mr-vinn","followers_url":"https://api.github.com/users/mr-vinn/followers","following_url":"https://api.github.com/users/mr-vinn/following{/other_user}","gists_url":"https://api.github.com/users/mr-vinn/gists{/gist_id}","starred_url":"https://api.github.com/users/mr-vinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mr-vinn/subscriptions","organizations_url":"https://api.github.com/users/mr-vinn/orgs","repos_url":"https://api.github.com/users/mr-vinn/repos","events_url":"https://api.github.com/users/mr-vinn/events{/privacy}","received_events_url":"https://api.github.com/users/mr-vinn/received_events","type":"User","site_admin":false},"repo":{"id":19654731,"name":"gitlab_git","full_name":"mr-vinn/gitlab_git","owner":{"login":"mr-vinn","id":2551678,"avatar_url":"https://avatars.githubusercontent.com/u/2551678?v=2","gravatar_id":null,"url":"https://api.github.com/users/mr-vinn","html_url":"https://github.com/mr-vinn","followers_url":"https://api.github.com/users/mr-vinn/followers","following_url":"https://api.github.com/users/mr-vinn/following{/other_user}","gists_url":"https://api.github.com/users/mr-vinn/gists{/gist_id}","starred_url":"https://api.github.com/users/mr-vinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mr-vinn/subscriptions","organizations_url":"https://api.github.com/users/mr-vinn/orgs","repos_url":"https://api.github.com/users/mr-vinn/repos","events_url":"https://api.github.com/users/mr-vinn/events{/privacy}","received_events_url":"https://api.github.com/users/mr-vinn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mr-vinn/gitlab_git","description":"Access git objects via GitLab Git. Basically its wrapper around grit","fork":true,"url":"https://api.github.com/repos/mr-vinn/gitlab_git","forks_url":"https://api.github.com/repos/mr-vinn/gitlab_git/forks","keys_url":"https://api.github.com/repos/mr-vinn/gitlab_git/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mr-vinn/gitlab_git/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mr-vinn/gitlab_git/teams","hooks_url":"https://api.github.com/repos/mr-vinn/gitlab_git/hooks","issue_events_url":"https://api.github.com/repos/mr-vinn/gitlab_git/issues/events{/number}","events_url":"https://api.github.com/repos/mr-vinn/gitlab_git/events","assignees_url":"https://api.github.com/repos/mr-vinn/gitlab_git/assignees{/user}","branches_url":"https://api.github.com/repos/mr-vinn/gitlab_git/branches{/branch}","tags_url":"https://api.github.com/repos/mr-vinn/gitlab_git/tags","blobs_url":"https://api.github.com/repos/mr-vinn/gitlab_git/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mr-vinn/gitlab_git/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mr-vinn/gitlab_git/git/refs{/sha}","trees_url":"https://api.github.com/repos/mr-vinn/gitlab_git/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mr-vinn/gitlab_git/statuses/{sha}","languages_url":"https://api.github.com/repos/mr-vinn/gitlab_git/languages","stargazers_url":"https://api.github.com/repos/mr-vinn/gitlab_git/stargazers","contributors_url":"https://api.github.com/repos/mr-vinn/gitlab_git/contributors","subscribers_url":"https://api.github.com/repos/mr-vinn/gitlab_git/subscribers","subscription_url":"https://api.github.com/repos/mr-vinn/gitlab_git/subscription","commits_url":"https://api.github.com/repos/mr-vinn/gitlab_git/commits{/sha}","git_commits_url":"https://api.github.com/repos/mr-vinn/gitlab_git/git/commits{/sha}","comments_url":"https://api.github.com/repos/mr-vinn/gitlab_git/comments{/number}","issue_comment_url":"https://api.github.com/repos/mr-vinn/gitlab_git/issues/comments/{number}","contents_url":"https://api.github.com/repos/mr-vinn/gitlab_git/contents/{+path}","compare_url":"https://api.github.com/repos/mr-vinn/gitlab_git/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mr-vinn/gitlab_git/merges","archive_url":"https://api.github.com/repos/mr-vinn/gitlab_git/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mr-vinn/gitlab_git/downloads","issues_url":"https://api.github.com/repos/mr-vinn/gitlab_git/issues{/number}","pulls_url":"https://api.github.com/repos/mr-vinn/gitlab_git/pulls{/number}","milestones_url":"https://api.github.com/repos/mr-vinn/gitlab_git/milestones{/number}","notifications_url":"https://api.github.com/repos/mr-vinn/gitlab_git/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mr-vinn/gitlab_git/labels{/name}","releases_url":"https://api.github.com/repos/mr-vinn/gitlab_git/releases{/id}","created_at":"2014-05-10T23:46:30Z","updated_at":"2014-08-22T20:03:52Z","pushed_at":"2014-08-27T22:35:39Z","git_url":"git://github.com/mr-vinn/gitlab_git.git","ssh_url":"git@github.com:mr-vinn/gitlab_git.git","clone_url":"https://github.com/mr-vinn/gitlab_git.git","svn_url":"https://github.com/mr-vinn/gitlab_git","homepage":"","size":16493,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gitlabhq:master","ref":"master","sha":"441daa12025ded930bf3f77719a81c3d11a0b481","user":{"login":"gitlabhq","id":1086321,"avatar_url":"https://avatars.githubusercontent.com/u/1086321?v=2","gravatar_id":"95b7f387358639ec09184a76151bc690","url":"https://api.github.com/users/gitlabhq","html_url":"https://github.com/gitlabhq","followers_url":"https://api.github.com/users/gitlabhq/followers","following_url":"https://api.github.com/users/gitlabhq/following{/other_user}","gists_url":"https://api.github.com/users/gitlabhq/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlabhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlabhq/subscriptions","organizations_url":"https://api.github.com/users/gitlabhq/orgs","repos_url":"https://api.github.com/users/gitlabhq/repos","events_url":"https://api.github.com/users/gitlabhq/events{/privacy}","received_events_url":"https://api.github.com/users/gitlabhq/received_events","type":"Organization","site_admin":false},"repo":{"id":9712023,"name":"gitlab_git","full_name":"gitlabhq/gitlab_git","owner":{"login":"gitlabhq","id":1086321,"avatar_url":"https://avatars.githubusercontent.com/u/1086321?v=2","gravatar_id":"95b7f387358639ec09184a76151bc690","url":"https://api.github.com/users/gitlabhq","html_url":"https://github.com/gitlabhq","followers_url":"https://api.github.com/users/gitlabhq/followers","following_url":"https://api.github.com/users/gitlabhq/following{/other_user}","gists_url":"https://api.github.com/users/gitlabhq/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlabhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlabhq/subscriptions","organizations_url":"https://api.github.com/users/gitlabhq/orgs","repos_url":"https://api.github.com/users/gitlabhq/repos","events_url":"https://api.github.com/users/gitlabhq/events{/privacy}","received_events_url":"https://api.github.com/users/gitlabhq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gitlabhq/gitlab_git","description":"Access git objects via GitLab Git. Basically its wrapper around grit","fork":false,"url":"https://api.github.com/repos/gitlabhq/gitlab_git","forks_url":"https://api.github.com/repos/gitlabhq/gitlab_git/forks","keys_url":"https://api.github.com/repos/gitlabhq/gitlab_git/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gitlabhq/gitlab_git/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gitlabhq/gitlab_git/teams","hooks_url":"https://api.github.com/repos/gitlabhq/gitlab_git/hooks","issue_events_url":"https://api.github.com/repos/gitlabhq/gitlab_git/issues/events{/number}","events_url":"https://api.github.com/repos/gitlabhq/gitlab_git/events","assignees_url":"https://api.github.com/repos/gitlabhq/gitlab_git/assignees{/user}","branches_url":"https://api.github.com/repos/gitlabhq/gitlab_git/branches{/branch}","tags_url":"https://api.github.com/repos/gitlabhq/gitlab_git/tags","blobs_url":"https://api.github.com/repos/gitlabhq/gitlab_git/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gitlabhq/gitlab_git/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gitlabhq/gitlab_git/git/refs{/sha}","trees_url":"https://api.github.com/repos/gitlabhq/gitlab_git/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gitlabhq/gitlab_git/statuses/{sha}","languages_url":"https://api.github.com/repos/gitlabhq/gitlab_git/languages","stargazers_url":"https://api.github.com/repos/gitlabhq/gitlab_git/stargazers","contributors_url":"https://api.github.com/repos/gitlabhq/gitlab_git/contributors","subscribers_url":"https://api.github.com/repos/gitlabhq/gitlab_git/subscribers","subscription_url":"https://api.github.com/repos/gitlabhq/gitlab_git/subscription","commits_url":"https://api.github.com/repos/gitlabhq/gitlab_git/commits{/sha}","git_commits_url":"https://api.github.com/repos/gitlabhq/gitlab_git/git/commits{/sha}","comments_url":"https://api.github.com/repos/gitlabhq/gitlab_git/comments{/number}","issue_comment_url":"https://api.github.com/repos/gitlabhq/gitlab_git/issues/comments/{number}","contents_url":"https://api.github.com/repos/gitlabhq/gitlab_git/contents/{+path}","compare_url":"https://api.github.com/repos/gitlabhq/gitlab_git/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gitlabhq/gitlab_git/merges","archive_url":"https://api.github.com/repos/gitlabhq/gitlab_git/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gitlabhq/gitlab_git/downloads","issues_url":"https://api.github.com/repos/gitlabhq/gitlab_git/issues{/number}","pulls_url":"https://api.github.com/repos/gitlabhq/gitlab_git/pulls{/number}","milestones_url":"https://api.github.com/repos/gitlabhq/gitlab_git/milestones{/number}","notifications_url":"https://api.github.com/repos/gitlabhq/gitlab_git/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gitlabhq/gitlab_git/labels{/name}","releases_url":"https://api.github.com/repos/gitlabhq/gitlab_git/releases{/id}","created_at":"2013-04-27T08:52:56Z","updated_at":"2014-08-24T05:53:27Z","pushed_at":"2014-08-14T12:12:00Z","git_url":"git://github.com/gitlabhq/gitlab_git.git","ssh_url":"git@github.com:gitlabhq/gitlab_git.git","clone_url":"https://github.com/gitlabhq/gitlab_git.git","svn_url":"https://github.com/gitlabhq/gitlab_git","homepage":"","size":17763,"stargazers_count":36,"watchers_count":36,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":32,"mirror_url":null,"open_issues_count":10,"forks":32,"open_issues":10,"watchers":36,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gitlabhq/gitlab_git/pulls/40"},"html":{"href":"https://github.com/gitlabhq/gitlab_git/pull/40"},"issue":{"href":"https://api.github.com/repos/gitlabhq/gitlab_git/issues/40"},"comments":{"href":"https://api.github.com/repos/gitlabhq/gitlab_git/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/gitlabhq/gitlab_git/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/gitlabhq/gitlab_git/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/gitlabhq/gitlab_git/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/gitlabhq/gitlab_git/statuses/6a0b6c2f0ae038cca2c97dcc37b2bd154fb17e90"}}}}