GitHub PullRequestReviewCommentEvent at 2014-09-08 07:41:48
Repository: sneaky-save
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/einzige/sneaky-save/pulls/comments/17225220","id":17225220,"diff_hunk":"@@ -1,67 +1,87 @@\n require 'spec_helper'\n \n describe SneakySave, use_connection: true do\n-  after :each do \n-    expect(subject.sneaky_save).to eq(true)\n-  end\n-\n   context 'new record' do\n-    subject { Fake.new }\n+    subject { Fake.new(name: 'test') }\n \n-    it('returns true if everything is good') {}\n+    describe '#sneaky_save' do\n+      it 'returns true if everything is good' do\n+        expect(subject.sneaky_save).to eq(true)\n+      end\n \n-    it 'does insert of the new record' do\n-      allow(subject).to receive(:sneaky_create).once.and_return(true)\n-    end\n+      it 'inserts the new record' do\n+        allow(subject).to receive(:sneaky_create).once.and_return(true)\n+        expect(subject.sneaky_save).to eq(true)\n+      end\n \n-    it 'stores attributes in database' do\n-      subject.name = 'test'\n-      subject.sneaky_save\n-      subject.reload\n-      expect(subject.name).to eq('test')\n-    end\n+      it 'stores attributes in database' do\n+        subject.name = 'test'\n+        expect(subject.sneaky_save).to eq(true)\n+        subject.reload\n+        expect(subject.name).to eq('test')\n+      end\n+\n+      it 'does not call any callback' do\n+        Fake.any_instance.should_not_receive :before_save_callback\n+        subject.sneaky_save\n+      end\n \n-    it 'does not call any callback' do\n-      Fake.any_instance.should_not_receive :before_save_callback\n+      it 'does not call validations' do","path":"spec/lib/sneaky_save_spec.rb","position":46,"original_position":46,"commit_id":"b56f7d67dc16b25fad35ebf1bd881577cef033ca","original_commit_id":"b56f7d67dc16b25fad35ebf1bd881577cef033ca","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":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2014-09-08T07:41:48Z","updated_at":"2014-09-08T07:41:48Z","html_url":"https://github.com/einzige/sneaky-save/pull/6#discussion_r17225220","pull_request_url":"https://api.github.com/repos/einzige/sneaky-save/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/einzige/sneaky-save/pulls/comments/17225220"},"html":{"href":"https://github.com/einzige/sneaky-save/pull/6#discussion_r17225220"},"pull_request":{"href":"https://api.github.com/repos/einzige/sneaky-save/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/einzige/sneaky-save/pulls/6","id":20874274,"html_url":"https://github.com/einzige/sneaky-save/pull/6","diff_url":"https://github.com/einzige/sneaky-save/pull/6.diff","patch_url":"https://github.com/einzige/sneaky-save/pull/6.patch","issue_url":"https://api.github.com/repos/einzige/sneaky-save/issues/6","number":6,"state":"open","locked":false,"title":"Adds #sneaky_save!","user":{"login":"akshayrawat","id":202283,"avatar_url":"https://avatars.githubusercontent.com/u/202283?v=2","gravatar_id":"080ceff5aad70e26a60a05558a6794b8","url":"https://api.github.com/users/akshayrawat","html_url":"https://github.com/akshayrawat","followers_url":"https://api.github.com/users/akshayrawat/followers","following_url":"https://api.github.com/users/akshayrawat/following{/other_user}","gists_url":"https://api.github.com/users/akshayrawat/gists{/gist_id}","starred_url":"https://api.github.com/users/akshayrawat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akshayrawat/subscriptions","organizations_url":"https://api.github.com/users/akshayrawat/orgs","repos_url":"https://api.github.com/users/akshayrawat/repos","events_url":"https://api.github.com/users/akshayrawat/events{/privacy}","received_events_url":"https://api.github.com/users/akshayrawat/received_events","type":"User","site_admin":false},"body":"* This is similar to `ActiveRecord::Base#save!`. Our use-cases always need a whiny `sneaky_save!` (similar to when you would prefer to use `save!`) as we never expect it to fail. When it does, we want it to complain loudly with the inner exception. Instead of repeating that pattern in our code-base, we've pushed it into this gem.\r\n\r\n* The specs had to be re-org'ed a bit to accommodate its testing.\r\n\r\n@einzige Let me know what you think.","created_at":"2014-09-08T07:41:43Z","updated_at":"2014-09-08T07:41:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"128c98280fa0fe7d2165b6a2d3cd134240b8f739","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/einzige/sneaky-save/pulls/6/commits","review_comments_url":"https://api.github.com/repos/einzige/sneaky-save/pulls/6/comments","review_comment_url":"https://api.github.com/repos/einzige/sneaky-save/pulls/comments/{number}","comments_url":"https://api.github.com/repos/einzige/sneaky-save/issues/6/comments","statuses_url":"https://api.github.com/repos/einzige/sneaky-save/statuses/b56f7d67dc16b25fad35ebf1bd881577cef033ca","head":{"label":"akshayrawat:master","ref":"master","sha":"b56f7d67dc16b25fad35ebf1bd881577cef033ca","user":{"login":"akshayrawat","id":202283,"avatar_url":"https://avatars.githubusercontent.com/u/202283?v=2","gravatar_id":"080ceff5aad70e26a60a05558a6794b8","url":"https://api.github.com/users/akshayrawat","html_url":"https://github.com/akshayrawat","followers_url":"https://api.github.com/users/akshayrawat/followers","following_url":"https://api.github.com/users/akshayrawat/following{/other_user}","gists_url":"https://api.github.com/users/akshayrawat/gists{/gist_id}","starred_url":"https://api.github.com/users/akshayrawat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akshayrawat/subscriptions","organizations_url":"https://api.github.com/users/akshayrawat/orgs","repos_url":"https://api.github.com/users/akshayrawat/repos","events_url":"https://api.github.com/users/akshayrawat/events{/privacy}","received_events_url":"https://api.github.com/users/akshayrawat/received_events","type":"User","site_admin":false},"repo":{"id":23781493,"name":"sneaky-save","full_name":"akshayrawat/sneaky-save","owner":{"login":"akshayrawat","id":202283,"avatar_url":"https://avatars.githubusercontent.com/u/202283?v=2","gravatar_id":"080ceff5aad70e26a60a05558a6794b8","url":"https://api.github.com/users/akshayrawat","html_url":"https://github.com/akshayrawat","followers_url":"https://api.github.com/users/akshayrawat/followers","following_url":"https://api.github.com/users/akshayrawat/following{/other_user}","gists_url":"https://api.github.com/users/akshayrawat/gists{/gist_id}","starred_url":"https://api.github.com/users/akshayrawat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akshayrawat/subscriptions","organizations_url":"https://api.github.com/users/akshayrawat/orgs","repos_url":"https://api.github.com/users/akshayrawat/repos","events_url":"https://api.github.com/users/akshayrawat/events{/privacy}","received_events_url":"https://api.github.com/users/akshayrawat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/akshayrawat/sneaky-save","description":"Allows to update complex objects without triggering validations or callbacks.","fork":true,"url":"https://api.github.com/repos/akshayrawat/sneaky-save","forks_url":"https://api.github.com/repos/akshayrawat/sneaky-save/forks","keys_url":"https://api.github.com/repos/akshayrawat/sneaky-save/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akshayrawat/sneaky-save/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akshayrawat/sneaky-save/teams","hooks_url":"https://api.github.com/repos/akshayrawat/sneaky-save/hooks","issue_events_url":"https://api.github.com/repos/akshayrawat/sneaky-save/issues/events{/number}","events_url":"https://api.github.com/repos/akshayrawat/sneaky-save/events","assignees_url":"https://api.github.com/repos/akshayrawat/sneaky-save/assignees{/user}","branches_url":"https://api.github.com/repos/akshayrawat/sneaky-save/branches{/branch}","tags_url":"https://api.github.com/repos/akshayrawat/sneaky-save/tags","blobs_url":"https://api.github.com/repos/akshayrawat/sneaky-save/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akshayrawat/sneaky-save/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akshayrawat/sneaky-save/git/refs{/sha}","trees_url":"https://api.github.com/repos/akshayrawat/sneaky-save/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akshayrawat/sneaky-save/statuses/{sha}","languages_url":"https://api.github.com/repos/akshayrawat/sneaky-save/languages","stargazers_url":"https://api.github.com/repos/akshayrawat/sneaky-save/stargazers","contributors_url":"https://api.github.com/repos/akshayrawat/sneaky-save/contributors","subscribers_url":"https://api.github.com/repos/akshayrawat/sneaky-save/subscribers","subscription_url":"https://api.github.com/repos/akshayrawat/sneaky-save/subscription","commits_url":"https://api.github.com/repos/akshayrawat/sneaky-save/commits{/sha}","git_commits_url":"https://api.github.com/repos/akshayrawat/sneaky-save/git/commits{/sha}","comments_url":"https://api.github.com/repos/akshayrawat/sneaky-save/comments{/number}","issue_comment_url":"https://api.github.com/repos/akshayrawat/sneaky-save/issues/comments/{number}","contents_url":"https://api.github.com/repos/akshayrawat/sneaky-save/contents/{+path}","compare_url":"https://api.github.com/repos/akshayrawat/sneaky-save/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akshayrawat/sneaky-save/merges","archive_url":"https://api.github.com/repos/akshayrawat/sneaky-save/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akshayrawat/sneaky-save/downloads","issues_url":"https://api.github.com/repos/akshayrawat/sneaky-save/issues{/number}","pulls_url":"https://api.github.com/repos/akshayrawat/sneaky-save/pulls{/number}","milestones_url":"https://api.github.com/repos/akshayrawat/sneaky-save/milestones{/number}","notifications_url":"https://api.github.com/repos/akshayrawat/sneaky-save/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akshayrawat/sneaky-save/labels{/name}","releases_url":"https://api.github.com/repos/akshayrawat/sneaky-save/releases{/id}","created_at":"2014-09-08T06:38:06Z","updated_at":"2014-09-08T07:33:52Z","pushed_at":"2014-09-08T07:33:52Z","git_url":"git://github.com/akshayrawat/sneaky-save.git","ssh_url":"git@github.com:akshayrawat/sneaky-save.git","clone_url":"https://github.com/akshayrawat/sneaky-save.git","svn_url":"https://github.com/akshayrawat/sneaky-save","homepage":"","size":330,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"einzige:master","ref":"master","sha":"12ca0baa1ee0d2e74dca1acf41e10e2ed5e564b5","user":{"login":"einzige","id":370635,"avatar_url":"https://avatars.githubusercontent.com/u/370635?v=2","gravatar_id":"b2e94d7a5deb9310dcb81b0392cd81e5","url":"https://api.github.com/users/einzige","html_url":"https://github.com/einzige","followers_url":"https://api.github.com/users/einzige/followers","following_url":"https://api.github.com/users/einzige/following{/other_user}","gists_url":"https://api.github.com/users/einzige/gists{/gist_id}","starred_url":"https://api.github.com/users/einzige/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/einzige/subscriptions","organizations_url":"https://api.github.com/users/einzige/orgs","repos_url":"https://api.github.com/users/einzige/repos","events_url":"https://api.github.com/users/einzige/events{/privacy}","received_events_url":"https://api.github.com/users/einzige/received_events","type":"User","site_admin":false},"repo":{"id":2593585,"name":"sneaky-save","full_name":"einzige/sneaky-save","owner":{"login":"einzige","id":370635,"avatar_url":"https://avatars.githubusercontent.com/u/370635?v=2","gravatar_id":"b2e94d7a5deb9310dcb81b0392cd81e5","url":"https://api.github.com/users/einzige","html_url":"https://github.com/einzige","followers_url":"https://api.github.com/users/einzige/followers","following_url":"https://api.github.com/users/einzige/following{/other_user}","gists_url":"https://api.github.com/users/einzige/gists{/gist_id}","starred_url":"https://api.github.com/users/einzige/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/einzige/subscriptions","organizations_url":"https://api.github.com/users/einzige/orgs","repos_url":"https://api.github.com/users/einzige/repos","events_url":"https://api.github.com/users/einzige/events{/privacy}","received_events_url":"https://api.github.com/users/einzige/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/einzige/sneaky-save","description":"Allows to update complex objects without triggering validations or callbacks.","fork":false,"url":"https://api.github.com/repos/einzige/sneaky-save","forks_url":"https://api.github.com/repos/einzige/sneaky-save/forks","keys_url":"https://api.github.com/repos/einzige/sneaky-save/keys{/key_id}","collaborators_url":"https://api.github.com/repos/einzige/sneaky-save/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/einzige/sneaky-save/teams","hooks_url":"https://api.github.com/repos/einzige/sneaky-save/hooks","issue_events_url":"https://api.github.com/repos/einzige/sneaky-save/issues/events{/number}","events_url":"https://api.github.com/repos/einzige/sneaky-save/events","assignees_url":"https://api.github.com/repos/einzige/sneaky-save/assignees{/user}","branches_url":"https://api.github.com/repos/einzige/sneaky-save/branches{/branch}","tags_url":"https://api.github.com/repos/einzige/sneaky-save/tags","blobs_url":"https://api.github.com/repos/einzige/sneaky-save/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/einzige/sneaky-save/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/einzige/sneaky-save/git/refs{/sha}","trees_url":"https://api.github.com/repos/einzige/sneaky-save/git/trees{/sha}","statuses_url":"https://api.github.com/repos/einzige/sneaky-save/statuses/{sha}","languages_url":"https://api.github.com/repos/einzige/sneaky-save/languages","stargazers_url":"https://api.github.com/repos/einzige/sneaky-save/stargazers","contributors_url":"https://api.github.com/repos/einzige/sneaky-save/contributors","subscribers_url":"https://api.github.com/repos/einzige/sneaky-save/subscribers","subscription_url":"https://api.github.com/repos/einzige/sneaky-save/subscription","commits_url":"https://api.github.com/repos/einzige/sneaky-save/commits{/sha}","git_commits_url":"https://api.github.com/repos/einzige/sneaky-save/git/commits{/sha}","comments_url":"https://api.github.com/repos/einzige/sneaky-save/comments{/number}","issue_comment_url":"https://api.github.com/repos/einzige/sneaky-save/issues/comments/{number}","contents_url":"https://api.github.com/repos/einzige/sneaky-save/contents/{+path}","compare_url":"https://api.github.com/repos/einzige/sneaky-save/compare/{base}...{head}","merges_url":"https://api.github.com/repos/einzige/sneaky-save/merges","archive_url":"https://api.github.com/repos/einzige/sneaky-save/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/einzige/sneaky-save/downloads","issues_url":"https://api.github.com/repos/einzige/sneaky-save/issues{/number}","pulls_url":"https://api.github.com/repos/einzige/sneaky-save/pulls{/number}","milestones_url":"https://api.github.com/repos/einzige/sneaky-save/milestones{/number}","notifications_url":"https://api.github.com/repos/einzige/sneaky-save/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/einzige/sneaky-save/labels{/name}","releases_url":"https://api.github.com/repos/einzige/sneaky-save/releases{/id}","created_at":"2011-10-17T17:46:52Z","updated_at":"2014-09-05T09:43:58Z","pushed_at":"2014-08-08T11:52:41Z","git_url":"git://github.com/einzige/sneaky-save.git","ssh_url":"git@github.com:einzige/sneaky-save.git","clone_url":"https://github.com/einzige/sneaky-save.git","svn_url":"https://github.com/einzige/sneaky-save","homepage":"","size":330,"stargazers_count":23,"watchers_count":23,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":8,"mirror_url":null,"open_issues_count":1,"forks":8,"open_issues":1,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/einzige/sneaky-save/pulls/6"},"html":{"href":"https://github.com/einzige/sneaky-save/pull/6"},"issue":{"href":"https://api.github.com/repos/einzige/sneaky-save/issues/6"},"comments":{"href":"https://api.github.com/repos/einzige/sneaky-save/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/einzige/sneaky-save/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/einzige/sneaky-save/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/einzige/sneaky-save/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/einzige/sneaky-save/statuses/b56f7d67dc16b25fad35ebf1bd881577cef033ca"}}}}