diff options
author | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2008-11-17 11:42:55 +0100 |
---|---|---|
committer | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2008-11-17 11:42:55 +0100 |
commit | cb09cd55424b21904d42c2bf2157907ad981e532 (patch) | |
tree | 3d36667fc3c52df960a529bdb5e108e3add36e4d /atom.cgi | |
parent | 5ec5ec180cfdae140f459c167741dabcd94f755a (diff) |
added possibility to configure the system and outsourced bazaar specific things
Diffstat (limited to 'atom.cgi')
-rwxr-xr-x | atom.cgi | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -4,6 +4,10 @@ require "atom" require "yaml" require "cgi" +$cgi = CGI.new + +load "config.rb" + def readhistory dir log = `export LC_ALL=de_DE.UTF-8; bzr log -r -10.. "#{dir}"`.split("-"*60) log.collect!{|s| s.scan(/\nrevno: (.*)\ncommitter.*\n.*\ntimestamp: (.*)\nmessage:\n (.*)/).flatten} @@ -11,10 +15,6 @@ def readhistory dir log.collect!{|r,t,c| [r.to_i,DateTime.parse(t),c]} end -cgi = CGI.new - -SITEURL = "http://#{cgi.server_name}#{cgi.script_name.gsub(/atom.cgi$/,"")}" - feed = Atom::Feed.new if File.exist?("data.yaml") olddir = File.expand_path(".") @@ -75,4 +75,4 @@ else end -cgi.out("type" => "application/atom+xml"){ feed.to_xml } +$cgi.out("type" => "application/atom+xml"){ feed.to_xml } |