add rake tasks and spec tests