I am experimenting with a design for a Rails application which will have most of its functionality delegated to highly specialized Engines. However, there will probably be 10 Engines or so and I definitely don’t want to have to manage 10 different gems and Git repositories.
Rails and RefineryCMS both seem to house all their submodules in one git repo but then somehow release them as independent gems as well as requiring them all with – in Rails’ case – a simple require.
'rails/all'
I have of course browsed the source code but I could use a more experienced eye for help … could anyone please enlighten me as to how this multi-gem, one-repo architecture works?
It’s very simple, at http://github.com/resolve/refinerycms there is a folder for each gem. In those folders you will find a gemspec, so building the gems is as simple as cd-ing into those directories and running gem build.
Then, the main https://github.com/resolve/refinerycms/blob/master/refinerycms.gemspec simply lists all these other gems as dependencies.