ryanfitz/vogels — pull request #22 by Sazpaimon (2014-04-04 00:25:42+00:00)
Title: Update Joi and add support for writing Buffers for binary types

This PR should add support for Buffer objects with the binary data type. It also has the side-effect of updating the Joi version to 2.x (which should close #17) because I was having problems with the old version and making the BinarySet type work with multiple Joi types. As such, I removed the date type (as Joi already includes that now), and re-did the Binary type to do a check on if the value is either a string or an instance of a Buffer object. I also made the UUID/TimeUUID types validate against the Joi.

As a side-effect of updating Joi, I also made the internal names of all the custom types lowercase, as that is how the Joi types are named now. The prototypes names for the Schema remain unchanged, however. Feel free to reverse this if you wish, I only did it for consistency with Joi.

I wouldn't be surprised if something is broken here, but my (admittedly brief) testing yielded no issues.