On Tue, Dec 20, 2011 at 12:14, Magnus Holm <judo...@gmail.com> wrote:
> I think the ability to load multiple Camping apps at once makes things
> a lot more difficult (e.g. how to deal with static files).
>
> Does anyone actually use this feature?
>
> // Magnus Holm

Just realized that we have a slight problem:

How to deal with `camping app.rb` where app.rb is:

  Camping.goes :App
  Camping.goes :OtherThing

Possible solutions:
- Always choose the first/last app
- Choose one that matches the filename
- Show an error

You should always be able to create a "config.ru" which explicitly
tells Camping/Rack how to run the app:

  # config.ru
  require 'app'
  run OtherThing

Therefore it feels best to choose one that matches the filename, and
show an error otherwise if there's no such app. This means that it
works as expected for people who name their apps/files correctly, and
it shows that something in wrong for those who don't.

Of course, if there's just one app that was loaded, we can always use
that one. We only need to be picky in multi-app cases.

Thoughts?
_______________________________________________
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to