Resolves Issue #202 and #217

This commit is contained in:
BJ Dierkes 2014-01-22 18:09:03 -06:00
parent fe6cecb7b5
commit bbf2e4e31e
6 changed files with 129 additions and 34 deletions

View File

@ -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)

34
LICENSE
View File

@ -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.

View File

@ -1 +0,0 @@
__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover

View File

@ -1 +0,0 @@
__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover

View File

@ -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: <label>' if foo == True.
**for loops**
.. code-block:: text
{% for item in items %}\
- ${item}
{% end %}\
Where 'items' is a list returned from the controller. Will display:
.. code-block:: text
- list item 1
- list item 2
- list item 3
**Functions**
.. code-block:: text
{% def greeting(name) %}\
Hello, ${name}!
{% end %}\
${greeting('World')}\
${greeting('Edward')}
Will output:
.. code-block:: text
Hello, World!
Hello, Edward!
**Formatted Columns**
.. code-block:: text
{# --------------------- 78 character baseline --------------------------- #}\
label ver description
================== ======== ================================================
{% for plugin in plugins %}\
${"%-18s" % plugin['label']} ${"%-8s" % plugin['version']} ${"%-48s" % plugin['description']}
{% end %}
Output looks like:
.. code-block:: text
$ helloworld list-plugins
label ver description
================== ======== ================================================
example1 1.0.34 Example plugin v1.x for helloworld
example2 2.1 Example plugin v2.x for helloworld

View File

@ -6,13 +6,13 @@ from cement.utils import version
VERSION = version.get_version()
LONG = """
Cement is an advanced CLI Application Framework for Python. Its goal is to
introduce a standard, and feature-full platform for both simple and complex
command line applications as well as support rapid development needs without
Cement is an advanced CLI Application Framework for Python. Its goal is to
introduce a standard, and feature-full platform for both simple and complex
command line applications as well as support rapid development needs without
sacrificing quality.
More Information please visit the official site at:
For more information please visit the official site at:
* http://builtoncement.com/
"""
@ -34,7 +34,7 @@ setup(name='cement',
version=VERSION,
description="CLI Application Framework for Python",
long_description=LONG,
classifiers=[],
classifiers=[],
keywords='cli framework',
author='Data Folk Labs, LLC',
author_email='team@datafolklabs.com',
@ -48,8 +48,5 @@ setup(name='cement',
setup_requires=[],
entry_points="""
""",
namespace_packages=[
'cement',
'cement.ext',
],
namespace_packages=[],
)