We have been packaging up our shared code into our own gems and distributing them to the appliances. Since Automate runs in a clean environment, the gems are available there. Here is an example of one we created for reusing some common code: https://github.com/ewannema/miq_dev_util
Note that the gems are not available from
rails console on an appliance for interactive development. You can look at adding them to your appliance’s Gemfile (or a dev Gemfile) so it works, but you are likely to run into issues with the generated Gemfile.lock during upgrades. I would personally avoid this anywhere, but a dedicated dev server.