GitHub PullRequestReviewCommentEvent at 2014-11-26 20:19:27
Repository: panamax-api
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/pulls/comments/20961641","id":20961641,"diff_hunk":"@@ -40,9 +40,9 @@\n     subject(:search) { described_class.search(query) }\n \n     before do\n-      Registry.stub(:enabled).and_return([ successful_registry, errored_registry ])\n-      successful_registry.stub(:search).and_return({ remote_images: [ first_image, second_image ] })\n-      errored_registry.stub(:search).and_return({ error: error_hash })\n+      allow(Registry).to receive(:enabled).and_return([ successful_registry, errored_registry ])\n+      allow(successful_registry).to receive(:search).and_return({ remote_images: [ first_image, second_image ] })\n+      allow(errored_registry).to receive(:search).and_return({ error: error_hash })","path":"spec/models/registry_spec.rb","position":18,"original_position":18,"commit_id":"9bc24ef340c93fe81fbdd44ef5ad77f7d5f92168","original_commit_id":"9bc24ef340c93fe81fbdd44ef5ad77f7d5f92168","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":"Redundant curly braces around a hash parameter.","created_at":"2014-11-26T20:19:27Z","updated_at":"2014-11-26T20:19:27Z","html_url":"https://github.com/CenturyLinkLabs/panamax-api/pull/256#discussion_r20961641","pull_request_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/pulls/256","_links":{"self":{"href":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/pulls/comments/20961641"},"html":{"href":"https://github.com/CenturyLinkLabs/panamax-api/pull/256#discussion_r20961641"},"pull_request":{"href":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/pulls/256"}}},"pull_request":{"url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/pulls/256","id":25106833,"html_url":"https://github.com/CenturyLinkLabs/panamax-api/pull/256","diff_url":"https://github.com/CenturyLinkLabs/panamax-api/pull/256.diff","patch_url":"https://github.com/CenturyLinkLabs/panamax-api/pull/256.patch","issue_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/issues/256","number":256,"state":"open","locked":false,"title":"Upgrade to rspec3 without mock/stub upgrade.","user":{"login":"dpetersen","id":408,"avatar_url":"https://avatars.githubusercontent.com/u/408?v=3","gravatar_id":"","url":"https://api.github.com/users/dpetersen","html_url":"https://github.com/dpetersen","followers_url":"https://api.github.com/users/dpetersen/followers","following_url":"https://api.github.com/users/dpetersen/following{/other_user}","gists_url":"https://api.github.com/users/dpetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/dpetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpetersen/subscriptions","organizations_url":"https://api.github.com/users/dpetersen/orgs","repos_url":"https://api.github.com/users/dpetersen/repos","events_url":"https://api.github.com/users/dpetersen/events{/privacy}","received_events_url":"https://api.github.com/users/dpetersen/received_events","type":"User","site_admin":false},"body":"I had a conversation with @dharmamike about new and old stubbing syntax, and it got me wondering what it would take to upgrade the API to the latest version of Rspec. It turns out that API has a fair amount of the new syntax already(`expect(object).to receive(:method)`), which I didn't even know was available in 2.x. It also turns out that Rspec 3 allows you to use the old and new syntax in a mix without deprecation warnings as long as you specifically configure it to allow both. \r\n\r\nThis seems like a good half-step upgrade, although I am going to take a shot at upgrading to the newer syntax throughout. They have made it clear that the new syntax is their recommended style, even though the old is allowed.\r\n\r\nMost of this PR is straightforward. I specifically did not want to screw around refactoring any tests. I did the minimum to get them passing again. We use two styles of testing that have been ripped from rspec core:\r\n  * *its* - e.g. `its(:color) { should eq(\"blue\") }`\r\n  * *collections* - e.g. `expect(my_array).to have(1).item` and `expect(model).to have(1).error_on(:foo)`\r\n\r\nThey have both been gemified, but I only brought in the first. I'm on the fence about it, but I figured the fewer gems the better. The tests that used the collection methods can be very easily rewritten. It hides from you the fact that it checks your models for validity before checking for errors, but you could argue that it's helpful to know the fact that your errors aren't available until `valid?` is called. If you've ever gotten bitten by that one, it sucks.","created_at":"2014-11-26T19:04:34Z","updated_at":"2014-11-26T20:19:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c2ef1f9e14b7a418995b9beb0732e5ab13182b6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/pulls/256/commits","review_comments_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/pulls/256/comments","review_comment_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/pulls/comments/{number}","comments_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/issues/256/comments","statuses_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/statuses/9bc24ef340c93fe81fbdd44ef5ad77f7d5f92168","head":{"label":"CenturyLinkLabs:chore/upgrade-rspec","ref":"chore/upgrade-rspec","sha":"9bc24ef340c93fe81fbdd44ef5ad77f7d5f92168","user":{"login":"CenturyLinkLabs","id":6453752,"avatar_url":"https://avatars.githubusercontent.com/u/6453752?v=3","gravatar_id":"","url":"https://api.github.com/users/CenturyLinkLabs","html_url":"https://github.com/CenturyLinkLabs","followers_url":"https://api.github.com/users/CenturyLinkLabs/followers","following_url":"https://api.github.com/users/CenturyLinkLabs/following{/other_user}","gists_url":"https://api.github.com/users/CenturyLinkLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/CenturyLinkLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenturyLinkLabs/subscriptions","organizations_url":"https://api.github.com/users/CenturyLinkLabs/orgs","repos_url":"https://api.github.com/users/CenturyLinkLabs/repos","events_url":"https://api.github.com/users/CenturyLinkLabs/events{/privacy}","received_events_url":"https://api.github.com/users/CenturyLinkLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":18078605,"name":"panamax-api","full_name":"CenturyLinkLabs/panamax-api","owner":{"login":"CenturyLinkLabs","id":6453752,"avatar_url":"https://avatars.githubusercontent.com/u/6453752?v=3","gravatar_id":"","url":"https://api.github.com/users/CenturyLinkLabs","html_url":"https://github.com/CenturyLinkLabs","followers_url":"https://api.github.com/users/CenturyLinkLabs/followers","following_url":"https://api.github.com/users/CenturyLinkLabs/following{/other_user}","gists_url":"https://api.github.com/users/CenturyLinkLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/CenturyLinkLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenturyLinkLabs/subscriptions","organizations_url":"https://api.github.com/users/CenturyLinkLabs/orgs","repos_url":"https://api.github.com/users/CenturyLinkLabs/repos","events_url":"https://api.github.com/users/CenturyLinkLabs/events{/privacy}","received_events_url":"https://api.github.com/users/CenturyLinkLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CenturyLinkLabs/panamax-api","description":"The API behind Panamax","fork":false,"url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api","forks_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/forks","keys_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/teams","hooks_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/hooks","issue_events_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/issues/events{/number}","events_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/events","assignees_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/assignees{/user}","branches_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/branches{/branch}","tags_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/tags","blobs_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/statuses/{sha}","languages_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/languages","stargazers_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/stargazers","contributors_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/contributors","subscribers_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/subscribers","subscription_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/subscription","commits_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/issues/comments/{number}","contents_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/contents/{+path}","compare_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/merges","archive_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/downloads","issues_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/issues{/number}","pulls_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/pulls{/number}","milestones_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/milestones{/number}","notifications_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/labels{/name}","releases_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/releases{/id}","created_at":"2014-03-24T20:59:11Z","updated_at":"2014-11-26T18:14:05Z","pushed_at":"2014-11-26T20:19:11Z","git_url":"git://github.com/CenturyLinkLabs/panamax-api.git","ssh_url":"git@github.com:CenturyLinkLabs/panamax-api.git","clone_url":"https://github.com/CenturyLinkLabs/panamax-api.git","svn_url":"https://github.com/CenturyLinkLabs/panamax-api","homepage":"http://panamax.io","size":6842,"stargazers_count":47,"watchers_count":47,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":1,"forks":20,"open_issues":1,"watchers":47,"default_branch":"master"}},"base":{"label":"CenturyLinkLabs:master","ref":"master","sha":"0d13ce81c0935ae146114f1350644ac4265c7397","user":{"login":"CenturyLinkLabs","id":6453752,"avatar_url":"https://avatars.githubusercontent.com/u/6453752?v=3","gravatar_id":"","url":"https://api.github.com/users/CenturyLinkLabs","html_url":"https://github.com/CenturyLinkLabs","followers_url":"https://api.github.com/users/CenturyLinkLabs/followers","following_url":"https://api.github.com/users/CenturyLinkLabs/following{/other_user}","gists_url":"https://api.github.com/users/CenturyLinkLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/CenturyLinkLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenturyLinkLabs/subscriptions","organizations_url":"https://api.github.com/users/CenturyLinkLabs/orgs","repos_url":"https://api.github.com/users/CenturyLinkLabs/repos","events_url":"https://api.github.com/users/CenturyLinkLabs/events{/privacy}","received_events_url":"https://api.github.com/users/CenturyLinkLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":18078605,"name":"panamax-api","full_name":"CenturyLinkLabs/panamax-api","owner":{"login":"CenturyLinkLabs","id":6453752,"avatar_url":"https://avatars.githubusercontent.com/u/6453752?v=3","gravatar_id":"","url":"https://api.github.com/users/CenturyLinkLabs","html_url":"https://github.com/CenturyLinkLabs","followers_url":"https://api.github.com/users/CenturyLinkLabs/followers","following_url":"https://api.github.com/users/CenturyLinkLabs/following{/other_user}","gists_url":"https://api.github.com/users/CenturyLinkLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/CenturyLinkLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenturyLinkLabs/subscriptions","organizations_url":"https://api.github.com/users/CenturyLinkLabs/orgs","repos_url":"https://api.github.com/users/CenturyLinkLabs/repos","events_url":"https://api.github.com/users/CenturyLinkLabs/events{/privacy}","received_events_url":"https://api.github.com/users/CenturyLinkLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CenturyLinkLabs/panamax-api","description":"The API behind Panamax","fork":false,"url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api","forks_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/forks","keys_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/teams","hooks_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/hooks","issue_events_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/issues/events{/number}","events_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/events","assignees_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/assignees{/user}","branches_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/branches{/branch}","tags_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/tags","blobs_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/statuses/{sha}","languages_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/languages","stargazers_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/stargazers","contributors_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/contributors","subscribers_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/subscribers","subscription_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/subscription","commits_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/issues/comments/{number}","contents_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/contents/{+path}","compare_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/merges","archive_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/downloads","issues_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/issues{/number}","pulls_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/pulls{/number}","milestones_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/milestones{/number}","notifications_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/labels{/name}","releases_url":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/releases{/id}","created_at":"2014-03-24T20:59:11Z","updated_at":"2014-11-26T18:14:05Z","pushed_at":"2014-11-26T20:19:11Z","git_url":"git://github.com/CenturyLinkLabs/panamax-api.git","ssh_url":"git@github.com:CenturyLinkLabs/panamax-api.git","clone_url":"https://github.com/CenturyLinkLabs/panamax-api.git","svn_url":"https://github.com/CenturyLinkLabs/panamax-api","homepage":"http://panamax.io","size":6842,"stargazers_count":47,"watchers_count":47,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":1,"forks":20,"open_issues":1,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/pulls/256"},"html":{"href":"https://github.com/CenturyLinkLabs/panamax-api/pull/256"},"issue":{"href":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/issues/256"},"comments":{"href":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/issues/256/comments"},"review_comments":{"href":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/pulls/256/comments"},"review_comment":{"href":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/pulls/256/commits"},"statuses":{"href":"https://api.github.com/repos/CenturyLinkLabs/panamax-api/statuses/9bc24ef340c93fe81fbdd44ef5ad77f7d5f92168"}}}}