{"action":"closed","number":515,"pull_request":{"url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/pulls/515","id":76865656,"html_url":"https://github.com/iOS-Goodies/iOS-Goodies/pull/515","diff_url":"https://github.com/iOS-Goodies/iOS-Goodies/pull/515.diff","patch_url":"https://github.com/iOS-Goodies/iOS-Goodies/pull/515.patch","issue_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/issues/515","number":515,"state":"closed","locked":false,"title":"Add Alembic","user":{"login":"ra1028","id":7347118,"avatar_url":"https://avatars.githubusercontent.com/u/7347118?v=3","gravatar_id":"","url":"https://api.github.com/users/ra1028","html_url":"https://github.com/ra1028","followers_url":"https://api.github.com/users/ra1028/followers","following_url":"https://api.github.com/users/ra1028/following{/other_user}","gists_url":"https://api.github.com/users/ra1028/gists{/gist_id}","starred_url":"https://api.github.com/users/ra1028/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ra1028/subscriptions","organizations_url":"https://api.github.com/users/ra1028/orgs","repos_url":"https://api.github.com/users/ra1028/repos","events_url":"https://api.github.com/users/ra1028/events{/privacy}","received_events_url":"https://api.github.com/users/ra1028/received_events","type":"User","site_admin":false},"body":"A trait of __Alembic__ is to enable easy JSON parsing and transform its value by data streams.\r\nAdopted a functional monad concepts.\r\n\r\nExample is here:\r\n\r\n```Swift\r\nlet obj = [\"website\": [\"title\": \"Example\", \"url\": \"http://example.com\"]]\r\nlet j = JSON(obj)\r\n\r\nstruct Website: Distillable {\r\n    let title: String\r\n    let url: NSURL\r\n    \r\n    static func distil(j: JSON) throws -> Website {\r\n        return try Website(\r\n            title: j <| \"title\",\r\n            url: (j <| \"url\").flatMap(NSURL.init(string:))\r\n        )\r\n    }\r\n}\r\n\r\nlet name1: String = try j.distil([\"website\", \"title\"])\r\nlet name2: String = try j <| [\"website\", \"title\"]\r\nlet name3: String = try j[\"website\"][\"title\"].distil()\r\nj.distil([\"website\", \"title\"])(String).success { name4 in\r\n    print(name4)\r\n}\r\n\r\nj.distil([\"website\", \"title\"])\r\n    .filter { !$0.isEmpty }\r\n    .map { \"Website title is \" + $0 }\r\n    .success { print($0) }\r\n\r\nlet user: Website = try j <| \"website\"\r\n```\r\n\r\nA previous PR for Alembic wasn't included in the newsletter, though it was merged.\r\nWill it be possible to include this in next week iOS goodies?","created_at":"2016-07-10T06:23:21Z","updated_at":"2016-07-10T13:11:39Z","closed_at":"2016-07-10T13:11:39Z","merged_at":"2016-07-10T13:11:39Z","merge_commit_sha":"86ba799525715e3f7f670621ba9f100871ddd8be","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/pulls/515/commits","review_comments_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/pulls/515/comments","review_comment_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/issues/515/comments","statuses_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/statuses/e78f89e59d02e00aeb5a89db97555feca732291d","head":{"label":"ra1028:master","ref":"master","sha":"e78f89e59d02e00aeb5a89db97555feca732291d","user":{"login":"ra1028","id":7347118,"avatar_url":"https://avatars.githubusercontent.com/u/7347118?v=3","gravatar_id":"","url":"https://api.github.com/users/ra1028","html_url":"https://github.com/ra1028","followers_url":"https://api.github.com/users/ra1028/followers","following_url":"https://api.github.com/users/ra1028/following{/other_user}","gists_url":"https://api.github.com/users/ra1028/gists{/gist_id}","starred_url":"https://api.github.com/users/ra1028/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ra1028/subscriptions","organizations_url":"https://api.github.com/users/ra1028/orgs","repos_url":"https://api.github.com/users/ra1028/repos","events_url":"https://api.github.com/users/ra1028/events{/privacy}","received_events_url":"https://api.github.com/users/ra1028/received_events","type":"User","site_admin":false},"repo":{"id":59903105,"name":"iOS-Goodies","full_name":"ra1028/iOS-Goodies","owner":{"login":"ra1028","id":7347118,"avatar_url":"https://avatars.githubusercontent.com/u/7347118?v=3","gravatar_id":"","url":"https://api.github.com/users/ra1028","html_url":"https://github.com/ra1028","followers_url":"https://api.github.com/users/ra1028/followers","following_url":"https://api.github.com/users/ra1028/following{/other_user}","gists_url":"https://api.github.com/users/ra1028/gists{/gist_id}","starred_url":"https://api.github.com/users/ra1028/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ra1028/subscriptions","organizations_url":"https://api.github.com/users/ra1028/orgs","repos_url":"https://api.github.com/users/ra1028/repos","events_url":"https://api.github.com/users/ra1028/events{/privacy}","received_events_url":"https://api.github.com/users/ra1028/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ra1028/iOS-Goodies","description":"Your favorite iOS Newsletter, now open source.","fork":true,"url":"https://api.github.com/repos/ra1028/iOS-Goodies","forks_url":"https://api.github.com/repos/ra1028/iOS-Goodies/forks","keys_url":"https://api.github.com/repos/ra1028/iOS-Goodies/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ra1028/iOS-Goodies/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ra1028/iOS-Goodies/teams","hooks_url":"https://api.github.com/repos/ra1028/iOS-Goodies/hooks","issue_events_url":"https://api.github.com/repos/ra1028/iOS-Goodies/issues/events{/number}","events_url":"https://api.github.com/repos/ra1028/iOS-Goodies/events","assignees_url":"https://api.github.com/repos/ra1028/iOS-Goodies/assignees{/user}","branches_url":"https://api.github.com/repos/ra1028/iOS-Goodies/branches{/branch}","tags_url":"https://api.github.com/repos/ra1028/iOS-Goodies/tags","blobs_url":"https://api.github.com/repos/ra1028/iOS-Goodies/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ra1028/iOS-Goodies/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ra1028/iOS-Goodies/git/refs{/sha}","trees_url":"https://api.github.com/repos/ra1028/iOS-Goodies/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ra1028/iOS-Goodies/statuses/{sha}","languages_url":"https://api.github.com/repos/ra1028/iOS-Goodies/languages","stargazers_url":"https://api.github.com/repos/ra1028/iOS-Goodies/stargazers","contributors_url":"https://api.github.com/repos/ra1028/iOS-Goodies/contributors","subscribers_url":"https://api.github.com/repos/ra1028/iOS-Goodies/subscribers","subscription_url":"https://api.github.com/repos/ra1028/iOS-Goodies/subscription","commits_url":"https://api.github.com/repos/ra1028/iOS-Goodies/commits{/sha}","git_commits_url":"https://api.github.com/repos/ra1028/iOS-Goodies/git/commits{/sha}","comments_url":"https://api.github.com/repos/ra1028/iOS-Goodies/comments{/number}","issue_comment_url":"https://api.github.com/repos/ra1028/iOS-Goodies/issues/comments{/number}","contents_url":"https://api.github.com/repos/ra1028/iOS-Goodies/contents/{+path}","compare_url":"https://api.github.com/repos/ra1028/iOS-Goodies/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ra1028/iOS-Goodies/merges","archive_url":"https://api.github.com/repos/ra1028/iOS-Goodies/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ra1028/iOS-Goodies/downloads","issues_url":"https://api.github.com/repos/ra1028/iOS-Goodies/issues{/number}","pulls_url":"https://api.github.com/repos/ra1028/iOS-Goodies/pulls{/number}","milestones_url":"https://api.github.com/repos/ra1028/iOS-Goodies/milestones{/number}","notifications_url":"https://api.github.com/repos/ra1028/iOS-Goodies/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ra1028/iOS-Goodies/labels{/name}","releases_url":"https://api.github.com/repos/ra1028/iOS-Goodies/releases{/id}","deployments_url":"https://api.github.com/repos/ra1028/iOS-Goodies/deployments","created_at":"2016-05-28T16:11:41Z","updated_at":"2016-05-28T15:48:23Z","pushed_at":"2016-07-10T06:03:03Z","git_url":"git://github.com/ra1028/iOS-Goodies.git","ssh_url":"git@github.com:ra1028/iOS-Goodies.git","clone_url":"https://github.com/ra1028/iOS-Goodies.git","svn_url":"https://github.com/ra1028/iOS-Goodies","homepage":"http://ios-goodies.com","size":949,"stargazers_count":0,"watchers_count":0,"language":null,"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":"iOS-Goodies:master","ref":"master","sha":"b1d4155afb4d462fa39387dfe69229bf5bbeb2e4","user":{"login":"iOS-Goodies","id":11159512,"avatar_url":"https://avatars.githubusercontent.com/u/11159512?v=3","gravatar_id":"","url":"https://api.github.com/users/iOS-Goodies","html_url":"https://github.com/iOS-Goodies","followers_url":"https://api.github.com/users/iOS-Goodies/followers","following_url":"https://api.github.com/users/iOS-Goodies/following{/other_user}","gists_url":"https://api.github.com/users/iOS-Goodies/gists{/gist_id}","starred_url":"https://api.github.com/users/iOS-Goodies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iOS-Goodies/subscriptions","organizations_url":"https://api.github.com/users/iOS-Goodies/orgs","repos_url":"https://api.github.com/users/iOS-Goodies/repos","events_url":"https://api.github.com/users/iOS-Goodies/events{/privacy}","received_events_url":"https://api.github.com/users/iOS-Goodies/received_events","type":"Organization","site_admin":false},"repo":{"id":31210625,"name":"iOS-Goodies","full_name":"iOS-Goodies/iOS-Goodies","owner":{"login":"iOS-Goodies","id":11159512,"avatar_url":"https://avatars.githubusercontent.com/u/11159512?v=3","gravatar_id":"","url":"https://api.github.com/users/iOS-Goodies","html_url":"https://github.com/iOS-Goodies","followers_url":"https://api.github.com/users/iOS-Goodies/followers","following_url":"https://api.github.com/users/iOS-Goodies/following{/other_user}","gists_url":"https://api.github.com/users/iOS-Goodies/gists{/gist_id}","starred_url":"https://api.github.com/users/iOS-Goodies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iOS-Goodies/subscriptions","organizations_url":"https://api.github.com/users/iOS-Goodies/orgs","repos_url":"https://api.github.com/users/iOS-Goodies/repos","events_url":"https://api.github.com/users/iOS-Goodies/events{/privacy}","received_events_url":"https://api.github.com/users/iOS-Goodies/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iOS-Goodies/iOS-Goodies","description":"Your favorite iOS Newsletter, now open source.","fork":false,"url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies","forks_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/forks","keys_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/teams","hooks_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/hooks","issue_events_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/issues/events{/number}","events_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/events","assignees_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/assignees{/user}","branches_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/branches{/branch}","tags_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/tags","blobs_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/git/refs{/sha}","trees_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/statuses/{sha}","languages_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/languages","stargazers_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/stargazers","contributors_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/contributors","subscribers_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/subscribers","subscription_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/subscription","commits_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/commits{/sha}","git_commits_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/git/commits{/sha}","comments_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/comments{/number}","issue_comment_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/issues/comments{/number}","contents_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/contents/{+path}","compare_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/merges","archive_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/downloads","issues_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/issues{/number}","pulls_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/pulls{/number}","milestones_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/milestones{/number}","notifications_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/labels{/name}","releases_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/releases{/id}","deployments_url":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/deployments","created_at":"2015-02-23T14:07:27Z","updated_at":"2016-07-04T16:40:44Z","pushed_at":"2016-07-10T13:11:39Z","git_url":"git://github.com/iOS-Goodies/iOS-Goodies.git","ssh_url":"git@github.com:iOS-Goodies/iOS-Goodies.git","clone_url":"https://github.com/iOS-Goodies/iOS-Goodies.git","svn_url":"https://github.com/iOS-Goodies/iOS-Goodies","homepage":"http://ios-goodies.com","size":1039,"stargazers_count":342,"watchers_count":342,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":123,"mirror_url":null,"open_issues_count":0,"forks":123,"open_issues":0,"watchers":342,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/pulls/515"},"html":{"href":"https://github.com/iOS-Goodies/iOS-Goodies/pull/515"},"issue":{"href":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/issues/515"},"comments":{"href":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/issues/515/comments"},"review_comments":{"href":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/pulls/515/comments"},"review_comment":{"href":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/pulls/515/commits"},"statuses":{"href":"https://api.github.com/repos/iOS-Goodies/iOS-Goodies/statuses/e78f89e59d02e00aeb5a89db97555feca732291d"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"dkhamsing","id":4723115,"avatar_url":"https://avatars.githubusercontent.com/u/4723115?v=3","gravatar_id":"","url":"https://api.github.com/users/dkhamsing","html_url":"https://github.com/dkhamsing","followers_url":"https://api.github.com/users/dkhamsing/followers","following_url":"https://api.github.com/users/dkhamsing/following{/other_user}","gists_url":"https://api.github.com/users/dkhamsing/gists{/gist_id}","starred_url":"https://api.github.com/users/dkhamsing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkhamsing/subscriptions","organizations_url":"https://api.github.com/users/dkhamsing/orgs","repos_url":"https://api.github.com/users/dkhamsing/repos","events_url":"https://api.github.com/users/dkhamsing/events{/privacy}","received_events_url":"https://api.github.com/users/dkhamsing/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"dkhamsing"}}