alphagov/support — pull request #20 by benilovj (2012-12-04 14:38:02+00:00)
Title: Refactoring the Zendesk API wrapping code

Made the wrapper around the Zendesk API a bit nicer.

Noteworthy: I removed one error guard from zendesk_client.rb because:
a) I couldn't figure out which error condition it's trying to catch
b) it gives false positives in certain valid cases (i.e. it triggered in cases where there wasn't an auth error, just a response that it wasn't expecting) - e.g. trying to use the client to access users.
c) it seems that the bad authentication case should be caught by a later condition anyway (the 401)