{"action":"created","comment":{"url":"https://api.github.com/repos/nowait/amqp/pulls/comments/57218763","id":57218763,"diff_hunk":"@@ -0,0 +1,13 @@\n+\n+{\n+  \"presets\": [\"es2015-node5\"],","path":".babelrc","position":3,"original_position":3,"commit_id":"422b76d00b5ea5c25e0b81cd24303e990d5d8c1d","original_commit_id":"422b76d00b5ea5c25e0b81cd24303e990d5d8c1d","user":{"login":"unscriptable","id":46133,"avatar_url":"https://avatars.githubusercontent.com/u/46133?v=3","gravatar_id":"","url":"https://api.github.com/users/unscriptable","html_url":"https://github.com/unscriptable","followers_url":"https://api.github.com/users/unscriptable/followers","following_url":"https://api.github.com/users/unscriptable/following{/other_user}","gists_url":"https://api.github.com/users/unscriptable/gists{/gist_id}","starred_url":"https://api.github.com/users/unscriptable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unscriptable/subscriptions","organizations_url":"https://api.github.com/users/unscriptable/orgs","repos_url":"https://api.github.com/users/unscriptable/repos","events_url":"https://api.github.com/users/unscriptable/events{/privacy}","received_events_url":"https://api.github.com/users/unscriptable/received_events","type":"User","site_admin":false},"body":"It looks like node5 will be a requirement to use this package.  That's ok with me, I've been wanting an excuse to update!","created_at":"2016-03-23T19:06:14Z","updated_at":"2016-03-23T19:06:14Z","html_url":"https://github.com/nowait/amqp/pull/1#discussion_r57218763","pull_request_url":"https://api.github.com/repos/nowait/amqp/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/nowait/amqp/pulls/comments/57218763"},"html":{"href":"https://github.com/nowait/amqp/pull/1#discussion_r57218763"},"pull_request":{"href":"https://api.github.com/repos/nowait/amqp/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/nowait/amqp/pulls/1","id":63407453,"html_url":"https://github.com/nowait/amqp/pull/1","diff_url":"https://github.com/nowait/amqp/pull/1.diff","patch_url":"https://github.com/nowait/amqp/pull/1.patch","issue_url":"https://api.github.com/repos/nowait/amqp/issues/1","number":1,"state":"open","locked":false,"title":"Add initial impl","user":{"login":"briancavalier","id":90518,"avatar_url":"https://avatars.githubusercontent.com/u/90518?v=3","gravatar_id":"","url":"https://api.github.com/users/briancavalier","html_url":"https://github.com/briancavalier","followers_url":"https://api.github.com/users/briancavalier/followers","following_url":"https://api.github.com/users/briancavalier/following{/other_user}","gists_url":"https://api.github.com/users/briancavalier/gists{/gist_id}","starred_url":"https://api.github.com/users/briancavalier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briancavalier/subscriptions","organizations_url":"https://api.github.com/users/briancavalier/orgs","repos_url":"https://api.github.com/users/briancavalier/repos","events_url":"https://api.github.com/users/briancavalier/events{/privacy}","received_events_url":"https://api.github.com/users/briancavalier/received_events","type":"User","site_admin":false},"body":"This extracts the amqp related helper code from payments, with minor refactoring.  The goal is to provide an API that makes it easy to create amqp channels, and to publish to or consume from them using either \"basic\" amqp connections (those that don't don't worry about connection drop/retry), and \"managed\" connections (those that do manage dropped connections and retries).\r\n\r\n### Details\r\n\r\nThis package currently (and intentionally) does not depend on [amqplib](https://github.com/squaremo/amqp.node) or [amqp-connection-manager](https://github.com/benbria/node-amqp-connection-manager) directly.  The caller must use one of those two libraries to create a connection, and then pass it to `createChannel` or `createManagedChannel` to create a channel.\r\n\r\nI kept `async/await` and the dependency on creed.  It's possible to rewrite all of this code using explicit promises, but that would have meant rewriting a lot of code.  The \"extra\" dependency felt worthwhile in this case.\r\n\r\nWe were using the [payments spies lib](https://github.com/nowaitapp/payments/blob/master/test/test-helper/spy.js) for quite a few unit tests.  I switched them to use [sinon](http://sinonjs.org).\r\n\r\n### Open questions\r\n\r\n1. Should this package depend on amqplib and amqp-connection-manager, and expose APIs for creating connections?\r\n1. Does publishing a .flow file like this *actually work*?  It passes type checking in this repo, but we need to see if this actually works when someone consumes the published package.\r\n\r\n### Todo\r\n\r\n- [x] API docs in README\r\n- [x] Examples in README\r\n- [ ] Verify that flow types are actually being enforced when someone uses this package","created_at":"2016-03-18T17:14:41Z","updated_at":"2016-03-23T19:06:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5fe23c2ab69fe83c30f05b263caa1f0086e52af4","assignee":{"login":"unscriptable","id":46133,"avatar_url":"https://avatars.githubusercontent.com/u/46133?v=3","gravatar_id":"","url":"https://api.github.com/users/unscriptable","html_url":"https://github.com/unscriptable","followers_url":"https://api.github.com/users/unscriptable/followers","following_url":"https://api.github.com/users/unscriptable/following{/other_user}","gists_url":"https://api.github.com/users/unscriptable/gists{/gist_id}","starred_url":"https://api.github.com/users/unscriptable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unscriptable/subscriptions","organizations_url":"https://api.github.com/users/unscriptable/orgs","repos_url":"https://api.github.com/users/unscriptable/repos","events_url":"https://api.github.com/users/unscriptable/events{/privacy}","received_events_url":"https://api.github.com/users/unscriptable/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/nowait/amqp/pulls/1/commits","review_comments_url":"https://api.github.com/repos/nowait/amqp/pulls/1/comments","review_comment_url":"https://api.github.com/repos/nowait/amqp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nowait/amqp/issues/1/comments","statuses_url":"https://api.github.com/repos/nowait/amqp/statuses/422b76d00b5ea5c25e0b81cd24303e990d5d8c1d","head":{"label":"nowait:add-initial-impl","ref":"add-initial-impl","sha":"422b76d00b5ea5c25e0b81cd24303e990d5d8c1d","user":{"login":"nowait","id":13244839,"avatar_url":"https://avatars.githubusercontent.com/u/13244839?v=3","gravatar_id":"","url":"https://api.github.com/users/nowait","html_url":"https://github.com/nowait","followers_url":"https://api.github.com/users/nowait/followers","following_url":"https://api.github.com/users/nowait/following{/other_user}","gists_url":"https://api.github.com/users/nowait/gists{/gist_id}","starred_url":"https://api.github.com/users/nowait/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nowait/subscriptions","organizations_url":"https://api.github.com/users/nowait/orgs","repos_url":"https://api.github.com/users/nowait/repos","events_url":"https://api.github.com/users/nowait/events{/privacy}","received_events_url":"https://api.github.com/users/nowait/received_events","type":"Organization","site_admin":false},"repo":{"id":54212512,"name":"amqp","full_name":"nowait/amqp","owner":{"login":"nowait","id":13244839,"avatar_url":"https://avatars.githubusercontent.com/u/13244839?v=3","gravatar_id":"","url":"https://api.github.com/users/nowait","html_url":"https://github.com/nowait","followers_url":"https://api.github.com/users/nowait/followers","following_url":"https://api.github.com/users/nowait/following{/other_user}","gists_url":"https://api.github.com/users/nowait/gists{/gist_id}","starred_url":"https://api.github.com/users/nowait/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nowait/subscriptions","organizations_url":"https://api.github.com/users/nowait/orgs","repos_url":"https://api.github.com/users/nowait/repos","events_url":"https://api.github.com/users/nowait/events{/privacy}","received_events_url":"https://api.github.com/users/nowait/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nowait/amqp","description":"Simplified publish/subscribe and connection retry handling for amqp (rabbitmq)","fork":false,"url":"https://api.github.com/repos/nowait/amqp","forks_url":"https://api.github.com/repos/nowait/amqp/forks","keys_url":"https://api.github.com/repos/nowait/amqp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nowait/amqp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nowait/amqp/teams","hooks_url":"https://api.github.com/repos/nowait/amqp/hooks","issue_events_url":"https://api.github.com/repos/nowait/amqp/issues/events{/number}","events_url":"https://api.github.com/repos/nowait/amqp/events","assignees_url":"https://api.github.com/repos/nowait/amqp/assignees{/user}","branches_url":"https://api.github.com/repos/nowait/amqp/branches{/branch}","tags_url":"https://api.github.com/repos/nowait/amqp/tags","blobs_url":"https://api.github.com/repos/nowait/amqp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nowait/amqp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nowait/amqp/git/refs{/sha}","trees_url":"https://api.github.com/repos/nowait/amqp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nowait/amqp/statuses/{sha}","languages_url":"https://api.github.com/repos/nowait/amqp/languages","stargazers_url":"https://api.github.com/repos/nowait/amqp/stargazers","contributors_url":"https://api.github.com/repos/nowait/amqp/contributors","subscribers_url":"https://api.github.com/repos/nowait/amqp/subscribers","subscription_url":"https://api.github.com/repos/nowait/amqp/subscription","commits_url":"https://api.github.com/repos/nowait/amqp/commits{/sha}","git_commits_url":"https://api.github.com/repos/nowait/amqp/git/commits{/sha}","comments_url":"https://api.github.com/repos/nowait/amqp/comments{/number}","issue_comment_url":"https://api.github.com/repos/nowait/amqp/issues/comments{/number}","contents_url":"https://api.github.com/repos/nowait/amqp/contents/{+path}","compare_url":"https://api.github.com/repos/nowait/amqp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nowait/amqp/merges","archive_url":"https://api.github.com/repos/nowait/amqp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nowait/amqp/downloads","issues_url":"https://api.github.com/repos/nowait/amqp/issues{/number}","pulls_url":"https://api.github.com/repos/nowait/amqp/pulls{/number}","milestones_url":"https://api.github.com/repos/nowait/amqp/milestones{/number}","notifications_url":"https://api.github.com/repos/nowait/amqp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nowait/amqp/labels{/name}","releases_url":"https://api.github.com/repos/nowait/amqp/releases{/id}","deployments_url":"https://api.github.com/repos/nowait/amqp/deployments","created_at":"2016-03-18T15:37:53Z","updated_at":"2016-03-18T21:39:23Z","pushed_at":"2016-03-23T14:51:36Z","git_url":"git://github.com/nowait/amqp.git","ssh_url":"git@github.com:nowait/amqp.git","clone_url":"https://github.com/nowait/amqp.git","svn_url":"https://github.com/nowait/amqp","homepage":null,"size":21,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"nowait:master","ref":"master","sha":"786be40ce5a655b9bfea44c79d04e57102ecc18d","user":{"login":"nowait","id":13244839,"avatar_url":"https://avatars.githubusercontent.com/u/13244839?v=3","gravatar_id":"","url":"https://api.github.com/users/nowait","html_url":"https://github.com/nowait","followers_url":"https://api.github.com/users/nowait/followers","following_url":"https://api.github.com/users/nowait/following{/other_user}","gists_url":"https://api.github.com/users/nowait/gists{/gist_id}","starred_url":"https://api.github.com/users/nowait/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nowait/subscriptions","organizations_url":"https://api.github.com/users/nowait/orgs","repos_url":"https://api.github.com/users/nowait/repos","events_url":"https://api.github.com/users/nowait/events{/privacy}","received_events_url":"https://api.github.com/users/nowait/received_events","type":"Organization","site_admin":false},"repo":{"id":54212512,"name":"amqp","full_name":"nowait/amqp","owner":{"login":"nowait","id":13244839,"avatar_url":"https://avatars.githubusercontent.com/u/13244839?v=3","gravatar_id":"","url":"https://api.github.com/users/nowait","html_url":"https://github.com/nowait","followers_url":"https://api.github.com/users/nowait/followers","following_url":"https://api.github.com/users/nowait/following{/other_user}","gists_url":"https://api.github.com/users/nowait/gists{/gist_id}","starred_url":"https://api.github.com/users/nowait/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nowait/subscriptions","organizations_url":"https://api.github.com/users/nowait/orgs","repos_url":"https://api.github.com/users/nowait/repos","events_url":"https://api.github.com/users/nowait/events{/privacy}","received_events_url":"https://api.github.com/users/nowait/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nowait/amqp","description":"Simplified publish/subscribe and connection retry handling for amqp (rabbitmq)","fork":false,"url":"https://api.github.com/repos/nowait/amqp","forks_url":"https://api.github.com/repos/nowait/amqp/forks","keys_url":"https://api.github.com/repos/nowait/amqp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nowait/amqp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nowait/amqp/teams","hooks_url":"https://api.github.com/repos/nowait/amqp/hooks","issue_events_url":"https://api.github.com/repos/nowait/amqp/issues/events{/number}","events_url":"https://api.github.com/repos/nowait/amqp/events","assignees_url":"https://api.github.com/repos/nowait/amqp/assignees{/user}","branches_url":"https://api.github.com/repos/nowait/amqp/branches{/branch}","tags_url":"https://api.github.com/repos/nowait/amqp/tags","blobs_url":"https://api.github.com/repos/nowait/amqp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nowait/amqp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nowait/amqp/git/refs{/sha}","trees_url":"https://api.github.com/repos/nowait/amqp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nowait/amqp/statuses/{sha}","languages_url":"https://api.github.com/repos/nowait/amqp/languages","stargazers_url":"https://api.github.com/repos/nowait/amqp/stargazers","contributors_url":"https://api.github.com/repos/nowait/amqp/contributors","subscribers_url":"https://api.github.com/repos/nowait/amqp/subscribers","subscription_url":"https://api.github.com/repos/nowait/amqp/subscription","commits_url":"https://api.github.com/repos/nowait/amqp/commits{/sha}","git_commits_url":"https://api.github.com/repos/nowait/amqp/git/commits{/sha}","comments_url":"https://api.github.com/repos/nowait/amqp/comments{/number}","issue_comment_url":"https://api.github.com/repos/nowait/amqp/issues/comments{/number}","contents_url":"https://api.github.com/repos/nowait/amqp/contents/{+path}","compare_url":"https://api.github.com/repos/nowait/amqp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nowait/amqp/merges","archive_url":"https://api.github.com/repos/nowait/amqp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nowait/amqp/downloads","issues_url":"https://api.github.com/repos/nowait/amqp/issues{/number}","pulls_url":"https://api.github.com/repos/nowait/amqp/pulls{/number}","milestones_url":"https://api.github.com/repos/nowait/amqp/milestones{/number}","notifications_url":"https://api.github.com/repos/nowait/amqp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nowait/amqp/labels{/name}","releases_url":"https://api.github.com/repos/nowait/amqp/releases{/id}","deployments_url":"https://api.github.com/repos/nowait/amqp/deployments","created_at":"2016-03-18T15:37:53Z","updated_at":"2016-03-18T21:39:23Z","pushed_at":"2016-03-23T14:51:36Z","git_url":"git://github.com/nowait/amqp.git","ssh_url":"git@github.com:nowait/amqp.git","clone_url":"https://github.com/nowait/amqp.git","svn_url":"https://github.com/nowait/amqp","homepage":null,"size":21,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nowait/amqp/pulls/1"},"html":{"href":"https://github.com/nowait/amqp/pull/1"},"issue":{"href":"https://api.github.com/repos/nowait/amqp/issues/1"},"comments":{"href":"https://api.github.com/repos/nowait/amqp/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/nowait/amqp/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/nowait/amqp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nowait/amqp/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/nowait/amqp/statuses/422b76d00b5ea5c25e0b81cd24303e990d5d8c1d"}}}}