Commits

Jan-Jaap Driessen committed 7c30f99 Merge

merge jj-fanstatic-publisher-as-app

Comments (0)

Files changed (4)

   are wrapping to choke on the NotImplementedError raised by
   DummyNeededResources.
 
+- Update entry points in order to use the fanstatic Publisher used as an
+  application instead of a filter, for instance in a configuration
+  with paste.urlmap.
+
+  http://pythonpaste.org/modules/urlmap.html
+
 1.0a3 (2013-08-12)
 ==================
 

fanstatic/publisher.py

         return self.publisher(environ, start_response)
 
 
-def make_publisher(app, global_config,
-                   publisher_signature=fanstatic.DEFAULT_SIGNATURE):
-    publisher = Publisher(fanstatic.LibraryRegistry.instance())
-    return Delegator(app, publisher, publisher_signature=publisher_signature)
+def make_publisher(global_config):
+    return Publisher(fanstatic.LibraryRegistry.instance())
         ],
         'paste.filter_app_factory': [
             'fanstatic = fanstatic:make_fanstatic',
-            'publisher = fanstatic:make_publisher',
             'injector = fanstatic:make_injector',
         ],
         'paste.app_factory': [
             'serf = fanstatic:make_serf',
+            'publisher = fanstatic:make_publisher',
         ],
         'fanstatic.injectors': [
             'topbottom = fanstatic.injector:TopBottomInjector',

tests/test_config.py

     }
 
 
-def test_publisher_config():
-    publisher = make_publisher(None, {}, publisher_signature='foo')
-    assert publisher.trigger == '/foo/'
-    assert publisher.app is None
-
-
 def test_fanstatic_config():
     d = {
         'versioning': 't',
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.