Update Rails4 branch with commits from 0.5.0 release