{"action":"created","comment":{"url":"https://api.github.com/repos/strongloop/strong-remoting/pulls/comments/32247721","id":32247721,"diff_hunk":"@@ -45,3 +47,66 @@ describe('strong-remoting', function() {\n       .expect({bar: 'baz'}, done);\n   });\n });\n+\n+describe('a function returning a ReadableStream', function() {\n+  var Readable = require('stream').Readable;\n+  var remotes = RemoteObjects.create();\n+  var streamClass;\n+  var server;\n+\n+  before(function(done) {\n+    var app = express();\n+    server = app.listen(0, '127.0.0.1', done);\n+    function StreamClass() {\n+\n+    }\n+\n+    StreamClass.createStream = function createStream(cb) {\n+      var rs = new Readable({objectMode: true});\n+      var buf = [];\n+      var n = 5;\n+      while (n--) {\n+        buf.push({n: n});\n+      }\n+      rs._read = function() {\n+        setTimeout(function() {\n+          rs.push(buf.shift() || null);\n+        }, 1);\n+      };","path":"test/streams.js","position":37,"original_position":37,"commit_id":"574957ca2e05516af53e121e18a80b0e7b3bb5f3","original_commit_id":"574957ca2e05516af53e121e18a80b0e7b3bb5f3","user":{"login":"bajtos","id":1140553,"avatar_url":"https://avatars.githubusercontent.com/u/1140553?v=3","gravatar_id":"","url":"https://api.github.com/users/bajtos","html_url":"https://github.com/bajtos","followers_url":"https://api.github.com/users/bajtos/followers","following_url":"https://api.github.com/users/bajtos/following{/other_user}","gists_url":"https://api.github.com/users/bajtos/gists{/gist_id}","starred_url":"https://api.github.com/users/bajtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bajtos/subscriptions","organizations_url":"https://api.github.com/users/bajtos/orgs","repos_url":"https://api.github.com/users/bajtos/repos","events_url":"https://api.github.com/users/bajtos/events{/privacy}","received_events_url":"https://api.github.com/users/bajtos/received_events","type":"User","site_admin":false},"body":"How about using even-stream's [readArray](https://www.npmjs.com/package/event-stream#readarray-array)? Unless the 1ms timeout is important for your test.","created_at":"2015-06-11T17:45:40Z","updated_at":"2015-06-11T17:45:40Z","html_url":"https://github.com/strongloop/strong-remoting/pull/216#discussion_r32247721","pull_request_url":"https://api.github.com/repos/strongloop/strong-remoting/pulls/216","_links":{"self":{"href":"https://api.github.com/repos/strongloop/strong-remoting/pulls/comments/32247721"},"html":{"href":"https://github.com/strongloop/strong-remoting/pull/216#discussion_r32247721"},"pull_request":{"href":"https://api.github.com/repos/strongloop/strong-remoting/pulls/216"}}},"pull_request":{"url":"https://api.github.com/repos/strongloop/strong-remoting/pulls/216","id":37417839,"html_url":"https://github.com/strongloop/strong-remoting/pull/216","diff_url":"https://github.com/strongloop/strong-remoting/pull/216.diff","patch_url":"https://github.com/strongloop/strong-remoting/pull/216.patch","issue_url":"https://api.github.com/repos/strongloop/strong-remoting/issues/216","number":216,"state":"open","locked":false,"title":"Add object mode ReadableStream support","user":{"login":"ritch","id":462228,"avatar_url":"https://avatars.githubusercontent.com/u/462228?v=3","gravatar_id":"","url":"https://api.github.com/users/ritch","html_url":"https://github.com/ritch","followers_url":"https://api.github.com/users/ritch/followers","following_url":"https://api.github.com/users/ritch/following{/other_user}","gists_url":"https://api.github.com/users/ritch/gists{/gist_id}","starred_url":"https://api.github.com/users/ritch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ritch/subscriptions","organizations_url":"https://api.github.com/users/ritch/orgs","repos_url":"https://api.github.com/users/ritch/repos","events_url":"https://api.github.com/users/ritch/events{/privacy}","received_events_url":"https://api.github.com/users/ritch/received_events","type":"User","site_admin":false},"body":"This PR adds support for returning object mode `ReadableStream`s.\r\n\r\nconnect to strongloop/strong-remoting#214","created_at":"2015-06-11T00:08:13Z","updated_at":"2015-06-11T17:45:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/strongloop/strong-remoting/pulls/216/commits","review_comments_url":"https://api.github.com/repos/strongloop/strong-remoting/pulls/216/comments","review_comment_url":"https://api.github.com/repos/strongloop/strong-remoting/pulls/comments{/number}","comments_url":"https://api.github.com/repos/strongloop/strong-remoting/issues/216/comments","statuses_url":"https://api.github.com/repos/strongloop/strong-remoting/statuses/574957ca2e05516af53e121e18a80b0e7b3bb5f3","head":{"label":"strongloop:feature/readables","ref":"feature/readables","sha":"574957ca2e05516af53e121e18a80b0e7b3bb5f3","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":10045175,"name":"strong-remoting","full_name":"strongloop/strong-remoting","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/strong-remoting","description":"Communicate between objects in servers, mobile apps, and other servers.","fork":false,"url":"https://api.github.com/repos/strongloop/strong-remoting","forks_url":"https://api.github.com/repos/strongloop/strong-remoting/forks","keys_url":"https://api.github.com/repos/strongloop/strong-remoting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/strong-remoting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/strong-remoting/teams","hooks_url":"https://api.github.com/repos/strongloop/strong-remoting/hooks","issue_events_url":"https://api.github.com/repos/strongloop/strong-remoting/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/strong-remoting/events","assignees_url":"https://api.github.com/repos/strongloop/strong-remoting/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/strong-remoting/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/strong-remoting/tags","blobs_url":"https://api.github.com/repos/strongloop/strong-remoting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/strong-remoting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/strong-remoting/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/strong-remoting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/strong-remoting/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/strong-remoting/languages","stargazers_url":"https://api.github.com/repos/strongloop/strong-remoting/stargazers","contributors_url":"https://api.github.com/repos/strongloop/strong-remoting/contributors","subscribers_url":"https://api.github.com/repos/strongloop/strong-remoting/subscribers","subscription_url":"https://api.github.com/repos/strongloop/strong-remoting/subscription","commits_url":"https://api.github.com/repos/strongloop/strong-remoting/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/strong-remoting/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/strong-remoting/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/strong-remoting/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongloop/strong-remoting/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/strong-remoting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/strong-remoting/merges","archive_url":"https://api.github.com/repos/strongloop/strong-remoting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/strong-remoting/downloads","issues_url":"https://api.github.com/repos/strongloop/strong-remoting/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/strong-remoting/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/strong-remoting/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/strong-remoting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/strong-remoting/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/strong-remoting/releases{/id}","created_at":"2013-05-14T01:53:04Z","updated_at":"2015-05-15T16:28:27Z","pushed_at":"2015-06-11T00:16:34Z","git_url":"git://github.com/strongloop/strong-remoting.git","ssh_url":"git@github.com:strongloop/strong-remoting.git","clone_url":"https://github.com/strongloop/strong-remoting.git","svn_url":"https://github.com/strongloop/strong-remoting","homepage":"www.strongloop.com","size":2985,"stargazers_count":39,"watchers_count":39,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":15,"forks":26,"open_issues":15,"watchers":39,"default_branch":"master"}},"base":{"label":"strongloop:master","ref":"master","sha":"ebe06145de5146694f3c43665adda4a354a2a4b1","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":10045175,"name":"strong-remoting","full_name":"strongloop/strong-remoting","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/strong-remoting","description":"Communicate between objects in servers, mobile apps, and other servers.","fork":false,"url":"https://api.github.com/repos/strongloop/strong-remoting","forks_url":"https://api.github.com/repos/strongloop/strong-remoting/forks","keys_url":"https://api.github.com/repos/strongloop/strong-remoting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/strong-remoting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/strong-remoting/teams","hooks_url":"https://api.github.com/repos/strongloop/strong-remoting/hooks","issue_events_url":"https://api.github.com/repos/strongloop/strong-remoting/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/strong-remoting/events","assignees_url":"https://api.github.com/repos/strongloop/strong-remoting/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/strong-remoting/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/strong-remoting/tags","blobs_url":"https://api.github.com/repos/strongloop/strong-remoting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/strong-remoting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/strong-remoting/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/strong-remoting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/strong-remoting/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/strong-remoting/languages","stargazers_url":"https://api.github.com/repos/strongloop/strong-remoting/stargazers","contributors_url":"https://api.github.com/repos/strongloop/strong-remoting/contributors","subscribers_url":"https://api.github.com/repos/strongloop/strong-remoting/subscribers","subscription_url":"https://api.github.com/repos/strongloop/strong-remoting/subscription","commits_url":"https://api.github.com/repos/strongloop/strong-remoting/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/strong-remoting/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/strong-remoting/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/strong-remoting/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongloop/strong-remoting/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/strong-remoting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/strong-remoting/merges","archive_url":"https://api.github.com/repos/strongloop/strong-remoting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/strong-remoting/downloads","issues_url":"https://api.github.com/repos/strongloop/strong-remoting/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/strong-remoting/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/strong-remoting/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/strong-remoting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/strong-remoting/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/strong-remoting/releases{/id}","created_at":"2013-05-14T01:53:04Z","updated_at":"2015-05-15T16:28:27Z","pushed_at":"2015-06-11T00:16:34Z","git_url":"git://github.com/strongloop/strong-remoting.git","ssh_url":"git@github.com:strongloop/strong-remoting.git","clone_url":"https://github.com/strongloop/strong-remoting.git","svn_url":"https://github.com/strongloop/strong-remoting","homepage":"www.strongloop.com","size":2985,"stargazers_count":39,"watchers_count":39,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":15,"forks":26,"open_issues":15,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/strongloop/strong-remoting/pulls/216"},"html":{"href":"https://github.com/strongloop/strong-remoting/pull/216"},"issue":{"href":"https://api.github.com/repos/strongloop/strong-remoting/issues/216"},"comments":{"href":"https://api.github.com/repos/strongloop/strong-remoting/issues/216/comments"},"review_comments":{"href":"https://api.github.com/repos/strongloop/strong-remoting/pulls/216/comments"},"review_comment":{"href":"https://api.github.com/repos/strongloop/strong-remoting/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/strongloop/strong-remoting/pulls/216/commits"},"statuses":{"href":"https://api.github.com/repos/strongloop/strong-remoting/statuses/574957ca2e05516af53e121e18a80b0e7b3bb5f3"}}}}