changeset 19:608df6b3de80

interpolate all the things
author jhammel
date Fri, 26 Oct 2012 15:27:41 +0000
parents 6ffbad8cc31f
children 71c36a7842d1
files dogdish/dispatcher.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/dogdish/dispatcher.py	Fri Oct 26 15:11:06 2012 +0000
+++ b/dogdish/dispatcher.py	Fri Oct 26 15:27:41 2012 +0000
@@ -111,7 +111,7 @@
     # template for response body
     body = """<?xml version="1.0"?>
 <updates>
-  <update type="minor" appVersion="19.0a1" version="19.0a1" extensionVersion="19.0a1" buildID="20121010114416" licenseURL="http://www.mozilla.com/test/sample-eula.html" detailsURL="http://www.mozilla.com/test/sample-details.html">
+  <update type="minor" appVersion="%(version)s" version="%(version)s" extensionVersion="%(version)s" buildID="%(build_id)s" licenseURL="http://www.mozilla.com/test/sample-eula.html" detailsURL="http://www.mozilla.com/test/sample-details.html">
     <patch type="complete" URL="http://update.boot2gecko.org/%(path)s/%(update)s%(query)s" hashFunction="SHA512" hashValue="%(hash)s" size="%(size)s"/>
   </update>
 </updates>"""
@@ -144,8 +144,10 @@
         # template variables
         variables = dict(update=current_update.filename,
                          size=current_update.size,
+                         version=application.version,
                          hash=current_update.hash(),
                          path=self.app.path,
+                         build_id=application.build_id,
                          query=query)
 
         return Response(content_type='text/xml',
@@ -169,7 +171,7 @@
 
         # path
         if not self.path:
-            self.path = os.path.split(self.directory.strip(os.path.sep))
+            self.path = os.path.split(self.directory.strip(os.path.sep))[-1]
 
         # cache
         self.updates = {}