Just to be clear (obviously env vars are going to differ according to
setup, but):
when env is used inside Camping, it's equivalent to @env and get Rack
env vars
when ENV is used, it will get any other environment variables, not
just from Passenger etc. but also any set by the system.
With a view to making a little app/snippet to show all available env
vars I've been looking at them on David's Camping server (they only
appear with the query string at the end of the URL):
http://dave.camping.sh/sites?vars
But the Rack vars don't seem to format nicely with key value pairs
(breaks when I try):
env.each_pair do |name,value|
so I just made a line for each with
env.each do |name|
- source here:
https://github.com/DaveEveritt/Camping-links/blob/master/www/camplinks.rb
DaveE
On Mon, Apr 16, 2012 at 13:45, Nokan Emiro <uzleep...@gmail.com>
wrote:
Actually env[] works with mongrel also, not just fcgi or passenger.
(No, it's not a typo: env, and not ENV. But I'm sure ENV works too.)
Yes, env inside Camping is the same @env (it's just an attr_accessor).
Same for @body, @request, @method, @status etc:
https://github.com/camping/camping/blob/75f1144b7c9f53948d887d331a4f583a3b86a74f/lib/camping-unabridged.rb
#L257
_______________________________________________
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list
_______________________________________________
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list