]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/deploy.py
Properly register salt values as random.
[wizard.git] / wizard / deploy.py
index ea573c1fef5ef547c0368d063d7945e026aea43c..27a1bb30bbb6d8b4d0712666f725bb1819f1f490 100644 (file)
@@ -80,12 +80,15 @@ def web(dir, url=None):
     Attempts to determine the URL a directory would be web-accessible at.
     If ``url`` is specified, automatically use it.  Returns a generator whic
     produces a list of candidate urls.
+
+    This function implements a plugin interface named :ref:`wizard.deploy.web`.
     """
     if url:
         yield url
         return
 
-    for f in pkg_resources.iter_entry_points("deploy.web"):
+    for entry in pkg_resources.iter_entry_points("wizard.deploy.web"):
+        f = entry.load()
         for r in f(dir):
             if isinstance(r, str):
                 r = urlparse.urlparse(r)
@@ -328,7 +331,7 @@ class Deployment(object):
     def dsn(self):
         """The :class:`sqlalchemy.engine.url.URL` for this deployment."""
         if not self._dsn:
-            self._dsn = sql.fill_url(self.application.dsn(self))
+            self._dsn = sql.auth(self.application.dsn(self))
         return self._dsn
     @property
     def url(self):
@@ -344,13 +347,6 @@ class Deployment(object):
             return self._url
         except StopIteration:
             raise UnknownWebPath
-    def enableOldStyleUrls(self):
-        """
-        Switches to using http://user.scripts.mit.edu/~user/app URLs.
-        No effect if they have an explicit .scripts/url override.
-        """
-        # XXX: This is pretty scripts specific
-        self._url = scripts.fill_url(self.location, self.application.url(self), old_style = True)
     @staticmethod
     def parse(line):
         """