Please use the nickel gem.
The source is available on github: Nickel