walle/gas — pull request #7 by TheNotary (2011-10-26 16:39:18+00:00)
Title: Development --I ran into just a couple more bugs I caused while using gas

Both bugs stem from the same source: I naively changed has_user?() so it didn't exit and instead returned true/false. The plus side was that I could use Gas.delete in the test and it wouldn't exit out. The down side is that the code must look like

return false if self.has_user?(username)

Instead of your original

self.has_user? username

If there is a better solution that you'd prefer, I'd be happy to try to implement it. I feel low that the code's readability has been degraded a bit =/

-----

Bug 1

$ gas import already-existant-nickname

Running this caused duplicate users of the same nickname.

Bug 2

$ gas use non-existant-nickname

Running this code spewed out a lengthy call stack instead of simply exiting as it originally did.