aboutsummaryrefslogtreecommitdiff
path: root/atom.cgi
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2008-11-17 11:42:55 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2008-11-17 11:42:55 +0100
commitcb09cd55424b21904d42c2bf2157907ad981e532 (patch)
tree3d36667fc3c52df960a529bdb5e108e3add36e4d /atom.cgi
parent5ec5ec180cfdae140f459c167741dabcd94f755a (diff)
added possibility to configure the system and outsourced bazaar specific things
Diffstat (limited to 'atom.cgi')
-rwxr-xr-xatom.cgi10
1 files changed, 5 insertions, 5 deletions
diff --git a/atom.cgi b/atom.cgi
index 33c6280..498afcb 100755
--- a/atom.cgi
+++ b/atom.cgi
@@ -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 }