copy mock and gem patches for Rails edge (5) from d488bb1