[Checkins] SVN: grokproject/branches/janjaapdriessen-hurry.resource/grokproject/template/ Create two zope.conf files: A debug and a production one. This will allow you to run grok in a debug and a deploy configuration without re-running bin/buildout or messing around in parts/etc/zope.conf.

Jan-Jaap Driessen jdriessen at thehealthagency.com
Fri Dec 3 10:13:47 EST 2010


Log message for revision 118679:
  Create two zope.conf files: A debug and a production one. This will allow you to run grok in a debug and a deploy configuration without re-running bin/buildout or messing around in parts/etc/zope.conf.
  
  Use the fanstatic middleware component that combines the injector and publisher.
  
  

Changed:
  U   grokproject/branches/janjaapdriessen-hurry.resource/grokproject/template/buildout.cfg_tmpl
  U   grokproject/branches/janjaapdriessen-hurry.resource/grokproject/template/etc/debug.ini.in_tmpl
  U   grokproject/branches/janjaapdriessen-hurry.resource/grokproject/template/etc/deploy.ini.in_tmpl
  U   grokproject/branches/janjaapdriessen-hurry.resource/grokproject/template/etc/zope.conf.in_tmpl

-=-
Modified: grokproject/branches/janjaapdriessen-hurry.resource/grokproject/template/buildout.cfg_tmpl
===================================================================
--- grokproject/branches/janjaapdriessen-hurry.resource/grokproject/template/buildout.cfg_tmpl	2010-12-03 15:09:26 UTC (rev 118678)
+++ grokproject/branches/janjaapdriessen-hurry.resource/grokproject/template/buildout.cfg_tmpl	2010-12-03 15:13:46 UTC (rev 118679)
@@ -7,13 +7,14 @@
 parts =
     app
     daemon
-    debug_ini
-    deploy_ini
+    paster_ini_debug
+    paster_ini_deploy
     i18n
     mkdirs
     site_zcml
     test
-    zope_conf
+    zope_conf_debug
+    zope_conf_deploy
     zpasswd
     interactive_debugger
 # For backward compatibility, telling buildout not to throw away
@@ -28,12 +29,12 @@
 ${eggs_dir}
 extensions = buildout.dumppickedversions
              mr.developer
-auto-checkout = hurry.zoperesource
-                hurry.resource
+auto-checkout = fanstatic
+                zope.fanstatic
 
 [sources]
-hurry.resource = svn svn+ssh://svn.zope.org/repos/main/hurry.resource/branches/janjaapdriessen-resource-publisher
-hurry.zoperesource = svn svn+ssh://svn.zope.org/repos/main/hurry.zoperesource/branches/janjaapdriessen-wsgi
+fanstatic = hg http://bitbucket.org/fanstatic/fanstatic
+zope.fanstatic = svn http://svn.zope.org/repos/main/zope.fanstatic/trunk
 
 [versions]
 # Override versions here.
@@ -57,14 +58,14 @@
     --daemon --pid-file=$${buildout:directory}/var/daemon.pid
     --log-file=$${buildout:directory}/log/daemon.log
 
-[debug_ini]
+[paster_ini_debug]
 recipe = collective.recipe.template
 input = etc/debug.ini.in
 output = $${buildout:parts-directory}/etc/debug.ini
 host = 127.0.0.1
 port = 8080
 
-[deploy_ini]
+[paster_ini_deploy]
 recipe = collective.recipe.template
 input = etc/deploy.ini.in
 output = $${buildout:parts-directory}/etc/deploy.ini
@@ -98,16 +99,25 @@
 defaults = ['-v']
 
 [zope_conf]
-recipe = collective.recipe.template
 input = etc/zope.conf.in
-output = $${buildout:parts-directory}/etc/zope.conf
 filestorage = $${buildout:directory}/var/filestorage
 blobstorage = $${buildout:directory}/var/blobstorage
 logfiles = $${buildout:directory}/var/log
 # 'extra' is copied verbatim. Use it for product config sections and so.
 extra =
-  devmode on
 
+[zope_conf_debug]
+<= zope_conf
+recipe = collective.recipe.template
+output = $${buildout:parts-directory}/etc/zope.debug.conf
+devmode = on
+
+[zope_conf_deploy]
+<= zope_conf
+recipe = collective.recipe.template
+output = $${buildout:parts-directory}/etc/zope.deploy.conf
+devmode = off
+
 # This section is named so that the zpasswd utility is
 # called `zpasswd`
 [zpasswd]
