batchblue / batchbook

DEPRECATED - A Ruby Wrapper for The BatchBook Classic API. This gem and underlying API are no longer supported or maintained.
http://batchblue.com
23 stars 9 forks source link

Fixes for activeresource 3.1 #3

Open ahm opened 13 years ago

ahm commented 13 years ago

Upgrading to ActiveResource 3.1 breaks several features of this gem. Comments won't send anymore because the default is to send them as ..., while the API expects .... You cannot add locations to a person because the add locations post uses the URL /service/people/new/locations.xml rather than /service/people/123/locations.xml. The default encoding moves from XML to json. (I'm not sure if the encoding change created problems, but it certainly made it harder to debug and compare to the last version.)

I modified the library to address these bugs in my application. This probably isn't complete, as I only tested the APIs I use. Also, this version is not backward compatible with earlier activeresource versions. (I don't know if you'll want to try to harmonize the two of just have a different gem for later versions.) But I thought it would be useful to other folks facing the same problems, and might be a starting point to fixing the gem more generally.