Fixed a syntax error

I found a syntax error in the **already released** version 2.5.4. The
blocks of `if`/`else` statements that were added on 21 May were missing
`end` expressions, breaking the gem and making any app that imports it
halt. Simply running the tests *before* release rather than just making
quick changes and hoping that the thing still works would have prevented
this from happening.
Merge pull request #23 from lendsquare/fix_syntax_error

Merging in PR #23: Fixed a syntax error