docs/main
by Luke Macken
docs/main/IntegratingWithTG2.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit df43a6ad524056f8f58249615d07f15c709d4a50
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Sep 28 13:13:05 2009 -0400
Fix a broken link to a moved document
diff --git a/docs/main/IntegratingWithTG2.rst b/docs/main/IntegratingWithTG2.rst
index 048f6b8..f37c1c4 100644
--- a/docs/main/IntegratingWithTG2.rst
+++ b/docs/main/IntegratingWithTG2.rst
@@ -315,6 +315,6 @@ entry-point.
.. seealso::
- :doc:`MokshaApplications`
+ :doc:`PluginEntryPoints`
14 years, 8 months
moksha.spec pavement.py setup.py
by Luke Macken
moksha.spec | 2 +-
pavement.py | 2 +-
setup.py | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit c63b5f27aebc9107ff55caa4a6e1215b1a8483b6
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Sep 28 05:46:35 2009 -0400
0.4.2
diff --git a/moksha.spec b/moksha.spec
index fda16ff..245c981 100644
--- a/moksha.spec
+++ b/moksha.spec
@@ -2,7 +2,7 @@
%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
Name: moksha
-Version: 0.4.1
+Version: 0.4.2
Release: 1%{?dist}
Summary: A flexable platform for creating live collaborative web applications
Group: Applications/Internet
diff --git a/pavement.py b/pavement.py
index 9984eef..29e9cbf 100644
--- a/pavement.py
+++ b/pavement.py
@@ -25,7 +25,7 @@ from paver.setuputils import find_packages, find_package_data
import paver.misctasks
import paver.virtual
-VERSION = '0.4.1'
+VERSION = '0.4.2'
HEADER = """This file is part of Moksha.
Copyright (C) 2008-2009 Red Hat, Inc.
diff --git a/setup.py b/setup.py
index c91b705..90469dd 100644
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@ from paver.setuputils import find_package_data
setup(
name='moksha',
- version='0.4.1',
+ version='0.4.2',
description='',
author='',
author_email='',
14 years, 8 months
2 commits - docs/main MANIFEST.in
by Luke Macken
MANIFEST.in | 1 +
docs/main/RPMInstallation.rst | 26 +++++++++++++++++---------
2 files changed, 18 insertions(+), 9 deletions(-)
New commits:
commit 3b8bf48a524428d3d44a4a8c21a24aa7bbf04dff
Author: Luke Macken <lmacken(a)redhat.com>
Date: Sun Sep 27 14:07:36 2009 -0400
Include our quickstart templates in the manifest
diff --git a/MANIFEST.in b/MANIFEST.in
index 3c4a5b7..e2f9e0a 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -2,6 +2,7 @@ recursive-include docs *
recursive-include production *
recursive-include moksha *.mak *.html *.js *.css *.png *.jpg *.gif
recursive-include moksha/public *
+recursive-include moksha/templates/moksha *
include moksha.spec
include stop-moksha
commit 1ddf55fc7cf39f257ea5fa37ec6f878bad31eba4
Author: Luke Macken <lmacken(a)redhat.com>
Date: Sun Sep 27 13:57:51 2009 -0400
Some improvements to our RPM install doc
diff --git a/docs/main/RPMInstallation.rst b/docs/main/RPMInstallation.rst
index 8fb60de..6f004eb 100644
--- a/docs/main/RPMInstallation.rst
+++ b/docs/main/RPMInstallation.rst
@@ -36,14 +36,6 @@ as root, replacing `$DISTRO` with either `fedora-rawhide`, `fedora-11`,
http://fedoraproject.org/wiki/TurboGears2
-Install the dependencies and setup your RPM tree
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-.. code-block:: bash
-
- $ sudo yum install rpmdevtools python-paver python-tg-devtools TurboGears2
- $ sudo yum-builddep -y moksha
- $ rpmdev-setuptree
Installing the Moksha Apache/mod_wsgi server
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -52,6 +44,10 @@ Installing the Moksha Apache/mod_wsgi server
$ sudo yum install moksha-{server,hub,docs}
+.. note::
+
+ The above setup does not install any apps. To duplicate the moksha
+ dashboard demo, you can `yum install moksha\*`
Running Moksha
~~~~~~~~~~~~~~
@@ -66,7 +62,7 @@ Running Orbited
.. code-block:: bash
- $ orbited
+ $ orbited -c /etc/moksha/orbited.cfg
Running the Moksha Hub
@@ -77,6 +73,18 @@ Running the Moksha Hub
$ sudo /sbin/service moksha-hub restart
+Install the dependencies and setup your RPM tree
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This step is only necessary if you plan on building moksha apps.
+
+.. code-block:: bash
+
+ $ sudo yum install rpmdevtools
+ $ rpmdev-setuptree
+ $ sudo yum-builddep -y moksha
+
+
Watching the Error Log
~~~~~~~~~~~~~~~~~~~~~~
14 years, 8 months
2 commits - docs/main moksha/api moksha/connector
by Luke Macken
docs/main/Connectors.rst | 3 +++
docs/main/MokshaLabs.rst | 2 +-
moksha/api/widgets/stomp/stomp.py | 4 ++--
moksha/connector/connector.py | 2 +-
4 files changed, 7 insertions(+), 4 deletions(-)
New commits:
commit 3d8f6bbc8d8d71dddedef7caf9397f2cd07a2282
Author: Luke Macken <lmacken(a)redhat.com>
Date: Sat Sep 26 20:05:50 2009 -0400
Utilize the StompWidget's own orbited settings, not the globals
diff --git a/moksha/api/widgets/stomp/stomp.py b/moksha/api/widgets/stomp/stomp.py
index 3acf8bb..3389176 100644
--- a/moksha/api/widgets/stomp/stomp.py
+++ b/moksha/api/widgets/stomp/stomp.py
@@ -144,8 +144,8 @@ class StompWidget(Widget):
self.notify = asbool(config.get('moksha.socket.notify', False))
self.orbited_host = config.get('orbited_host', 'localhost')
self.orbited_port = config.get('orbited_port', 9000)
- self.orbited_url = 'http://%s:%s' % (orbited_host, orbited_port)
- self.orbited_js = JSLink(link=orbited_url + '/static/Orbited.js')
+ self.orbited_url = 'http://%s:%s' % (self.orbited_host, self.orbited_port)
+ self.orbited_js = JSLink(link=self.orbited_url + '/static/Orbited.js')
self.stomp_host = config.get('stomp_host', 'localhost')
self.stomp_port = config.get('stomp_port', 61613)
self.stomp_user = config.get('stomp_user', 'guest')
commit 45c014bfaf753b2af6526da00951100cf0094b58
Author: Luke Macken <lmacken(a)redhat.com>
Date: Sat Sep 26 19:29:51 2009 -0400
More minor doc tweaks
diff --git a/docs/main/Connectors.rst b/docs/main/Connectors.rst
index a80f3f8..05ed0be 100644
--- a/docs/main/Connectors.rst
+++ b/docs/main/Connectors.rst
@@ -1,3 +1,6 @@
+Moksha Data Connector Interfaces
+================================
+
.. automodule:: moksha.connector.connector
.. seealso::
diff --git a/docs/main/MokshaLabs.rst b/docs/main/MokshaLabs.rst
index 10c536e..d6bdc41 100644
--- a/docs/main/MokshaLabs.rst
+++ b/docs/main/MokshaLabs.rst
@@ -6,10 +6,10 @@ The Moksha Labs is an experimental R&D playground for reusable apps & widgets.
.. toctree::
:maxdepth: 1
- ../apps/MokshaMenus
LiveWidget
Feeds
MokshaContainerWidgets
Connectors
+ ../apps/MokshaMenus
Blueprint
diff --git a/moksha/connector/connector.py b/moksha/connector/connector.py
index 664b75f..7298189 100644
--- a/moksha/connector/connector.py
+++ b/moksha/connector/connector.py
@@ -17,7 +17,7 @@
# Authors: John (J5) Palmieri <johnp(a)redhat.com>
"""
Moksha Data Connector Interfaces
-================================
+--------------------------------
A Data Connector is an object which translate Moksha data requests to the
native protocol of a data resource such as an XMLRPC or JSON server and then
14 years, 9 months
2 commits - docs/main moksha.spec pavement.py setup.py
by Luke Macken
docs/main/MokshaLabs.rst | 7 ++++++-
docs/main/Widgets.rst | 12 +++++++-----
moksha.spec | 2 +-
pavement.py | 2 +-
setup.py | 2 +-
5 files changed, 16 insertions(+), 9 deletions(-)
New commits:
commit 6cdc800c90d5d310023905c39e8f5e10bd536bdd
Author: Luke Macken <lmacken(a)redhat.com>
Date: Sat Sep 26 19:19:00 2009 -0400
Various documentation tweaks & linking
diff --git a/docs/main/MokshaLabs.rst b/docs/main/MokshaLabs.rst
index 97f22b9..10c536e 100644
--- a/docs/main/MokshaLabs.rst
+++ b/docs/main/MokshaLabs.rst
@@ -1,10 +1,15 @@
Moksha Labs
===========
-The Moksha Labs is an experimental playground for re-usable apps & widgets.
+The Moksha Labs is an experimental R&D playground for reusable apps & widgets.
.. toctree::
+ :maxdepth: 1
../apps/MokshaMenus
LiveWidget
Feeds
+ MokshaContainerWidgets
+ Connectors
+ Blueprint
+
diff --git a/docs/main/Widgets.rst b/docs/main/Widgets.rst
index 5240f48..ece86be 100644
--- a/docs/main/Widgets.rst
+++ b/docs/main/Widgets.rst
@@ -11,12 +11,14 @@ official documentation, you can also find great ToscaWidgets tutorials in the
* `Writing Widget Demos <http://toscawidgets.org/documentation/WidgetBrowser>`_
* `TurboGears2 Documentation <http://www.turbogears.org/2.0/docs/toc.html>`_
-Moksha also provides a number of Widgets in its API, some of which include:
-
.. toctree::
- :maxdepth: 2
- Feeds
+ Caching
+ GlobalResources
+ Feed
LiveWidget
MokshaContainerWidgets
- Caching
+
+.. seealso::
+
+ :doc:`MokshaLabs`
commit 75f456f9d86eb4ca41d285a31d0a9246237724ab
Author: Luke Macken <lmacken(a)redhat.com>
Date: Sat Sep 26 19:04:35 2009 -0400
0.4.1
diff --git a/moksha.spec b/moksha.spec
index 23f770d..fda16ff 100644
--- a/moksha.spec
+++ b/moksha.spec
@@ -2,7 +2,7 @@
%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
Name: moksha
-Version: 0.4.0
+Version: 0.4.1
Release: 1%{?dist}
Summary: A flexable platform for creating live collaborative web applications
Group: Applications/Internet
diff --git a/pavement.py b/pavement.py
index 7975b7f..22abb42 100644
--- a/pavement.py
+++ b/pavement.py
@@ -25,7 +25,7 @@ from paver.setuputils import find_packages, find_package_data
import paver.misctasks
import paver.virtual
-VERSION = '0.4.0'
+VERSION = '0.4.1'
HEADER = """This file is part of Moksha.
Copyright (C) 2008-2009 Red Hat, Inc.
diff --git a/setup.py b/setup.py
index bd92fed..c91b705 100644
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@ from paver.setuputils import find_package_data
setup(
name='moksha',
- version='0.4.0',
+ version='0.4.1',
description='',
author='',
author_email='',
14 years, 9 months
4 commits - docs/conf.py docs/main docs/_templates moksha.spec pavement.py setup.py
by Luke Macken
docs/_templates/indexcontent.html | 4 +-
docs/conf.py | 2 -
docs/main/MokshaApplications.rst | 68 --------------------------------------
docs/main/PluginEntryPoints.rst | 68 ++++++++++++++++++++++++++++++++++++++
docs/main/QuickstartTemplates.rst | 2 -
moksha.spec | 5 ++
pavement.py | 2 -
setup.py | 2 -
8 files changed, 77 insertions(+), 76 deletions(-)
New commits:
commit 9ae66ba5cbc48e664fc5a7c31c0eec561425fcfd
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Sep 24 14:09:28 2009 -0400
0.4.0 release
diff --git a/docs/conf.py b/docs/conf.py
index 1545c9d..7f8c7c4 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -43,7 +43,7 @@ copyright = '2008-2009, Red Hat, Inc'
# other places throughout the built documents.
#
# The short X.Y version.
-version = '0.1'
+version = '0.4.0'
# The full version, including alpha/beta/rc tags.
release = '0.1'
diff --git a/moksha.spec b/moksha.spec
index 0a528f3..192f6d6 100644
--- a/moksha.spec
+++ b/moksha.spec
@@ -2,7 +2,7 @@
%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
Name: moksha
-Version: 0.3.5
+Version: 0.4.0
Release: 1%{?dist}
Summary: A flexable platform for creating live collaborative web applications
Group: Applications/Internet
@@ -145,6 +145,9 @@ restorecon -Rv /var/cache/moksha
%doc docs/_build/html
%changelog
+* Thu Sep 24 2009 Luke Macken <lmacken(a)redhat.com> - 0.4.0-01
+- 0.4.0 release
+
* Tue Sep 22 2009 Luke Macken <lmacken(a)redhat.com> - 0.3.5-1
- 0.3.5
diff --git a/pavement.py b/pavement.py
index 7685433..9707c05 100644
--- a/pavement.py
+++ b/pavement.py
@@ -25,7 +25,7 @@ from paver.setuputils import find_packages, find_package_data
import paver.misctasks
import paver.virtual
-VERSION = '0.3.5'
+VERSION = '0.4.0'
HEADER = """This file is part of Moksha.
Copyright (C) 2008-2009 Red Hat, Inc.
diff --git a/setup.py b/setup.py
index 9972c15..fa1f9d5 100644
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@ from paver.setuputils import find_package_data
setup(
name='moksha',
- version='0.3.5',
+ version='0.4.0',
description='',
author='',
author_email='',
commit c06229556938cd0c3553094c21286e5fe98dbb3a
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Sep 24 14:02:34 2009 -0400
Change our moksha applications doc title
diff --git a/docs/main/PluginEntryPoints.rst b/docs/main/PluginEntryPoints.rst
index fd978b7..210e0b0 100644
--- a/docs/main/PluginEntryPoints.rst
+++ b/docs/main/PluginEntryPoints.rst
@@ -1,5 +1,5 @@
-Moksha Applications
-===================
+Moksha Plugin Entry Points
+==========================
When the :class:`moksha.middleware.MokshaMiddleware` is loaded, it will
automatically load all applications and widgets from those entry points,
commit 535a90f940300273f0661fd9a009edf9842c313e
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Sep 24 13:58:40 2009 -0400
Rename the 'Moksha Applications' docs to 'Plugin Entry Points'.
diff --git a/docs/_templates/indexcontent.html b/docs/_templates/indexcontent.html
index c534c4e..0d971ef 100644
--- a/docs/_templates/indexcontent.html
+++ b/docs/_templates/indexcontent.html
@@ -22,8 +22,8 @@
<span class="linkdescr">Features of and the technology behind them</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("main/QuickstartTemplates") }}">Quickstart Templates</a><br/>
<span class="linkdescr">Quickly create Moksha components</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("main/MokshaApplications") }}">Applications</a><br/>
- <span class="linkdescr">Details on creating applications using Moksha</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("main/PluginEntryPoints") }}">Plugin Entry Points</a><br/>
+ <span class="linkdescr">Details on plugging in various components</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("main/IntegratingWithTG2") }}">TurboGears2</a><br/>
<span class="linkdescr">Using Moksha with TurboGears2</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("main/Development") }}">Development</a><br/>
diff --git a/docs/main/MokshaApplications.rst b/docs/main/MokshaApplications.rst
deleted file mode 100644
index fd978b7..0000000
--- a/docs/main/MokshaApplications.rst
+++ /dev/null
@@ -1,68 +0,0 @@
-Moksha Applications
-===================
-
-When the :class:`moksha.middleware.MokshaMiddleware` is loaded, it will
-automatically load all applications and widgets from those entry points,
-and store them in ``moksha.apps`` and ``moksha._widgets`` dictionaries.
-These can then be accessed at any time by any application or widget during
-any request.
-
-Mounting a WSGI application
----------------------------
-
-You can mount an existing WSGI application by pointing to it
-in the ``setup.py`` on the ``[moksha.wsgiapp]`` entry-point.
-
-.. code-block:: python
-
- [moksha.wsgiapp]
- mywsgiapp = mywsgiapp.wsgiapp:MyWSGIApplication
-
-Your WSGI application will then be accessable via ``/apps/mywsgiapp`` in Moksha.
-
-Mounting a TurboGears application
-----------------------------------
-
-You can easily mount TurboGears Controllers within Moksha by pointing to them in
-your ``setup.py`` under the ``[moksha.application]`` entry-point.
-
-.. code-block:: python
-
- [moksha.application]
- myapp = myapplication.controllers.root:RootController
-
-Your TG application will then be accessable via ``/apps/myapp`` in Moksha.
-Moksha will also look for a ``model`` module in your application, and will call
-the ``init_model`` method within it, if it exists. This is a convention used to
-initialize TurboGears2 models.
-
-Installing a ToscaWidget
-------------------------
-
-You can plug an existing ToscaWidget into Moksha by adding it to the ``[moksha.widget]`` entry-point.
-
-.. code-block:: python
-
- [moksha.widget]
- jquery = tw.jquery:jquery_js
-
-Your Widget will then be accessable via ``/widgets/mywidget`` in Moksha.
-
-Configuration
--------------
-
-Moksha will reads every application's ``production.ini`` or ``development.ini``
-from ``/etc/moksha/conf.d/$APPNAME/`` upon startup and loads all of the ``[DEFAULT]`` variables into the global
-:class:`pylons.config` object. This enables TG2/Pylons Moksha applications to
-use the config object as they would do normally. However, this requires that
-applications do not have conflicting configuration variable names. Moksha will
-display a warning message for each variable conflict. Resolving these can be
-done by namespacing your configuration variables. For example, if your config
-variable is `foo=bar`, you could rename it to `myapp.foo=bar`.
-
-
-.. seealso::
-
- :doc:`GettingStarted` for details on getting things up and running,
- :doc:`QuickstartTemplates` for creating new Moksha Components, and
- :doc:`IntegratingWithTG2` for using Moksha with TurboGears2.
diff --git a/docs/main/PluginEntryPoints.rst b/docs/main/PluginEntryPoints.rst
new file mode 100644
index 0000000..fd978b7
--- /dev/null
+++ b/docs/main/PluginEntryPoints.rst
@@ -0,0 +1,68 @@
+Moksha Applications
+===================
+
+When the :class:`moksha.middleware.MokshaMiddleware` is loaded, it will
+automatically load all applications and widgets from those entry points,
+and store them in ``moksha.apps`` and ``moksha._widgets`` dictionaries.
+These can then be accessed at any time by any application or widget during
+any request.
+
+Mounting a WSGI application
+---------------------------
+
+You can mount an existing WSGI application by pointing to it
+in the ``setup.py`` on the ``[moksha.wsgiapp]`` entry-point.
+
+.. code-block:: python
+
+ [moksha.wsgiapp]
+ mywsgiapp = mywsgiapp.wsgiapp:MyWSGIApplication
+
+Your WSGI application will then be accessable via ``/apps/mywsgiapp`` in Moksha.
+
+Mounting a TurboGears application
+----------------------------------
+
+You can easily mount TurboGears Controllers within Moksha by pointing to them in
+your ``setup.py`` under the ``[moksha.application]`` entry-point.
+
+.. code-block:: python
+
+ [moksha.application]
+ myapp = myapplication.controllers.root:RootController
+
+Your TG application will then be accessable via ``/apps/myapp`` in Moksha.
+Moksha will also look for a ``model`` module in your application, and will call
+the ``init_model`` method within it, if it exists. This is a convention used to
+initialize TurboGears2 models.
+
+Installing a ToscaWidget
+------------------------
+
+You can plug an existing ToscaWidget into Moksha by adding it to the ``[moksha.widget]`` entry-point.
+
+.. code-block:: python
+
+ [moksha.widget]
+ jquery = tw.jquery:jquery_js
+
+Your Widget will then be accessable via ``/widgets/mywidget`` in Moksha.
+
+Configuration
+-------------
+
+Moksha will reads every application's ``production.ini`` or ``development.ini``
+from ``/etc/moksha/conf.d/$APPNAME/`` upon startup and loads all of the ``[DEFAULT]`` variables into the global
+:class:`pylons.config` object. This enables TG2/Pylons Moksha applications to
+use the config object as they would do normally. However, this requires that
+applications do not have conflicting configuration variable names. Moksha will
+display a warning message for each variable conflict. Resolving these can be
+done by namespacing your configuration variables. For example, if your config
+variable is `foo=bar`, you could rename it to `myapp.foo=bar`.
+
+
+.. seealso::
+
+ :doc:`GettingStarted` for details on getting things up and running,
+ :doc:`QuickstartTemplates` for creating new Moksha Components, and
+ :doc:`IntegratingWithTG2` for using Moksha with TurboGears2.
commit 3956d0d5ecd95f33144d7ff9d8a8d7410bf36dbb
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Sep 24 10:44:12 2009 -0400
Remove some unused quickstart options
diff --git a/docs/main/QuickstartTemplates.rst b/docs/main/QuickstartTemplates.rst
index 60c41f4..11c3f31 100644
--- a/docs/main/QuickstartTemplates.rst
+++ b/docs/main/QuickstartTemplates.rst
@@ -22,8 +22,6 @@ Moksha provides templates for easily creating basic components.
package name for the code
-t TOPIC, --topic=TOPIC
The Moksha topic to utilize
- --dry-run dry run (don't actually do anything)
- --noinput no input (don't ask any questions)
.. note::
14 years, 9 months
2 commits - moksha/middleware moksha/tests
by Luke Macken
moksha/middleware/connector.py | 10 ++--
moksha/tests/quickstarts/base.py | 69 ++++++++++++++--------------
moksha/tests/quickstarts/test_connector.py | 44 +++++++++++------
moksha/tests/quickstarts/test_consumer.py | 44 +++++++++++------
moksha/tests/quickstarts/test_controller.py | 43 +++++++++++------
moksha/tests/quickstarts/test_livewidget.py | 43 ++++++++++-------
moksha/tests/quickstarts/test_stream.py | 44 +++++++++++------
7 files changed, 183 insertions(+), 114 deletions(-)
New commits:
commit e0a9b5dff04aa2360b4c69da8466153f1faa8432
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Sep 24 09:37:33 2009 -0400
Test suite optimizations to cut the running time almost in half
diff --git a/moksha/tests/quickstarts/base.py b/moksha/tests/quickstarts/base.py
index f7403a3..0589127 100644
--- a/moksha/tests/quickstarts/base.py
+++ b/moksha/tests/quickstarts/base.py
@@ -20,47 +20,50 @@ class Options(object):
inspect_files = False
svn_repository = None
+old_cwd = None
-class QuickstartTester(object):
+def setup_quickstart(template, templates, template_vars, args):
+ command = CreateDistroCommand('MokshaQuickStartUnitTest')
+ command.verbose = False
+ command.simulate = False
+ command.options = Options()
+ command.interactive=False
+ command.args=[
+ 'mokshatest', '--package=mokshatest',
+ '--template=moksha.master',
+ ]
+ for t in templates:
+ command.args.append('--template=%s' % t)
+
+ for arg in args:
+ command.args.append('%s=%s' % (arg, args[arg]))
- def setUp(self):
- command = CreateDistroCommand('MokshaQuickStartUnitTest')
- command.verbose = False
- command.simulate = False
- command.options = Options()
- command.interactive=False
- command.args=[
- 'mokshatest', '--package=mokshatest',
- '--template=moksha.master',
- ]
- for template in self.templates:
- command.args.append('--template=%s' % template)
+ proj_dir = os.path.join(testDataPath, 'mokshatest')
+ command.create_template(
+ template('mokshatest'),
+ proj_dir,
+ template_vars)
+ command.command()
- for arg in self.args:
- command.args.append('%s=%s' % (arg, self.args[arg]))
+ global old_cwd
+ old_cwd = os.getcwd()
+ os.chdir(proj_dir)
+ subprocess.Popen('paver egg_info', shell=True, stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE).communicate()
- proj_dir = os.path.join(testDataPath, 'mokshatest')
- command.create_template(
- self.template('mokshatest'),
- proj_dir,
- self.template_vars)
- command.command()
+ pkg_resources.working_set.add_entry(proj_dir)
+ reload(pkg_resources)
- self.oldcwd = os.getcwd()
- os.chdir(proj_dir)
- subprocess.Popen('paver egg_info', shell=True, stdout=subprocess.PIPE,
- stderr=subprocess.PIPE).communicate()
+ app = loadapp('config:/srv/moksha/development.ini',
+ relative_to=proj_dir)
+ return TestApp(app)
- pkg_resources.working_set.add_entry(proj_dir)
- reload(pkg_resources)
+def teardown_quickstart():
+ shutil.rmtree(testDataPath, ignore_errors=True)
+ os.chdir(old_cwd)
- self.app = loadapp('config:/srv/moksha/development.ini',
- relative_to=proj_dir)
- self.app = TestApp(self.app)
- def tearDown(self):
- shutil.rmtree(testDataPath, ignore_errors=True)
- os.chdir(self.oldcwd)
+class QuickstartTester(object):
def get_entry(self, entry_point):
for entry in pkg_resources.working_set.iter_entry_points(entry_point):
diff --git a/moksha/tests/quickstarts/test_connector.py b/moksha/tests/quickstarts/test_connector.py
index 2c40280..9ea7eba 100644
--- a/moksha/tests/quickstarts/test_connector.py
+++ b/moksha/tests/quickstarts/test_connector.py
@@ -4,24 +4,35 @@ import pkg_resources
from datetime import timedelta
from moksha.pastetemplate import MokshaConnectorTemplate
-from base import QuickstartTester
+from base import QuickstartTester, setup_quickstart, teardown_quickstart
+
+app = None
+
+def setup():
+ template = MokshaConnectorTemplate
+ templates = ['moksha.connector']
+ template_vars = {
+ 'package': 'mokshatest',
+ 'project': 'mokshatest',
+ 'egg': 'mokshatest',
+ 'egg_plugins': ['Moksha'],
+ }
+ args = {
+ 'connector': True,
+ 'connector_name': 'MokshatestConnector',
+ }
+ global app
+ app = setup_quickstart(template=template, templates=templates, args=args,
+ template_vars=template_vars)
+
+def teardown():
+ teardown_quickstart()
+
class TestConnectorQuickstart(QuickstartTester):
- def __init__(self,**options):
- self.app = None
- self.template_vars = {
- 'package': 'mokshatest',
- 'project': 'mokshatest',
- 'egg': 'mokshatest',
- 'egg_plugins': ['Moksha'],
- }
- self.args = {
- 'connector': True,
- 'connector_name': 'MokshatestConnector',
- }
- self.template = MokshaConnectorTemplate
- self.templates = ['moksha.connector']
+ def setUp(self):
+ self.app = app
def get_connector(self):
return self.get_entry('moksha.connector')
diff --git a/moksha/tests/quickstarts/test_consumer.py b/moksha/tests/quickstarts/test_consumer.py
index 53bb95e..9bd6a88 100644
--- a/moksha/tests/quickstarts/test_consumer.py
+++ b/moksha/tests/quickstarts/test_consumer.py
@@ -6,25 +6,37 @@ from datetime import timedelta
from moksha.api.hub import Consumer
from moksha.pastetemplate import MokshaConsumerTemplate
-from base import QuickstartTester
+from base import QuickstartTester, setup_quickstart, teardown_quickstart
+
+app = None
+
+def setup():
+ template = MokshaConsumerTemplate
+ templates = ['moksha.consumer']
+ template_vars = {
+ 'package': 'mokshatest',
+ 'project': 'mokshatest',
+ 'egg': 'mokshatest',
+ 'egg_plugins': ['Moksha'],
+ 'topic': 'moksha.topics.test',
+ }
+ args = {
+ 'consumer': True,
+ 'consumer_name': 'MokshatestConsumer',
+ }
+ global app
+ app = setup_quickstart(template=template, templates=templates, args=args,
+ template_vars=template_vars)
+
+
+def teardown():
+ teardown_quickstart()
+
class TestConsumerQuickstart(QuickstartTester):
- def __init__(self,**options):
- self.app = None
- self.template_vars = {
- 'package': 'mokshatest',
- 'project': 'mokshatest',
- 'egg': 'mokshatest',
- 'egg_plugins': ['Moksha'],
- 'topic': 'moksha.topics.test',
- }
- self.args = {
- 'consumer': True,
- 'consumer_name': 'MokshatestConsumer',
- }
- self.template = MokshaConsumerTemplate
- self.templates = ['moksha.consumer']
+ def setUp(self):
+ self.app = app
def get_consumer(self):
return self.get_entry('moksha.consumer')
diff --git a/moksha/tests/quickstarts/test_controller.py b/moksha/tests/quickstarts/test_controller.py
index c186902..122d756 100644
--- a/moksha/tests/quickstarts/test_controller.py
+++ b/moksha/tests/quickstarts/test_controller.py
@@ -3,26 +3,39 @@ import pkg_resources
from datetime import timedelta
from moksha.pastetemplate import MokshaControllerTemplate
-from base import QuickstartTester
from moksha.lib.base import Controller
+from base import QuickstartTester, setup_quickstart, teardown_quickstart
+
+app = None
+
+def setup():
+ template_vars = {
+ 'package': 'mokshatest',
+ 'project': 'mokshatest',
+ 'egg': 'mokshatest',
+ 'egg_plugins': ['Moksha'],
+ }
+ args = {
+ 'controller': True,
+ 'controller_name': 'MokshatestController',
+ }
+ template = MokshaControllerTemplate
+ templates = ['moksha.controller']
+ global app
+ app = setup_quickstart(template=template, templates=templates, args=args,
+ template_vars=template_vars)
+
+
+def teardown():
+ teardown_quickstart()
+
+
class TestControllerQuickstart(QuickstartTester):
- def __init__(self,**options):
- self.app = None
- self.template_vars = {
- 'package': 'mokshatest',
- 'project': 'mokshatest',
- 'egg': 'mokshatest',
- 'egg_plugins': ['Moksha'],
- }
- self.args = {
- 'controller': True,
- 'controller_name': 'MokshatestController',
- }
- self.template = MokshaControllerTemplate
- self.templates = ['moksha.controller']
+ def setUp(self):
+ self.app = app
def get_controller(self):
return self.get_entry('moksha.application')
diff --git a/moksha/tests/quickstarts/test_livewidget.py b/moksha/tests/quickstarts/test_livewidget.py
index aee91c1..1cdcf98 100644
--- a/moksha/tests/quickstarts/test_livewidget.py
+++ b/moksha/tests/quickstarts/test_livewidget.py
@@ -3,25 +3,36 @@ import pkg_resources
from moksha.pastetemplate import MokshaLiveWidgetTemplate
-from base import QuickstartTester
+from base import QuickstartTester, setup_quickstart, teardown_quickstart
+
+app = None
+
+def setup():
+ template = MokshaLiveWidgetTemplate
+ templates = ['moksha.livewidget']
+ template_vars = {
+ 'package': 'mokshatest',
+ 'project': 'mokshatest',
+ 'egg': 'mokshatest',
+ 'egg_plugins': ['Moksha'],
+ 'topic': 'moksha.topics.test',
+ }
+ args = {
+ 'livewidget': True,
+ 'widget_name': 'MokshatestWidget',
+ }
+
+ global app
+ app = setup_quickstart(template=template, templates=templates, args=args,
+ template_vars=template_vars)
+
+def teardown():
+ teardown_quickstart()
class TestLiveWidgetQuickstart(QuickstartTester):
- def __init__(self,**options):
- self.app = None
- self.template_vars = {
- 'package': 'mokshatest',
- 'project': 'mokshatest',
- 'egg': 'mokshatest',
- 'egg_plugins': ['Moksha'],
- 'topic': 'moksha.topics.test',
- }
- self.args = {
- 'livewidget': True,
- 'widget_name': 'MokshatestWidget',
- }
- self.template = MokshaLiveWidgetTemplate
- self.templates = ['moksha.livewidget']
+ def setUp(self):
+ self.app = app
def get_widget(self):
return self.get_entry('moksha.widget')
diff --git a/moksha/tests/quickstarts/test_stream.py b/moksha/tests/quickstarts/test_stream.py
index bfaecc2..d08b4ec 100644
--- a/moksha/tests/quickstarts/test_stream.py
+++ b/moksha/tests/quickstarts/test_stream.py
@@ -6,25 +6,37 @@ from datetime import timedelta
from moksha.api.streams import PollingDataStream
from moksha.pastetemplate import MokshaStreamTemplate
-from base import QuickstartTester
+from base import QuickstartTester, setup_quickstart, teardown_quickstart
+
+app = None
+
+def setup():
+ template = MokshaStreamTemplate
+ templates = ['moksha.stream']
+ template_vars = {
+ 'package': 'mokshatest',
+ 'project': 'mokshatest',
+ 'egg': 'mokshatest',
+ 'egg_plugins': ['Moksha'],
+ 'topic': 'moksha.topics.test',
+ }
+ args = {
+ 'stream': True,
+ 'stream_name': 'MokshatestStream',
+ }
+ global app
+ app = setup_quickstart(template=template, templates=templates, args=args,
+ template_vars=template_vars)
+
+def teardown():
+ teardown_quickstart()
+
+
class TestStreamQuickstart(QuickstartTester):
- def __init__(self,**options):
- self.app = None
- self.template_vars = {
- 'package': 'mokshatest',
- 'project': 'mokshatest',
- 'egg': 'mokshatest',
- 'egg_plugins': ['Moksha'],
- 'topic': 'moksha.topics.test',
- }
- self.args = {
- 'stream': True,
- 'stream_name': 'MokshatestStream',
- }
- self.template = MokshaStreamTemplate
- self.templates = ['moksha.stream']
+ def setUp(self):
+ self.app = app
def get_stream(self):
return self.get_entry('moksha.stream')
commit 4db2cc1754cc88e04a0a66766d1db8a69612a989
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Sep 24 08:47:38 2009 -0400
Ensure our Connector middleware can handle invalid requests
diff --git a/moksha/middleware/connector.py b/moksha/middleware/connector.py
index 8c5638b..9632b98 100644
--- a/moksha/middleware/connector.py
+++ b/moksha/middleware/connector.py
@@ -85,9 +85,13 @@ class MokshaConnectorMiddleware(object):
if params[k] and len(params[k]) == 1:
params[k] = params[k][0]
- response = self._run_connector(environ, request,
- s[0], s[1], *s[2:],
- **params)
+ try:
+ response = self._run_connector(environ, request,
+ s[0], s[1], *s[2:],
+ **params)
+ except IndexError, e:
+ log.info('Invalid connector path: %s' % str(e))
+ return Response(status='404 Not Found')(environ, start_response)
else:
response = request.get_response(self.application)
diff --git a/moksha/tests/quickstarts/test_connector.py b/moksha/tests/quickstarts/test_connector.py
index f611b0d..2c40280 100644
--- a/moksha/tests/quickstarts/test_connector.py
+++ b/moksha/tests/quickstarts/test_connector.py
@@ -34,6 +34,9 @@ class TestConnectorQuickstart(QuickstartTester):
resp = self.app.get('/moksha_connector/mokshatest/call/foo')
assert "MokshatestConnector.call('foo')" in resp, resp.body
+ def test_failed_connector_call(self):
+ self.app.get('/moksha_connector/foo', status=404)
+
def test_connector_query(self):
""" Ensure we can perform a basic connector query """
resp = self.app.get('/moksha_connector/mokshatest/query/query_stuff/')
14 years, 9 months
docs/main
by Luke Macken
docs/main/Connectors.rst | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
New commits:
commit 2b3f3b3c20dc9bfbaf4671333e159ba6be7ac50e
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Sep 24 07:58:35 2009 -0400
Add a Connectors.rst doc
diff --git a/docs/main/Connectors.rst b/docs/main/Connectors.rst
new file mode 100644
index 0000000..a80f3f8
--- /dev/null
+++ b/docs/main/Connectors.rst
@@ -0,0 +1,32 @@
+.. automodule:: moksha.connector.connector
+
+.. seealso::
+
+ The :doc:`QuickstartTemplates` for instructions on automatically
+ generating connectors.
+
+.. seealso::
+
+ The `Fedora Community <http://fedoracommunity.fedorahosted.org>`_ project
+ contains a variety of connectors that can be used as examples, which
+ can be found `here <https://fedorahosted.org/fedoracommunity/browser/fedoracommunity/connectors>`_
+
+
+from moksha.connector import :class:`IConnector`, :class:`ICall`, :class:`IQuery`, :class:`ISearch`
+---------------------------------------------------------------------------------------------------
+
+.. autoclass:: moksha.connector.connector.IConnector
+ :members:
+ :inherited-members:
+
+.. autoclass:: moksha.connector.connector.ICall
+ :members:
+ :inherited-members:
+
+.. autoclass:: moksha.connector.connector.IQuery
+ :members:
+ :inherited-members:
+
+.. autoclass:: moksha.connector.connector.ISearch
+ :members:
+ :inherited-members:
14 years, 9 months
docs/main docs/_templates moksha/connector
by Luke Macken
docs/_templates/indexcontent.html | 10 +++-
docs/main/QuickstartTemplates.rst | 3 -
moksha/connector/connector.py | 77 +++++++++++++++++++++-----------------
3 files changed, 52 insertions(+), 38 deletions(-)
New commits:
commit 604e42457819fcdf7f0a7ebb133cc5b1065a0b34
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Sep 24 07:58:15 2009 -0400
Improve our connector docs, and tweak the front page a little
diff --git a/docs/_templates/indexcontent.html b/docs/_templates/indexcontent.html
index d0099e6..c534c4e 100644
--- a/docs/_templates/indexcontent.html
+++ b/docs/_templates/indexcontent.html
@@ -11,6 +11,8 @@
<span class="linkdescr">Details on creating Widgets</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("main/Messaging") }}">Messaging</a><br/>
<span class="linkdescr">Moksha's real-time messaging layer</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("main/Connectors") }}">Connectors</a><br/>
+ <span class="linkdescr">Data connector interfaces</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("main/Middleware") }}">WSGI Middleware</a><br/>
<span class="linkdescr">A description of Moksha's WSGI middleware</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("main/Security") }}">Security</a><br/>
@@ -18,16 +20,18 @@
</td><td width="50%">
<p class="biglink"><a class="biglink" href="{{ pathto("main/Architecture") }}">The Architecture</a><br/>
<span class="linkdescr">Features of and the technology behind them</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("main/QuickstartTemplates") }}">Quickstart Templates</a><br/>
+ <span class="linkdescr">Quickly create Moksha components</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("main/MokshaApplications") }}">Applications</a><br/>
<span class="linkdescr">Details on creating applications using Moksha</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("main/IntegratingWithTG2") }}">TurboGears2</a><br/>
+ <span class="linkdescr">Using Moksha with TurboGears2</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("main/Development") }}">Development</a><br/>
- <span class="linkdescr">A handbook for hacking on and with Moksha</span></p>
+ <span class="linkdescr">A handbook for hacking on Moksha</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("main/Deployment") }}">Deployment</a><br/>
<span class="linkdescr">Recipies for deploying and scaling Moksha</span></p>
<p class="biglink"><a class="biglink" href="http://moksha.csh.rit.edu">Demo Dashboard</a><br/>
<span class="linkdescr">A simple demo Moksha dashboard</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("main/IntegratingWithTG2") }}">TurboGears2</a><br/>
- <span class="linkdescr">Using Moksha with TurboGears2</span></p>
</td></tr>
</table>
diff --git a/docs/main/QuickstartTemplates.rst b/docs/main/QuickstartTemplates.rst
index 20aae37..60c41f4 100644
--- a/docs/main/QuickstartTemplates.rst
+++ b/docs/main/QuickstartTemplates.rst
@@ -2,8 +2,7 @@
Moksha Quickstart Templates
===========================
-Moksha provides templates for easily creating basic widgets, streams,
-consumers, etc.
+Moksha provides templates for easily creating basic components.
.. code-block:: bash
diff --git a/moksha/connector/connector.py b/moksha/connector/connector.py
index 164e80c..664b75f 100644
--- a/moksha/connector/connector.py
+++ b/moksha/connector/connector.py
@@ -15,24 +15,25 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Authors: John (J5) Palmieri <johnp(a)redhat.com>
+"""
+Moksha Data Connector Interfaces
+================================
+
+A Data Connector is an object which translate Moksha data requests to the
+native protocol of a data resource such as an XMLRPC or JSON server and then
+translates the results into a format the client is expecting. They can also
+implement caching and other data services. Think of a connector as an
+intelligent proxy to external servers.
+
+All Data Connectors must derive and implement the :class:`IConnector`
+interface. All other interfaces are optional. Any feature of an interface
+which is not implemented (e.g. sorting in the ITable interface) must raise
+NotImplementedError if the value is set to anything but None
+"""
from utils import QueryPath, QueryCol, ParamFilter, WeightedSearch
from beaker.cache import Cache
-""" Data Connector Interfaces
-
-A Data Connector is an object which translate Moksha data requests to the native
-protocol of a data resource such as an XMLRPC or json server and then translates
-the results into a format the client is expecting. They can also implement
-caching and other data services. Think of a connector as an intelligent proxy
-to external servers.
-
-All Data Connectors must derive and implement the IConnector interface. All
-other interfaces are optional. Any feature of an interface which is not
-implemented (e.g. sorting in the ITable interface) must
-raise NotImplementedError if the value is set to anything but None
-"""
-
class IConnector(object):
""" Data connector interface
@@ -111,15 +112,17 @@ class IConnector(object):
""" Implement this method to return all available remote resource paths
along with documentation for each path broken into this format:
- {
- path: {
- "doc": general documentation,
- "return": return documentation,
- "parameters": {
- param name: param documentation
- },
- }
- }
+ .. code-block:: python
+
+ {
+ path: {
+ "doc": general documentation,
+ "return": return documentation,
+ "parameters": {
+ param name: param documentation
+ },
+ }
+ }
You may return None if your resource does not have a way to introspect
it but you must return something.
@@ -208,21 +211,27 @@ class IQuery(object):
:sort_col: Which column we should sort by. None = default
:sort_order: 1 = ascending, -1 = descending
:filters: a hash of columns and their filters in this format:
- {
- colname: {
- "value": value,
- "op": operator # "=", "<", ">", etc.
- }
- }
- - or -
+ .. code-block::
+
+ {
+ colname: {
+ "value": value,
+ "op": operator # "=", "<", ">", etc.
+ }
+ }
- {
- colname: value # assumes =
- }
+ - or -
+
+ {
+ colname: value # assumes =
+ }
:Returns:
A hash with format:
+
+ .. code-block:: python
+
{
"total_rows": total_rows, # number of rows matched by query
"rows_per_page": rows_per_page, # number of rows requested
@@ -232,6 +241,8 @@ class IQuery(object):
# to pagination
"rows": rows # list of rows which were returned
}
+
+
"""
results = None
14 years, 9 months
2 commits - docs/main
by Luke Macken
docs/main/Development.rst | 7 +++++++
docs/main/Topics.rst | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 8873d794a8de1b041ce2238b78651a3aeb969f80
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 23 19:15:48 2009 -0400
Minor change of wording in the Topics doc
diff --git a/docs/main/Topics.rst b/docs/main/Topics.rst
index f38f949..b93e507 100644
--- a/docs/main/Topics.rst
+++ b/docs/main/Topics.rst
@@ -6,7 +6,7 @@ A `"Topic"` in Moksha is basically just a message queue.
By abstracting out the low-level messaging protocols and brokers, Moksha
applications can interact with `"topics"` without having to worry about the
-underlying protocols that are involved. For example, a `topic` could
+underlying technology that is involved. For example, a `topic` could
potentially be represented by a STOMP destination, or even an AMQP message
queue. These messaging backends can be swapped out and configured without
having to alter the applications that care about those `topics`.
commit 1b3c83d5168a13e128036d523f1197c8a7e9e65b
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 23 18:06:14 2009 -0400
Make a note of ajax's patch to speed RPM up when building python packages
diff --git a/docs/main/Development.rst b/docs/main/Development.rst
index 8daff7b..495ca7a 100644
--- a/docs/main/Development.rst
+++ b/docs/main/Development.rst
@@ -59,6 +59,13 @@ Rebuilding and reinstall *everything*, restart apache, and run the test suite
$ paver reinstall reinstall_apps restart_httpd test
+.. note::
+
+ As a developer, performing the full rebuild, reinstall, restart, and test
+ sequence is usually a good habit to get into, however it can take a long
+ time. If you're hardcore, this `RPM patch <http://www.rpm.org/ticket/92>`_
+ will speed things up quite a bit.
+
Freezing requirements
~~~~~~~~~~~~~~~~~~~~~
14 years, 9 months