52214657 move rules to config file

Also added config file to build with Travis.
Specs are passed.