poper rails 3 support + wrap everything in logger + tests for setup hooks

@steved555