Plaristote/sharepoint-ruby — pull request #5 by ehansen486 (2014-10-30 09:33:32+00:00)
Title: Add a generic sharepoint object.  Adjust support for downloading Sharepoint documents to a local file.

Please have a look when you get a chance. I wanted to have the ability to add metadata to Sharepoint documents (content types). To address that, I added the ability to make calls to generic methods; otherwise we'd have to hand-code any document type in Sharepoint which seems a waste of time.

Also, sometimes the response from Sharepoint is either blank or binary data (in the case of downloading a file). In those cases, it's not appropriate to JSON-parse the response.

I noticed that when downloading a file via the Gem from Sharepoint, if the encoding is not UTF-8, the download failed to write to a file. I addressed this by opening the file with the same encoding as the string we retrieve from Sharepoint.

Happy to listen to feedback if you see a better way of accomplishing this.

Thanks!
Eric