padrino/padrino-framework — pull request #1007 by skade (2013-01-12 15:13:27+00:00)
Title: Apps in gems

Hi everybody,

I took the liberty of finally coming up with a system to wrap apps in gems. Its an often requested feature.

The basic version turned out easier than expected - its basically just a spare Padrino app that can be run both from the gems repository as well as loaded from other Padrino locations. It only contains backwards-compatible changes to the mounter.

It comes with a generator for quickly generating valid Padrino app gems - just run `padrino-gen gem my_gem_name` with all the known options and be done.

Some limitations apply, which can or cannot be fixed by the framework:
- `config/` in gems obviously only makes sense for testing the thing or running it standalone.
- `public_path` is currently the mouting apps public path.
- bringing assets from the mounted app to the main app is generally an unsolved problem. This sounds like a job for sprockets or similar.
- Obviously, care has to be taken with ORM dependencies if you want to build a generally usable App.
- The README file for the generated Gem is currently empty, I'd like to fill it with some hints and pointers.

For API use, for example, this implementation is fully usable.

What do you think? @achiu, @nesquena , @dariocravero ?

Regards,
Florian