[Checkins] SVN: plone.postpublicationhook/trunk/ Moved to GitHub.

Stephen Richter cvs-admin at zope.org
Sat Mar 2 02:10:23 UTC 2013


Log message for revision 129988:
  Moved to GitHub.

Changed:
  D   plone.postpublicationhook/trunk/COPYRIGHT.txt
  D   plone.postpublicationhook/trunk/LICENSE.txt
  A   plone.postpublicationhook/trunk/MOVED_TO_GITHUB
  D   plone.postpublicationhook/trunk/README.txt
  D   plone.postpublicationhook/trunk/docs/
  D   plone.postpublicationhook/trunk/plone/
  D   plone.postpublicationhook/trunk/setup.py

-=-
Deleted: plone.postpublicationhook/trunk/COPYRIGHT.txt
===================================================================
--- plone.postpublicationhook/trunk/COPYRIGHT.txt	2013-03-02 02:10:12 UTC (rev 129987)
+++ plone.postpublicationhook/trunk/COPYRIGHT.txt	2013-03-02 02:10:23 UTC (rev 129988)
@@ -1 +0,0 @@
-Zope Foundation and Contributors
\ No newline at end of file

Deleted: plone.postpublicationhook/trunk/LICENSE.txt
===================================================================
--- plone.postpublicationhook/trunk/LICENSE.txt	2013-03-02 02:10:12 UTC (rev 129987)
+++ plone.postpublicationhook/trunk/LICENSE.txt	2013-03-02 02:10:23 UTC (rev 129988)
@@ -1,44 +0,0 @@
-Zope Public License (ZPL) Version 2.1
-
-A copyright notice accompanies this license document that identifies the
-copyright holders.
-
-This license has been certified as open source. It has also been designated as
-GPL compatible by the Free Software Foundation (FSF).
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions in source code must retain the accompanying copyright
-notice, this list of conditions, and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the accompanying copyright
-notice, this list of conditions, and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-3. Names of the copyright holders must not be used to endorse or promote
-products derived from this software without prior written permission from the
-copyright holders.
-
-4. The right to distribute this software or to use it for any purpose does not
-give you the right to use Servicemarks (sm) or Trademarks (tm) of the
-copyright
-holders. Use of them is covered by separate agreement with the copyright
-holders.
-
-5. If any files are modified, you must cause the modified files to carry
-prominent notices stating that you changed the files and the date of any
-change.
-
-Disclaimer
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
-OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Added: plone.postpublicationhook/trunk/MOVED_TO_GITHUB
===================================================================
--- plone.postpublicationhook/trunk/MOVED_TO_GITHUB	                        (rev 0)
+++ plone.postpublicationhook/trunk/MOVED_TO_GITHUB	2013-03-02 02:10:23 UTC (rev 129988)
@@ -0,0 +1 @@
+See https://github.com/zopefoundation/plone.postpublicationhook
\ No newline at end of file

Deleted: plone.postpublicationhook/trunk/README.txt
===================================================================
--- plone.postpublicationhook/trunk/README.txt	2013-03-02 02:10:12 UTC (rev 129987)
+++ plone.postpublicationhook/trunk/README.txt	2013-03-02 02:10:23 UTC (rev 129988)
@@ -1,85 +0,0 @@
-Note
-====
-
-This package is provided for backwards compatibility. New code should use the
-publication events introduced in Zope 2.12 directly.
-
-For Zope 2.10, a backport of the publication events is available in
-`ZPublisherEventsBackport`_. This is required for this package and may be added
-to your buildout directly, or by specifying the 'Zope2.10' extra::
-
-    eggs =
-        Plone
-        plone.postpublicationhook [Zope2.10]
-
-Introduction
-============
-
-This package provides a hook into Zope's ZPublisher that is run after the
-publisher has completed publication, but before the the transaction is committed
-and the response is returned to the requesting browser. This is practical for
-caching purposes: it is the ideal place to determine and insert caching headers
-into the response.
-
-Hooks use `zope.event`_'s event mechanism using the
-plone.validatehook.interfaces.IPostValidationEvent. This is based on the
-standard ObjectEvent from `zope.component`_.
-
-Example
-=======
-
-As an example we will write a bit of code which logs the path of every published
-object. This is the code for the event handler::
-
-    from zope.interface import Interface
-    from zope.component import adapter
-    from plone.postpublicationhook.interfaces import IAfterPublicationEvent
-    import logging
-
-    logger = logging.getLogger("LogRequest")
-
-    @adapter(Interface, IAfterPublicationEvent)
-    def LogRequest(object, event):
-        if getattr(object, "getPhysicalPath", None) is None:
-            path="Unknown path"
-        else:
-            path="/".join(object.getPhysicalPath()
-
-        logger.info("Request for object %s" % path)
-
-
-To use this code you need to register it in zcml::
-
-    <subscriber handler=".events.LogRequest" />
-
-Using ZPublisher events directly
-================================
-
-The IPubBeforeCommit event is equivalent to the IAfterPublicationEvent,
-however it is not an ObjectEvent so there are a few changes::
-
-    from zope.component import adapter
-    from ZPublisher.interfaces import IPubBeforeCommit
-    import logging
-
-    logger = logging.getLogger("LogRequest")
-
-    @adapter(IPubBeforeCommit)
-    def LogRequest(event):
-        request = event.request
-        object = request['PUBLISHED']
-        if getattr(object, "getPhysicalPath", None) is None:
-            path="Unknown path"
-        else:
-            path="/".join(object.getPhysicalPath()
-
-        logger.info("Request for object %s" % path)
-
-
-Register it in zcml the same way::
-
-    <subscriber handler=".events.LogRequest" />
-
-.. _zope.event: http://pypi.python.org/pypi/zope.event
-.. _zope.component: http://pypi.python.org/pypi/zope.component
-.. _ZPublisherEventsBackport: http://pypi.python.org/pypi/ZPublisherEventsBackport

Deleted: plone.postpublicationhook/trunk/setup.py
===================================================================
--- plone.postpublicationhook/trunk/setup.py	2013-03-02 02:10:12 UTC (rev 129987)
+++ plone.postpublicationhook/trunk/setup.py	2013-03-02 02:10:23 UTC (rev 129988)
@@ -1,36 +0,0 @@
-from setuptools import setup, find_packages
-import os.path
-
-version = '1.2dev'
-
-setup(name='plone.postpublicationhook',
-      version=version,
-      description="Zope 2 post-publication hook",
-      long_description=open("README.txt").read() + "\n" +
-                       open(os.path.join("docs", "HISTORY.txt")).read(),
-      classifiers=[
-        "Programming Language :: Python",
-        "Environment :: Web Environment",
-        "Framework :: Zope2",
-        "Intended Audience :: Developers",
-        "License :: OSI Approved :: Zope Public License",
-        ],
-      keywords='',
-      author='Wichert Akkerman',
-      author_email='wichert at wiggy.net',
-      url='',
-      license='ZPL',
-      packages=find_packages(exclude=['ez_setup']),
-      namespace_packages=['plone'],
-      include_package_data=True,
-      zip_safe=False,
-      install_requires=[
-          'setuptools',
-          'zope.event',
-          'zope.interface',
-          'zope.security',
-      ],
-      extras_require={
-          'Zope2.10': ['ZPublisherEventsBackport'],
-      },
-      )



More information about the checkins mailing list