Is it possible to run Rack and specify that it should look for config.ru
from one of the project's Gem dependencies rather than the project's files on the local filesystem?
I'm sure this is a 'wrong' pattern, but we've got project A that has a load of front-end static resources. Project B is a Sinatra app that provides the backend services for that web UI to call upon. We separated them into two projects so A could depend on a particular version of B, and be insulated from breaking changes.
B contains the Sinatra app, and the config.ru
which defines what Sinatra endpoints are mapped to which paths, and additionally that the static resources should be served too.
A has the thinnest sliver of Ruby, essentially just depending on B via a Gemfile.
We want someone to be able to clone project A, do a bundle install
, and then run rackup
and have Rack use the config.ru
inside B's Gem to decide how to configure itself.