@@ -123,7 +133,7 @@
 eggs = ${egg}
 entry-points =
   interactive_debugger=grokcore.startup.startup:interactive_debug_prompt
-arguments = zope_conf="$${zope_conf:output}"
+arguments = zope_conf="$${zope_conf_debug:output}"
 
 # The [data] and [log] parts are still in here to instruct buildout to not
 # unintentionally throw away the parts/data and parts/log subdirectories

Modified: grokproject/branches/janjaapdriessen-hurry.resource/grokproject/template/etc/debug.ini.in_tmpl
===================================================================
--- grokproject/branches/janjaapdriessen-hurry.resource/grokproject/template/etc/debug.ini.in_tmpl	2010-12-03 15:09:26 UTC (rev 118678)
+++ grokproject/branches/janjaapdriessen-hurry.resource/grokproject/template/etc/debug.ini.in_tmpl	2010-12-03 15:13:46 UTC (rev 118679)
@@ -1,5 +1,5 @@
 [DEFAULT]
-zope_conf = %(here)s/zope.conf
+zope_conf = %(here)s/zope.debug.conf
 
 [server:main]
 use = egg:Paste#http
@@ -7,7 +7,7 @@
 port = $${:port}
 
 [pipeline:main]
-pipeline = accesslogging evalexception resource_publisher resource_injection grok
+pipeline = accesslogging evalexception fanstatic grok
 
 [filter:accesslogging]
 use = egg:Paste#translogger
@@ -15,13 +15,11 @@
 [filter:evalexception]
 use = egg:z3c.evalexception#ajax
 
-[filter:resource_publisher]
-use = egg:hurry.resource#publisher
+[filter:fanstatic]
+use = egg:fanstatic#fanstatic
+devmode = $${zope_conf_debug:devmode}
+hashing = true
 
-[filter:resource_injection]
-use = egg:hurry.resource#inject
-devmode = on
-
 [app:grok]
 use = egg:grokcore.startup#debug
 exempt-exceptions = zope.security.interfaces.IUnauthorized

Modified: grokproject/branches/janjaapdriessen-hurry.resource/grokproject/template/etc/deploy.ini.in_tmpl
===================================================================
--- grokproject/branches/janjaapdriessen-hurry.resource/grokproject/template/etc/deploy.ini.in_tmpl	2010-12-03 15:09:26 UTC (rev 118678)
+++ grokproject/branches/janjaapdriessen-hurry.resource/grokproject/template/etc/deploy.ini.in_tmpl	2010-12-03 15:13:46 UTC (rev 118679)
@@ -1,5 +1,5 @@
 [DEFAULT]
-zope_conf = %(here)s/zope.conf
+zope_conf = %(here)s/zope.deploy.conf
 
 [server:main]
 use = egg:Paste#http
@@ -7,7 +7,7 @@
 port = $${:port}
 
 [pipeline:main]
-pipeline = accesslogging gzip resource_publisher resource_injection grok
+pipeline = accesslogging gzip fanstatic grok
 
 [filter:accesslogging]
 use = egg:Paste#translogger
@@ -15,12 +15,14 @@
 [filter:gzip]
 use = egg:Paste#gzip
 
-[filter:resource_publisher]
-use = egg:hurry.resource#publisher
+[filter:fanstatic]
+use = egg:fanstatic#fanstatic
+devmode = $${zope_conf_deploy:devmode}
+bottom = true
+hashing = true
+mode = minified
+rollup = true
 
-[filter:resource_injection]
-use = egg:hurry.resource#inject
-
 [app:grok]
 use = egg:grokcore.startup
 

Modified: grokproject/branches/janjaapdriessen-hurry.resource/grokproject/template/etc/zope.conf.in_tmpl
===================================================================
--- grokproject/branches/janjaapdriessen-hurry.resource/grokproject/template/etc/zope.conf.in_tmpl	2010-12-03 15:09:26 UTC (rev 118678)
+++ grokproject/branches/janjaapdriessen-hurry.resource/grokproject/template/etc/zope.conf.in_tmpl	2010-12-03 15:13:46 UTC (rev 118679)
@@ -31,6 +31,8 @@
 # logfiles are setup in the debug.ini and deploy.ini files.
 </eventlog>
 
+devmode $${devmode}
+
 # Extra configuration lines can be added to zope_conf's extra option. Put for
 # instance productconf sections in here.
 $${zope_conf:extra}



More information about the checkins mailing list