File: envlist.rb

package info (click to toggle)
html-template 0.16-2.1
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 128 kB
  • ctags: 111
  • sloc: ruby: 869; makefile: 41
file content (14 lines) | stat: -rwxr-xr-x 259 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/ruby

require "html/template"

tmpl = HTML::Template.new("envlist.html")

ENV.keys.sort.each do |k|
  tmpl.node("envlist").param({
			       'key' => k,
			       'val' => ENV[k]
			     })
end
print "Content-Type: text/html\n\n"
print tmpl.output