method-inc / bamboozled

Bamboozled wraps the BambooHR API without the use of Rails dependencies.
MIT License
44 stars 50 forks source link

Improve response handling on job_info #20

Closed abepetrillo closed 7 years ago

abepetrillo commented 8 years ago

The tests imply that the response from the API would be xml, but in the case of client.example.job_info, the returned data is an Array in JSON format.

When we call with_indifferent_access on the array, we get a method missing exception, which causes the code to then try and parse a JSON response as xml.

This change only calls the method when we get an object back.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.1%) to 75.0% when pulling dcb77055953105879300c8bd96f2f8a0f28a400c on alphasights:fix_job_info into f5a6f5967d784c37d0b3019fa09704949d713ca8 on Skookum:master.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.1%) to 75.0% when pulling 13ce01194bc0fdbd8595b743e75ed440086cb0e3 on alphasights:fix_job_info into f5a6f5967d784c37d0b3019fa09704949d713ca8 on Skookum:master.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.1%) to 75.0% when pulling 6b27a43d8bf67084a8dbedb7fb839b66fa3863ce on alphasights:fix_job_info into f5a6f5967d784c37d0b3019fa09704949d713ca8 on Skookum:master.

abepetrillo commented 8 years ago

That Hound thing is pretty damn annoying.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.1%) to 75.0% when pulling a53a5ddc1416e4ac9968b3034b881fcd77617970 on alphasights:fix_job_info into f5a6f5967d784c37d0b3019fa09704949d713ca8 on Skookum:master.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.1%) to 75.0% when pulling b3835ae36f3c9e828697edcaf2e5d6441ffa2907 on alphasights:fix_job_info into f5a6f5967d784c37d0b3019fa09704949d713ca8 on Skookum:master.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.1%) to 75.0% when pulling 05c18e8205511579654f62c892def874c7cfab9c on alphasights:fix_job_info into f5a6f5967d784c37d0b3019fa09704949d713ca8 on Skookum:master.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+8.3%) to 83.459% when pulling 544c3f35f76fbdfc11dd0cb1bc3e91d50afb2090 on alphasights:fix_job_info into f5a6f5967d784c37d0b3019fa09704949d713ca8 on Skookum:master.