{"action":"closed","number":2,"pull_request":{"url":"https://api.github.com/repos/metova/up_and_at_them/pulls/2","id":27788502,"html_url":"https://github.com/metova/up_and_at_them/pull/2","diff_url":"https://github.com/metova/up_and_at_them/pull/2.diff","patch_url":"https://github.com/metova/up_and_at_them/pull/2.patch","issue_url":"https://api.github.com/repos/metova/up_and_at_them/issues/2","number":2,"state":"closed","locked":false,"title":"Make Transaction#rollback method and expose it","user":{"login":"lserman","id":1957122,"avatar_url":"https://avatars.githubusercontent.com/u/1957122?v=3","gravatar_id":"","url":"https://api.github.com/users/lserman","html_url":"https://github.com/lserman","followers_url":"https://api.github.com/users/lserman/followers","following_url":"https://api.github.com/users/lserman/following{/other_user}","gists_url":"https://api.github.com/users/lserman/gists{/gist_id}","starred_url":"https://api.github.com/users/lserman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lserman/subscriptions","organizations_url":"https://api.github.com/users/lserman/orgs","repos_url":"https://api.github.com/users/lserman/repos","events_url":"https://api.github.com/users/lserman/events{/privacy}","received_events_url":"https://api.github.com/users/lserman/received_events","type":"User","site_admin":false},"body":"This is useful whenever a transaction is nested somehow in another transaction, for example:\r\n\r\n```ruby\r\nclass DetermineWinners\r\n  def initialize(game)\r\n    @game = game\r\n  end\r\n\r\n  def call\r\n    awards = @game.players.map { |p| AwardPlayer.new(p) }\r\n    @transaction = UpAndAtThem::Transaction.new(awards)\r\n    # do something else...\r\n  end\r\n\r\n  def rollback\r\n    @transaction.rollback\r\n    # rollback something else...\r\n  end\r\nend\r\n```\r\n\r\nWith `#rollback` added, `DetermineWinners` can forcefully rollback it's nested `@transaction` in addition to rolling back it's own actions.","created_at":"2015-01-21T19:43:28Z","updated_at":"2015-01-21T23:03:14Z","closed_at":"2015-01-21T23:03:14Z","merged_at":"2015-01-21T23:03:14Z","merge_commit_sha":"961986af890c5c485cdcfb3cbf8729cd88d43331","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/metova/up_and_at_them/pulls/2/commits","review_comments_url":"https://api.github.com/repos/metova/up_and_at_them/pulls/2/comments","review_comment_url":"https://api.github.com/repos/metova/up_and_at_them/pulls/comments/{number}","comments_url":"https://api.github.com/repos/metova/up_and_at_them/issues/2/comments","statuses_url":"https://api.github.com/repos/metova/up_and_at_them/statuses/ab93186b78db3a979a46707b9172190482f7140c","head":{"label":"lserman:master","ref":"master","sha":"ab93186b78db3a979a46707b9172190482f7140c","user":{"login":"lserman","id":1957122,"avatar_url":"https://avatars.githubusercontent.com/u/1957122?v=3","gravatar_id":"","url":"https://api.github.com/users/lserman","html_url":"https://github.com/lserman","followers_url":"https://api.github.com/users/lserman/followers","following_url":"https://api.github.com/users/lserman/following{/other_user}","gists_url":"https://api.github.com/users/lserman/gists{/gist_id}","starred_url":"https://api.github.com/users/lserman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lserman/subscriptions","organizations_url":"https://api.github.com/users/lserman/orgs","repos_url":"https://api.github.com/users/lserman/repos","events_url":"https://api.github.com/users/lserman/events{/privacy}","received_events_url":"https://api.github.com/users/lserman/received_events","type":"User","site_admin":false},"repo":{"id":29607451,"name":"up_and_at_them","full_name":"lserman/up_and_at_them","owner":{"login":"lserman","id":1957122,"avatar_url":"https://avatars.githubusercontent.com/u/1957122?v=3","gravatar_id":"","url":"https://api.github.com/users/lserman","html_url":"https://github.com/lserman","followers_url":"https://api.github.com/users/lserman/followers","following_url":"https://api.github.com/users/lserman/following{/other_user}","gists_url":"https://api.github.com/users/lserman/gists{/gist_id}","starred_url":"https://api.github.com/users/lserman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lserman/subscriptions","organizations_url":"https://api.github.com/users/lserman/orgs","repos_url":"https://api.github.com/users/lserman/repos","events_url":"https://api.github.com/users/lserman/events{/privacy}","received_events_url":"https://api.github.com/users/lserman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lserman/up_and_at_them","description":"A library for simplifying atomic transactions in Ruby.","fork":true,"url":"https://api.github.com/repos/lserman/up_and_at_them","forks_url":"https://api.github.com/repos/lserman/up_and_at_them/forks","keys_url":"https://api.github.com/repos/lserman/up_and_at_them/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lserman/up_and_at_them/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lserman/up_and_at_them/teams","hooks_url":"https://api.github.com/repos/lserman/up_and_at_them/hooks","issue_events_url":"https://api.github.com/repos/lserman/up_and_at_them/issues/events{/number}","events_url":"https://api.github.com/repos/lserman/up_and_at_them/events","assignees_url":"https://api.github.com/repos/lserman/up_and_at_them/assignees{/user}","branches_url":"https://api.github.com/repos/lserman/up_and_at_them/branches{/branch}","tags_url":"https://api.github.com/repos/lserman/up_and_at_them/tags","blobs_url":"https://api.github.com/repos/lserman/up_and_at_them/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lserman/up_and_at_them/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lserman/up_and_at_them/git/refs{/sha}","trees_url":"https://api.github.com/repos/lserman/up_and_at_them/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lserman/up_and_at_them/statuses/{sha}","languages_url":"https://api.github.com/repos/lserman/up_and_at_them/languages","stargazers_url":"https://api.github.com/repos/lserman/up_and_at_them/stargazers","contributors_url":"https://api.github.com/repos/lserman/up_and_at_them/contributors","subscribers_url":"https://api.github.com/repos/lserman/up_and_at_them/subscribers","subscription_url":"https://api.github.com/repos/lserman/up_and_at_them/subscription","commits_url":"https://api.github.com/repos/lserman/up_and_at_them/commits{/sha}","git_commits_url":"https://api.github.com/repos/lserman/up_and_at_them/git/commits{/sha}","comments_url":"https://api.github.com/repos/lserman/up_and_at_them/comments{/number}","issue_comment_url":"https://api.github.com/repos/lserman/up_and_at_them/issues/comments/{number}","contents_url":"https://api.github.com/repos/lserman/up_and_at_them/contents/{+path}","compare_url":"https://api.github.com/repos/lserman/up_and_at_them/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lserman/up_and_at_them/merges","archive_url":"https://api.github.com/repos/lserman/up_and_at_them/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lserman/up_and_at_them/downloads","issues_url":"https://api.github.com/repos/lserman/up_and_at_them/issues{/number}","pulls_url":"https://api.github.com/repos/lserman/up_and_at_them/pulls{/number}","milestones_url":"https://api.github.com/repos/lserman/up_and_at_them/milestones{/number}","notifications_url":"https://api.github.com/repos/lserman/up_and_at_them/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lserman/up_and_at_them/labels{/name}","releases_url":"https://api.github.com/repos/lserman/up_and_at_them/releases{/id}","created_at":"2015-01-21T19:33:20Z","updated_at":"2015-01-21T19:38:18Z","pushed_at":"2015-01-21T19:38:18Z","git_url":"git://github.com/lserman/up_and_at_them.git","ssh_url":"git@github.com:lserman/up_and_at_them.git","clone_url":"https://github.com/lserman/up_and_at_them.git","svn_url":"https://github.com/lserman/up_and_at_them","homepage":null,"size":150,"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":"metova:master","ref":"master","sha":"5780a560937f9283b97b64633601f329dda4fb02","user":{"login":"metova","id":430136,"avatar_url":"https://avatars.githubusercontent.com/u/430136?v=3","gravatar_id":"","url":"https://api.github.com/users/metova","html_url":"https://github.com/metova","followers_url":"https://api.github.com/users/metova/followers","following_url":"https://api.github.com/users/metova/following{/other_user}","gists_url":"https://api.github.com/users/metova/gists{/gist_id}","starred_url":"https://api.github.com/users/metova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metova/subscriptions","organizations_url":"https://api.github.com/users/metova/orgs","repos_url":"https://api.github.com/users/metova/repos","events_url":"https://api.github.com/users/metova/events{/privacy}","received_events_url":"https://api.github.com/users/metova/received_events","type":"Organization","site_admin":false},"repo":{"id":24898971,"name":"up_and_at_them","full_name":"metova/up_and_at_them","owner":{"login":"metova","id":430136,"avatar_url":"https://avatars.githubusercontent.com/u/430136?v=3","gravatar_id":"","url":"https://api.github.com/users/metova","html_url":"https://github.com/metova","followers_url":"https://api.github.com/users/metova/followers","following_url":"https://api.github.com/users/metova/following{/other_user}","gists_url":"https://api.github.com/users/metova/gists{/gist_id}","starred_url":"https://api.github.com/users/metova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metova/subscriptions","organizations_url":"https://api.github.com/users/metova/orgs","repos_url":"https://api.github.com/users/metova/repos","events_url":"https://api.github.com/users/metova/events{/privacy}","received_events_url":"https://api.github.com/users/metova/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/metova/up_and_at_them","description":"A library for simplifying atomic transactions in Ruby.","fork":false,"url":"https://api.github.com/repos/metova/up_and_at_them","forks_url":"https://api.github.com/repos/metova/up_and_at_them/forks","keys_url":"https://api.github.com/repos/metova/up_and_at_them/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metova/up_and_at_them/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metova/up_and_at_them/teams","hooks_url":"https://api.github.com/repos/metova/up_and_at_them/hooks","issue_events_url":"https://api.github.com/repos/metova/up_and_at_them/issues/events{/number}","events_url":"https://api.github.com/repos/metova/up_and_at_them/events","assignees_url":"https://api.github.com/repos/metova/up_and_at_them/assignees{/user}","branches_url":"https://api.github.com/repos/metova/up_and_at_them/branches{/branch}","tags_url":"https://api.github.com/repos/metova/up_and_at_them/tags","blobs_url":"https://api.github.com/repos/metova/up_and_at_them/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metova/up_and_at_them/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metova/up_and_at_them/git/refs{/sha}","trees_url":"https://api.github.com/repos/metova/up_and_at_them/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metova/up_and_at_them/statuses/{sha}","languages_url":"https://api.github.com/repos/metova/up_and_at_them/languages","stargazers_url":"https://api.github.com/repos/metova/up_and_at_them/stargazers","contributors_url":"https://api.github.com/repos/metova/up_and_at_them/contributors","subscribers_url":"https://api.github.com/repos/metova/up_and_at_them/subscribers","subscription_url":"https://api.github.com/repos/metova/up_and_at_them/subscription","commits_url":"https://api.github.com/repos/metova/up_and_at_them/commits{/sha}","git_commits_url":"https://api.github.com/repos/metova/up_and_at_them/git/commits{/sha}","comments_url":"https://api.github.com/repos/metova/up_and_at_them/comments{/number}","issue_comment_url":"https://api.github.com/repos/metova/up_and_at_them/issues/comments/{number}","contents_url":"https://api.github.com/repos/metova/up_and_at_them/contents/{+path}","compare_url":"https://api.github.com/repos/metova/up_and_at_them/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metova/up_and_at_them/merges","archive_url":"https://api.github.com/repos/metova/up_and_at_them/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metova/up_and_at_them/downloads","issues_url":"https://api.github.com/repos/metova/up_and_at_them/issues{/number}","pulls_url":"https://api.github.com/repos/metova/up_and_at_them/pulls{/number}","milestones_url":"https://api.github.com/repos/metova/up_and_at_them/milestones{/number}","notifications_url":"https://api.github.com/repos/metova/up_and_at_them/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metova/up_and_at_them/labels{/name}","releases_url":"https://api.github.com/repos/metova/up_and_at_them/releases{/id}","created_at":"2014-10-07T16:08:42Z","updated_at":"2015-01-12T20:55:08Z","pushed_at":"2015-01-21T23:03:15Z","git_url":"git://github.com/metova/up_and_at_them.git","ssh_url":"git@github.com:metova/up_and_at_them.git","clone_url":"https://github.com/metova/up_and_at_them.git","svn_url":"https://github.com/metova/up_and_at_them","homepage":null,"size":150,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/metova/up_and_at_them/pulls/2"},"html":{"href":"https://github.com/metova/up_and_at_them/pull/2"},"issue":{"href":"https://api.github.com/repos/metova/up_and_at_them/issues/2"},"comments":{"href":"https://api.github.com/repos/metova/up_and_at_them/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/metova/up_and_at_them/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/metova/up_and_at_them/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/metova/up_and_at_them/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/metova/up_and_at_them/statuses/ab93186b78db3a979a46707b9172190482f7140c"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"NotDaveLane","id":440232,"avatar_url":"https://avatars.githubusercontent.com/u/440232?v=3","gravatar_id":"","url":"https://api.github.com/users/NotDaveLane","html_url":"https://github.com/NotDaveLane","followers_url":"https://api.github.com/users/NotDaveLane/followers","following_url":"https://api.github.com/users/NotDaveLane/following{/other_user}","gists_url":"https://api.github.com/users/NotDaveLane/gists{/gist_id}","starred_url":"https://api.github.com/users/NotDaveLane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NotDaveLane/subscriptions","organizations_url":"https://api.github.com/users/NotDaveLane/orgs","repos_url":"https://api.github.com/users/NotDaveLane/repos","events_url":"https://api.github.com/users/NotDaveLane/events{/privacy}","received_events_url":"https://api.github.com/users/NotDaveLane/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":19,"deletions":3,"changed_files":2}}