From bbf2e4e31edcc1fa3a4975d1b99fdbd513a5239e Mon Sep 17 00:00:00 2001 From: BJ Dierkes Date: Wed, 22 Jan 2014 18:09:03 -0600 Subject: [PATCH] Resolves Issue #202 and #217 --- ChangeLog | 18 ++++-- LICENSE | 34 ++++++------ cement/__init__.py | 1 - cement/ext/__init__.py | 1 - doc/source/api/ext/ext_genshi.rst | 92 +++++++++++++++++++++++++++++++ setup.py | 17 +++--- 6 files changed, 129 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index c342f4f3..88c2c66f 100755 --- a/ChangeLog +++ b/ChangeLog @@ -26,11 +26,19 @@ Bugs: Features: * :issue:`209` - Added app.debug property to allow developers to know if - `--debug` was passed at command line of via the config. - * :issue:`219` - Merged ext.memcached into mainline. - * :issue:`222` - Merged ext.configobj into mainline. - * :issue:`223` - Merged ext.genshi into mainline. - * :issue:`224` - Merged ext.yaml into mainline. + `--debug` was passed at command line of via the config + * :issue:`219` - Merged ext.memcached into mainline + * :issue:`222` - Merged ext.configobj into mainline + * :issue:`223` - Merged ext.genshi into mainline + * :issue:`224` - Merged ext.yaml into mainline + +Incompatible: + + * :issue:`202` - Deprecated namespace packaging for cement and cement.ext. + Resolves issues with certain IDE's and other situations where the lack + of a proper ``__init__.py`` causes issues. This change means that + external extensions can no longer share the ``cement.ext`` module + namespace, and must have it's own unique module path. 2.1.4 - Tue Oct 29, 2013 (DEVELOPMENT) diff --git a/LICENSE b/LICENSE index e32024f1..7c387471 100755 --- a/LICENSE +++ b/LICENSE @@ -3,28 +3,28 @@ License ======= -Copyright (c) 2009-2013 Data Folk Labs, LLC +Copyright (c) 2009-2014 Data Folk Labs, LLC All rights reserved. -Redistribution and use in source and binary forms, with or without +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright notice, + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of BJ Dierkes. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. + * Neither the name of Data Folk Labs, LLC. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS 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 HOLDER OR CONTRIBUTORS 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 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS 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 HOLDER OR CONTRIBUTORS 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. diff --git a/cement/__init__.py b/cement/__init__.py index 656dc0f7..e69de29b 100644 --- a/cement/__init__.py +++ b/cement/__init__.py @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover diff --git a/cement/ext/__init__.py b/cement/ext/__init__.py index 656dc0f7..e69de29b 100644 --- a/cement/ext/__init__.py +++ b/cement/ext/__init__.py @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover diff --git a/doc/source/api/ext/ext_genshi.rst b/doc/source/api/ext/ext_genshi.rst index 6358ead9..80158bcc 100644 --- a/doc/source/api/ext/ext_genshi.rst +++ b/doc/source/api/ext/ext_genshi.rst @@ -8,3 +8,95 @@ :undoc-members: :private-members: :show-inheritance: + + +Genshi Syntax Basics +^^^^^^^^^^^^^^^^^^^^ + +**Printing Variables** + +.. code-block:: text + + Hello ${user_name} + + +Where 'user_name' is a variable returned from the controller. Will display: + +.. code-block:: text + + Hello Johnny + + +**if statements** + +.. code-block:: text + + {% if foo %}\ + Label: ${example.label} + {% end %}\ + + +Will only output 'Label: