{"action":"closed","issue":{"url":"https://api.github.com/repos/janko-m/down/issues/10","repository_url":"https://api.github.com/repos/janko-m/down","labels_url":"https://api.github.com/repos/janko-m/down/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/janko-m/down/issues/10/comments","events_url":"https://api.github.com/repos/janko-m/down/issues/10/events","html_url":"https://github.com/janko-m/down/issues/10","id":190823543,"number":10,"title":"ChunkedIO API is Incompatibile with CSV.parse","user":{"login":"chrisnicola","id":156449,"avatar_url":"https://avatars.githubusercontent.com/u/156449?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisnicola","html_url":"https://github.com/chrisnicola","followers_url":"https://api.github.com/users/chrisnicola/followers","following_url":"https://api.github.com/users/chrisnicola/following{/other_user}","gists_url":"https://api.github.com/users/chrisnicola/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisnicola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisnicola/subscriptions","organizations_url":"https://api.github.com/users/chrisnicola/orgs","repos_url":"https://api.github.com/users/chrisnicola/repos","events_url":"https://api.github.com/users/chrisnicola/events{/privacy}","received_events_url":"https://api.github.com/users/chrisnicola/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-21T20:13:22Z","updated_at":"2016-11-22T03:23:03Z","closed_at":"2016-11-22T03:23:03Z","body":"I'm currently noticing this when working with some CSV files I'm storing in S3 using Shrine. The `Down::ChunkedIO` has a private `gets` method when `CSV.parse` is trying to call (yes I know CSV.parse shouldn't be parsing by lines but that's what it does).\r\n\r\nThe actual error is:\r\n\r\n```\r\nNoMethodError (private method `gets' called for #<Down::ChunkedIO:0x007f7116dbbad0>): \r\n```\r\n\r\nIt would probably help for compatibility with other things that process IO if the `gets` method was public and processed chunks until it completed a line an then returned that line.\r\n\r\nI should add that I worked around this issue by simply calling `download` instead of of `to_io` so this is hardly a big issue. I noticed that `ChunkedIO` is using a Tempfile as an intermediate anyways so it probably makes no difference. I'm curious though why not just process the IO in memory?"}}
{"actor":{"display_login":"janko-m"}}