2600hz/kazoo — pull request #8 by goshh (2013-03-15 05:19:42+00:00)
Title: Fixing wh_util:whistle_version so crossbar's module cb_about returns the...

While learning ErLang and Kazoo's internals I found that the module cb_about had a bug, so I decided to figure out why and fix it as a primary goal for my learning process, as it should be simple enough and harmless enough for a first contribution (as long as I don't break the whole wh_utils module ;) )

After enabling the cb_about in crossbar I saw that a request to /v1/about would always return "not available" for the whistle version.
Investigating why, I found out that this change:
https://github.com/2600hz/kazoo/commit/a733c132845e2d48b5971c608ff1da18d2e2685b
required the VERSION file to have a the contents in ErLang terms, so it could be read and returned by file:consult (not sure why it was done this way as it looks like it was nice enough before that).
Due to that requirement, a change in the VERSION file for version 1.51:
https://github.com/2600hz/kazoo/commit/e6a7c204ee044fda6fe1c174c124afb18e2cb8d8
broke the module, as ErLang would fail to parse the file contents.

So my fix is basically reversing to the original way it was done, but using a different method.