snapframework/snap — pull request #37 by adinapoli (2012-09-13 18:44:25+00:00)
Title: Fixed (better, I should have) issue #30: Do not allow empty username and password when create user

Hi everyone,

this is an important step for me, my first contribution to an Haskell project :)
My path is probably the most naive thing in the universe, and I've tested the code only from user side (aka in a new snap app) so expect more pull reqs with HUnit tests :)

As I said, it should work, now if you try to create a new empty user this is what Snap answers:

A web handler threw an exception. Details:
Username cannot be empty

I hope this is the expected behaviour and to have been useful!

And glad to be able to contribute, even in small part, to the Haskell ecosystem :)

Cheers,
Alfredo

ps. I've also update the .gitignore file, relaxing the constraint over the dist directory to be "dist*" :
since I'm a hsenv user, the tool creates a custom dist directory with as suffix the name of the sandbox environment. With my .gitignore we should be able to catch both cases (i.e. "plain" env and sandboxed env with hsenv).