Rails: Make shared contexts specs composable to simplify versioning

MR: Refactor remote devleopment shared contexts (!129603 - merged)

Description

Currently, the shared contexts have everything written as strings. It is a little annoying. We should convert it to a native hash object.

Secondly, we should break down the big specs to make it more composable to make it easy for using shared contexts while support multiple versions of configurations as discussed in #421898 (comment 1516511472)

Edited by Vishal Tak