Commits

Jan-Jaap Driessen committed 7c30f99 Merge

merge jj-fanstatic-publisher-as-app

  • Participants
  • Parent commits f14dd03, 61ab5f8

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',