{"action":"closed","number":7,"pull_request":{"url":"https://api.github.com/repos/hyperoslo/Aftermath/pulls/7","id":83230988,"html_url":"https://github.com/hyperoslo/Aftermath/pull/7","diff_url":"https://github.com/hyperoslo/Aftermath/pull/7.diff","patch_url":"https://github.com/hyperoslo/Aftermath/pull/7.patch","issue_url":"https://api.github.com/repos/hyperoslo/Aftermath/issues/7","number":7,"state":"closed","locked":false,"title":"Feature: command output","user":{"login":"vadymmarkov","id":10529867,"avatar_url":"https://avatars.githubusercontent.com/u/10529867?v=3","gravatar_id":"","url":"https://api.github.com/users/vadymmarkov","html_url":"https://github.com/vadymmarkov","followers_url":"https://api.github.com/users/vadymmarkov/followers","following_url":"https://api.github.com/users/vadymmarkov/following{/other_user}","gists_url":"https://api.github.com/users/vadymmarkov/gists{/gist_id}","starred_url":"https://api.github.com/users/vadymmarkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vadymmarkov/subscriptions","organizations_url":"https://api.github.com/users/vadymmarkov/orgs","repos_url":"https://api.github.com/users/vadymmarkov/repos","events_url":"https://api.github.com/users/vadymmarkov/events{/privacy}","received_events_url":"https://api.github.com/users/vadymmarkov/received_events","type":"User","site_admin":false},"body":"@zenangst @RamonGilabert @onmyway133 \r\n\r\n1) `Projection` is removed, so we have less confusion with new terms 😄 Now you execute command with a specified output result type, and react to event produced by this command. The flow looks like this for example:\r\n\r\n```swift\r\nstruct UsersStory {\r\n\r\n  struct Command: Aftermath.Command {\r\n    typealias Output = [ViewModel]\r\n  }\r\n\r\n  struct Handler: Aftermath.CommandHandler {\r\n\r\n    func handle(command: Command) throws -> Event<Command> {\r\n      let request = UsersRequest()\r\n\r\n      Malibu.networking(\"base\").GET(request)\r\n        .validate()\r\n        .toJSONArray()\r\n        .then({ array -> [User] in try array.map({ try User($0) }) })\r\n        .then({ users -> [ViewModel] in\r\n          return users.map({ user in\r\n            ViewModel(\r\n              identifier: user.id,\r\n              title: user.name.capitalizedString,\r\n              subtitle: \"Email: \\(user.email)\",\r\n              action: \"users:\\(user.id)\")\r\n          })\r\n        })\r\n        .done({ items in\r\n          self.fulfill(items)\r\n        })\r\n        .fail({ error in\r\n          self.reject(error)\r\n        })\r\n\r\n      return progress\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n2) Reaction's disposal tokens are handled automatically, the only thing that you need to do is to call `disposeAll()` from `ReactionProducer`.\r\n\r\n3) There is a basic implementation of an example project that uses `Spots` and a lot of other cool stuff.","created_at":"2016-08-30T08:47:55Z","updated_at":"2016-08-30T21:57:50Z","closed_at":"2016-08-30T21:57:49Z","merged_at":"2016-08-30T21:57:49Z","merge_commit_sha":"505e52eda7bb367b53958320538b02ed4deae904","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/hyperoslo/Aftermath/pulls/7/commits","review_comments_url":"https://api.github.com/repos/hyperoslo/Aftermath/pulls/7/comments","review_comment_url":"https://api.github.com/repos/hyperoslo/Aftermath/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hyperoslo/Aftermath/issues/7/comments","statuses_url":"https://api.github.com/repos/hyperoslo/Aftermath/statuses/0013a134b0d94e5d8aea6085bcec2208e1e46edf","head":{"label":"hyperoslo:feature/spots-demo","ref":"feature/spots-demo","sha":"0013a134b0d94e5d8aea6085bcec2208e1e46edf","user":{"login":"hyperoslo","id":1340892,"avatar_url":"https://avatars.githubusercontent.com/u/1340892?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperoslo","html_url":"https://github.com/hyperoslo","followers_url":"https://api.github.com/users/hyperoslo/followers","following_url":"https://api.github.com/users/hyperoslo/following{/other_user}","gists_url":"https://api.github.com/users/hyperoslo/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperoslo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperoslo/subscriptions","organizations_url":"https://api.github.com/users/hyperoslo/orgs","repos_url":"https://api.github.com/users/hyperoslo/repos","events_url":"https://api.github.com/users/hyperoslo/events{/privacy}","received_events_url":"https://api.github.com/users/hyperoslo/received_events","type":"Organization","site_admin":false},"repo":{"id":66086829,"name":"Aftermath","full_name":"hyperoslo/Aftermath","owner":{"login":"hyperoslo","id":1340892,"avatar_url":"https://avatars.githubusercontent.com/u/1340892?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperoslo","html_url":"https://github.com/hyperoslo","followers_url":"https://api.github.com/users/hyperoslo/followers","following_url":"https://api.github.com/users/hyperoslo/following{/other_user}","gists_url":"https://api.github.com/users/hyperoslo/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperoslo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperoslo/subscriptions","organizations_url":"https://api.github.com/users/hyperoslo/orgs","repos_url":"https://api.github.com/users/hyperoslo/repos","events_url":"https://api.github.com/users/hyperoslo/events{/privacy}","received_events_url":"https://api.github.com/users/hyperoslo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hyperoslo/Aftermath","description":":arrows_clockwise: Stateless message-driven micro-framework in Swift.","fork":false,"url":"https://api.github.com/repos/hyperoslo/Aftermath","forks_url":"https://api.github.com/repos/hyperoslo/Aftermath/forks","keys_url":"https://api.github.com/repos/hyperoslo/Aftermath/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyperoslo/Aftermath/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyperoslo/Aftermath/teams","hooks_url":"https://api.github.com/repos/hyperoslo/Aftermath/hooks","issue_events_url":"https://api.github.com/repos/hyperoslo/Aftermath/issues/events{/number}","events_url":"https://api.github.com/repos/hyperoslo/Aftermath/events","assignees_url":"https://api.github.com/repos/hyperoslo/Aftermath/assignees{/user}","branches_url":"https://api.github.com/repos/hyperoslo/Aftermath/branches{/branch}","tags_url":"https://api.github.com/repos/hyperoslo/Aftermath/tags","blobs_url":"https://api.github.com/repos/hyperoslo/Aftermath/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyperoslo/Aftermath/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyperoslo/Aftermath/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyperoslo/Aftermath/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyperoslo/Aftermath/statuses/{sha}","languages_url":"https://api.github.com/repos/hyperoslo/Aftermath/languages","stargazers_url":"https://api.github.com/repos/hyperoslo/Aftermath/stargazers","contributors_url":"https://api.github.com/repos/hyperoslo/Aftermath/contributors","subscribers_url":"https://api.github.com/repos/hyperoslo/Aftermath/subscribers","subscription_url":"https://api.github.com/repos/hyperoslo/Aftermath/subscription","commits_url":"https://api.github.com/repos/hyperoslo/Aftermath/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyperoslo/Aftermath/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyperoslo/Aftermath/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyperoslo/Aftermath/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyperoslo/Aftermath/contents/{+path}","compare_url":"https://api.github.com/repos/hyperoslo/Aftermath/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyperoslo/Aftermath/merges","archive_url":"https://api.github.com/repos/hyperoslo/Aftermath/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyperoslo/Aftermath/downloads","issues_url":"https://api.github.com/repos/hyperoslo/Aftermath/issues{/number}","pulls_url":"https://api.github.com/repos/hyperoslo/Aftermath/pulls{/number}","milestones_url":"https://api.github.com/repos/hyperoslo/Aftermath/milestones{/number}","notifications_url":"https://api.github.com/repos/hyperoslo/Aftermath/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyperoslo/Aftermath/labels{/name}","releases_url":"https://api.github.com/repos/hyperoslo/Aftermath/releases{/id}","deployments_url":"https://api.github.com/repos/hyperoslo/Aftermath/deployments","created_at":"2016-08-19T14:07:42Z","updated_at":"2016-08-27T16:45:17Z","pushed_at":"2016-08-30T21:57:50Z","git_url":"git://github.com/hyperoslo/Aftermath.git","ssh_url":"git@github.com:hyperoslo/Aftermath.git","clone_url":"https://github.com/hyperoslo/Aftermath.git","svn_url":"https://github.com/hyperoslo/Aftermath","homepage":"http://hyper.no","size":171,"stargazers_count":8,"watchers_count":8,"language":"Swift","has_issues":true,"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":8,"default_branch":"master"}},"base":{"label":"hyperoslo:master","ref":"master","sha":"7c2049977f03c59bd4a192dab9b745976724af3f","user":{"login":"hyperoslo","id":1340892,"avatar_url":"https://avatars.githubusercontent.com/u/1340892?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperoslo","html_url":"https://github.com/hyperoslo","followers_url":"https://api.github.com/users/hyperoslo/followers","following_url":"https://api.github.com/users/hyperoslo/following{/other_user}","gists_url":"https://api.github.com/users/hyperoslo/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperoslo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperoslo/subscriptions","organizations_url":"https://api.github.com/users/hyperoslo/orgs","repos_url":"https://api.github.com/users/hyperoslo/repos","events_url":"https://api.github.com/users/hyperoslo/events{/privacy}","received_events_url":"https://api.github.com/users/hyperoslo/received_events","type":"Organization","site_admin":false},"repo":{"id":66086829,"name":"Aftermath","full_name":"hyperoslo/Aftermath","owner":{"login":"hyperoslo","id":1340892,"avatar_url":"https://avatars.githubusercontent.com/u/1340892?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperoslo","html_url":"https://github.com/hyperoslo","followers_url":"https://api.github.com/users/hyperoslo/followers","following_url":"https://api.github.com/users/hyperoslo/following{/other_user}","gists_url":"https://api.github.com/users/hyperoslo/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperoslo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperoslo/subscriptions","organizations_url":"https://api.github.com/users/hyperoslo/orgs","repos_url":"https://api.github.com/users/hyperoslo/repos","events_url":"https://api.github.com/users/hyperoslo/events{/privacy}","received_events_url":"https://api.github.com/users/hyperoslo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hyperoslo/Aftermath","description":":arrows_clockwise: Stateless message-driven micro-framework in Swift.","fork":false,"url":"https://api.github.com/repos/hyperoslo/Aftermath","forks_url":"https://api.github.com/repos/hyperoslo/Aftermath/forks","keys_url":"https://api.github.com/repos/hyperoslo/Aftermath/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyperoslo/Aftermath/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyperoslo/Aftermath/teams","hooks_url":"https://api.github.com/repos/hyperoslo/Aftermath/hooks","issue_events_url":"https://api.github.com/repos/hyperoslo/Aftermath/issues/events{/number}","events_url":"https://api.github.com/repos/hyperoslo/Aftermath/events","assignees_url":"https://api.github.com/repos/hyperoslo/Aftermath/assignees{/user}","branches_url":"https://api.github.com/repos/hyperoslo/Aftermath/branches{/branch}","tags_url":"https://api.github.com/repos/hyperoslo/Aftermath/tags","blobs_url":"https://api.github.com/repos/hyperoslo/Aftermath/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyperoslo/Aftermath/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyperoslo/Aftermath/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyperoslo/Aftermath/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyperoslo/Aftermath/statuses/{sha}","languages_url":"https://api.github.com/repos/hyperoslo/Aftermath/languages","stargazers_url":"https://api.github.com/repos/hyperoslo/Aftermath/stargazers","contributors_url":"https://api.github.com/repos/hyperoslo/Aftermath/contributors","subscribers_url":"https://api.github.com/repos/hyperoslo/Aftermath/subscribers","subscription_url":"https://api.github.com/repos/hyperoslo/Aftermath/subscription","commits_url":"https://api.github.com/repos/hyperoslo/Aftermath/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyperoslo/Aftermath/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyperoslo/Aftermath/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyperoslo/Aftermath/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyperoslo/Aftermath/contents/{+path}","compare_url":"https://api.github.com/repos/hyperoslo/Aftermath/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyperoslo/Aftermath/merges","archive_url":"https://api.github.com/repos/hyperoslo/Aftermath/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyperoslo/Aftermath/downloads","issues_url":"https://api.github.com/repos/hyperoslo/Aftermath/issues{/number}","pulls_url":"https://api.github.com/repos/hyperoslo/Aftermath/pulls{/number}","milestones_url":"https://api.github.com/repos/hyperoslo/Aftermath/milestones{/number}","notifications_url":"https://api.github.com/repos/hyperoslo/Aftermath/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyperoslo/Aftermath/labels{/name}","releases_url":"https://api.github.com/repos/hyperoslo/Aftermath/releases{/id}","deployments_url":"https://api.github.com/repos/hyperoslo/Aftermath/deployments","created_at":"2016-08-19T14:07:42Z","updated_at":"2016-08-27T16:45:17Z","pushed_at":"2016-08-30T21:57:50Z","git_url":"git://github.com/hyperoslo/Aftermath.git","ssh_url":"git@github.com:hyperoslo/Aftermath.git","clone_url":"https://github.com/hyperoslo/Aftermath.git","svn_url":"https://github.com/hyperoslo/Aftermath","homepage":"http://hyper.no","size":171,"stargazers_count":8,"watchers_count":8,"language":"Swift","has_issues":true,"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":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hyperoslo/Aftermath/pulls/7"},"html":{"href":"https://github.com/hyperoslo/Aftermath/pull/7"},"issue":{"href":"https://api.github.com/repos/hyperoslo/Aftermath/issues/7"},"comments":{"href":"https://api.github.com/repos/hyperoslo/Aftermath/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/hyperoslo/Aftermath/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/hyperoslo/Aftermath/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hyperoslo/Aftermath/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/hyperoslo/Aftermath/statuses/0013a134b0d94e5d8aea6085bcec2208e1e46edf"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"zenangst","id":57446,"avatar_url":"https://avatars.githubusercontent.com/u/57446?v=3","gravatar_id":"","url":"https://api.github.com/users/zenangst","html_url":"https://github.com/zenangst","followers_url":"https://api.github.com/users/zenangst/followers","following_url":"https://api.github.com/users/zenangst/following{/other_user}","gists_url":"https://api.github.com/users/zenangst/gists{/gist_id}","starred_url":"https://api.github.com/users/zenangst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenangst/subscriptions","organizations_url":"https://api.github.com/users/zenangst/orgs","repos_url":"https://api.github.com/users/zenangst/repos","events_url":"https://api.github.com/users/zenangst/events{/privacy}","received_events_url":"https://api.github.com/users/zenangst/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"commits":31,"additions":1343,"deletions":128,"changed_files":59}}
{"actor":{"display_login":"zenangst"}}