{"action":"created","issue":{"url":"https://api.github.com/repos/stripe/stripe-ruby/issues/616","repository_url":"https://api.github.com/repos/stripe/stripe-ruby","labels_url":"https://api.github.com/repos/stripe/stripe-ruby/issues/616/labels{/name}","comments_url":"https://api.github.com/repos/stripe/stripe-ruby/issues/616/comments","events_url":"https://api.github.com/repos/stripe/stripe-ruby/issues/616/events","html_url":"https://github.com/stripe/stripe-ruby/pull/616","id":282150590,"number":616,"title":"Use duck typing to detect File-like objects","user":{"login":"ob-stripe","id":23086931,"avatar_url":"https://avatars0.githubusercontent.com/u/23086931?v=4","gravatar_id":"","url":"https://api.github.com/users/ob-stripe","html_url":"https://github.com/ob-stripe","followers_url":"https://api.github.com/users/ob-stripe/followers","following_url":"https://api.github.com/users/ob-stripe/following{/other_user}","gists_url":"https://api.github.com/users/ob-stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/ob-stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ob-stripe/subscriptions","organizations_url":"https://api.github.com/users/ob-stripe/orgs","repos_url":"https://api.github.com/users/ob-stripe/repos","events_url":"https://api.github.com/users/ob-stripe/events{/privacy}","received_events_url":"https://api.github.com/users/ob-stripe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"brandur-stripe","id":23105990,"avatar_url":"https://avatars3.githubusercontent.com/u/23105990?v=4","gravatar_id":"","url":"https://api.github.com/users/brandur-stripe","html_url":"https://github.com/brandur-stripe","followers_url":"https://api.github.com/users/brandur-stripe/followers","following_url":"https://api.github.com/users/brandur-stripe/following{/other_user}","gists_url":"https://api.github.com/users/brandur-stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/brandur-stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandur-stripe/subscriptions","organizations_url":"https://api.github.com/users/brandur-stripe/orgs","repos_url":"https://api.github.com/users/brandur-stripe/repos","events_url":"https://api.github.com/users/brandur-stripe/events{/privacy}","received_events_url":"https://api.github.com/users/brandur-stripe/received_events","type":"User","site_admin":false},"assignees":[{"login":"brandur-stripe","id":23105990,"avatar_url":"https://avatars3.githubusercontent.com/u/23105990?v=4","gravatar_id":"","url":"https://api.github.com/users/brandur-stripe","html_url":"https://github.com/brandur-stripe","followers_url":"https://api.github.com/users/brandur-stripe/followers","following_url":"https://api.github.com/users/brandur-stripe/following{/other_user}","gists_url":"https://api.github.com/users/brandur-stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/brandur-stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandur-stripe/subscriptions","organizations_url":"https://api.github.com/users/brandur-stripe/orgs","repos_url":"https://api.github.com/users/brandur-stripe/repos","events_url":"https://api.github.com/users/brandur-stripe/events{/privacy}","received_events_url":"https://api.github.com/users/brandur-stripe/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2017-12-14T16:01:55Z","updated_at":"2017-12-14T17:03:08Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/stripe/stripe-ruby/pulls/616","html_url":"https://github.com/stripe/stripe-ruby/pull/616","diff_url":"https://github.com/stripe/stripe-ruby/pull/616.diff","patch_url":"https://github.com/stripe/stripe-ruby/pull/616.patch"},"body":"r? @brandur-stripe \r\ncc @stripe/api-libraries \r\n\r\nUse duck typing to detect `File`-like objects rather than directly checking the class. This is the same strategy used by rest-client: https://github.com/rest-client/rest-client/blob/f450a0f086f1cd1049abbef2a2c66166a1a9ba71/lib/restclient/payload.rb#L55.\r\n\r\nThanks @kimroen for the suggestion!\r\n\r\nFixes #615.\r\n"},"comment":{"url":"https://api.github.com/repos/stripe/stripe-ruby/issues/comments/351773528","html_url":"https://github.com/stripe/stripe-ruby/pull/616#issuecomment-351773528","issue_url":"https://api.github.com/repos/stripe/stripe-ruby/issues/616","id":351773528,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars1.githubusercontent.com/u/2354108?v=4","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2017-12-14T17:03:08Z","updated_at":"2017-12-14T17:03:08Z","author_association":"NONE","body":"\n[![Coverage Status](https://coveralls.io/builds/14659706/badge)](https://coveralls.io/builds/14659706)\n\nCoverage decreased (-0.005%) to 91.803% when pulling **d946d7a379366b42343efa517dcab5512164974a on ob-file-duck-typing** into **be8e4ff5f4b9bb3ba42c3c6cf5a76704040b8793 on master**.\n"}}
{"actor":{"display_login":"coveralls"}}