Haha! How did you get Spock on board... :-)

I must admit I'm a little confused about the sytnax for environmental variables, because as well as
  @env[HTTP_REFERER]
this also works:
  ENV['SCRIPT_NAME']

For a test I just used it like this:
  ENV['SCRIPT_NAME'].scan(/\w+\.\w+$/)
to get the Camping file's name (with whatever file extension rb, rbx, cgi) instead of using __FILE__

I think I'll throw together a quick Camping app that 'nicely' prints all available environment variables (as they'll vary for each setup)...

DaveE

Starship Enterprise, Stardate #{Time.now.to_f}. Captain's Log.
network.http.sendrefererheader was set to 0 in my Firefox for unknown reasons.
Probably Mr Spock, the Chief of security did this.
I make this log entry for those who don't want to spend hours in a spacedock repairing a working application.
Signing out...


On Sat, Apr 7, 2012 at 6:06 PM, Nokan Emiro <uzleep...@gmail.com> wrote:
Why does it work without the @ for me?


On Fri, Apr 6, 2012 at 4:26 PM, Magnus Holm <judo...@gmail.com> wrote:
It should be in @env:

 @env['HTTP_REFERER']

(Note that it's misspelled in the spec)


_______________________________________________
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

Reply via email to