{"action":"created","comment":{"url":"https://api.github.com/repos/apsislabs/slayer/pulls/comments/100676358","pull_request_review_id":21393913,"id":100676358,"diff_hunk":"@@ -6,37 +6,51 @@ class Command\n     class << self\n       def call(*args, &block)\n         # Run the Command and capture the result\n-        result = new.tap { |s|\n-          s.run(*args, &block)\n-        }.result\n+        command = self.new\n+        result  = command.tap { |s| s.run(*args) }.result\n+\n+        # Run block\n+        yield(result, command) if block_given?\n+\n+        # Throw an exception if we don't return a result\n+        raise CommandNotImplemented unless result.is_a? Result\n+        return result\n+      end\n+\n+      def call!(*args, &block)","path":"lib/slayer/command.rb","position":18,"original_position":18,"commit_id":"aa83dc663dea8141de9ef4cb6e23e6159ed2b4d3","original_commit_id":"aa83dc663dea8141de9ef4cb6e23e6159ed2b4d3","user":{"login":"ncallaway","id":427497,"avatar_url":"https://avatars.githubusercontent.com/u/427497?v=3","gravatar_id":"","url":"https://api.github.com/users/ncallaway","html_url":"https://github.com/ncallaway","followers_url":"https://api.github.com/users/ncallaway/followers","following_url":"https://api.github.com/users/ncallaway/following{/other_user}","gists_url":"https://api.github.com/users/ncallaway/gists{/gist_id}","starred_url":"https://api.github.com/users/ncallaway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncallaway/subscriptions","organizations_url":"https://api.github.com/users/ncallaway/orgs","repos_url":"https://api.github.com/users/ncallaway/repos","events_url":"https://api.github.com/users/ncallaway/events{/privacy}","received_events_url":"https://api.github.com/users/ncallaway/received_events","type":"User","site_admin":false},"body":"Nevermind. We call `run!` in `call!`, I didn't see that earlier.","created_at":"2017-02-11T20:47:42Z","updated_at":"2017-02-11T20:47:42Z","html_url":"https://github.com/apsislabs/slayer/pull/1#discussion_r100676358","pull_request_url":"https://api.github.com/repos/apsislabs/slayer/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/apsislabs/slayer/pulls/comments/100676358"},"html":{"href":"https://github.com/apsislabs/slayer/pull/1#discussion_r100676358"},"pull_request":{"href":"https://api.github.com/repos/apsislabs/slayer/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/apsislabs/slayer/pulls/1","id":105766563,"html_url":"https://github.com/apsislabs/slayer/pull/1","diff_url":"https://github.com/apsislabs/slayer/pull/1.diff","patch_url":"https://github.com/apsislabs/slayer/pull/1.patch","issue_url":"https://api.github.com/repos/apsislabs/slayer/issues/1","number":1,"state":"open","locked":false,"title":"Revise testing strategy and implement blocks","user":{"login":"wkirby","id":579688,"avatar_url":"https://avatars.githubusercontent.com/u/579688?v=3","gravatar_id":"","url":"https://api.github.com/users/wkirby","html_url":"https://github.com/wkirby","followers_url":"https://api.github.com/users/wkirby/followers","following_url":"https://api.github.com/users/wkirby/following{/other_user}","gists_url":"https://api.github.com/users/wkirby/gists{/gist_id}","starred_url":"https://api.github.com/users/wkirby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkirby/subscriptions","organizations_url":"https://api.github.com/users/wkirby/orgs","repos_url":"https://api.github.com/users/wkirby/repos","events_url":"https://api.github.com/users/wkirby/events{/privacy}","received_events_url":"https://api.github.com/users/wkirby/received_events","type":"User","site_admin":false},"body":"This implements a new way to pass blocks to `command` objects that will execute with access to the `result` and to the `command` instance.\r\n\r\nThis also modifies the available `fixtures` and reworks the tests.","created_at":"2017-02-11T20:23:55Z","updated_at":"2017-02-11T20:47:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"ncallaway","id":427497,"avatar_url":"https://avatars.githubusercontent.com/u/427497?v=3","gravatar_id":"","url":"https://api.github.com/users/ncallaway","html_url":"https://github.com/ncallaway","followers_url":"https://api.github.com/users/ncallaway/followers","following_url":"https://api.github.com/users/ncallaway/following{/other_user}","gists_url":"https://api.github.com/users/ncallaway/gists{/gist_id}","starred_url":"https://api.github.com/users/ncallaway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncallaway/subscriptions","organizations_url":"https://api.github.com/users/ncallaway/orgs","repos_url":"https://api.github.com/users/ncallaway/repos","events_url":"https://api.github.com/users/ncallaway/events{/privacy}","received_events_url":"https://api.github.com/users/ncallaway/received_events","type":"User","site_admin":false},"assignees":[{"login":"ncallaway","id":427497,"avatar_url":"https://avatars.githubusercontent.com/u/427497?v=3","gravatar_id":"","url":"https://api.github.com/users/ncallaway","html_url":"https://github.com/ncallaway","followers_url":"https://api.github.com/users/ncallaway/followers","following_url":"https://api.github.com/users/ncallaway/following{/other_user}","gists_url":"https://api.github.com/users/ncallaway/gists{/gist_id}","starred_url":"https://api.github.com/users/ncallaway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncallaway/subscriptions","organizations_url":"https://api.github.com/users/ncallaway/orgs","repos_url":"https://api.github.com/users/ncallaway/repos","events_url":"https://api.github.com/users/ncallaway/events{/privacy}","received_events_url":"https://api.github.com/users/ncallaway/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/apsislabs/slayer/pulls/1/commits","review_comments_url":"https://api.github.com/repos/apsislabs/slayer/pulls/1/comments","review_comment_url":"https://api.github.com/repos/apsislabs/slayer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apsislabs/slayer/issues/1/comments","statuses_url":"https://api.github.com/repos/apsislabs/slayer/statuses/aa83dc663dea8141de9ef4cb6e23e6159ed2b4d3","head":{"label":"apsislabs:feature/test-revisions","ref":"feature/test-revisions","sha":"aa83dc663dea8141de9ef4cb6e23e6159ed2b4d3","user":{"login":"apsislabs","id":6498443,"avatar_url":"https://avatars.githubusercontent.com/u/6498443?v=3","gravatar_id":"","url":"https://api.github.com/users/apsislabs","html_url":"https://github.com/apsislabs","followers_url":"https://api.github.com/users/apsislabs/followers","following_url":"https://api.github.com/users/apsislabs/following{/other_user}","gists_url":"https://api.github.com/users/apsislabs/gists{/gist_id}","starred_url":"https://api.github.com/users/apsislabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apsislabs/subscriptions","organizations_url":"https://api.github.com/users/apsislabs/orgs","repos_url":"https://api.github.com/users/apsislabs/repos","events_url":"https://api.github.com/users/apsislabs/events{/privacy}","received_events_url":"https://api.github.com/users/apsislabs/received_events","type":"Organization","site_admin":false},"repo":{"id":60317305,"name":"slayer","full_name":"apsislabs/slayer","owner":{"login":"apsislabs","id":6498443,"avatar_url":"https://avatars.githubusercontent.com/u/6498443?v=3","gravatar_id":"","url":"https://api.github.com/users/apsislabs","html_url":"https://github.com/apsislabs","followers_url":"https://api.github.com/users/apsislabs/followers","following_url":"https://api.github.com/users/apsislabs/following{/other_user}","gists_url":"https://api.github.com/users/apsislabs/gists{/gist_id}","starred_url":"https://api.github.com/users/apsislabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apsislabs/subscriptions","organizations_url":"https://api.github.com/users/apsislabs/orgs","repos_url":"https://api.github.com/users/apsislabs/repos","events_url":"https://api.github.com/users/apsislabs/events{/privacy}","received_events_url":"https://api.github.com/users/apsislabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apsislabs/slayer","description":"A Service Layer","fork":false,"url":"https://api.github.com/repos/apsislabs/slayer","forks_url":"https://api.github.com/repos/apsislabs/slayer/forks","keys_url":"https://api.github.com/repos/apsislabs/slayer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apsislabs/slayer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apsislabs/slayer/teams","hooks_url":"https://api.github.com/repos/apsislabs/slayer/hooks","issue_events_url":"https://api.github.com/repos/apsislabs/slayer/issues/events{/number}","events_url":"https://api.github.com/repos/apsislabs/slayer/events","assignees_url":"https://api.github.com/repos/apsislabs/slayer/assignees{/user}","branches_url":"https://api.github.com/repos/apsislabs/slayer/branches{/branch}","tags_url":"https://api.github.com/repos/apsislabs/slayer/tags","blobs_url":"https://api.github.com/repos/apsislabs/slayer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apsislabs/slayer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apsislabs/slayer/git/refs{/sha}","trees_url":"https://api.github.com/repos/apsislabs/slayer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apsislabs/slayer/statuses/{sha}","languages_url":"https://api.github.com/repos/apsislabs/slayer/languages","stargazers_url":"https://api.github.com/repos/apsislabs/slayer/stargazers","contributors_url":"https://api.github.com/repos/apsislabs/slayer/contributors","subscribers_url":"https://api.github.com/repos/apsislabs/slayer/subscribers","subscription_url":"https://api.github.com/repos/apsislabs/slayer/subscription","commits_url":"https://api.github.com/repos/apsislabs/slayer/commits{/sha}","git_commits_url":"https://api.github.com/repos/apsislabs/slayer/git/commits{/sha}","comments_url":"https://api.github.com/repos/apsislabs/slayer/comments{/number}","issue_comment_url":"https://api.github.com/repos/apsislabs/slayer/issues/comments{/number}","contents_url":"https://api.github.com/repos/apsislabs/slayer/contents/{+path}","compare_url":"https://api.github.com/repos/apsislabs/slayer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apsislabs/slayer/merges","archive_url":"https://api.github.com/repos/apsislabs/slayer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apsislabs/slayer/downloads","issues_url":"https://api.github.com/repos/apsislabs/slayer/issues{/number}","pulls_url":"https://api.github.com/repos/apsislabs/slayer/pulls{/number}","milestones_url":"https://api.github.com/repos/apsislabs/slayer/milestones{/number}","notifications_url":"https://api.github.com/repos/apsislabs/slayer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apsislabs/slayer/labels{/name}","releases_url":"https://api.github.com/repos/apsislabs/slayer/releases{/id}","deployments_url":"https://api.github.com/repos/apsislabs/slayer/deployments","created_at":"2016-06-03T04:03:23Z","updated_at":"2016-06-03T19:00:55Z","pushed_at":"2017-02-11T20:39:31Z","git_url":"git://github.com/apsislabs/slayer.git","ssh_url":"git@github.com:apsislabs/slayer.git","clone_url":"https://github.com/apsislabs/slayer.git","svn_url":"https://github.com/apsislabs/slayer","homepage":null,"size":100,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"apsislabs:v2","ref":"v2","sha":"425be41413bdeeaf44356c613da3212bb71d0a1b","user":{"login":"apsislabs","id":6498443,"avatar_url":"https://avatars.githubusercontent.com/u/6498443?v=3","gravatar_id":"","url":"https://api.github.com/users/apsislabs","html_url":"https://github.com/apsislabs","followers_url":"https://api.github.com/users/apsislabs/followers","following_url":"https://api.github.com/users/apsislabs/following{/other_user}","gists_url":"https://api.github.com/users/apsislabs/gists{/gist_id}","starred_url":"https://api.github.com/users/apsislabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apsislabs/subscriptions","organizations_url":"https://api.github.com/users/apsislabs/orgs","repos_url":"https://api.github.com/users/apsislabs/repos","events_url":"https://api.github.com/users/apsislabs/events{/privacy}","received_events_url":"https://api.github.com/users/apsislabs/received_events","type":"Organization","site_admin":false},"repo":{"id":60317305,"name":"slayer","full_name":"apsislabs/slayer","owner":{"login":"apsislabs","id":6498443,"avatar_url":"https://avatars.githubusercontent.com/u/6498443?v=3","gravatar_id":"","url":"https://api.github.com/users/apsislabs","html_url":"https://github.com/apsislabs","followers_url":"https://api.github.com/users/apsislabs/followers","following_url":"https://api.github.com/users/apsislabs/following{/other_user}","gists_url":"https://api.github.com/users/apsislabs/gists{/gist_id}","starred_url":"https://api.github.com/users/apsislabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apsislabs/subscriptions","organizations_url":"https://api.github.com/users/apsislabs/orgs","repos_url":"https://api.github.com/users/apsislabs/repos","events_url":"https://api.github.com/users/apsislabs/events{/privacy}","received_events_url":"https://api.github.com/users/apsislabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apsislabs/slayer","description":"A Service Layer","fork":false,"url":"https://api.github.com/repos/apsislabs/slayer","forks_url":"https://api.github.com/repos/apsislabs/slayer/forks","keys_url":"https://api.github.com/repos/apsislabs/slayer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apsislabs/slayer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apsislabs/slayer/teams","hooks_url":"https://api.github.com/repos/apsislabs/slayer/hooks","issue_events_url":"https://api.github.com/repos/apsislabs/slayer/issues/events{/number}","events_url":"https://api.github.com/repos/apsislabs/slayer/events","assignees_url":"https://api.github.com/repos/apsislabs/slayer/assignees{/user}","branches_url":"https://api.github.com/repos/apsislabs/slayer/branches{/branch}","tags_url":"https://api.github.com/repos/apsislabs/slayer/tags","blobs_url":"https://api.github.com/repos/apsislabs/slayer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apsislabs/slayer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apsislabs/slayer/git/refs{/sha}","trees_url":"https://api.github.com/repos/apsislabs/slayer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apsislabs/slayer/statuses/{sha}","languages_url":"https://api.github.com/repos/apsislabs/slayer/languages","stargazers_url":"https://api.github.com/repos/apsislabs/slayer/stargazers","contributors_url":"https://api.github.com/repos/apsislabs/slayer/contributors","subscribers_url":"https://api.github.com/repos/apsislabs/slayer/subscribers","subscription_url":"https://api.github.com/repos/apsislabs/slayer/subscription","commits_url":"https://api.github.com/repos/apsislabs/slayer/commits{/sha}","git_commits_url":"https://api.github.com/repos/apsislabs/slayer/git/commits{/sha}","comments_url":"https://api.github.com/repos/apsislabs/slayer/comments{/number}","issue_comment_url":"https://api.github.com/repos/apsislabs/slayer/issues/comments{/number}","contents_url":"https://api.github.com/repos/apsislabs/slayer/contents/{+path}","compare_url":"https://api.github.com/repos/apsislabs/slayer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apsislabs/slayer/merges","archive_url":"https://api.github.com/repos/apsislabs/slayer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apsislabs/slayer/downloads","issues_url":"https://api.github.com/repos/apsislabs/slayer/issues{/number}","pulls_url":"https://api.github.com/repos/apsislabs/slayer/pulls{/number}","milestones_url":"https://api.github.com/repos/apsislabs/slayer/milestones{/number}","notifications_url":"https://api.github.com/repos/apsislabs/slayer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apsislabs/slayer/labels{/name}","releases_url":"https://api.github.com/repos/apsislabs/slayer/releases{/id}","deployments_url":"https://api.github.com/repos/apsislabs/slayer/deployments","created_at":"2016-06-03T04:03:23Z","updated_at":"2016-06-03T19:00:55Z","pushed_at":"2017-02-11T20:39:31Z","git_url":"git://github.com/apsislabs/slayer.git","ssh_url":"git@github.com:apsislabs/slayer.git","clone_url":"https://github.com/apsislabs/slayer.git","svn_url":"https://github.com/apsislabs/slayer","homepage":null,"size":100,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"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/apsislabs/slayer/pulls/1"},"html":{"href":"https://github.com/apsislabs/slayer/pull/1"},"issue":{"href":"https://api.github.com/repos/apsislabs/slayer/issues/1"},"comments":{"href":"https://api.github.com/repos/apsislabs/slayer/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/apsislabs/slayer/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/apsislabs/slayer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apsislabs/slayer/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/apsislabs/slayer/statuses/aa83dc663dea8141de9ef4cb6e23e6159ed2b4d3"}}}}
{"actor":{"display_login":"ncallaway"}}