From gotcha at codespeak.net Sat Mar 1 08:34:57 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sat, 1 Mar 2008 08:34:57 +0100 (CET)
Subject: [KSS-checkins] r51970 - kukit/kss.zope/trunk/kss/zope
Message-ID: <20080301073457.32DE4168452@codespeak.net>
Author: gotcha
Date: Sat Mar 1 08:34:54 2008
New Revision: 51970
Modified:
kukit/kss.zope/trunk/kss/zope/meta.zcml
Log:
add missing i18n domain
Modified: kukit/kss.zope/trunk/kss/zope/meta.zcml
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/meta.zcml (original)
+++ kukit/kss.zope/trunk/kss/zope/meta.zcml Sat Mar 1 08:34:54 2008
@@ -1,4 +1,5 @@
From gotcha at codespeak.net Sat Mar 1 08:35:48 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sat, 1 Mar 2008 08:35:48 +0100 (CET)
Subject: [KSS-checkins] r51971 - kukit/kss.zope/trunk/kss/zope/tests
Message-ID: <20080301073548.577C21684D7@codespeak.net>
Author: gotcha
Date: Sat Mar 1 08:35:47 2008
New Revision: 51971
Modified:
kukit/kss.zope/trunk/kss/zope/tests/test_actionwrapper.py
Log:
avoid warning about functionaltestcase
Modified: kukit/kss.zope/trunk/kss/zope/tests/test_actionwrapper.py
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/tests/test_actionwrapper.py (original)
+++ kukit/kss.zope/trunk/kss/zope/tests/test_actionwrapper.py Sat Mar 1 08:35:47 2008
@@ -17,15 +17,13 @@
# 02111-1307, USA.
from Testing.ZopeTestCase import FunctionalDocFileSuite
-##from kss.zope.tests.base import KSSViewFunctionalTestCase
-from kss.zope.tests.base import KSSViewTestCase
+from kss.zope.tests.base import KSSViewFunctionalTestCase
import unittest, doctest
def test_suite():
suites = []
suites.append(FunctionalDocFileSuite('../actionwrapper.py',
optionflags=doctest.ELLIPSIS,
-# test_class=KSSViewFunctionalTestCase,
- test_class=KSSViewTestCase,
+ test_class=KSSViewFunctionalTestCase,
))
return unittest.TestSuite(suites)
From gotcha at codespeak.net Sat Mar 1 08:36:45 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sat, 1 Mar 2008 08:36:45 +0100 (CET)
Subject: [KSS-checkins] r51972 - kukit/kss.zope/trunk/kss/zope/tests
Message-ID: <20080301073645.F1B2C1684D7@codespeak.net>
Author: gotcha
Date: Sat Mar 1 08:36:45 2008
New Revision: 51972
Modified:
kukit/kss.zope/trunk/kss/zope/tests/test_kssview_core.py
Log:
* change protocol version
* remove unneeded code
Modified: kukit/kss.zope/trunk/kss/zope/tests/test_kssview_core.py
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/tests/test_kssview_core.py (original)
+++ kukit/kss.zope/trunk/kss/zope/tests/test_kssview_core.py Sat Mar 1 08:36:45 2008
@@ -27,7 +27,6 @@
from kss.zope.interfaces import IKSSPluginRegistry
from kss.zope.registry import GlobalPluginRegistry
from kss.zope.view import KSSView
-from kss.core import KSSUnicodeError
class KSSTestCase(unittest.TestCase):
def setUp(self):
@@ -113,7 +112,7 @@
def _wrapped_commands(self, inline):
header = textwrap.dedent(u'''\
-
+
''')
footer = ''
return header + inline + footer
@@ -145,11 +144,6 @@
awaited = u''''''
self.assertCommandsEqual(result, awaited)
-def afterSetUp(self):
- KSSViewTestCase.afterSetUp(self)
- self.setDebugRequest()
-
-
def test_suite():
suites = []
suites.append(unittest.makeSuite(TestKSSViewCoreCommandSet))
From gotcha at codespeak.net Sat Mar 1 08:37:26 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sat, 1 Mar 2008 08:37:26 +0100 (CET)
Subject: [KSS-checkins] r51973 - kukit/kss.zope/trunk/kss/zope
Message-ID: <20080301073726.35AEA1684D7@codespeak.net>
Author: gotcha
Date: Sat Mar 1 08:37:25 2008
New Revision: 51973
Modified:
kukit/kss.zope/trunk/kss/zope/actionwrapper.py
Log:
change protocol version
Modified: kukit/kss.zope/trunk/kss/zope/actionwrapper.py
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/actionwrapper.py (original)
+++ kukit/kss.zope/trunk/kss/zope/actionwrapper.py Sat Mar 1 08:37:25 2008
@@ -185,7 +185,7 @@
>>> hasattr(v, 'error')
True
>>> v(1, b=2)
- '\n\nThe error'
+ '\n\nThe error'
In addition, to be publishable, the docstring must exist. Let's
see if the wrapper actually does this. If the method had a docstring,
From gotcha at codespeak.net Sat Mar 1 08:48:51 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sat, 1 Mar 2008 08:48:51 +0100 (CET)
Subject: [KSS-checkins] r51974 - kukit/kss.base/trunk/src/kss/base
Message-ID: <20080301074851.58AE11684E9@codespeak.net>
Author: gotcha
Date: Sat Mar 1 08:48:49 2008
New Revision: 51974
Modified:
kukit/kss.base/trunk/src/kss/base/tests.py
Log:
fix test runner
Modified: kukit/kss.base/trunk/src/kss/base/tests.py
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/tests.py (original)
+++ kukit/kss.base/trunk/src/kss/base/tests.py Sat Mar 1 08:48:49 2008
@@ -4,7 +4,7 @@
def test_suite():
suite = unittest.TestSuite((
doctest.DocFileSuite(
- 'README.txt', 'selectors.txt',
+ 'selectors.txt',
'registry.txt', 'plugin.txt',
'commands.txt', 'corecommands.txt',
'javascript.txt',
From gotcha at codespeak.net Sat Mar 1 09:06:19 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sat, 1 Mar 2008 09:06:19 +0100 (CET)
Subject: [KSS-checkins] r51975 - kukit/kss.base/trunk/src/kss/base
Message-ID: <20080301080619.7AC86168501@codespeak.net>
Author: gotcha
Date: Sat Mar 1 09:06:17 2008
New Revision: 51975
Modified:
kukit/kss.base/trunk/src/kss/base/selectors.txt
Log:
Some hopefully better wording
Modified: kukit/kss.base/trunk/src/kss/base/selectors.txt
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/selectors.txt (original)
+++ kukit/kss.base/trunk/src/kss/base/selectors.txt Sat Mar 1 09:06:17 2008
@@ -1,10 +1,11 @@
Selectors
=========
-The selector is responsible for finding the nodes on which to operate.
-Selectors are executed on the client. Most of them has a single parameter.
+In the client, the selectors are used to find the DOM nodes on which to operate.
+The selectors need to be serialized from the server to the client.
A base class is provided for all selectors.
+Most of them have a single parameter.
>>> from kss.base.selectors import Selector
@@ -32,7 +33,7 @@
>>> htmlid.type
'htmlid'
-They both need a value to operate on.
+Both constructors demand a value.
>>> selector = css('div.main a')
>>> selector.type
@@ -46,9 +47,11 @@
>>> selector.value
'someid'
-There are also two somewhat different selectors. The first is special
-in that it selects the same node that was used to call the server
-action. Also note that it does not accept any arguments.
+There are also two somewhat different selectors.
+
+The first is special in that it selects the same node
+that was used to call the server action.
+Note that its constructor does not accept any arguments.
>>> from kss.base.selectors import samenode
>>> samenode.type
@@ -59,7 +62,7 @@
>>> selector.value
''
-Another core selector is parentnode. This one can be used to use a CSS
+The second selector is `parentnode`. It uses a CSS
query which only operates on nodes that are the parent (or
grandparents).
@@ -76,8 +79,9 @@
-------------------------------
Suppose a plugin registers a new selector. It must overwrite type, and
-__init__. The type of the selector should always be in namespace-name
-notation. Only the core selectors can do without a namespace.
+__init__. The type of the selector should always be specified as
+`namespace-name`.
+Only the core selectors can do without a namespace.
>>> from kss.base.selectors import Selector
>>> class MyFunkySelector(Selector):
@@ -85,8 +89,8 @@
... def __init__(self, value):
... self.value = value
-We will use this class to create selector instances. In real
-life, the plugin would register this class now with the plugin
+We will use this class to create selector instances. In actual
+code, the plugin would register this class with the plugin
registry, and the commandset code would look up the class from
the registry. However, we test the registration somewhere
else, and just use the class as it is for now:
@@ -103,7 +107,7 @@
>>> selector.value
'Selector value'
-Currently only the "value" property will be marshalled to the
+Currently, only the `value` property will be marshalled to the
client. Selectors must therefore have their parameter stored as
`value`.
@@ -118,3 +122,4 @@
>>> print css('div.content')
css('div.content')
+
From gotcha at codespeak.net Sat Mar 1 09:11:38 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sat, 1 Mar 2008 09:11:38 +0100 (CET)
Subject: [KSS-checkins] r51976 - kukit/kss.base/trunk/src/kss/base
Message-ID: <20080301081138.1117B168505@codespeak.net>
Author: gotcha
Date: Sat Mar 1 09:11:37 2008
New Revision: 51976
Modified:
kukit/kss.base/trunk/src/kss/base/registry.txt
Log:
Some hopefully better wording
Modified: kukit/kss.base/trunk/src/kss/base/registry.txt
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/registry.txt (original)
+++ kukit/kss.base/trunk/src/kss/base/registry.txt Sat Mar 1 09:11:37 2008
@@ -2,22 +2,22 @@
KSS Registries
==============
-KSS can be extendend in a few different ways. To make these things
-work we have a few different registries.
+KSS can be extended in a few different ways. To make these things
+work we have registries.
-The registries are all instances of a simple base class. Using these
+The registries are all instances of a simple base class. Using them
is pretty simple.
>>> from kss.base.registry import Registry
-We will now demonstrate the working of this registry with an sample
-command set.
+We demonstrate the interactions with this registry by defining
+a sample command set.
>>> command_set_registry = Registry()
-First we will create a simple factory function for our command
-set. Note that any callable object will do. For more information on
-command sets look at the documentation in kss.commands.
+First we create a simple factory function for our command
+set. Note that any callable object will do. (For more information on
+command sets, look at the documentation in kss.commands.)
>>> def test_command_set_factory(commands):
... pass
@@ -27,45 +27,43 @@
>>> command_set_registry.register('test', test_command_set_factory)
The name is used as a unique identifier to lookup the command set factory.
-When you try to register a factory under the same name you will get an error.
+If you try to register a factory under the same name, you get an error.
>>> command_set_registry.register('test', test_command_set_factory)
Traceback (most recent call last):
...
KeyError: ...
-This avoids any accidental overrides. If you want to override a command you
-can unregister it first.
+This avoids accidental overrides. If you want to override a command you
+need to unregister it first.
>>> command_set_registry.unregister('test')
-Unregistering the same thing twice will throw a KeyError.
+Unregistering the same thing twice throws a KeyError.
>>> command_set_registry.unregister('test')
Traceback (most recent call last):
...
KeyError: ...
-This is because we cannot unregister what is not there.
-
-Now that the registry is clean we can safely register our command set again.
+Now that the registry is clean, we can safely register our command set again.
>>> command_set_registry.register('test', test_command_set_factory)
-To use a command set we will need to get it from the registry. Let us load the
+To use a command set, we need to look it up from the registry. Let us load the
previously defined `test` set.
>>> command_set_registry.get('test') is test_command_set_factory
True
-Trying to load a command set which is not defined will result in a key error.
+Trying to load a command set which is not defined results in a key error.
>>> command_set_registry.get('does-not-exist')
Traceback (most recent call last):
...
KeyError: ...
-Registries can list theirs registered items.
+Registries can list the registered items.
>>> list(command_set_registry.items())
[('test', )]
From gotcha at codespeak.net Sat Mar 1 10:57:26 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sat, 1 Mar 2008 10:57:26 +0100 (CET)
Subject: [KSS-checkins] r51977 - in kukit/kss.base/trunk: docs src/kss/base
Message-ID: <20080301095726.61465168405@codespeak.net>
Author: gotcha
Date: Sat Mar 1 10:57:19 2008
New Revision: 51977
Added:
kukit/kss.base/trunk/docs/HISTORY.txt
Modified:
kukit/kss.base/trunk/src/kss/base/__init__.py
kukit/kss.base/trunk/src/kss/base/javascript.py
kukit/kss.base/trunk/src/kss/base/javascript.txt
kukit/kss.base/trunk/src/kss/base/plugin.py
kukit/kss.base/trunk/src/kss/base/plugin.txt
Log:
- renamed `load_plugins`, `unload_plugins`, and `activated_plugins`
to respectively `activate`, `deactivate`, and `active_plugins`
- hopefully better wording for plugin.txt
Added: kukit/kss.base/trunk/docs/HISTORY.txt
==============================================================================
--- (empty file)
+++ kukit/kss.base/trunk/docs/HISTORY.txt Sat Mar 1 10:57:19 2008
@@ -0,0 +1,11 @@
+Changelog for kss.base
+
+ (name of developer listed in brackets)
+
+kss.base - 0.4dev Unreleased
+
+ - renamed `load_plugins`, `unload_plugins`, and `activated_plugins`
+ to respectively `activate`, `deactivate`, and `active_plugins`
+ [gotcha]
+
+kss.base - 0.3 Released 2008-02-12
Modified: kukit/kss.base/trunk/src/kss/base/__init__.py
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/__init__.py (original)
+++ kukit/kss.base/trunk/src/kss/base/__init__.py Sat Mar 1 10:57:19 2008
@@ -1,4 +1,4 @@
from kss.base.commands import KSSCommands
from kss.base.selectors import selectors
-from kss.base.plugin import load_plugins
+from kss.base.plugin import activate
from kss.base.commands import xmldata, htmldata, cdatadata
Modified: kukit/kss.base/trunk/src/kss/base/javascript.py
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/javascript.py (original)
+++ kukit/kss.base/trunk/src/kss/base/javascript.py Sat Mar 1 10:57:19 2008
@@ -1,13 +1,13 @@
import os
-from kss.base.plugin import activated_plugins
+from kss.base.plugin import active_plugins
from kss.base.compression.javascript import compress
def concatenated(include_extras=False):
'''Concatinate the Javascript files for all activate plugins'''
scripts = []
- for id, plugin in sorted(activated_plugins(),
+ for id, plugin in sorted(active_plugins(),
key=lambda item: item[1].priority):
if include_extras:
javascripts = plugin.javascripts + plugin.extra_javascripts
@@ -24,11 +24,11 @@
return compress(concatenated(include_extras), compression_level)
def extra_scripts():
- '''Return a dictionary of the extra javascripts for all activated
+ '''Return a dictionary of the extra javascripts for all active
plugins'''
scripts = {}
- for id, plugin in activated_plugins():
+ for id, plugin in active_plugins():
for filename in plugin.extra_javascripts:
f = open(filename, 'r')
scripts[os.path.basename(filename)] = f.read()
Modified: kukit/kss.base/trunk/src/kss/base/javascript.txt
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/javascript.txt (original)
+++ kukit/kss.base/trunk/src/kss/base/javascript.txt Sat Mar 1 10:57:19 2008
@@ -22,8 +22,8 @@
Now if we run the code again after we activate a plugin we get
something more interesting.
- >>> from kss.base import load_plugins
- >>> load_plugins('kss-core')
+ >>> from kss.base import activate
+ >>> activate('kss-core')
>>> concatenated()
'/*\n* Copyright (c) 2005-2007\n* Authors: KSS Project Contributors...'
@@ -42,8 +42,8 @@
Finally we will unregister the core plugin to clean up.
- >>> from kss.base.plugin import unload_plugins
- >>> unload_plugins('kss-core')
+ >>> from kss.base.plugin import deactivate
+ >>> deactivate('kss-core')
Packed
@@ -63,7 +63,7 @@
So now we activate a plugin.
- >>> load_plugins('kss-core')
+ >>> activate('kss-core')
By default the packed function does no packing.
@@ -84,8 +84,8 @@
We will again unregister the core plugin to clean up.
- >>> from kss.base.plugin import unload_plugins
- >>> unload_plugins('kss-core')
+ >>> from kss.base.plugin import deactivate
+ >>> deactivate('kss-core')
Extra scripts
@@ -104,7 +104,7 @@
If we activate a plugin we get something more interesting.
- >>> load_plugins('kss-core')
+ >>> activate('kss-core')
>>> extra_scripts()
{...'base2...js': ...}
@@ -113,5 +113,5 @@
Now we can cleanup the registry again.
- >>> from kss.base.plugin import unload_plugins
- >>> unload_plugins('kss-core')
+ >>> from kss.base.plugin import deactivate
+ >>> deactivate('kss-core')
Modified: kukit/kss.base/trunk/src/kss/base/plugin.py
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/plugin.py (original)
+++ kukit/kss.base/trunk/src/kss/base/plugin.py Sat Mar 1 10:57:19 2008
@@ -24,11 +24,7 @@
def _selectors(self):
for name, selectors in self.selectors.iteritems():
for selector in selectors:
- if name is None:
- selector_id = selector.__name__
- else:
- selector_id = name + '-' + selector.__name__
- yield selector_id, selector
+ yield selector.type, selector
def register_selectors(self):
for id, selector in self._selectors():
@@ -67,7 +63,7 @@
return sorted(plugins,
key=lambda item: item[1].priority)
-def load_plugins(*names):
+def activate(*names):
def load(name):
for entry_point in iter_entry_points('kss.plugin', name):
plugin_factory = entry_point.load()
@@ -83,7 +79,7 @@
for name in names:
load(name)
-def unload_plugins(*names):
+def deactivate(*names):
for name in names:
for entry_point in iter_entry_points('kss.plugin', name):
plugin_factory = entry_point.load()
@@ -96,6 +92,6 @@
plugin_registry.unregister(name)
-def activated_plugins():
+def active_plugins():
return plugin_registry.items()
Modified: kukit/kss.base/trunk/src/kss/base/plugin.txt
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/plugin.txt (original)
+++ kukit/kss.base/trunk/src/kss/base/plugin.txt Sat Mar 1 10:57:19 2008
@@ -2,33 +2,34 @@
Plugins
=======
-KSS is a framework which is meant to be extended. An extension is a
+KSS is a framework which is meant to be extended. A plugin is a
simple Python package with some setuptools glue.
-Before any plugin can be used it must be activated. There is a
-function for this which will be shown later. We will now just query
-all activated plugins and show that it is empty.
+Before any plugin can be used, it must be active. There is a
+function to activate plugins that we will show later.
- >>> from kss.base.plugin import activated_plugins
- >>> tuple(activated_plugins())
+At startup, when we query for active plugins, we get an empty tuple.
+
+ >>> from kss.base.plugin import active_plugins
+ >>> tuple(active_plugins())
()
-We will now create a sample registration. A registration consists of a
-class like you can see below.
+We create a sample registration. A registration consists of a
+class as you can see below.
-The first thing we need to do is import the `Plugin` base class. This
-contains a few methods used in registration.
+The first thing we need to do is to import the `Plugin` base class. It
+holds a few items used by the registration.
>>> from kss.base.plugin import Plugin, file_below_module
-Now we can create our class. We will reuse the core commands in this
-example.
+Now, we can create our class. (We reuse the core commands in this
+example.)
>>> import kss.base
>>> from kss.base.corecommands import KSSCoreCommands
>>> from kss.base.selectors import Selector
- >>> class silly(Selector):
+ >>> class Silly(Selector):
... type = 'example-silly'
... def __init__(self, value):
... self.value = value
@@ -41,28 +42,28 @@
... commandsets = {
... 'example': KSSCoreCommands,
... }
- ... selectors = {'example': [silly]}
+ ... selectors = {'example': [Silly]}
+
+The registration has a few items.
-As you can see from the lines above the registration has a few things
-in it. The first thing is registering the Javascripts. All items in
-the list to the `javascripts` variable should be full paths to your
-plugins Javascript. This should not list any third party Javascript
-files. For this you can use `extra_javascripts`.
+The first item is the list of the names of the Javascripts files that makes
+the client-side plugin. All names should be full paths.
-The `commandset` var is a dictionary containing the mapping with
-identifiers and the command set factory. When using KSS you would
-normally use this identifier for the lookup of command sets.
+This list should not include any third party Javascript files.
+Those are declared in `extra_javascripts`.
-If we try the activate our plugin now it will not work.
+The `commandset` var is a dictionary that containins the mapping between
+command set factories and their identifiers.
+Those identifiers are used to look the command sets up.
- >>> kss.base.load_plugins('kss-testing')
+Before being able to activate our plugin, we need to hook its registration with
+`setuptools`.
+
+ >>> kss.base.activate('kss-testing')
Traceback (most recent call last):
...
KeyError: 'Plugin is not registered: kss-testing'
-Now that we have our registration it is time to hook it up with the
-setuptools registry.
-
>>> import pkg_resources
>>> class FakeEntryPoint(pkg_resources.EntryPoint):
@@ -78,17 +79,14 @@
>>> distribution._ep_map = {'kss.plugin': {'kss-testing': entry_point}}
>>> pkg_resources.working_set.add(distribution)
+
+Let us activate our plugin.
-After this we can load our newly created plugin.
+ >>> kss.base.activate('kss-testing')
- >>> kss.base.load_plugins('kss-testing')
-
-Now that we have activated our plugin it should show up as activated.
-
- >>> tuple(activated_plugins())
+ >>> tuple(active_plugins())
(('kss-testing', ),)
-
The additional selector we registered is now available in the selector
registry. It can be looked up based on the class name with the key
from the registrion as the namespace.
@@ -97,38 +95,37 @@
>>> print selectors['example-silly']('testing')
example-silly('testing')
-Finally we will unregister our plugin to clean up.
+Finally we deactivate our plugin to clean up.
- >>> from kss.base.plugin import unload_plugins
- >>> unload_plugins('kss-testing')
+ >>> from kss.base.plugin import deactivate
+ >>> deactivate('kss-testing')
-----------------
Utility functions
-----------------
-When you write a plugin you will need to do a few things. For some of
-these things there are helper functions available.
+When you write a plugin, you need to do a few things. We have defined
+helper functions.
Getting full path names for Javascripts
---------------------------------------
-One of the helpers which is usefull mostly for extra Javascripts is
-`javascripts_from`. This function whill recursively generate an
-iterator of all javascripts from a certain path.
+`javascripts_from` is usefull mainly for extra Javascripts.
+This function generates a recursive iterator of all javascripts
+starting from a given path.
>>> from kss.base.plugin import javascripts_from, module_path
>>> scripts = javascripts_from(module_path(kss.base))
-To test the output we will first sort the scripts (otherwise the test
+To test the output, we need to sort the scripts (otherwise the test
may fail on different systems). Keep this in mind when creating your
-own plugins. If you need a consistent order either sort the output or
-use a different way of creating the list of scripts.
+own plugins. If you need a consistent order, either sort the output or
+use a different way of computing the list of scripts.
>>> list(sorted(scripts))
[.../kukit/kukit/dom.js', ..., .../kukit/kukit/serveraction.js', ...]
-When we try to load from something which is not a directory we will
-get an error.
+If we try to load from an identifier which is not a directory, we get an error.
>>> import os
>>> javascripts_from(os.path.join(module_path(kss.base),
@@ -148,13 +145,13 @@
>>> from kss.base.plugin import available_plugins
Because we ship with the core plugin it should show up when we call
-it. Also the example plugin we make will show here.
+it. The example plugin we have made also shows up here.
>>> list(available_plugins())
[('kss-core', >> ExamplePlugin.priority = -99999
>>> list(available_plugins())
From jvloothuis at codespeak.net Sat Mar 1 11:35:25 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Sat, 1 Mar 2008 11:35:25 +0100 (CET)
Subject: [KSS-checkins] r51979 - kukit/kss.base/trunk/src/kss/base
Message-ID: <20080301103525.0368D16844B@codespeak.net>
Author: jvloothuis
Date: Sat Mar 1 11:35:25 2008
New Revision: 51979
Added:
kukit/kss.base/trunk/src/kss/base/utils.txt
Modified:
kukit/kss.base/trunk/src/kss/base/tests.py
kukit/kss.base/trunk/src/kss/base/utils.py
Log:
Readded the code from r51399 which got lost for some reason::
Improved the command lined utility by making it dump all the
required . Also made some of the unused options work. The script now
has tests as well.
Modified: kukit/kss.base/trunk/src/kss/base/tests.py
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/tests.py (original)
+++ kukit/kss.base/trunk/src/kss/base/tests.py Sat Mar 1 11:35:25 2008
@@ -7,7 +7,7 @@
'selectors.txt',
'registry.txt', 'plugin.txt',
'commands.txt', 'corecommands.txt',
- 'javascript.txt',
+ 'javascript.txt', 'utils.txt',
package='kss.base',
optionflags=doctest.ELLIPSIS|doctest.REPORT_ONLY_FIRST_FAILURE,
),
Modified: kukit/kss.base/trunk/src/kss/base/utils.py
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/utils.py (original)
+++ kukit/kss.base/trunk/src/kss/base/utils.py Sat Mar 1 11:35:25 2008
@@ -1,160 +1,58 @@
+import os
+import sys
import optparse
-import ConfigParser
-
-from paste.script.templates import Template
-
-from kss.base.javascript import packed
-from kss.base.plugin import load_plugins, activated_plugins
-
-
-class KSSConcatJs(object):
- '''Prints out or saves a packed javascript of loaded plugins'''
-
- configSection = "KSSConcatJs"
-
- def __init__(self):
- self.getOptions()
- if self.options.configFile:
- self.getConfig(self.options.configFile)
- self.handleCreation()
-
-
- def getOptions(self):
- '''Gets the arguments passed to the script (override config)'''
- parser = optparse.OptionParser()
-
- parser.add_option('-m', '--message',
- action='store',
- dest='message',
- help="message (comment) that will be added to the generated javascript")
- parser.add_option('--list',
- action='store_true',
- dest='listPlugins',
- help="lists activated plugins")
- parser.add_option('--compression-level',
- action='store',
- dest='compressionLevel',
- help="specifies the compression level (devel / stripped / safe / full / safe-devel / full-devel)")
- parser.add_option('--plugin',
- action='append',
- dest='pluginsToHandle',
- help="specifies one additional plugin to load; if you want to specify multiple plugins you can do it by calling --plugin multiple times")
- parser.add_option('--no-display',
- action='store_true',
- dest='noDisplayJavascript',
- help="avoids the display of resulting javascript in console")
- parser.add_option('--output-file',
- action='store',
- dest='outputFile',
- help="outputs the resulting javascript to the specified file")
- parser.add_option('--include-extras',
- action='store',
- dest='includeExtras',
- help="specifies if 3rd party javascripts have to be packed too")
- parser.add_option('-v', '--verbose',
- action='store_true',
- dest='verboseMode',
- help="verbose mode")
- parser.add_option('-F',
- action='store',
- dest='configFile',
- help="loads options from the specified config file")
-
- options, args = parser.parse_args()
- self.options = options
-
-
- def getConfig(self, fileName):
- '''Gets the values in config file only if not overrided by argument'''
- config = ConfigParser.ConfigParser()
- config.read(fileName)
- listParameters = ['pluginsToHandle']
- strParameters = ['compressionLevel', \
- 'outputFile']
- boolParameters = ['listPlugins', \
- 'noDisplayJavascript', \
- 'includeExtras', \
- 'verboseMode']
- for param in strParameters:
- if not hasattr(self.options, param):
- try:
- setattr(self.options, \
- param, \
- config.get(self.configSection, param))
- except ConfigParser.NoOptionError:
- pass
- for param in boolParameters:
- if not hasattr(self.options, param):
- try:
- setattr(self.options, \
- param, \
- config.getboolean(self.configSection, param))
- except ConfigParser.NoOptionError:
- pass
- for param in listParameters:
- #this is a list so the condition doesn't work with hasattr
- if not bool(self.options.pluginsToHandle):
- try:
- paramList = config.get(self.configSection, param).split(' ')
- setattr(self.options, \
- param, \
- paramList)
- except ConfigParser.NoOptionError:
- pass
-
-
- def makeJS(self, compressionLevel=None, includeExtras=False):
- '''Returns a compacted javascript generated from loaded javascripts'''
- return packed(compressionLevel, include_extras=False)
-
-
- def setComment(self, javascript, message):
- '''Add a comment to the generated javascript'''
- return "/* %s */\n\n%s" % (message, javascript)
-
- def writeToFile(self, fileName, fileContent):
- '''Writes the packed javascript to file'''
- file = open(fileName, 'w')
- file.write(fileContent)
- file.close()
-
-
- def listPlugins(self):
- '''Displays activated plugins'''
- if self.options.verboseMode:
- print "Activated plugins :"
- for id, plugin in activated_plugins():
- print " * %s" % id
- else:
- for id, plugin in activated_plugins():
- print id
-
-
- def handleCreation(self):
- '''Handles the JS creation regarding options and/or config'''
- corePlugin = ('kss-core', )
- if self.options.pluginsToHandle:
- plugins = tuple(self.options.pluginsToHandle) + corePlugin
- else:
- plugins = corePlugin
- self.loadedPlugins = load_plugins(*plugins)
-
- if self.options.listPlugins:
- self.listPlugins()
-
- javascript = self.makeJS(self.options.compressionLevel, \
- self.options.includeExtras)
-
- if self.options.message:
- javascript = self.setComment(javascript, self.options.message)
-
- if self.options.outputFile:
- self.writeToFile(self.options.outputFile, javascript)
- elif not self.options.noDisplayJavascript:
- print javascript
-
-
-class KSSPluginTemplate(Template):
- _template_dir = 'templates/plugin'
- summary = 'KSS plugin template'
- egg_plugins = ['kss.base']
+
+from kss.base import javascript
+from kss.base.plugin import activate, active_plugins
+
+def ksspackage():
+ parser = optparse.OptionParser()
+ parser.add_option('--list',
+ action='store_true',
+ dest='list_plugins',
+ help="lists available plugins")
+ parser.add_option('--compression',
+ action='store',
+ dest='compression',
+ default='safe',
+ help="specifies the compression level (devel / stripped / safe / full / safe-devel / full-devel)")
+ parser.add_option('--plugin',
+ action='append',
+ dest='plugins',
+ default=[],
+ help="specifies one additional plugin to load; if you want to specify multiple plugins you can do it by calling --plugin multiple times")
+
+
+ options, args = parser.parse_args()
+
+ def make_package():
+ output_dir = args[0]
+ if not os.path.exists(output_dir):
+ os.makedirs(output_dir)
+
+ activate(*options.plugins)
+
+ print "Creating `kss.js` script:",
+ f = open(os.path.join(output_dir, 'kss.js'), 'w')
+ f.write(javascript.packed(options.compression))
+ f.close()
+ print "DONE"
+
+ for name, script in javascript.extra_scripts().items():
+ print "Creating `%s` script:" % name,
+ f = open(os.path.join(output_dir, name), 'w')
+ f.write(script)
+ f.close()
+ print "DONE"
+
+ if args:
+ make_package()
+
+ elif options.list_plugins:
+ print "Available plugins:"
+ for id, factory in active_plugins():
+ print " %s" % id
+
+ else:
+ print 'Usage: %s OUTPUTDIR [OPTIONS]' % sys.argv[0]
+ print 'Try `%s --help` for more information.' % sys.argv[0]
Added: kukit/kss.base/trunk/src/kss/base/utils.txt
==============================================================================
--- (empty file)
+++ kukit/kss.base/trunk/src/kss/base/utils.txt Sat Mar 1 11:35:25 2008
@@ -0,0 +1,75 @@
+=========
+Utilities
+=========
+
+KSS ships with various utilties. When you install `kss.base` these get
+installed as executables.
+
+
+Create a standalone package
+===========================
+
+Since the whole KSS framework is pluggable the amount of Javascript
+that ends up being used depends a lot on the plugins. To make it easy
+to create static files from a know plugin configuration we have the
+`ksspackage`. This creates a directory with all the Javascripts needed
+to run the set of plugins.
+
+ >>> from pkg_resources import load_entry_point
+ >>> ksspackage = load_entry_point(
+ ... 'kss.base', 'console_scripts', 'ksspackage')
+
+We will first setup a temp directory to contain our stuff.
+
+ >>> import os
+ >>> from tempfile import mktemp
+ >>> temp = mktemp()
+ >>> static_dump = os.path.join(temp, 'static-dump')
+
+Executing the script without any arguments will raise an error.
+
+ >>> import sys
+ >>> old_argv = sys.argv
+ >>> sys.argv = ['ksspackage']
+
+ >>> ksspackage()
+ Usage: ksspackage OUTPUTDIR [OPTIONS]
+ Try `ksspackage --help` for more information.
+
+It needs at least one argument, the path for the output.
+
+ >>> sys.argv = ['ksspackage', static_dump]
+ >>> ksspackage()
+ Creating `kss.js` script: DONE
+
+If we look into the export we will see only the `kss.js` file.
+
+ >>> os.listdir(static_dump)
+ ['kss.js']
+
+In this case it is empty since we did not give it any plugins to
+extract the Javascript from.
+
+ >>> open(os.path.join(static_dump, 'kss.js')).read()
+ ''
+
+Now if we give it a plugin it will put the files into the dir.
+
+ >>> sys.argv = ['ksspackage', static_dump, '--plugin=kss-core']
+ >>> ksspackage()
+ Creating `kss.js` script: DONE
+ Creating `base2-dom-fp.js` script: DONE
+ Creating `sarissa.js` script: DONE
+
+ >>> list(sorted(os.listdir(static_dump)))
+ ['base2-dom-fp.js', 'kss.js', 'sarissa.js']
+
+ >>> sys.argv = old_argv
+
+Besides creating the scripts the utility can also list the available
+plugins.
+
+ >>> sys.argv = ['ksspackage', '--list']
+ >>> ksspackage()
+ Available plugins:
+ kss-core
\ No newline at end of file
From gotcha at codespeak.net Sat Mar 1 11:55:41 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sat, 1 Mar 2008 11:55:41 +0100 (CET)
Subject: [KSS-checkins] r51980 - kukit/kss.base/trunk/src/kss/base
Message-ID: <20080301105541.1AE81168460@codespeak.net>
Author: gotcha
Date: Sat Mar 1 11:55:40 2008
New Revision: 51980
Modified:
kukit/kss.base/trunk/src/kss/base/commands.txt
Log:
Some hopefully better wording
Modified: kukit/kss.base/trunk/src/kss/base/commands.txt
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/commands.txt (original)
+++ kukit/kss.base/trunk/src/kss/base/commands.txt Sat Mar 1 11:55:40 2008
@@ -2,14 +2,14 @@
KSS Commands
============
-The KSS commands system allows you to create a properly formatted KSS
-response.
+The KSS client awaits a response with properly formatted commands.
+`KSSCommands` is the server-side component that is serialized in the response.
Command renderer
================
The command renderer is the core of the system. This object is responsible
-for create the KSS response. We will now take a look at an example to see it
+for creating the KSS response. We take a look at an example to see it
in action.
>>> from kss.base import KSSCommands
@@ -18,23 +18,23 @@
>>> commands = KSSCommands()
-We can add commands to the renderer using the `add` method. To do this we
-also need to create a selector. In this case we will use the CSS selector.
-For more information about selectors look at the selector documentation.
+We can add commands to the renderer using the `add` method. To do this, we
+need to instantiate a selector (the CSS selector, in this example).
+For more information about selectors, look at the selector documentation.
+
+Let us add a command. The first argument is the name of the action
+which will be invoked on the client. The second argument is the selector.
+The keyword arguments become arguments to the client side action.
>>> from kss.base.selectors import css
>>> commands.add('replaceHTML', css('#someid'), html='some value')
-Now we have added a command. The first argument is the name of the action
-which will be invoked on the client. Our second argument is the selector.
-Any given keyword arguments become arguments to the client side action.
-
-You can add any number of commands this way. Each command will be executed
-in the order that it is added.
+You can add any number of commands this way. Commands are executed in the
+client in the order they have been added on the server.
>>> commands.add('someOtherAction', css('#otherid'), arg='some arg')
-Now that we have a few commands we can render them.
+Now that we have a few commands, we can render them.
>>> commands.render()
'...some value...some arg...'
@@ -48,26 +48,24 @@
>>> from xml.dom import minidom
>>> doc = minidom.parseString(commands.render())
-In this case there are two commands in the response (because of the
+In this case, the response hold two commands (added in the
previous examples). They are represented as command nodes.
>>> doc.getElementsByTagName('command')
[, ]
-Each parameter is represented by a child node in a command. Their name
-is stored in the attribute and their value is put within text nodes or
-CDATA blocks. Which type of node is used depends on the type of
+Each parameter is represented as a child node in a command.
+Parameter name is stored as an attribute.
+Parameter value is put within text nodes or CDATA blocks.
+Which type of node is used depends on the type of
the keyword argument given to the command.
-Depending on the type the serialisation to XML changes. Strings and
-unicode objects will be send as text nodes. You can also mark data as
-HTML, XML or CDATA blocks. This is used so that these can have special
-escaping rules.
+The serialization to XML depends on the value type.
+Strings and unicode objects ar sent as text nodes.
+You can also mark data as HTML, XML or CDATA blocks.
+These will have specific escaping rules.
>>> from kss.base import xmldata, htmldata, cdatadata
-
-Now if we make a command with these types the output will be different.
-
>>> commands = KSSCommands()
>>> commands.add('htmlAction', css('#someid'), html=htmldata('some value'))
>>> commands.add('cdataAction', css('#otherid'), arg=cdatadata('some arg'))
@@ -95,14 +93,13 @@
>>> commands.render()
'......'
-CDATA nodes are used for serializing XML or HTML. This makes the
+CDATA nodes are used to serialize XML or HTML. This makes the
response more readable when looking at it from traffic sniffers or
other debugging tools.
-We have another case where CDATA is used. That is when we serialize a
-normal value larger than 4KB. This is because Firefox chops text nodes
-at 4KB blocks (which makes the client side handling more
-difficult). Using CDATA avoids the chopping.
+We have another case where CDATA is used : when we serialize text
+ value larger than 4KB. This is a workaround a Firefox bug.
+Firefox chops text nodes at 4KB blocks : this makes the client side handling more difficult). Using CDATA avoids the chopping.
The example below demonstrates this behaviour.
@@ -127,7 +124,7 @@
>>> commands = KSSCommands()
-By default it does nothing.
+When empty, it is rendered a blank line.
>>> print commands
@@ -138,8 +135,8 @@
>>> print commands
replaceHTML(css('#someid'))
-If you add parameters they are also shown in the string
-representation. Parameters are sorted before display to make them
+Parameters are also rendered in the string representation.
+Parameters are sorted before display to make them
stable for testing.
>>> commands = KSSCommands()
@@ -158,8 +155,7 @@
Features for working with commands
==================================
-If we add a parameter with a `None` value it will not be put into the
-response.
+Parameter with a `None` value is not rendered into the response.
>>> commands.clear()
>>> commands.add('parameterCommand', css('#something'),
@@ -167,9 +163,8 @@
>>> print commands
parameterCommand(css('#something'), value='Testing')
-You can also use strings instead of a selector instance as a value for
-selector. In this case the string will automatically be converted to a
-selector on the client. By default this is the CSS selector.
+If the selector is a string instead of a selector class instance,
+the string is converted to a CSS selector on the client.
>>> commands.clear()
>>> commands.add('replaceHTML', '#someid', html='some value')
@@ -180,30 +175,29 @@
Command sets
============
-A command set wraps the commands system so that you get a highlevel way to
+Command sets wrap the commands system and provide a highlevel API to
communicate with the browser. Command sets are responsible for escaping and
-validating data and can provider a nicer api for calling.
+validating data.
-We will now take a look at the base class for all commandsets.
+Let us take a look at the base class for all commandsets.
>>> from kss.base.commands import KSSCommandSet
>>> commands = KSSCommands()
>>> commandset = KSSCommandSet(commands)
-All this does is wrap our commands in the command set. We can still access the
+It wraps commands in the command set. We can still access the
commands directly by using the `commands` attribute.
>>> commandset.commands
<...KSSCommands object at ...>
-The thing that makes this interesting is the actual command sets. Take a look
-at the core commands for a better understanding of the usage pattern.
+Take a look at the core command set for a better understanding of the usage pattern.
Using command sets
==================
-In the previous examples we saw how to load command sets directly. Normally we
+In the previous examples, we saw how to load command sets directly. Usually, we
do not need to do this. This is because the command renderer can also look
them up by name. This is done by using the KSS plugin registry.
@@ -213,19 +207,21 @@
>>> from kss.base.corecommands import KSSCoreCommands
>>> from kss.base.registry import command_set_registry
-Now we can register our command set. For more information about the registry look at the documentation of kss.pluginregistry.
+Now we can register our command set. (For more information about the registry
+look at the documentation of kss.pluginregistry.)
>>> command_set_registry.register('core', KSSCoreCommands)
-To access a command set just need to create our command renderer like we do
-normally.
+Command sets are accessed as attributes on the command renderer.
>>> commands = KSSCommands()
-
-We can now access the command set. This is done using attribute access.
-
>>> commands.core.replaceInnerHTML(css('div'), 'example')
>>> print commands
replaceInnerHTML(css('div'), html=htmldata('example'))
-
+
+In this case, we used `replaceInnerHTML` method that is defined in the core
+command set. This is equivalent but shorter than explicitely adding a command.
+
+Let us clean up.
+
>>> command_set_registry.unregister('core')
From gotcha at codespeak.net Sat Mar 1 12:02:02 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sat, 1 Mar 2008 12:02:02 +0100 (CET)
Subject: [KSS-checkins] r51981 - kukit/kss.base/trunk/src/kss/base
Message-ID: <20080301110202.9A282168034@codespeak.net>
Author: gotcha
Date: Sat Mar 1 12:02:00 2008
New Revision: 51981
Modified:
kukit/kss.base/trunk/src/kss/base/corecommands.py
kukit/kss.base/trunk/src/kss/base/corecommands.txt
Log:
Some hopefully better wording
Fix a typo in error message
Modified: kukit/kss.base/trunk/src/kss/base/corecommands.py
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/corecommands.py (original)
+++ kukit/kss.base/trunk/src/kss/base/corecommands.py Sat Mar 1 12:02:00 2008
@@ -8,7 +8,7 @@
def setStyle(self, selector, name, value):
if ' ' in name:
- raise ValueError('Style properites cannot contain spaces')
+ raise ValueError('Style properties cannot contain spaces')
self.commands.add('setStyle', selector, name=name, value=value)
def addClass(self, selector, value):
Modified: kukit/kss.base/trunk/src/kss/base/corecommands.txt
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/corecommands.txt (original)
+++ kukit/kss.base/trunk/src/kss/base/corecommands.txt Sat Mar 1 12:02:00 2008
@@ -2,10 +2,11 @@
Core commands
=============
-The core commands wrap all standard KSS actions that are always available.
+The core commands wrap all KSS commands provided by the core plugin.
+They are always available.
These do not contain any effects and focus mostly on DOM manipulation.
-First we will need to create our command set.
+First we instantiate the command set.
>>> from kss.base.corecommands import KSSCoreCommands
>>> from kss.base import KSSCommands
@@ -14,7 +15,7 @@
>>> commands = KSSCommands()
>>> core = KSSCoreCommands(commands)
-Now we will look at the individual methods provided by the core commands.
+Let us look at the individual methods provided by the core commands.
>>> core.replaceInnerHTML(css('div'), 'some <h1>html</h1>')
>>> commands.render()
@@ -48,7 +49,7 @@
>>> core.setStyle(css('div'), 'some name', 'some value')
Traceback (most recent call last):
...
- ValueError: Style properites cannot contain spaces
+ ValueError: Style properties cannot contain spaces
Add class
@@ -77,14 +78,6 @@
toggleClass(css('div'), value='somename')
-Focus
------
-
- >>> commands.clear()
- >>> core.focus(css('div'))
- >>> print commands
- focus(css('div'))
-
----------------
HTML replacement
----------------
@@ -98,7 +91,7 @@
replaceInnerHTML(css('div'), html=htmldata('some html'))
You can also avoid KSS event setup. Use this only if you really need
-the speedup because KSS will not be applied to these new nodes.
+the speedup, as the KSS resource will not be bound to those new nodes.
>>> core.replaceInnerHTML(css('div'), 'some html', withKssSetup=False)
>>> print commands
From gotcha at codespeak.net Sat Mar 1 12:10:08 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sat, 1 Mar 2008 12:10:08 +0100 (CET)
Subject: [KSS-checkins] r51982 - kukit/kss.base/trunk/src/kss/base
Message-ID: <20080301111008.6BAA1168480@codespeak.net>
Author: gotcha
Date: Sat Mar 1 12:10:07 2008
New Revision: 51982
Modified:
kukit/kss.base/trunk/src/kss/base/javascript.txt
Log:
Some hopefully better wording
Modified: kukit/kss.base/trunk/src/kss/base/javascript.txt
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/javascript.txt (original)
+++ kukit/kss.base/trunk/src/kss/base/javascript.txt Sat Mar 1 12:10:07 2008
@@ -5,42 +5,38 @@
The javascript module has some helpers which can be used to easily get
the Javascript files from the active plugins.
-Concatinated
+Concatenated
============
-With the concatenated function you can get the a single string
-containing all the Javascript from each active plugin.
+With the `concatenated` function, you get a string that
+contains the Javascript from all active plugins.
>>> from kss.base.javascript import concatenated
-When we run the code without activating any plugin we will get an
-empty string.
+Without any active plugin, we get an empty string.
>>> concatenated()
''
-Now if we run the code again after we activate a plugin we get
-something more interesting.
+If we activate a plugin, we get something more interesting.
>>> from kss.base import activate
>>> activate('kss-core')
>>> concatenated()
'/*\n* Copyright (c) 2005-2007\n* Authors: KSS Project Contributors...'
-An optimization you might want to enable is concatenate the extra
-dependencies along side with the plugin code. This will reduce the
-number of requests a browser has to make to a website therefore making
+As an optimization, you might want to concatenate the extra
+dependencies along side with the plugin code. This reduces the
+number of requests a browser has to make to the web server therefore making
it slightly faster (only for the first page load).
- >>> 'XPathParser' in concatenated(include_extras=True)
- True
-
-This example was not there in the previous concatination.
-
>>> 'XPathParser' in concatenated()
False
-Finally we will unregister the core plugin to clean up.
+ >>> 'XPathParser' in concatenated(include_extras=True)
+ True
+
+Finally, we deactivate the core plugin to clean up.
>>> from kss.base.plugin import deactivate
>>> deactivate('kss-core')
@@ -50,18 +46,18 @@
======
The kss.base package ships with a Javascript packer. This can reduce
-the filesize of the Javascript. It will also do the concatination of
-all registered plugin code.
+the filesize of the Javascript.
+It also concatenates all registered plugin code.
>>> from kss.base.javascript import packed
-Like with the concatination we will get an empty string if we just run
-it.
+Like with the concatenation, we get an empty string if we run
+it without any active plugin.
>>> packed()
''
-So now we activate a plugin.
+Now we activate a plugin.
>>> activate('kss-core')
@@ -71,7 +67,7 @@
>>> no_compression
'/*\n* Copyright (c) 2005-2007\n* Authors: KSS Project Contributors...'
-To enable compression we need to pass in a a compression level. There
+To enable compression, we need to pass the compression level. There
are a few available options of which only `safe` is currently usable.
>>> with_compression = packed(compression_level='safe')
@@ -82,7 +78,7 @@
>>> len(with_compression) < len(no_compression)
True
-We will again unregister the core plugin to clean up.
+We again deactivate the core plugin to clean up.
>>> from kss.base.plugin import deactivate
>>> deactivate('kss-core')
@@ -97,12 +93,12 @@
>>> from kss.base.javascript import extra_scripts
-By default we get an empty dictionary.
+When no plugins are active, we get an empty dictionary.
>>> extra_scripts()
{}
-If we activate a plugin we get something more interesting.
+If we activate a plugin, we get something more interesting.
>>> activate('kss-core')
>>> extra_scripts()
@@ -111,7 +107,7 @@
This dictionary contains the base names of all the registered
Javascripts with their file contents as the value.
-Now we can cleanup the registry again.
+Let us cleanup the registry again.
>>> from kss.base.plugin import deactivate
>>> deactivate('kss-core')
From gotcha at codespeak.net Sat Mar 1 12:32:11 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sat, 1 Mar 2008 12:32:11 +0100 (CET)
Subject: [KSS-checkins] r51984 - kukit/kss.base/trunk/src/kss/base
Message-ID: <20080301113211.22453168420@codespeak.net>
Author: gotcha
Date: Sat Mar 1 12:32:10 2008
New Revision: 51984
Modified:
kukit/kss.base/trunk/src/kss/base/utils.txt
Log:
Some hopefully better wording.
Some suggestions to improve the usage; test is broken.
Modified: kukit/kss.base/trunk/src/kss/base/utils.txt
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/utils.txt (original)
+++ kukit/kss.base/trunk/src/kss/base/utils.txt Sat Mar 1 12:32:10 2008
@@ -2,31 +2,32 @@
Utilities
=========
-KSS ships with various utilties. When you install `kss.base` these get
-installed as executables.
+KSS ships with various utilities. When you install `kss.base`, they get
+installed as executable scripts.
Create a standalone package
===========================
-Since the whole KSS framework is pluggable the amount of Javascript
-that ends up being used depends a lot on the plugins. To make it easy
-to create static files from a know plugin configuration we have the
-`ksspackage`. This creates a directory with all the Javascripts needed
+Since the whole KSS framework is pluggable, the Javascript that ends up
+being used depends a lot on the plugins.
+
+The `ksspackage` makes it easy to create static files from a known plugin configuration.
+It creates a directory with all the Javascripts needed
to run the set of plugins.
>>> from pkg_resources import load_entry_point
>>> ksspackage = load_entry_point(
... 'kss.base', 'console_scripts', 'ksspackage')
-We will first setup a temp directory to contain our stuff.
+Let us setup a temporary directory that will contain our stuff.
>>> import os
>>> from tempfile import mktemp
>>> temp = mktemp()
>>> static_dump = os.path.join(temp, 'static-dump')
-Executing the script without any arguments will raise an error.
+Executing the script without any arguments raises an error.
>>> import sys
>>> old_argv = sys.argv
@@ -36,24 +37,16 @@
Usage: ksspackage OUTPUTDIR [OPTIONS]
Try `ksspackage --help` for more information.
-It needs at least one argument, the path for the output.
-
- >>> sys.argv = ['ksspackage', static_dump]
- >>> ksspackage()
- Creating `kss.js` script: DONE
-
-If we look into the export we will see only the `kss.js` file.
-
- >>> os.listdir(static_dump)
- ['kss.js']
+It needs at least two arguments, the path for the output and a plugin.
-In this case it is empty since we did not give it any plugins to
-extract the Javascript from.
+To find out which plugin we can use, let us ask for the available plugins.
- >>> open(os.path.join(static_dump, 'kss.js')).read()
- ''
+// >>> sys.argv = ['ksspackage', '--list']
+// >>> ksspackage()
+// Available plugins:
+// kss-core
-Now if we give it a plugin it will put the files into the dir.
+Now that we provide a plugin, its files are put into the dir.
>>> sys.argv = ['ksspackage', static_dump, '--plugin=kss-core']
>>> ksspackage()
@@ -66,10 +59,10 @@
>>> sys.argv = old_argv
-Besides creating the scripts the utility can also list the available
-plugins.
+The code hereunder should be removed : strangely, it only works after the code
+above.
>>> sys.argv = ['ksspackage', '--list']
>>> ksspackage()
Available plugins:
- kss-core
\ No newline at end of file
+ kss-core
From jvloothuis at codespeak.net Sat Mar 1 13:49:03 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Sat, 1 Mar 2008 13:49:03 +0100 (CET)
Subject: [KSS-checkins] r51991 - kukit/kss.base/trunk/src/kss/base
Message-ID: <20080301124903.68DE81684C3@codespeak.net>
Author: jvloothuis
Date: Sat Mar 1 13:49:01 2008
New Revision: 51991
Modified:
kukit/kss.base/trunk/src/kss/base/plugin.txt
kukit/kss.base/trunk/src/kss/base/utils.py
kukit/kss.base/trunk/src/kss/base/utils.txt
Log:
Fixed the listing of plugins for the ksspackage utility
Made the plugin test clean up after itself
Modified: kukit/kss.base/trunk/src/kss/base/plugin.txt
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/plugin.txt (original)
+++ kukit/kss.base/trunk/src/kss/base/plugin.txt Sat Mar 1 13:49:01 2008
@@ -156,3 +156,12 @@
>>> ExamplePlugin.priority = -99999
>>> list(available_plugins())
[('testing', ), ('kss-core', )]
+
+
+Cleanup
+-------
+
+Finally we will cleanup the working set so that the next tests won't
+find our example plugin.
+
+ >>> pkg_resources.working_set.entry_keys['.'] = []
Modified: kukit/kss.base/trunk/src/kss/base/utils.py
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/utils.py (original)
+++ kukit/kss.base/trunk/src/kss/base/utils.py Sat Mar 1 13:49:01 2008
@@ -3,7 +3,7 @@
import optparse
from kss.base import javascript
-from kss.base.plugin import activate, active_plugins
+from kss.base.plugin import activate, available_plugins
def ksspackage():
parser = optparse.OptionParser()
@@ -50,7 +50,8 @@
elif options.list_plugins:
print "Available plugins:"
- for id, factory in active_plugins():
+
+ for id, factory in available_plugins():
print " %s" % id
else:
Modified: kukit/kss.base/trunk/src/kss/base/utils.txt
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/utils.txt (original)
+++ kukit/kss.base/trunk/src/kss/base/utils.txt Sat Mar 1 13:49:01 2008
@@ -41,10 +41,10 @@
To find out which plugin we can use, let us ask for the available plugins.
-// >>> sys.argv = ['ksspackage', '--list']
-// >>> ksspackage()
-// Available plugins:
-// kss-core
+ >>> sys.argv = ['ksspackage', '--list']
+ >>> ksspackage()
+ Available plugins:
+ kss-core
Now that we provide a plugin, its files are put into the dir.
@@ -59,10 +59,3 @@
>>> sys.argv = old_argv
-The code hereunder should be removed : strangely, it only works after the code
-above.
-
- >>> sys.argv = ['ksspackage', '--list']
- >>> ksspackage()
- Available plugins:
- kss-core
From kukit-checkins at codespeak.net Sun Mar 2 15:05:55 2008
From: kukit-checkins at codespeak.net (kukit-checkins at codespeak.net)
Date: Sun, 2 Mar 2008 15:05:55 +0100 (CET)
Subject: [KSS-checkins] March 85% Off
Message-ID: 20080302040518.8593.qmail@hostk215.infobiuro.pl
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kukit-checkins/attachments/20080302/19e93d33/attachment-0001.htm
From reebalazs at codespeak.net Sun Mar 2 16:50:45 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 2 Mar 2008 16:50:45 +0100 (CET)
Subject: [KSS-checkins] r52043 - kukit/kss.concatresource/branch/1.4
Message-ID: <20080302155045.C1E5916856F@codespeak.net>
Author: reebalazs
Date: Sun Mar 2 16:50:44 2008
New Revision: 52043
Added:
kukit/kss.concatresource/branch/1.4/
- copied from r52042, kukit/kss.concatresource/branch/1.4pre/
Log:
Relocate branch to its final place 1.4, 1.4pre will be deleted asap.
From reebalazs at codespeak.net Sun Mar 2 16:51:04 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 2 Mar 2008 16:51:04 +0100 (CET)
Subject: [KSS-checkins] r52044 - kukit/kukit.js/branch/1.4
Message-ID: <20080302155104.690CD16856C@codespeak.net>
Author: reebalazs
Date: Sun Mar 2 16:51:03 2008
New Revision: 52044
Added:
kukit/kukit.js/branch/1.4/
- copied from r52043, kukit/kukit.js/branch/1.4pre/
Log:
Relocate branch to its final place 1.4, 1.4pre will be deleted asap.
From reebalazs at codespeak.net Sun Mar 2 16:51:30 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 2 Mar 2008 16:51:30 +0100 (CET)
Subject: [KSS-checkins] r52045 - kukit/kss.core/branch/1.4
Message-ID: <20080302155130.5B65916856C@codespeak.net>
Author: reebalazs
Date: Sun Mar 2 16:51:29 2008
New Revision: 52045
Added:
kukit/kss.core/branch/1.4/
- copied from r52044, kukit/kss.core/branch/1.4pre/
Log:
Relocate branch to its final place 1.4, 1.4pre will be deleted asap.
From reebalazs at codespeak.net Sun Mar 2 16:54:39 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 2 Mar 2008 16:54:39 +0100 (CET)
Subject: [KSS-checkins] r52046 - in kukit/kss.core/branch/1.4/kss/core: .
pluginregistry
Message-ID: <20080302155439.CC9AF16856C@codespeak.net>
Author: reebalazs
Date: Sun Mar 2 16:54:39 2008
New Revision: 52046
Modified:
kukit/kss.core/branch/1.4/kss/core/ (props changed)
kukit/kss.core/branch/1.4/kss/core/EXTERNALS.TXT
kukit/kss.core/branch/1.4/kss/core/pluginregistry/ (props changed)
kukit/kss.core/branch/1.4/kss/core/pluginregistry/EXTERNALS.TXT
Log:
Set externals
Modified: kukit/kss.core/branch/1.4/kss/core/EXTERNALS.TXT
==============================================================================
--- kukit/kss.core/branch/1.4/kss/core/EXTERNALS.TXT (original)
+++ kukit/kss.core/branch/1.4/kss/core/EXTERNALS.TXT Sun Mar 2 16:54:39 2008
@@ -5,4 +5,4 @@
# You can update your working dir by:
# svn propset svn:externals -F EXTERNALS.TXT .
#
-kukit http://codespeak.net/svn/kukit/kukit.js/branch/1.4pre/
+kukit http://codespeak.net/svn/kukit/kukit.js/branch/1.4/
Modified: kukit/kss.core/branch/1.4/kss/core/pluginregistry/EXTERNALS.TXT
==============================================================================
--- kukit/kss.core/branch/1.4/kss/core/pluginregistry/EXTERNALS.TXT (original)
+++ kukit/kss.core/branch/1.4/kss/core/pluginregistry/EXTERNALS.TXT Sun Mar 2 16:54:39 2008
@@ -7,4 +7,4 @@
#
# concatresource is now included like as batteries
-_concatresource https://codespeak.net/svn/kukit/kss.concatresource/branch/1.4pre/kss/concatresource
+_concatresource https://codespeak.net/svn/kukit/kss.concatresource/branch/1.4/kss/concatresource
From reebalazs at codespeak.net Sun Mar 2 16:55:47 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 2 Mar 2008 16:55:47 +0100 (CET)
Subject: [KSS-checkins] r52047 - kukit/kss.demo/branch/1.4
Message-ID: <20080302155547.87009168471@codespeak.net>
Author: reebalazs
Date: Sun Mar 2 16:55:47 2008
New Revision: 52047
Added:
kukit/kss.demo/branch/1.4/
- copied from r52046, kukit/kss.demo/branch/1.4pre/
Log:
Relocate branch to its final place 1.4, 1.4pre will be deleted asap.
From reebalazs at codespeak.net Sun Mar 2 17:02:58 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 2 Mar 2008 17:02:58 +0100 (CET)
Subject: [KSS-checkins] r52049 - in kukit/kss.demo/branch/1.4/kss/demo: .
configfeature configfeature/tests
Message-ID: <20080302160258.27BDB168564@codespeak.net>
Author: reebalazs
Date: Sun Mar 2 17:02:57 2008
New Revision: 52049
Added:
kukit/kss.demo/branch/1.4/kss/demo/configfeature/
kukit/kss.demo/branch/1.4/kss/demo/configfeature/README
kukit/kss.demo/branch/1.4/kss/demo/configfeature/__init__.py
kukit/kss.demo/branch/1.4/kss/demo/configfeature/configure.zcml
kukit/kss.demo/branch/1.4/kss/demo/configfeature/directives.py
kukit/kss.demo/branch/1.4/kss/demo/configfeature/fiveconfig.py
kukit/kss.demo/branch/1.4/kss/demo/configfeature/fiveconfig.zcml
kukit/kss.demo/branch/1.4/kss/demo/configfeature/meta.py
kukit/kss.demo/branch/1.4/kss/demo/configfeature/meta.zcml
kukit/kss.demo/branch/1.4/kss/demo/configfeature/metacore.zcml
kukit/kss.demo/branch/1.4/kss/demo/configfeature/tests/
kukit/kss.demo/branch/1.4/kss/demo/configfeature/tests/__init__.py
kukit/kss.demo/branch/1.4/kss/demo/configfeature/tests/__parent__.py
kukit/kss.demo/branch/1.4/kss/demo/configfeature/tests/configtest.py
kukit/kss.demo/branch/1.4/kss/demo/configfeature/tests/test_directive.py
kukit/kss.demo/branch/1.4/kss/demo/configfeature/tests/test_fiveconfig.py
Removed:
kukit/kss.demo/branch/1.4/kss/demo/EXTERNALS.TXT
Modified:
kukit/kss.demo/branch/1.4/kss/demo/ (props changed)
Log:
Include configfeature library statically, instead of an external
This is the last version when we use configfeature anyway,
so this is a temporary solution. However now since this
package will make part of the official distribution.
Deleted: /kukit/kss.demo/branch/1.4/kss/demo/EXTERNALS.TXT
==============================================================================
--- /kukit/kss.demo/branch/1.4/kss/demo/EXTERNALS.TXT Sun Mar 2 17:02:57 2008
+++ (empty file)
@@ -1,8 +0,0 @@
-#
-# results of svn propget svn:externals
-# http://codespeak.net/svn/kukit/kss.demo/trunk
-#
-# You can update your working dir by:
-# svn propset svn:externals -F EXTERNALS.TXT .
-#
-configfeature http://codespeak.net/svn/z3/jsonserver/branch/merge/configfeature
Added: kukit/kss.demo/branch/1.4/kss/demo/configfeature/README
==============================================================================
--- (empty file)
+++ kukit/kss.demo/branch/1.4/kss/demo/configfeature/README Sun Mar 2 17:02:57 2008
@@ -0,0 +1,35 @@
+
+Objectives
+----------
+
+The goal of the program is to enable defining a feature based on
+configuration values set from python code. The directive imports
+a python object and uses an attribute of it as a boolean value
+to declare a feature or not.
+
+
+
+
+
+Instance can be used as a module itself (in which case a module level
+attribute can be looked up) or a class instance (in this case an attribute
+of the instance will be used). If there is no such attribute on the instance,
+a dictionary key access will be attempted, allowing dictionaries to be used.
+
+The given attribute is used as a boolean value. It must exist, or else
+an error is raised.
+
+The featured fiveconfig.zcml serves both as an example and also can be
+used to identify which version of five is in effect. The configuration
+can be used both by zope configuration (by using the features), or
+from python code, by directly importing the module that forms the base
+for the feature setup.
+
+The negate attribute is only necessary to overcome the lack of negation
+feature in zcml:condition.
+
Added: kukit/kss.demo/branch/1.4/kss/demo/configfeature/__init__.py
==============================================================================
--- (empty file)
+++ kukit/kss.demo/branch/1.4/kss/demo/configfeature/__init__.py Sun Mar 2 17:02:57 2008
@@ -0,0 +1,3 @@
+'''\
+Product init
+'''
Added: kukit/kss.demo/branch/1.4/kss/demo/configfeature/configure.zcml
==============================================================================
--- (empty file)
+++ kukit/kss.demo/branch/1.4/kss/demo/configfeature/configure.zcml Sun Mar 2 17:02:57 2008
@@ -0,0 +1,4 @@
+
+
+
Added: kukit/kss.demo/branch/1.4/kss/demo/configfeature/directives.py
==============================================================================
--- (empty file)
+++ kukit/kss.demo/branch/1.4/kss/demo/configfeature/directives.py Sun Mar 2 17:02:57 2008
@@ -0,0 +1,34 @@
+from zope.interface import Interface
+from zope.configuration.fields import GlobalObject, Bool
+from zope.schema import ASCII
+from zope.app.publisher.browser.metadirectives import IBasicResourceInformation
+
+class IConfigFeature(IBasicResourceInformation):
+ """
+ Defines a feature based on a python configuration
+ """
+
+ feature = ASCII(
+ title = u"Feature",
+ description = u"Name of the feature to define",
+ required = True,
+ )
+
+ instance = GlobalObject(
+ title = u'Object instance',
+ description = u'Dotted name of the object that holds the attribute.',
+ required = True,
+ )
+
+ attribute = ASCII(
+ title = u"Attribute",
+ description = u"Attribute name within the object.",
+ required = True,
+ )
+
+ negate = Bool(
+ title = u'Negate',
+ description = u'If to negate the boolean value, default False',
+ default = False,
+ required = False,
+ )
Added: kukit/kss.demo/branch/1.4/kss/demo/configfeature/fiveconfig.py
==============================================================================
--- (empty file)
+++ kukit/kss.demo/branch/1.4/kss/demo/configfeature/fiveconfig.py Sun Mar 2 17:02:57 2008
@@ -0,0 +1,75 @@
+'''\
+Compatibility configuration switches
+
+This is a transitional solution to attack the problem
+of quickly changing Zope3 and Five APIs.
+
+Import checks are done centrally from here.
+The point is that compatibility imports should fail here,
+if anything goes wrong. Components should only check
+the switches set from here.
+
+Corresponding configuration features are also set up
+from the compat.zcml file. The idea is that all switches
+are accessible both from python and zcml.
+
+
+Supported versions:
+-------------------
+
+Zope 2.9, 2.10
+Zope 3.2, 3.3
+
+Compatibility matrix
+--------------------
+
+The following table shows which Five version can and should be used
+with which Zope 2 and Zope 3 versions.
+
+. Zope 2.8 Zope 2.9 Zope 2.10
+. Zope X3 3.0 Zope 3.2 Zope 3.3
+Five 1.0 included
+Five 1.2 X
+Five 1.3 included
+Five 1.4 X
+Five trunk included
+
+'''
+
+__all__ = ('__compat__', )
+
+class DictLike(object):
+ pass
+
+__compat__ = DictLike()
+
+try:
+ import zope.component.interface
+ # XXX this now fails on Zope 3.4, so
+ # commented out even if it gives bad result now
+ ##import zope.component.location
+ __compat__.zope_pre_3_3 = False
+except ImportError:
+ # The only supported pre_3_3 version is 3.2
+ import zope.app.component.interface
+ ##import zope.app.location
+ __compat__.zope_pre_3_3 = True
+
+try:
+ import Products.Five
+except ImportError:
+ __compat__.five = False
+else:
+ __compat__.five = True
+ try:
+ # Zope 2.8 / Five 1.0.2
+ from Products.Five.resource import Resource
+ __compat__.five_pre_1_3 = True
+ except ImportError:
+ # Zope 2.9 / Five 1.3
+ from Products.Five.browser.resource import Resource
+ __compat__.five_pre_1_3 = False
+
+# Unsupported versions.
+if __compat__.five and __compat__.five_pre_1_3:
+ raise Exception, 'Zope 2.8 or prior versions (Five 1.2 or prior versions) are unsupported, please upgrade!'
Added: kukit/kss.demo/branch/1.4/kss/demo/configfeature/fiveconfig.zcml
==============================================================================
--- (empty file)
+++ kukit/kss.demo/branch/1.4/kss/demo/configfeature/fiveconfig.zcml Sun Mar 2 17:02:57 2008
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Added: kukit/kss.demo/branch/1.4/kss/demo/configfeature/meta.py
==============================================================================
--- (empty file)
+++ kukit/kss.demo/branch/1.4/kss/demo/configfeature/meta.py Sun Mar 2 17:02:57 2008
@@ -0,0 +1,99 @@
+
+from zope.configuration.exceptions import ConfigurationError
+
+def configfeature(_context, feature, instance, attribute, negate=False):
+ """Imports a python object and uses an attribute of it as a boolean value
+ to declare a feature or not.
+
+ Usage
+ -----
+
+ We can have an object with attributes,
+
+ >>> class dictlike(object):
+ ... pass
+ >>> conf1 = dictlike()
+ >>> conf1.this = True
+ >>> conf1.that = False
+
+ and its attributes can defined a feature if they evaluate to True.
+ The feature will not be defined if the value evaluates to False.
+
+ >>> from zope.configuration.config import ConfigurationContext
+ >>> c = ConfigurationContext()
+ >>> configfeature(c, 'f1', conf1, 'this')
+ >>> c.hasFeature('f1')
+ True
+ >>> configfeature(c, 'f2', conf1, 'that')
+ >>> c.hasFeature('f2')
+ False
+
+ The boolean value can be negated, this allows it
+ to overcome the shortage of negating possibilit of zcml:condition.
+
+ >>> configfeature(c, 'f3', conf1, 'this', True)
+ >>> c.hasFeature('f3')
+ False
+ >>> configfeature(c, 'f4', conf1, 'that', True)
+ >>> c.hasFeature('f4')
+ True
+
+ Instead of an object with attributes, a dictionary can also be used:
+
+ >>> dconf = {}
+ >>> dconf['this'] = True
+ >>> dconf['that'] = False
+
+ >>> configfeature(c, 'f5', dconf, 'this')
+ >>> c.hasFeature('f5')
+ True
+ >>> configfeature(c, 'f6', dconf, 'that')
+ >>> c.hasFeature('f6')
+ False
+
+
+ Error handling
+ --------------
+
+ If there is an unexistent attribute, an error is reported.
+
+ >>> configfeature(c, 'f7', conf1, 'nosuch') #doctest: +ELLIPSIS
+ Traceback (most recent call last):
+ ...
+ ConfigurationError: Object ... does not have attribute or key "nosuch"
+
+ >>> configfeature(c, 'f8', dconf, 'nosuch') #doctest: +ELLIPSIS
+ Traceback (most recent call last):
+ ...
+ ConfigurationError: Object ... does not have attribute or key "nosuch"
+
+
+ Finally, like with the "provides" directive normally:
+ Spaces are not allowed in feature names (this is reserved for providing
+ many features with a single directive in the futute).
+
+ >>> configfeature(c, 'two words', conf1, 'this')
+ Traceback (most recent call last):
+ ...
+ ValueError: Only one feature name allowed
+
+ """
+
+ try:
+ value = getattr(instance, attribute)
+ except AttributeError:
+ # also try as dictionary value
+ try:
+ value = instance[attribute]
+ except (TypeError, ValueError, KeyError):
+ raise ConfigurationError, 'Object %s does not have attribute or key "%s"' % (instance, attribute)
+
+ value = bool(value)
+ if negate:
+ value = not value
+
+ if len(feature.split()) > 1:
+ raise ValueError("Only one feature name allowed")
+
+ if value:
+ _context.provideFeature(feature)
Added: kukit/kss.demo/branch/1.4/kss/demo/configfeature/meta.zcml
==============================================================================
--- (empty file)
+++ kukit/kss.demo/branch/1.4/kss/demo/configfeature/meta.zcml Sun Mar 2 17:02:57 2008
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
Added: kukit/kss.demo/branch/1.4/kss/demo/configfeature/metacore.zcml
==============================================================================
--- (empty file)
+++ kukit/kss.demo/branch/1.4/kss/demo/configfeature/metacore.zcml Sun Mar 2 17:02:57 2008
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
Added: kukit/kss.demo/branch/1.4/kss/demo/configfeature/tests/__init__.py
==============================================================================
--- (empty file)
+++ kukit/kss.demo/branch/1.4/kss/demo/configfeature/tests/__init__.py Sun Mar 2 17:02:57 2008
@@ -0,0 +1,4 @@
+'''\
+Module init
+'''
+
Added: kukit/kss.demo/branch/1.4/kss/demo/configfeature/tests/__parent__.py
==============================================================================
--- (empty file)
+++ kukit/kss.demo/branch/1.4/kss/demo/configfeature/tests/__parent__.py Sun Mar 2 17:02:57 2008
@@ -0,0 +1,9 @@
+import sys
+
+def __parent__(modulename, level=1):
+ 'Figure out parent module'
+ for i in range(level):
+ if not isinstance(modulename, basestring):
+ modulename = modulename.__name__
+ modulename = sys.modules['.'.join(modulename.split('.')[:-1])]
+ return modulename
Added: kukit/kss.demo/branch/1.4/kss/demo/configfeature/tests/configtest.py
==============================================================================
--- (empty file)
+++ kukit/kss.demo/branch/1.4/kss/demo/configfeature/tests/configtest.py Sun Mar 2 17:02:57 2008
@@ -0,0 +1,18 @@
+
+# module level
+conf1 = True
+conf2 = False
+
+class dictlike(object):
+ pass
+
+# an object
+cobj = dictlike()
+cobj.conf3 = True
+cobj.conf4 = False
+
+# a dict
+dobj = {}
+dobj['conf5'] = True
+dobj['conf6'] = False
+
Added: kukit/kss.demo/branch/1.4/kss/demo/configfeature/tests/test_directive.py
==============================================================================
--- (empty file)
+++ kukit/kss.demo/branch/1.4/kss/demo/configfeature/tests/test_directive.py Sun Mar 2 17:02:57 2008
@@ -0,0 +1,228 @@
+
+import sys
+import unittest
+from zope.testing.doctestunit import DocTestSuite
+from __parent__ import __parent__
+configfeature = __parent__(__name__, 2)
+
+def test_module_level():
+ """
+ Module level access.
+
+ >>> import zope.configuration.tests
+ >>> import zope.configuration.xmlconfig
+ >>> context = zope.configuration.xmlconfig.file('metacore.zcml', configfeature)
+
+ >>> import tempfile
+ >>> fn = tempfile.mktemp('.zcml')
+ >>> zcml = open(fn, 'w')
+ >>> zcml.write('''
+ ...
+ ...
+ ...
+ ...
+ ...
+ ... ''')
+ >>> zcml.close()
+
+ >>> context = zope.configuration.xmlconfig.file(fn, configfeature.tests, context)
+
+ >>> context.hasFeature('conf1')
+ True
+ >>> context.hasFeature('conf2')
+ False
+ >>> context.hasFeature('conf2n')
+ True
+
+ """
+
+
+def test_objectlevel():
+ """
+ Object level access.
+
+ >>> import zope.configuration.tests
+ >>> import zope.configuration.xmlconfig
+ >>> context = zope.configuration.xmlconfig.file('metacore.zcml', configfeature)
+
+ >>> import tempfile
+ >>> fn = tempfile.mktemp('.zcml')
+ >>> zcml = open(fn, 'w')
+ >>> zcml.write('''
+ ...
+ ...
+ ...
+ ...
+ ...
+ ... ''')
+ >>> zcml.close()
+
+ >>> context = zope.configuration.xmlconfig.file(fn, configfeature.tests, context)
+
+ >>> context.hasFeature('conf3')
+ True
+ >>> context.hasFeature('conf4')
+ False
+ >>> context.hasFeature('conf4n')
+ True
+
+ """
+
+
+def test_dict_level():
+ """
+ Dictionary level access.
+
+ >>> import zope.configuration.tests
+ >>> import zope.configuration.xmlconfig
+ >>> context = zope.configuration.xmlconfig.file('metacore.zcml', configfeature)
+
+ >>> import tempfile
+ >>> fn = tempfile.mktemp('.zcml')
+ >>> zcml = open(fn, 'w')
+ >>> zcml.write('''
+ ...
+ ...
+ ...
+ ...
+ ...
+ ... ''')
+ >>> zcml.close()
+
+ >>> context = zope.configuration.xmlconfig.file(fn, configfeature.tests, context)
+
+ >>> context.hasFeature('conf5')
+ True
+ >>> context.hasFeature('conf6')
+ False
+ >>> context.hasFeature('conf6n')
+ True
+
+ """
+
+
+def test_errors():
+ """
+ Testing errors.
+
+ >>> import zope.configuration.tests
+ >>> import zope.configuration.xmlconfig
+ >>> context = zope.configuration.xmlconfig.file('metacore.zcml', configfeature)
+
+ No such instance: raises an error.
+
+ >>> import tempfile
+ >>> fn = tempfile.mktemp('.zcml')
+ >>> zcml = open(fn, 'w')
+ >>> zcml.write('''
+ ...
+ ...
+ ...
+ ... ''')
+ >>> zcml.close()
+
+ >>> context = zope.configuration.xmlconfig.file(fn, configfeature.tests, context) #doctest: +ELLIPSIS
+ Traceback (most recent call last):
+ ...
+ ZopeXMLConfigurationError: ...
+ ConfigurationError: ...
+
+ No such attribute: an error too
+
+ >>> fn = tempfile.mktemp('.zcml')
+ >>> zcml = open(fn, 'w')
+ >>> zcml.write('''
+ ...
+ ...
+ ...
+ ... ''')
+ >>> zcml.close()
+
+ >>> context = zope.configuration.xmlconfig.file(fn, configfeature.tests, context) #doctest: +ELLIPSIS
+ Traceback (most recent call last):
+ ...
+ ZopeXMLConfigurationError: ...
+ ConfigurationError: Object ... does not have attribute or key "nosuch"
+
+ No such key: an error too
+
+ >>> fn = tempfile.mktemp('.zcml')
+ >>> zcml = open(fn, 'w')
+ >>> zcml.write('''
+ ...
+ ...
+ ...
+ ... ''')
+ >>> zcml.close()
+
+ >>> context = zope.configuration.xmlconfig.file(fn, configfeature.tests, context) #doctest: +ELLIPSIS
+ Traceback (most recent call last):
+ ...
+ ZopeXMLConfigurationError: ...
+ ConfigurationError: Object ... does not have attribute or key "nosuch"
+
+ """
+
+
+def test_suite():
+ return unittest.TestSuite((
+ DocTestSuite(configfeature.__name__ + '.meta'),
+ DocTestSuite(),
+ ))
Added: kukit/kss.demo/branch/1.4/kss/demo/configfeature/tests/test_fiveconfig.py
==============================================================================
--- (empty file)
+++ kukit/kss.demo/branch/1.4/kss/demo/configfeature/tests/test_fiveconfig.py Sun Mar 2 17:02:57 2008
@@ -0,0 +1,27 @@
+
+import sys
+import unittest
+from zope.testing.doctestunit import DocTestSuite
+from __parent__ import __parent__
+configfeature = __parent__(__name__, 2)
+
+def test_fiveconfig():
+ """
+ The fiveconfig.zcml file declares various Five compatibility features.
+ We only test that the configuration file can be run.
+
+ >>> import zope.configuration.tests
+ >>> import zope.configuration.xmlconfig
+ >>> context = zope.configuration.xmlconfig.file('metacore.zcml', configfeature)
+ >>> context = zope.configuration.xmlconfig.file('fiveconfig.zcml', configfeature, context)
+
+ >>> context.hasFeature('compat_five') or context.hasFeature('compat_not_five')
+ True
+
+ """
+
+
+def test_suite():
+ return unittest.TestSuite((
+ DocTestSuite(),
+ ))
From reebalazs at codespeak.net Sun Mar 2 18:09:45 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 2 Mar 2008 18:09:45 +0100 (CET)
Subject: [KSS-checkins] r52054 - in kukit/kukit.js/trunk: . doc
Message-ID: <20080302170945.E7ACE168574@codespeak.net>
Author: reebalazs
Date: Sun Mar 2 18:09:43 2008
New Revision: 52054
Modified:
kukit/kukit.js/trunk/doc/HISTORY.txt
kukit/kukit.js/trunk/version.txt
Log:
Bump version to 1.5
Modified: kukit/kukit.js/trunk/doc/HISTORY.txt
==============================================================================
--- kukit/kukit.js/trunk/doc/HISTORY.txt (original)
+++ kukit/kukit.js/trunk/doc/HISTORY.txt Sun Mar 2 18:09:43 2008
@@ -2,10 +2,12 @@
(name of developer listed in brackets)
-kukit.js - 1.4dev Unreleased
+kukit.js - 1.5dev Unreleased
- ...
+kukit.js - 1.4dev Unreleased
+
- refactor the value provider registry to use
a single registry in place of 3.
This will enable to define value
Modified: kukit/kukit.js/trunk/version.txt
==============================================================================
--- kukit/kukit.js/trunk/version.txt (original)
+++ kukit/kukit.js/trunk/version.txt Sun Mar 2 18:09:43 2008
@@ -1 +1 @@
-1.4dev unreleased
+1.5dev unreleased
From reebalazs at codespeak.net Sun Mar 2 18:09:51 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 2 Mar 2008 18:09:51 +0100 (CET)
Subject: [KSS-checkins] r52055 - in kukit/kss.core/trunk: docs kss/core
Message-ID: <20080302170951.CC82D168575@codespeak.net>
Author: reebalazs
Date: Sun Mar 2 18:09:51 2008
New Revision: 52055
Modified:
kukit/kss.core/trunk/docs/HISTORY.txt
kukit/kss.core/trunk/kss/core/version.txt
Log:
Bump version to 1.5
Modified: kukit/kss.core/trunk/docs/HISTORY.txt
==============================================================================
--- kukit/kss.core/trunk/docs/HISTORY.txt (original)
+++ kukit/kss.core/trunk/docs/HISTORY.txt Sun Mar 2 18:09:51 2008
@@ -2,10 +2,12 @@
(name of developer listed in brackets)
-kss.core - 1.4dev Unreleased
+kss.core - 1.5dev Unreleased
- ...
+kss.core - 1.4dev Unreleased
+
- refactor the value provider registry to use
a single registry in place of 3.
This will enable to define value
Modified: kukit/kss.core/trunk/kss/core/version.txt
==============================================================================
--- kukit/kss.core/trunk/kss/core/version.txt (original)
+++ kukit/kss.core/trunk/kss/core/version.txt Sun Mar 2 18:09:51 2008
@@ -1 +1 @@
-1.4dev unreleased
+1.5dev unreleased
From reebalazs at codespeak.net Sun Mar 2 18:17:34 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 2 Mar 2008 18:17:34 +0100 (CET)
Subject: [KSS-checkins] r52056 - in kukit/kss.demo/trunk: . docs kss/demo
Message-ID: <20080302171734.0F74B168574@codespeak.net>
Author: reebalazs
Date: Sun Mar 2 18:17:33 2008
New Revision: 52056
Modified:
kukit/kss.demo/trunk/docs/HISTORY.txt
kukit/kss.demo/trunk/kss/demo/version.txt
kukit/kss.demo/trunk/setup.py
Log:
Bump version to 1.5
Modified: kukit/kss.demo/trunk/docs/HISTORY.txt
==============================================================================
--- kukit/kss.demo/trunk/docs/HISTORY.txt (original)
+++ kukit/kss.demo/trunk/docs/HISTORY.txt Sun Mar 2 18:17:33 2008
@@ -2,10 +2,12 @@
(name of developer listed in brackets)
-kss.demo - 1.4dev Unreleased
+kss.demo - 1.5dev Unreleased
- ...
+kss.demo - 1.4dev Unreleased
+
- Use develui.css (style is inline with kssproject.org).
[gotcha]
Modified: kukit/kss.demo/trunk/kss/demo/version.txt
==============================================================================
--- kukit/kss.demo/trunk/kss/demo/version.txt (original)
+++ kukit/kss.demo/trunk/kss/demo/version.txt Sun Mar 2 18:17:33 2008
@@ -1 +1 @@
-1.4dev Unreleased
+1.5dev Unreleased
Modified: kukit/kss.demo/trunk/setup.py
==============================================================================
--- kukit/kss.demo/trunk/setup.py (original)
+++ kukit/kss.demo/trunk/setup.py Sun Mar 2 18:17:33 2008
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import sys, os
-version = '1.4'
+version = '1.5'
setup(name='kss.demo',
version=version,
From reebalazs at codespeak.net Sun Mar 2 18:17:55 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 2 Mar 2008 18:17:55 +0100 (CET)
Subject: [KSS-checkins] r52057 - kukit/kss.core/trunk
Message-ID: <20080302171755.67FAE168575@codespeak.net>
Author: reebalazs
Date: Sun Mar 2 18:17:54 2008
New Revision: 52057
Modified:
kukit/kss.core/trunk/setup.py
Log:
Bump version to 1.5
Modified: kukit/kss.core/trunk/setup.py
==============================================================================
--- kukit/kss.core/trunk/setup.py (original)
+++ kukit/kss.core/trunk/setup.py Sun Mar 2 18:17:54 2008
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import sys, os
-version = '1.4'
+version = '1.5'
setup(name='kss.core',
version=version,
From reebalazs at codespeak.net Sun Mar 2 18:19:47 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 2 Mar 2008 18:19:47 +0100 (CET)
Subject: [KSS-checkins] r52058 - kukit/kss.demo/branch/1.4
Message-ID: <20080302171947.37F7016855F@codespeak.net>
Author: reebalazs
Date: Sun Mar 2 18:19:46 2008
New Revision: 52058
Modified:
kukit/kss.demo/branch/1.4/setup.py
Log:
Set egg dependency
Modified: kukit/kss.demo/branch/1.4/setup.py
==============================================================================
--- kukit/kss.demo/branch/1.4/setup.py (original)
+++ kukit/kss.demo/branch/1.4/setup.py Sun Mar 2 18:19:46 2008
@@ -33,6 +33,6 @@
# -*- Entry points: -*-
""",
dependency_links=[
- 'https://codespeak.net/svn/kukit/kss.core/trunk#egg=kss.core-dev',
+ 'https://codespeak.net/svn/kukit/kss.core/branch/1.4#egg=kss.core-dev',
],
)
From kukit-checkins at codespeak.net Tue Mar 4 15:07:41 2008
From: kukit-checkins at codespeak.net (kukit-checkins at codespeak.net)
Date: Tue, 4 Mar 2008 15:07:41 +0100 (CET)
Subject: [KSS-checkins] March 80% Off
Message-ID: <20080304180702.10328.qmail@bbcache-92.singnet.com.sg>
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kukit-checkins/attachments/20080304/7f36c0be/attachment.htm
From jvloothuis at codespeak.net Tue Mar 4 15:23:01 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Tue, 4 Mar 2008 15:23:01 +0100 (CET)
Subject: [KSS-checkins] r52144 - kukit/kss.base/trunk
Message-ID: <20080304142301.76C1C169F4F@codespeak.net>
Author: jvloothuis
Date: Tue Mar 4 15:23:01 2008
New Revision: 52144
Modified:
kukit/kss.base/trunk/setup.py
Log:
Increased the version to match the new target release so kss.django etc. can depend on it
Modified: kukit/kss.base/trunk/setup.py
==============================================================================
--- kukit/kss.base/trunk/setup.py (original)
+++ kukit/kss.base/trunk/setup.py Tue Mar 4 15:23:01 2008
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages
-version = '0.3'
+version = '0.4'
long_description = """
KSS enables you write rich Ajax applications without having to code
From jvloothuis at codespeak.net Tue Mar 4 15:40:48 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Tue, 4 Mar 2008 15:40:48 +0100 (CET)
Subject: [KSS-checkins] r52146 - in kukit/kss.plugin.scriptaculous/trunk: .
kss/plugin/scriptaculous kss/plugin/scriptaculous/javascript
Message-ID: <20080304144048.420A2169F63@codespeak.net>
Author: jvloothuis
Date: Tue Mar 4 15:40:46 2008
New Revision: 52146
Modified:
kukit/kss.plugin.scriptaculous/trunk/kss/plugin/scriptaculous/config.py
kukit/kss.plugin.scriptaculous/trunk/kss/plugin/scriptaculous/javascript/plugin.js
kukit/kss.plugin.scriptaculous/trunk/setup.py
Log:
Made the plugin work with the recent version of kss.base
Modified: kukit/kss.plugin.scriptaculous/trunk/kss/plugin/scriptaculous/config.py
==============================================================================
--- kukit/kss.plugin.scriptaculous/trunk/kss/plugin/scriptaculous/config.py (original)
+++ kukit/kss.plugin.scriptaculous/trunk/kss/plugin/scriptaculous/config.py Tue Mar 4 15:40:46 2008
@@ -21,5 +21,4 @@
'scriptaculous': KSSScriptaculousCommands,
}
- selectors = []
Modified: kukit/kss.plugin.scriptaculous/trunk/kss/plugin/scriptaculous/javascript/plugin.js
==============================================================================
--- kukit/kss.plugin.scriptaculous/trunk/kss/plugin/scriptaculous/javascript/plugin.js (original)
+++ kukit/kss.plugin.scriptaculous/trunk/kss/plugin/scriptaculous/javascript/plugin.js Tue Mar 4 15:40:46 2008
@@ -9,7 +9,7 @@
}
if (kukit.HASEFFECTS) {
- kukit.ar.actionRegistry.register("effect", function (oper) {
+ kukit.actionsGlobalRegistry.register("effect", function (oper) {
oper.completeParms([], {
'type': 'fade', 'queue': null,
'scope': null, 'delay': null}, 'scriptaculous effect');
@@ -44,7 +44,7 @@
}
});
- kukit.cr.commandRegistry.registerFromAction('effect', kukit.cr.makeSelectorCommand);
+ kukit.commandsGlobalRegistry.registerFromAction('effect', kukit.cr.makeSelectorCommand);
// This is terrible. We needed to copy this part
// from prototype. Notice that I put this.$ =
Modified: kukit/kss.plugin.scriptaculous/trunk/setup.py
==============================================================================
--- kukit/kss.plugin.scriptaculous/trunk/setup.py (original)
+++ kukit/kss.plugin.scriptaculous/trunk/setup.py Tue Mar 4 15:40:46 2008
@@ -23,7 +23,7 @@
zip_safe=False,
install_requires=[
'setuptools',
- 'kss.base>=dev',
+ 'kss.base',
],
entry_points={
'kss.plugin': [
From kukit-checkins at codespeak.net Fri Mar 7 15:31:25 2008
From: kukit-checkins at codespeak.net (BestDeals ® Official Site)
Date: Fri, 7 Mar 2008 15:31:25 +0100 (CET)
Subject: [KSS-checkins] March %74 OFF
Message-ID: <20080307163043.9787.qmail@ppp-58-9-101-224.revip2.asianet.co.th>
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kukit-checkins/attachments/20080307/e6f58f69/attachment.htm
From kukit-checkins at codespeak.net Fri Mar 7 18:58:37 2008
From: kukit-checkins at codespeak.net (kukit-checkins at codespeak.net)
Date: Fri, 7 Mar 2008 18:58:37 +0100 (CET)
Subject: [KSS-checkins] MedHelp 26497
Message-ID: <20080307115803.4801.qmail@ppp78-37-187-27.pppoe.avangarddsl.ru>
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kukit-checkins/attachments/20080307/562fd53c/attachment-0001.htm
From reebalazs at codespeak.net Sun Mar 9 08:45:01 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 9 Mar 2008 08:45:01 +0100 (CET)
Subject: [KSS-checkins] r52314 - kukit/kss.concatresource/tag/1.4-alpha1
Message-ID: <20080309074501.EBE2D16844D@codespeak.net>
Author: reebalazs
Date: Sun Mar 9 08:44:59 2008
New Revision: 52314
Added:
kukit/kss.concatresource/tag/1.4-alpha1/
- copied from r52313, kukit/kss.concatresource/branch/1.4/
Log:
Tag for release
From reebalazs at codespeak.net Sun Mar 9 08:46:09 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 9 Mar 2008 08:46:09 +0100 (CET)
Subject: [KSS-checkins] r52315 - kukit/kukit.js/tag/1.4-alpha1
Message-ID: <20080309074609.3038016844D@codespeak.net>
Author: reebalazs
Date: Sun Mar 9 08:46:08 2008
New Revision: 52315
Added:
kukit/kukit.js/tag/1.4-alpha1/
- copied from r52314, kukit/kukit.js/branch/1.4/
Log:
Tag for release
From reebalazs at codespeak.net Sun Mar 9 08:46:24 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 9 Mar 2008 08:46:24 +0100 (CET)
Subject: [KSS-checkins] r52316 - kukit/kss.core/tag/1.4-alpha1
Message-ID: <20080309074624.A5F84168450@codespeak.net>
Author: reebalazs
Date: Sun Mar 9 08:46:24 2008
New Revision: 52316
Added:
kukit/kss.core/tag/1.4-alpha1/
- copied from r52315, kukit/kss.core/branch/1.4/
Log:
Tag for release
From reebalazs at codespeak.net Sun Mar 9 08:46:38 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 9 Mar 2008 08:46:38 +0100 (CET)
Subject: [KSS-checkins] r52317 - kukit/kss.demo/tag/1.4-alpha1
Message-ID: <20080309074638.72A24168451@codespeak.net>
Author: reebalazs
Date: Sun Mar 9 08:46:37 2008
New Revision: 52317
Added:
kukit/kss.demo/tag/1.4-alpha1/
- copied from r52316, kukit/kss.demo/branch/1.4/
Log:
Tag for release
From reebalazs at codespeak.net Sun Mar 9 08:50:13 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 9 Mar 2008 08:50:13 +0100 (CET)
Subject: [KSS-checkins] r52318 - in kukit/kss.concatresource/tag/1.4-alpha1:
. docs kss/concatresource
Message-ID: <20080309075013.0DA1016844D@codespeak.net>
Author: reebalazs
Date: Sun Mar 9 08:50:12 2008
New Revision: 52318
Removed:
kukit/kss.concatresource/tag/1.4-alpha1/setup.cfg
Modified:
kukit/kss.concatresource/tag/1.4-alpha1/docs/HISTORY.txt
kukit/kss.concatresource/tag/1.4-alpha1/kss/concatresource/version.txt
kukit/kss.concatresource/tag/1.4-alpha1/setup.py
Log:
Set release
Modified: kukit/kss.concatresource/tag/1.4-alpha1/docs/HISTORY.txt
==============================================================================
--- kukit/kss.concatresource/tag/1.4-alpha1/docs/HISTORY.txt (original)
+++ kukit/kss.concatresource/tag/1.4-alpha1/docs/HISTORY.txt Sun Mar 9 08:50:12 2008
@@ -2,9 +2,10 @@
(name of developer listed in brackets)
-kss.concatresource - 1.4dev Unreleased
+kss.concatresource - 1.4-alpha1 Released 2008-03-09
- - ...
+ - Prepare for release
+ [ree]
kss.concatresource - 1.2 Released 2007-08-17
Modified: kukit/kss.concatresource/tag/1.4-alpha1/kss/concatresource/version.txt
==============================================================================
--- kukit/kss.concatresource/tag/1.4-alpha1/kss/concatresource/version.txt (original)
+++ kukit/kss.concatresource/tag/1.4-alpha1/kss/concatresource/version.txt Sun Mar 9 08:50:12 2008
@@ -1 +1 @@
-1.4dev Unreleased
+1.4-alpha1 Released 2008-03-09
Deleted: /kukit/kss.concatresource/tag/1.4-alpha1/setup.cfg
==============================================================================
--- /kukit/kss.concatresource/tag/1.4-alpha1/setup.cfg Sun Mar 9 08:50:12 2008
+++ (empty file)
@@ -1,3 +0,0 @@
-[egg_info]
-tag_build = dev
-tag_svn_revision = true
Modified: kukit/kss.concatresource/tag/1.4-alpha1/setup.py
==============================================================================
--- kukit/kss.concatresource/tag/1.4-alpha1/setup.py (original)
+++ kukit/kss.concatresource/tag/1.4-alpha1/setup.py Sun Mar 9 08:50:12 2008
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages
-version = '1.4'
+version = '1.4-alpha1'
setup(name='concatresource',
version=version,
From reebalazs at codespeak.net Sun Mar 9 08:51:20 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 9 Mar 2008 08:51:20 +0100 (CET)
Subject: [KSS-checkins] r52319 - kukit/kss.concatresource/branch/1.4/docs
Message-ID: <20080309075120.6BF9416844D@codespeak.net>
Author: reebalazs
Date: Sun Mar 9 08:51:19 2008
New Revision: 52319
Modified:
kukit/kss.concatresource/branch/1.4/docs/HISTORY.txt
Log:
Adjust history
Modified: kukit/kss.concatresource/branch/1.4/docs/HISTORY.txt
==============================================================================
--- kukit/kss.concatresource/branch/1.4/docs/HISTORY.txt (original)
+++ kukit/kss.concatresource/branch/1.4/docs/HISTORY.txt Sun Mar 9 08:51:19 2008
@@ -6,6 +6,11 @@
- ...
+kss.concatresource - 1.4-alpha1 Released 2008-03-09
+
+ - Prepare for release
+ [ree]
+
kss.concatresource - 1.2 Released 2007-08-17
- Change ;;; rendering in devel mode
From reebalazs at codespeak.net Sun Mar 9 08:53:39 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 9 Mar 2008 08:53:39 +0100 (CET)
Subject: [KSS-checkins] r52320 - in kukit/kukit.js/tag/1.4-alpha1: . doc
Message-ID: <20080309075339.7634216844D@codespeak.net>
Author: reebalazs
Date: Sun Mar 9 08:53:39 2008
New Revision: 52320
Modified:
kukit/kukit.js/tag/1.4-alpha1/doc/HISTORY.txt
kukit/kukit.js/tag/1.4-alpha1/version.txt
Log:
Set release
Modified: kukit/kukit.js/tag/1.4-alpha1/doc/HISTORY.txt
==============================================================================
--- kukit/kukit.js/tag/1.4-alpha1/doc/HISTORY.txt (original)
+++ kukit/kukit.js/tag/1.4-alpha1/doc/HISTORY.txt Sun Mar 9 08:53:39 2008
@@ -2,9 +2,7 @@
(name of developer listed in brackets)
-kukit.js - 1.4dev Unreleased
-
- - ...
+kukit.js - 1.4-alpha1 Released 2008-03-09
- refactor the value provider registry to use
a single registry in place of 3.
Modified: kukit/kukit.js/tag/1.4-alpha1/version.txt
==============================================================================
--- kukit/kukit.js/tag/1.4-alpha1/version.txt (original)
+++ kukit/kukit.js/tag/1.4-alpha1/version.txt Sun Mar 9 08:53:39 2008
@@ -1 +1 @@
-1.4dev unreleased
+1.4-alpha1 Released 2008-03-09
From reebalazs at codespeak.net Sun Mar 9 08:54:22 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 9 Mar 2008 08:54:22 +0100 (CET)
Subject: [KSS-checkins] r52321 - kukit/kukit.js/branch/1.4/doc
Message-ID: <20080309075422.8D03D16844D@codespeak.net>
Author: reebalazs
Date: Sun Mar 9 08:54:21 2008
New Revision: 52321
Modified:
kukit/kukit.js/branch/1.4/doc/HISTORY.txt
Log:
Adjust history
Modified: kukit/kukit.js/branch/1.4/doc/HISTORY.txt
==============================================================================
--- kukit/kukit.js/branch/1.4/doc/HISTORY.txt (original)
+++ kukit/kukit.js/branch/1.4/doc/HISTORY.txt Sun Mar 9 08:54:21 2008
@@ -5,6 +5,8 @@
kukit.js - 1.4dev Unreleased
- ...
+
+kuki.js - 1.4-alpha1 Released 2008-03-09
- refactor the value provider registry to use
a single registry in place of 3.
From reebalazs at codespeak.net Sun Mar 9 08:58:42 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 9 Mar 2008 08:58:42 +0100 (CET)
Subject: [KSS-checkins] r52322 - in kukit/kss.core/tag/1.4-alpha1: . docs
kss/core kss/core/pluginregistry
Message-ID: <20080309075842.8866116842C@codespeak.net>
Author: reebalazs
Date: Sun Mar 9 08:58:42 2008
New Revision: 52322
Removed:
kukit/kss.core/tag/1.4-alpha1/setup.cfg
Modified:
kukit/kss.core/tag/1.4-alpha1/docs/HISTORY.txt
kukit/kss.core/tag/1.4-alpha1/kss/core/ (props changed)
kukit/kss.core/tag/1.4-alpha1/kss/core/EXTERNALS.TXT
kukit/kss.core/tag/1.4-alpha1/kss/core/pluginregistry/ (props changed)
kukit/kss.core/tag/1.4-alpha1/kss/core/pluginregistry/EXTERNALS.TXT
kukit/kss.core/tag/1.4-alpha1/kss/core/version.txt
kukit/kss.core/tag/1.4-alpha1/setup.py
Log:
Set release
Modified: kukit/kss.core/tag/1.4-alpha1/docs/HISTORY.txt
==============================================================================
--- kukit/kss.core/tag/1.4-alpha1/docs/HISTORY.txt (original)
+++ kukit/kss.core/tag/1.4-alpha1/docs/HISTORY.txt Sun Mar 9 08:58:42 2008
@@ -2,9 +2,7 @@
(name of developer listed in brackets)
-kss.core - 1.4dev Unreleased
-
- - ...
+kss.core - 1.4-alpha1 Released 2008-03-09
- refactor the value provider registry to use
a single registry in place of 3.
Modified: kukit/kss.core/tag/1.4-alpha1/kss/core/EXTERNALS.TXT
==============================================================================
--- kukit/kss.core/tag/1.4-alpha1/kss/core/EXTERNALS.TXT (original)
+++ kukit/kss.core/tag/1.4-alpha1/kss/core/EXTERNALS.TXT Sun Mar 9 08:58:42 2008
@@ -5,4 +5,4 @@
# You can update your working dir by:
# svn propset svn:externals -F EXTERNALS.TXT .
#
-kukit http://codespeak.net/svn/kukit/kukit.js/branch/1.4/
+kukit http://codespeak.net/svn/kukit/kukit.js/trunk/1.4-alpha1/
Modified: kukit/kss.core/tag/1.4-alpha1/kss/core/pluginregistry/EXTERNALS.TXT
==============================================================================
--- kukit/kss.core/tag/1.4-alpha1/kss/core/pluginregistry/EXTERNALS.TXT (original)
+++ kukit/kss.core/tag/1.4-alpha1/kss/core/pluginregistry/EXTERNALS.TXT Sun Mar 9 08:58:42 2008
@@ -7,4 +7,4 @@
#
# concatresource is now included like as batteries
-_concatresource https://codespeak.net/svn/kukit/kss.concatresource/branch/1.4/kss/concatresource
+_concatresource https://codespeak.net/svn/kukit/kss.concatresource/tag/1.4-alpha1/kss/concatresource
Modified: kukit/kss.core/tag/1.4-alpha1/kss/core/version.txt
==============================================================================
--- kukit/kss.core/tag/1.4-alpha1/kss/core/version.txt (original)
+++ kukit/kss.core/tag/1.4-alpha1/kss/core/version.txt Sun Mar 9 08:58:42 2008
@@ -1 +1 @@
-1.4dev unreleased
+1.4-alpha1 Released 2008-03-09
Deleted: /kukit/kss.core/tag/1.4-alpha1/setup.cfg
==============================================================================
--- /kukit/kss.core/tag/1.4-alpha1/setup.cfg Sun Mar 9 08:58:42 2008
+++ (empty file)
@@ -1,3 +0,0 @@
-[egg_info]
-tag_build = dev
-tag_svn_revision = true
Modified: kukit/kss.core/tag/1.4-alpha1/setup.py
==============================================================================
--- kukit/kss.core/tag/1.4-alpha1/setup.py (original)
+++ kukit/kss.core/tag/1.4-alpha1/setup.py Sun Mar 9 08:58:42 2008
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import sys, os
-version = '1.4'
+version = '1.4-alpha1'
setup(name='kss.core',
version=version,
From reebalazs at codespeak.net Sun Mar 9 09:01:33 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 9 Mar 2008 09:01:33 +0100 (CET)
Subject: [KSS-checkins] r52323 - kukit/kss.core/tag/1.4-alpha1/kss/core
Message-ID: <20080309080133.A6C8916842C@codespeak.net>
Author: reebalazs
Date: Sun Mar 9 09:01:32 2008
New Revision: 52323
Modified:
kukit/kss.core/tag/1.4-alpha1/kss/core/ (props changed)
kukit/kss.core/tag/1.4-alpha1/kss/core/EXTERNALS.TXT
Log:
Set release (fix)
Modified: kukit/kss.core/tag/1.4-alpha1/kss/core/EXTERNALS.TXT
==============================================================================
--- kukit/kss.core/tag/1.4-alpha1/kss/core/EXTERNALS.TXT (original)
+++ kukit/kss.core/tag/1.4-alpha1/kss/core/EXTERNALS.TXT Sun Mar 9 09:01:32 2008
@@ -5,4 +5,4 @@
# You can update your working dir by:
# svn propset svn:externals -F EXTERNALS.TXT .
#
-kukit http://codespeak.net/svn/kukit/kukit.js/trunk/1.4-alpha1/
+kukit http://codespeak.net/svn/kukit/kukit.js/tag/1.4-alpha1/
From reebalazs at codespeak.net Sun Mar 9 09:16:29 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 9 Mar 2008 09:16:29 +0100 (CET)
Subject: [KSS-checkins] r52324 - kukit/kss.core/branch/1.4/docs
Message-ID: <20080309081629.53C4D168437@codespeak.net>
Author: reebalazs
Date: Sun Mar 9 09:16:28 2008
New Revision: 52324
Modified:
kukit/kss.core/branch/1.4/docs/HISTORY.txt
Log:
Adjust history
Modified: kukit/kss.core/branch/1.4/docs/HISTORY.txt
==============================================================================
--- kukit/kss.core/branch/1.4/docs/HISTORY.txt (original)
+++ kukit/kss.core/branch/1.4/docs/HISTORY.txt Sun Mar 9 09:16:28 2008
@@ -6,6 +6,8 @@
- ...
+kss.core - 1.4-alpha1 Released 2008-03-09
+
- refactor the value provider registry to use
a single registry in place of 3.
This will enable to define value
From reebalazs at codespeak.net Sun Mar 9 09:18:23 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 9 Mar 2008 09:18:23 +0100 (CET)
Subject: [KSS-checkins] r52325 - in kukit/kss.demo/tag/1.4-alpha1: . docs
kss/demo
Message-ID: <20080309081823.F00E816843A@codespeak.net>
Author: reebalazs
Date: Sun Mar 9 09:18:18 2008
New Revision: 52325
Removed:
kukit/kss.demo/tag/1.4-alpha1/setup.cfg
Modified:
kukit/kss.demo/tag/1.4-alpha1/docs/HISTORY.txt
kukit/kss.demo/tag/1.4-alpha1/kss/demo/version.txt
kukit/kss.demo/tag/1.4-alpha1/setup.py
Log:
Set release
Modified: kukit/kss.demo/tag/1.4-alpha1/docs/HISTORY.txt
==============================================================================
--- kukit/kss.demo/tag/1.4-alpha1/docs/HISTORY.txt (original)
+++ kukit/kss.demo/tag/1.4-alpha1/docs/HISTORY.txt Sun Mar 9 09:18:18 2008
@@ -2,9 +2,7 @@
(name of developer listed in brackets)
-kss.demo - 1.4dev Unreleased
-
- - ...
+kss.demo - 1.4-alpha1 Released 2008-03-09
- Use develui.css (style is inline with kssproject.org).
[gotcha]
Modified: kukit/kss.demo/tag/1.4-alpha1/kss/demo/version.txt
==============================================================================
--- kukit/kss.demo/tag/1.4-alpha1/kss/demo/version.txt (original)
+++ kukit/kss.demo/tag/1.4-alpha1/kss/demo/version.txt Sun Mar 9 09:18:18 2008
@@ -1 +1 @@
-1.4dev Unreleased
+1.4-alpha1 Released 2008-03-09
Deleted: /kukit/kss.demo/tag/1.4-alpha1/setup.cfg
==============================================================================
--- /kukit/kss.demo/tag/1.4-alpha1/setup.cfg Sun Mar 9 09:18:18 2008
+++ (empty file)
@@ -1,3 +0,0 @@
-[egg_info]
-tag_build = dev
-tag_svn_revision = true
Modified: kukit/kss.demo/tag/1.4-alpha1/setup.py
==============================================================================
--- kukit/kss.demo/tag/1.4-alpha1/setup.py (original)
+++ kukit/kss.demo/tag/1.4-alpha1/setup.py Sun Mar 9 09:18:18 2008
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import sys, os
-version = '1.4'
+version = '1.4-alpha1'
setup(name='kss.demo',
version=version,
@@ -27,12 +27,11 @@
install_requires=[
# -*- Extra requirements: -*-
'setuptools',
- 'kss.core>=dev',
+ 'kss.core==1.4-alpha1',
],
entry_points="""
# -*- Entry points: -*-
""",
dependency_links=[
- 'https://codespeak.net/svn/kukit/kss.core/branch/1.4#egg=kss.core-dev',
],
)
From reebalazs at codespeak.net Sun Mar 9 09:18:56 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 9 Mar 2008 09:18:56 +0100 (CET)
Subject: [KSS-checkins] r52326 - kukit/kss.demo/branch/1.4/docs
Message-ID: <20080309081856.C8BCD16843A@codespeak.net>
Author: reebalazs
Date: Sun Mar 9 09:18:56 2008
New Revision: 52326
Modified:
kukit/kss.demo/branch/1.4/docs/HISTORY.txt
Log:
Adjust history
Modified: kukit/kss.demo/branch/1.4/docs/HISTORY.txt
==============================================================================
--- kukit/kss.demo/branch/1.4/docs/HISTORY.txt (original)
+++ kukit/kss.demo/branch/1.4/docs/HISTORY.txt Sun Mar 9 09:18:56 2008
@@ -6,6 +6,8 @@
- ...
+kss.demo - 1.4-alpha1 Released 2008-03-09
+
- Use develui.css (style is inline with kssproject.org).
[gotcha]
From reebalazs at codespeak.net Sun Mar 9 14:23:40 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 9 Mar 2008 14:23:40 +0100 (CET)
Subject: [KSS-checkins] r52331 - kukit/kss.core/trunk/docs
Message-ID: <20080309132340.3437B168422@codespeak.net>
Author: reebalazs
Date: Sun Mar 9 14:23:38 2008
New Revision: 52331
Added:
kukit/kss.core/trunk/docs/NEWS.txt
Log:
Add what's new in 1.4
Added: kukit/kss.core/trunk/docs/NEWS.txt
==============================================================================
--- (empty file)
+++ kukit/kss.core/trunk/docs/NEWS.txt Sun Mar 9 14:23:38 2008
@@ -0,0 +1,104 @@
+
+
+New in kss 1.4
+--------------
+
+- Major code refactoring, for better readibility and speedups.
+
+- Lots and lots of ecma unittests and selenium tests that test kss.core
+ and the core plugin, are added. All are checkable from a single click
+ from any browser.
+
+- Base2 is used for css selection, instead of the original cssQuery (if
+ present). Significantly faster page load.
+
+- multiple selectors in the same rule are allowed, ie.::
+
+ selector1:click selector2:click { ... }
+
+ or even::
+
+ selector1:keyup selector2:keydown { ... }
+
+- Value providers can be recursive, ie.::
+
+ nodeAttr(kssAttr(blah))
+
+ is allowed.
+
+- added url() special value provider, the first is alternate syntax for::
+
+ action-server: blah;
+ blah-kssUrl: "http://foo.bar/blahblah";
+
+ you can now say in one line::
+
+ action-server: blah url(http://foo.bar/blahblah);
+
+ This may be handy if you want to call @@ url-s.
+
+- added alias() special value provider, this enables using more client
+ actions on the same node::
+
+ action-client: setAttribute;
+ setAttribute-key: foo;
+ setAttribute-value: bar;
+ action-client: setAttribute alias(other);
+ other-key: foo2;
+ other-value: bar2;
+
+- enable node selection in the same line as the action specification, ie.
+ instead of::
+
+ action-client: foo;
+ foo-kssSelector: css(div.klass);
+
+ you can also say::
+
+ action-client: foo css(div.klass);
+
+- enable full form submits in the same line as the action specification,
+ ie. instead of::
+
+ action-server: foo;
+ foo-kssSubmitForm: currentForm();
+
+ you can also say::
+
+ action-server: foo currentForm();
+
+- Value providers can be used also in the "event binder id", eg.
+ instead of the static binder id::
+
+ xxxxx:click(blah) { ... }
+
+ a dynamic binder id can also be used::
+
+ xxxxx:click(kssAttr(blah)) { ... }
+
+ This feature is needed for upcoming use cases like drag and drop.
+
+- Remove previously deprecated form() and
+ currentForm() value providers from normal
+ action parameters (remark: they should now
+ be used with xxx-kssSelector or directly on the action-client line as
+ described above, and they properly support Zope multiform
+ fields like :list, :record, :records.)
+
+- Demos and selenium tests are removed from kss.demo and are now placed
+ together with the plugin in kss.core. This means, all 3rdparty plugins
+ should now have a zope-only demo page with a selenium test, if the
+ plugin is loaded the demo appears in the index and the test is run
+ together with all tests. (Demos can be viewed and tested by kss.demo.)
+ We also have kss.template that creates a skeleton kss plugin with
+ all bells and whistles.
+
+- Implement loglevels based on cookies (also backported to 1.2.)
+
+- Other fixes (also backported to 1.2)::
+
+ - Fix error fallback handling
+
+ - Fix multiple selection form fields marshalling on Safari and IE
+
+
From reebalazs at codespeak.net Sun Mar 9 14:25:00 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sun, 9 Mar 2008 14:25:00 +0100 (CET)
Subject: [KSS-checkins] r52332 - kukit/kss.core/branch/1.4/docs
Message-ID: <20080309132500.DC5C4168422@codespeak.net>
Author: reebalazs
Date: Sun Mar 9 14:25:00 2008
New Revision: 52332
Added:
kukit/kss.core/branch/1.4/docs/NEWS.txt
- copied unchanged from r52331, kukit/kss.core/trunk/docs/NEWS.txt
Log:
Backport -r52231 from trunk: Add what's new in 1.4
From jvloothuis at codespeak.net Tue Mar 11 21:45:11 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Tue, 11 Mar 2008 21:45:11 +0100 (CET)
Subject: [KSS-checkins] r52397 - kukit/kss.core/branch/kss.core-on-kss.zope
Message-ID: <20080311204511.44FBE169E2B@codespeak.net>
Author: jvloothuis
Date: Tue Mar 11 21:45:08 2008
New Revision: 52397
Added:
kukit/kss.core/branch/kss.core-on-kss.zope/
Log:
New package for the kss.core compat layer
From jvloothuis at codespeak.net Tue Mar 11 21:48:00 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Tue, 11 Mar 2008 21:48:00 +0100 (CET)
Subject: [KSS-checkins] r52398 - kukit/buildout/kss.zope/transition
Message-ID: <20080311204800.55B0D168414@codespeak.net>
Author: jvloothuis
Date: Tue Mar 11 21:47:59 2008
New Revision: 52398
Modified:
kukit/buildout/kss.zope/transition/ (props changed)
kukit/buildout/kss.zope/transition/EXTERNALS.txt
Log:
Added kss.core
Modified: kukit/buildout/kss.zope/transition/EXTERNALS.txt
==============================================================================
--- kukit/buildout/kss.zope/transition/EXTERNALS.txt (original)
+++ kukit/buildout/kss.zope/transition/EXTERNALS.txt Tue Mar 11 21:47:59 2008
@@ -2,3 +2,4 @@
kss.base https://codespeak.net/svn/kukit/kss.base/trunk
# kss.demo is branched mainly to not depend on kss.core egg:
kss.demo https://codespeak.net/svn/kukit/kss.demo/branch/kss-zope-transition
+kss.core https://codespeak.net/svn/kukit/kss.core/branch/kss.core-on-kss.zope
From jvloothuis at codespeak.net Tue Mar 11 22:19:08 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Tue, 11 Mar 2008 22:19:08 +0100 (CET)
Subject: [KSS-checkins] r52399 - in kukit:
kss.core/branch/kss.core-on-kss.zope
kss.core/branch/kss.core-on-kss.zope/src
kss.core/branch/kss.core-on-kss.zope/src/kss
kss.core/branch/kss.core-on-kss.zope/src/kss/core
kss.zope/trunk/kss/core kss.zope/trunk/kss/core_future
Message-ID: <20080311211908.B0BFA169E0A@codespeak.net>
Author: jvloothuis
Date: Tue Mar 11 22:19:06 2008
New Revision: 52399
Added:
kukit/kss.core/branch/kss.core-on-kss.zope/setup.py
- copied, changed from r52397, kukit/kss.zope/trunk/setup.py
kukit/kss.core/branch/kss.core-on-kss.zope/src/
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/__init__.py
- copied unchanged from r52397, kukit/kss.zope/trunk/kss/__init__.py
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/
- copied from r52397, kukit/kss.zope/trunk/kss/core/
Removed:
kukit/kss.zope/trunk/kss/core/
kukit/kss.zope/trunk/kss/core_future/
Log:
Splitted the kss.core compatibility layer off into a seperate package
Copied: kukit/kss.core/branch/kss.core-on-kss.zope/setup.py (from r52397, kukit/kss.zope/trunk/setup.py)
==============================================================================
--- kukit/kss.zope/trunk/setup.py (original)
+++ kukit/kss.core/branch/kss.core-on-kss.zope/setup.py Tue Mar 11 22:19:06 2008
@@ -1,15 +1,14 @@
from setuptools import setup, find_packages
from textwrap import dedent
-version = '1.4'
+version = '2.0'
setup(
- name = 'kss.zope',
+ name = 'kss.core',
version = version,
description = "KSS (Kinetic Style Sheets) core framework",
long_description = dedent("""\
"""),
- # Get more strings from http://www.python.org/pypi?%3Aaction=list_classifiers
classifiers = [
"Framework :: Zope2",
"Framework :: Zope3",
@@ -21,12 +20,13 @@
author_email = 'kss-devel at codespeak.net',
url = 'http://kssproject.org',
license = 'GPL',
- packages = find_packages(exclude=['ez_setup']),
- namespace_packages = ['kss'],
+ package_dir={'': 'src'},
+ packages=find_packages('src'),
+ namespace_packages=['kss'],
include_package_data = True,
zip_safe = False,
install_requires = [
- 'kss.base>=dev',
+ 'kss.zope>=dev',
'setuptools',
],
entry_points={
From jvloothuis at codespeak.net Tue Mar 11 23:03:54 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Tue, 11 Mar 2008 23:03:54 +0100 (CET)
Subject: [KSS-checkins] r52402 - in
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core: . tests
Message-ID: <20080311220354.85EAA169E0A@codespeak.net>
Author: jvloothuis
Date: Tue Mar 11 23:03:53 2008
New Revision: 52402
Added:
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/siteview.txt
- copied unchanged from r52396, kukit/kss.core/trunk/kss/core/siteview.txt
Modified:
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/kssview.py
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/meta.zcml
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/tests/configure-unittest.zcml
Log:
Started to make as much tests for the kss.core compatibility layer
work
The meta.zcml now includes the meta.zcml from kss.zope, this makes
sure this is always loaded
Readded the siteview test. This is a duplicate of the one in kss.zope
but since the old kss.core had it the first version of kss.core should
have it as well (to maximize coverage).
Modified: kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/kssview.py
==============================================================================
--- kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/kssview.py (original)
+++ kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/kssview.py Tue Mar 11 23:03:53 2008
@@ -15,7 +15,11 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-from kss.zope.view import KSSView
+from kss.zope.view import KSSView, SiteView
from kss.zope.commandset import ZopeCommandSet as CommandSet
AzaxBaseView = KSSView
+
+# Pyflakes
+SiteView
+CommandSet
Modified: kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/meta.zcml
==============================================================================
--- kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/meta.zcml (original)
+++ kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/meta.zcml Tue Mar 11 23:03:53 2008
@@ -1,8 +1,6 @@
-
+
Modified: kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/tests/configure-unittest.zcml
==============================================================================
--- kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/tests/configure-unittest.zcml (original)
+++ kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/tests/configure-unittest.zcml Tue Mar 11 23:03:53 2008
@@ -3,17 +3,6 @@
xmlns:five="http://namespaces.zope.org/five"
xmlns:zcml="http://namespaces.zope.org/zcml"
>
-
-
-
-
-
-
-
-
-
-
-
-
-
Modified: kukit/kss.zope/trunk/kss/zope/configure.zcml
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/configure.zcml (original)
+++ kukit/kss.zope/trunk/kss/zope/configure.zcml Wed Mar 12 23:08:55 2008
@@ -41,6 +41,14 @@
+
+
From jvloothuis at codespeak.net Wed Mar 12 23:10:09 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Wed, 12 Mar 2008 23:10:09 +0100 (CET)
Subject: [KSS-checkins] r52437 -
kukit/kss.demo/branch/kss-zope-transition/kss/demo
Message-ID: <20080312221009.85F35169ED4@codespeak.net>
Author: jvloothuis
Date: Wed Mar 12 23:10:09 2008
New Revision: 52437
Modified:
kukit/kss.demo/branch/kss-zope-transition/kss/demo/simplecontent.py
Log:
Added an error method to the simple content class so that it calls the
kss error view. We can use this in the tests to make sure the view is
properly used etc.
Modified: kukit/kss.demo/branch/kss-zope-transition/kss/demo/simplecontent.py
==============================================================================
--- kukit/kss.demo/branch/kss-zope-transition/kss/demo/simplecontent.py (original)
+++ kukit/kss.demo/branch/kss-zope-transition/kss/demo/simplecontent.py Wed Mar 12 23:10:09 2008
@@ -29,6 +29,7 @@
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from zope.interface import implements
from interfaces import ISimpleContent
+from zope import component
class SimpleContent(SimpleItem):
implements(ISimpleContent)
@@ -50,6 +51,14 @@
"""
return "Direct traversal worked"
+ security.declarePublic('direct')
+ def standard_error_message(self, error_type=None, error_value=None,
+ **kwargs):
+ request = self.aq_acquire('REQUEST')
+ view = component.getMultiAdapter((self, request), name='kss_view')
+ view.attach_error(error_type, error_value)
+ return 'Error Type: %s\nError Value: %s' % (error_type, error_value)
+
InitializeClass(SimpleContent)
manage_addSimpleContentForm = PageTemplateFile(
From jvloothuis at codespeak.net Thu Mar 13 20:17:19 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Thu, 13 Mar 2008 20:17:19 +0100 (CET)
Subject: [KSS-checkins] r52454 -
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core
Message-ID: <20080313191719.F367C169F83@codespeak.net>
Author: jvloothuis
Date: Thu Mar 13 20:17:19 2008
New Revision: 52454
Removed:
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/parsers.py
Log:
This is no longer needed. Since the protocol change all HTML and XML
data is just data (not part of the XML structure) so invalid data will
not present a problem.
Deleted: /kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/parsers.py
==============================================================================
--- /kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/parsers.py Thu Mar 13 20:17:19 2008
+++ (empty file)
@@ -1,91 +0,0 @@
-# -*- coding: ISO-8859-15 -*-
-# Copyright (c) 2006-2007
-# Authors: KSS Project Contributors (see docs/CREDITS.txt)
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as published
-# by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-'''\
-Parser implementations
-
-These assure that output is valid XML or HTML and fix the code or
-raise an exception.
-
-The wrapping makes it possible to change the parser transparently
-if necessary.
-'''
-
-from unicode_quirks import force_unicode
-import re, htmlentitydefs
-
-class replace_html_named_entities(object):
-
- _entity_regexp = re.compile(r'&([A-Za-z]+);')
-
- def _entity_replacer(m):
- value = htmlentitydefs.name2codepoint.get(m.group(1))
- if value is None:
- return m.group(0)
- return "%i;" % value
- _entity_replacer = staticmethod(_entity_replacer)
-
- def _replace(cls, value):
- return cls._entity_regexp.sub(cls._entity_replacer, value)
- _replace = classmethod(_replace)
-
- def __new__(cls, value):
- return cls._replace(value)
-
-class XmlParser(object):
- '''Custom XML parser
-
- wraps the parser implementation
- '''
-
- from BeautifulSoup import BeautifulStoneSoup
-
- def __init__(self, value):
- value = force_unicode(value)
- self.soup = self.BeautifulStoneSoup(value)
-
- def __call__(self):
- return unicode(self.soup)
-
-class HtmlParser(object):
- '''Custom HTML parser
-
- wraps the parser implementation
- '''
-
- from BeautifulSoup import BeautifulSoup
-
- def __init__(self, value):
- value = force_unicode(value)
- self.soup = self.BeautifulSoup(value)
- #
- # XXX ree: I think these are not needed any more. See
- # kukit patches r25865, r25866 that IMO fix this on IE.
- #
- #for tag in self.soup.fetch(recursive=False):
- # tag['xmlns'] = "http://www.w3.org/1999/xhtml"
-
- def __call__(self):
- value = unicode(self.soup)
- # Replace named HTML entitied in each case.
- # This is necessary for two reasons:
- # 1. Fixes an IE bug.
- # 2. Needed for the alternate transport mechanism to work.
- value = replace_html_named_entities(value)
-
- return value
From jvloothuis at codespeak.net Thu Mar 13 20:18:00 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Thu, 13 Mar 2008 20:18:00 +0100 (CET)
Subject: [KSS-checkins] r52455 -
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core
Message-ID: <20080313191800.51B1F169F84@codespeak.net>
Author: jvloothuis
Date: Thu Mar 13 20:17:59 2008
New Revision: 52455
Removed:
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/commands.py
Log:
The compatability code for this has been implemented in kss.zope
Deleted: /kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/commands.py
==============================================================================
--- /kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/commands.py Thu Mar 13 20:17:59 2008
+++ (empty file)
@@ -1,157 +0,0 @@
-from kss.zope.commands import KSSZopeCommands as KSSCommands
-
-# Old cruft
-from zope.interface import implements
-from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
-from interfaces import IKSSCommands, IKSSCommand, IKSSParam, IKSSCommandView
-from unicode_quirks import force_unicode
-import zope.component
-from parsers import XmlParser, HtmlParser
-##from pluginregistry import checkRegisteredSelector
-from pluginregistry import checkRegisteredSelector
-
-class KSSParam:
- implements(IKSSParam)
-
- def __init__(self, name, content=''):
- self.name = name
- self.content = content
-
- def force_content_unicode(self):
- # Content must be str with ascii encoding, or unicode!
- self.content = force_unicode(self.content)
-
- def getName(self):
- return self.name
-
- def getContent(self):
- return self.content
-
-class KSSCommand:
- implements(IKSSCommand)
-
- def __init__(self, command_name, selector=None, **kw):
- # we expect this is not registered as command, anyway
- # so check it as an action.
-## XXX command checking temporarily disabled
-## XXX TODO needs to work from new registry.
-## checkRegisteredCommand(command_name)
- if selector is not None:
- if isinstance(selector, basestring):
- # the default selector - given just as a string
- self.selector = selector
- self.selectorType = ''
- else:
- checkRegisteredSelector(selector.type)
- self.selector = selector.value
- self.selectorType = selector.type
- else:
- self.selector = None
- self.selectorType = None
- self.name = command_name
- self.params = []
- # Add parameters passed in **kw
- for key, value in kw.iteritems():
- self.addParam(key, value)
-
- # --
- # Different parameter conversions
- # --
-
- # REMARK: with the jsonserver product present, you can
- # just send complex data types directly with AddParam
-
- def addParam(self, name, content=''):
- 'Add the param as is'
- param = KSSParam(name, content)
- self.params.append(param)
- return param
-
- #
- # Some helpers
- #
-
- def addUnicodeParam(self, name, content=''):
- 'Add the param as unicode'
- self.addParam(name, content=content)
-
- def addStringParam(self, name, content='', encoding='utf'):
- 'Add the param as an encoded string, by default UTF-8'
- content = unicode(content, 'utf')
- self.addParam(name, content=content)
-
- def addHtmlParam(self, name, content=''):
- 'Add the param as an HTML content.'
- content = HtmlParser(content)().encode('ascii', 'xmlcharrefreplace')
- ##self.addParam(name, content=content)
- # add html as cdata!
- self.addCdataParam(name, content=content)
-
- def addXmlParam(self, name, content=''):
- 'Add the param as XML content'
- content = XmlParser(content)().encode('ascii', 'xmlcharrefreplace')
- self.addParam(name, content=content)
-
- def addCdataParam(self, name, content=''):
- 'Add the param as a CDATA node'
- content = '' % (content, )
- self.addParam(name, content=content)
-
-
- # --
- # Accessors, not sure if we need them
- # --
-
- def getName(self):
- return self.name
-
- def getSelector(self):
- return self.selector
-
- def getSelectorType(self):
- return self.selectorType
-
- def getParams(self):
- return self.params
-
-class CommandView(object):
- '''View of a command.
-
- The render method does actual marshalling
- of the commands to be sent to the client.
- '''
- implements(IKSSCommandView)
-
- def __init__(self, context, request):
- self.context = context
- self.request = request
- # XXX From Zope2.9 we need this.
- # Note: We don't use proper views for Five. As our context object
- # is not even a proper Zope content. There would be a way to:
- #
- # - use ZopeTwoPageTemplateFile
- # - and, make the object to be proper zope content.
- #
- # This would be two much ado for nothing, so we just use barefoot
- # rendering but as a consequence no path expression, only python:
- # is available from the page template.
- if not hasattr(self.request, 'debug'):
- self.request.debug = None
-
- # Force parameters content to be unicode
- for command in context:
- for param in command.getParams():
- param.force_content_unicode()
-
- # XML output gets rendered via a page template
- # XXX note: barefoot rendering, use python: only after zope2.9
- # XXX we must have the content type set both here and below
- _render = ViewPageTemplateFile('browser/kukitresponse.pt', content_type='text/xml;charset=utf-8')
-
- def render(self):
- result = self._render()
- # Always output text/xml to make sure browsers but the data in the
- # responseXML instead of responseText attribute of the
- # XMLHttpRequestobject.
- self.request.response.setHeader('Content-type', 'text/xml;charset=utf-8')
- return result
From jvloothuis at codespeak.net Thu Mar 13 20:20:44 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Thu, 13 Mar 2008 20:20:44 +0100 (CET)
Subject: [KSS-checkins] r52456 -
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/browser
Message-ID: <20080313192044.343DB169F84@codespeak.net>
Author: jvloothuis
Date: Thu Mar 13 20:20:43 2008
New Revision: 52456
Removed:
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/browser/kukitresponse.pt
Log:
This template has been moved to kss.zope
Deleted: /kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/browser/kukitresponse.pt
==============================================================================
--- /kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/browser/kukitresponse.pt Thu Mar 13 20:20:43 2008
+++ (empty file)
@@ -1,19 +0,0 @@
-
-
-
-
-
- it worked]]>
-
-
-
-
From jvloothuis at codespeak.net Thu Mar 13 20:22:38 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Thu, 13 Mar 2008 20:22:38 +0100 (CET)
Subject: [KSS-checkins] r52457 -
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/browser
Message-ID: <20080313192238.71E83169F85@codespeak.net>
Author: jvloothuis
Date: Thu Mar 13 20:22:37 2008
New Revision: 52457
Removed:
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/browser/
Log:
The browser's only remaining template has been moved to kss.zope
From jvloothuis at codespeak.net Thu Mar 13 20:43:15 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Thu, 13 Mar 2008 20:43:15 +0100 (CET)
Subject: [KSS-checkins] r52458 -
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core
Message-ID: <20080313194315.4D906169ECE@codespeak.net>
Author: jvloothuis
Date: Thu Mar 13 20:43:15 2008
New Revision: 52458
Removed:
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/selectors.py
Log:
These are no longer needed (they are provided by kss.base)
Deleted: /kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/selectors.py
==============================================================================
--- /kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/selectors.py Thu Mar 13 20:43:15 2008
+++ (empty file)
@@ -1,48 +0,0 @@
-# Copyright (c) 2006-2007
-# Authors: KSS Project Contributors (see docs/CREDITS.txt)
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as published
-# by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-CSS_SELECTOR = 'css'
-HTMLID_SELECTOR = 'htmlid'
-PARENTNODE_SELECTOR = 'parentnode'
-SAMENODE_SELECTOR = 'samenode'
-
-class SelectorBase(object):
-
- def __init__(self, selector):
- self.value = selector
-
-class CssSelector(SelectorBase):
- type = CSS_SELECTOR
-
-class HtmlIdSelector(SelectorBase):
- type = HTMLID_SELECTOR
-
-class ParentNodeSelector(SelectorBase):
- type = PARENTNODE_SELECTOR
-
-class SameNodeSelector(SelectorBase):
- def __init__(self):
- super(SameNodeSelector, self).__init__('')
- type = SAMENODE_SELECTOR
-
-# A generic (pluggable) selector
-
-class Selector(SelectorBase):
-
- def __init__(self, type, selector):
- self.type = type
- SelectorBase.__init__(self, selector)
From jvloothuis at codespeak.net Thu Mar 13 20:47:10 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Thu, 13 Mar 2008 20:47:10 +0100 (CET)
Subject: [KSS-checkins] r52459 -
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core
Message-ID: <20080313194710.71419169F37@codespeak.net>
Author: jvloothuis
Date: Thu Mar 13 20:47:10 2008
New Revision: 52459
Removed:
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/config.py
Log:
Removed an unneeded empty config.py
Deleted: /kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/config.py
==============================================================================
--- /kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/config.py Thu Mar 13 20:47:10 2008
+++ (empty file)
@@ -1 +0,0 @@
-
From jvloothuis at codespeak.net Thu Mar 13 20:48:06 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Thu, 13 Mar 2008 20:48:06 +0100 (CET)
Subject: [KSS-checkins] r52460 - kukit/kss.core/branch/kss.core-on-kss.zope
Message-ID: <20080313194806.33352169F37@codespeak.net>
Author: jvloothuis
Date: Thu Mar 13 20:48:06 2008
New Revision: 52460
Modified:
kukit/kss.core/branch/kss.core-on-kss.zope/setup.py
Log:
Removed the entry points which where there due to copy and pasting the setup.py from kss.zope
Modified: kukit/kss.core/branch/kss.core-on-kss.zope/setup.py
==============================================================================
--- kukit/kss.core/branch/kss.core-on-kss.zope/setup.py (original)
+++ kukit/kss.core/branch/kss.core-on-kss.zope/setup.py Thu Mar 13 20:48:06 2008
@@ -29,10 +29,4 @@
'kss.zope>=dev',
'setuptools',
],
- entry_points={
- 'kss.plugin': [
- 'core-demos-1=kss.zope.plugins.core.demo.config:core_demos',
- 'core-demos-binderids=kss.zope.plugins.core.demo.binderids.config:core_demos',
- ],
- },
)
From jvloothuis at codespeak.net Thu Mar 13 20:49:25 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Thu, 13 Mar 2008 20:49:25 +0100 (CET)
Subject: [KSS-checkins] r52461 -
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/dtds
Message-ID: <20080313194925.EBAD2169F37@codespeak.net>
Author: jvloothuis
Date: Thu Mar 13 20:49:25 2008
New Revision: 52461
Removed:
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/dtds/
Log:
Removed the unused dtds for xhtml
From jvloothuis at codespeak.net Thu Mar 13 20:51:52 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Thu, 13 Mar 2008 20:51:52 +0100 (CET)
Subject: [KSS-checkins] r52462 -
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/kukit_3rd_party
Message-ID: <20080313195152.CAD7C169F37@codespeak.net>
Author: jvloothuis
Date: Thu Mar 13 20:51:49 2008
New Revision: 52462
Removed:
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/kukit_3rd_party/
Log:
Removed the unused 3rd party Javascripts
From jvloothuis at codespeak.net Thu Mar 13 20:52:59 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Thu, 13 Mar 2008 20:52:59 +0100 (CET)
Subject: [KSS-checkins] r52463 -
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core
Message-ID: <20080313195259.C5074169F37@codespeak.net>
Author: jvloothuis
Date: Thu Mar 13 20:52:58 2008
New Revision: 52463
Modified:
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/configure.zcml
Log:
Removed disabled code (was commented)
Modified: kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/configure.zcml
==============================================================================
--- kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/configure.zcml (original)
+++ kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/configure.zcml Thu Mar 13 20:52:58 2008
@@ -3,48 +3,6 @@
xmlns:zcml="http://namespaces.zope.org/zcml"
xmlns:five="http://namespaces.zope.org/five">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
From jvloothuis at codespeak.net Thu Mar 13 20:54:04 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Thu, 13 Mar 2008 20:54:04 +0100 (CET)
Subject: [KSS-checkins] r52464 -
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core
Message-ID: <20080313195404.DC3CB169F37@codespeak.net>
Author: jvloothuis
Date: Thu Mar 13 20:54:04 2008
New Revision: 52464
Removed:
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/svnignore
Log:
Removed silly ignore file
Deleted: /kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/svnignore
==============================================================================
--- /kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/svnignore Thu Mar 13 20:54:04 2008
+++ (empty file)
@@ -1,2 +0,0 @@
-concatresource.zcml
-
From jvloothuis at codespeak.net Thu Mar 13 20:55:21 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Thu, 13 Mar 2008 20:55:21 +0100 (CET)
Subject: [KSS-checkins] r52465 -
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core
Message-ID: <20080313195521.0CF16169F37@codespeak.net>
Author: jvloothuis
Date: Thu Mar 13 20:55:20 2008
New Revision: 52465
Removed:
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/EXTERNALS.TXT
Log:
Removed EXTERNALS.txt since we do no longer use externals
Deleted: /kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/EXTERNALS.TXT
==============================================================================
--- /kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/EXTERNALS.TXT Thu Mar 13 20:55:20 2008
+++ (empty file)
@@ -1,8 +0,0 @@
-#
-# results of svn propget svn:externals
-# http://codespeak.net/svn/kukit/kss.core/trunk
-#
-# You can update your working dir by:
-# svn propset svn:externals -F EXTERNALS.TXT .
-#
-#kukit http://codespeak.net/svn/kukit/kukit.js/trunk
From jvloothuis at codespeak.net Thu Mar 13 20:57:28 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Thu, 13 Mar 2008 20:57:28 +0100 (CET)
Subject: [KSS-checkins] r52467 -
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core
Message-ID: <20080313195728.0CE6B169F37@codespeak.net>
Author: jvloothuis
Date: Thu Mar 13 20:57:28 2008
New Revision: 52467
Removed:
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/deprecated.py
Log:
Removed the deprecated module, we do not use this from kss.core
Deleted: /kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/deprecated.py
==============================================================================
--- /kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/deprecated.py Thu Mar 13 20:57:28 2008
+++ (empty file)
@@ -1,43 +0,0 @@
-# -*- coding: ISO-8859-15 -*-
-# Copyright (c) 2005-2007
-# Authors: KSS Project Contributors (see docs/CREDITS.txt)
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as published
-# by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-import warnings, textwrap
-
-def deprecated_warning(message):
- warnings.warn(message, DeprecationWarning, 2)
-
-def deprecated(method, message):
- def deprecated_method(self, *args, **kw):
- warnings.warn(message, DeprecationWarning, 2)
- return method(self, *args, **kw)
- return deprecated_method
-
-def deprecated_directive(method, directive, message):
- def deprecated_method(_context, *args, **kw):
- warnings.warn(message, DeprecationWarning, 2)
- warnings.warn(textwrap.dedent('''\
-
-
- %s
- The directive %s is deprecated and will be removed any time,
- %s
- '''
- % (_context.info, directive, message)),
- DeprecationWarning, 2)
- return method(_context, *args, **kw)
- return deprecated_method
From jvloothuis at codespeak.net Thu Mar 13 20:58:55 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Thu, 13 Mar 2008 20:58:55 +0100 (CET)
Subject: [KSS-checkins] r52468 -
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core
Message-ID: <20080313195855.8A501168455@codespeak.net>
Author: jvloothuis
Date: Thu Mar 13 20:58:55 2008
New Revision: 52468
Removed:
kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/INSTALL.txt
Log:
The install guide is no longer valid. I do not think we need it there
now that we use eggs and the Zope crowd is used to them.
Deleted: /kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/INSTALL.txt
==============================================================================
--- /kukit/kss.core/branch/kss.core-on-kss.zope/src/kss/core/INSTALL.txt Thu Mar 13 20:58:55 2008
+++ (empty file)
@@ -1,40 +0,0 @@
-
-INSTALLATION NOTES
-==================
-
-*KSS* stands for *Kinetic Style Sheets*.
-
-This is KSS for Zope, containing server side support
-for Zope 2 and Zope 3.
-
-1- Prerequisites
-----------------
-
-To install kss you will need:
-
-- a working Zope (2.8 or higher, or Zope 3 supported)
-
-- kss.core itself (which version, is dependent on the version
- of Zope you use. Look for version numbers and release notes...)
-
-2 - Products setup
-------------------
-
-- Put kss.core in $INSTANCE/lib/python (it should be under kss/core/,
- with an empty __init__.py in the kss namespace module root)
-
-- Copy the slugs kss.core-configure.zcml and kss.core-meta.zcml
- into the directory $INSTANCE/etc/package-includes.
-
- * This is _not needed_ if you use KSS for Plone.
-
- * If you use Zope2.8, the etc/package-includes directories
- are not created by default, you have to create them yourself.
-
-3 - How to use kss
-------------------
-
-Copy the product kss.demo that's inside demos in your instance,
-into the directory $INSTANCE/lib/python, and look at its own README.txt
-(it should be under kss/demo)
-
From reebalazs at codespeak.net Fri Mar 14 12:29:11 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Fri, 14 Mar 2008 12:29:11 +0100 (CET)
Subject: [KSS-checkins] r52484 - kukit/kss.demo/tag/1.2.4
Message-ID: <20080314112911.05CCE169F6C@codespeak.net>
Author: reebalazs
Date: Fri Mar 14 12:29:10 2008
New Revision: 52484
Added:
kukit/kss.demo/tag/1.2.4/
- copied from r52483, kukit/kss.demo/branch/1.2/
Log:
Tag unplenned release. Needed to make a matching egg for kss.core 1.2.4.
From reebalazs at codespeak.net Fri Mar 14 12:33:29 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Fri, 14 Mar 2008 12:33:29 +0100 (CET)
Subject: [KSS-checkins] r52486 - in kukit/kss.demo/tag/1.2.4: . docs kss/demo
Message-ID: <20080314113329.80B5D169F6E@codespeak.net>
Author: reebalazs
Date: Fri Mar 14 12:33:28 2008
New Revision: 52486
Removed:
kukit/kss.demo/tag/1.2.4/setup.cfg
Modified:
kukit/kss.demo/tag/1.2.4/docs/HISTORY.txt
kukit/kss.demo/tag/1.2.4/kss/demo/version.txt
kukit/kss.demo/tag/1.2.4/setup.py
Log:
Set version info
Modified: kukit/kss.demo/tag/1.2.4/docs/HISTORY.txt
==============================================================================
--- kukit/kss.demo/tag/1.2.4/docs/HISTORY.txt (original)
+++ kukit/kss.demo/tag/1.2.4/docs/HISTORY.txt Fri Mar 14 12:33:28 2008
@@ -2,9 +2,12 @@
(name of developer listed in brackets)
-kss.demo - 1.2dev Unreleased
+kss.demo - 1.2.4 Released 2008-03-14
- - ...
+ - Prepare unplanned release.
+ Needed to provide an egg that matches kss.core 1.2.4,
+ and can be used with latest Plone 3.0 release line.
+ [ree]
- Fix error demo
[ree]
Modified: kukit/kss.demo/tag/1.2.4/kss/demo/version.txt
==============================================================================
--- kukit/kss.demo/tag/1.2.4/kss/demo/version.txt (original)
+++ kukit/kss.demo/tag/1.2.4/kss/demo/version.txt Fri Mar 14 12:33:28 2008
@@ -1 +1 @@
-1.2dev Unreleased
+1.2.4 Released 2008-03-14
Deleted: /kukit/kss.demo/tag/1.2.4/setup.cfg
==============================================================================
--- /kukit/kss.demo/tag/1.2.4/setup.cfg Fri Mar 14 12:33:28 2008
+++ (empty file)
@@ -1,3 +0,0 @@
-[egg_info]
-tag_build = dev
-tag_svn_revision = true
Modified: kukit/kss.demo/tag/1.2.4/setup.py
==============================================================================
--- kukit/kss.demo/tag/1.2.4/setup.py (original)
+++ kukit/kss.demo/tag/1.2.4/setup.py Fri Mar 14 12:33:28 2008
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import sys, os
-version = '1.2'
+version = '1.2.4'
setup(name='kss.demo',
version=version,
@@ -26,12 +26,11 @@
zip_safe=False,
install_requires=[
# -*- Extra requirements: -*-
- 'kss.core>=dev',
+ 'kss.core==1.2.4',
],
entry_points="""
# -*- Entry points: -*-
""",
dependency_links=[
- 'https://codespeak.net/svn/kukit/kss.core/branch/1.2#egg=kss.core-dev',
],
)
From reebalazs at codespeak.net Fri Mar 14 12:35:02 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Fri, 14 Mar 2008 12:35:02 +0100 (CET)
Subject: [KSS-checkins] r52487 - kukit/kss.demo/branch/1.2/docs
Message-ID: <20080314113502.15D57169F6E@codespeak.net>
Author: reebalazs
Date: Fri Mar 14 12:35:01 2008
New Revision: 52487
Modified:
kukit/kss.demo/branch/1.2/docs/HISTORY.txt
Log:
Set history
Modified: kukit/kss.demo/branch/1.2/docs/HISTORY.txt
==============================================================================
--- kukit/kss.demo/branch/1.2/docs/HISTORY.txt (original)
+++ kukit/kss.demo/branch/1.2/docs/HISTORY.txt Fri Mar 14 12:35:01 2008
@@ -6,6 +6,13 @@
- ...
+kss.demo - 1.2.4 Released 2008-03-14
+
+ - Prepare unplanned release.
+ Needed to provide an egg that matches kss.core 1.2.4,
+ and can be used with latest Plone 3.0 release line.
+ [ree]
+
- Fix error demo
[ree]
From kukit-checkins at codespeak.net Sun Mar 16 03:53:03 2008
From: kukit-checkins at codespeak.net (kukit-checkins at codespeak.net)
Date: Sun, 16 Mar 2008 03:53:03 +0100 (CET)
Subject: [KSS-checkins] MedHelp id 23613097
Message-ID: <20080316025303.EBA0116A0F3@codespeak.net>
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kukit-checkins/attachments/20080316/d77b81cc/attachment.htm
From gotcha at codespeak.net Sun Mar 16 12:35:16 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sun, 16 Mar 2008 12:35:16 +0100 (CET)
Subject: [KSS-checkins] r52584 - kukit/kukit.js/trunk/kukit
Message-ID: <20080316113516.3445316A14C@codespeak.net>
Author: gotcha
Date: Sun Mar 16 12:35:15 2008
New Revision: 52584
Modified:
kukit/kukit.js/trunk/kukit/forms.js
Log:
disabled input values should not be submitted with the form
Modified: kukit/kukit.js/trunk/kukit/forms.js
==============================================================================
--- kukit/kukit.js/trunk/kukit/forms.js (original)
+++ kukit/kukit.js/trunk/kukit/forms.js Sun Mar 16 12:35:15 2008
@@ -186,6 +186,9 @@
// First: update the field in case an editor is lurking
// in the background
this.fieldUpdateRegistry.doUpdate(element);
+ if (element.disabled) {
+ return null;
+ }
// Collect the data
if (element.selectedIndex != undefined) {
// handle single selects first
From gotcha at codespeak.net Sun Mar 16 12:36:09 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sun, 16 Mar 2008 12:36:09 +0100 (CET)
Subject: [KSS-checkins] r52585 - in
kukit/kss.core/trunk/kss/core/plugins/core/demo/parameterfunction:
. selenium_tests
Message-ID: <20080316113609.6625016A12A@codespeak.net>
Author: gotcha
Date: Sun Mar 16 12:36:08 2008
New Revision: 52585
Modified:
kukit/kss.core/trunk/kss/core/plugins/core/demo/parameterfunction/forms.kss
kukit/kss.core/trunk/kss/core/plugins/core/demo/parameterfunction/forms.pt
kukit/kss.core/trunk/kss/core/plugins/core/demo/parameterfunction/selenium_tests/pf_forms.html
Log:
disabled input values should not be submitted with the form
Modified: kukit/kss.core/trunk/kss/core/plugins/core/demo/parameterfunction/forms.kss
==============================================================================
--- kukit/kss.core/trunk/kss/core/plugins/core/demo/parameterfunction/forms.kss (original)
+++ kukit/kss.core/trunk/kss/core/plugins/core/demo/parameterfunction/forms.kss Sun Mar 16 12:36:08 2008
@@ -50,6 +50,15 @@
submitFullFormIntoRequest-kssSubmitForm: currentForm();
}
+#fullform-disabled:click {
+ action-client: setAttribute;
+ setAttribute-kssSelector: "#value1";
+ setAttribute-name: disabled;
+ setAttribute-value: true;
+ action-server: submitFullFormIntoRequest;
+ submitFullFormIntoRequest-kssSubmitForm: currentForm();
+}
+
#fullform-named:click {
action-server: submitFullFormIntoRequest;
submitFullFormIntoRequest-kssSubmitForm: form(full2);
Modified: kukit/kss.core/trunk/kss/core/plugins/core/demo/parameterfunction/forms.pt
==============================================================================
--- kukit/kss.core/trunk/kss/core/plugins/core/demo/parameterfunction/forms.pt (original)
+++ kukit/kss.core/trunk/kss/core/plugins/core/demo/parameterfunction/forms.pt Sun Mar 16 12:36:08 2008
@@ -173,19 +173,16 @@
Click the button.
Click me !
+ Click me !
Modified: kukit/kss.core/trunk/kss/core/plugins/core/demo/parameterfunction/selenium_tests/pf_forms.html
==============================================================================
--- kukit/kss.core/trunk/kss/core/plugins/core/demo/parameterfunction/selenium_tests/pf_forms.html (original)
+++ kukit/kss.core/trunk/kss/core/plugins/core/demo/parameterfunction/selenium_tests/pf_forms.html Sun Mar 16 12:36:08 2008
@@ -128,6 +128,27 @@
From gotcha at codespeak.net Sun Mar 16 12:45:33 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sun, 16 Mar 2008 12:45:33 +0100 (CET)
Subject: [KSS-checkins] r52587 - kukit/kukit.js/branch/1.4/kukit
Message-ID: <20080316114533.7F5CE16A155@codespeak.net>
Author: gotcha
Date: Sun Mar 16 12:45:33 2008
New Revision: 52587
Modified:
kukit/kukit.js/branch/1.4/kukit/forms.js
Log:
disabled input values should not be submitted with the form
Modified: kukit/kukit.js/branch/1.4/kukit/forms.js
==============================================================================
--- kukit/kukit.js/branch/1.4/kukit/forms.js (original)
+++ kukit/kukit.js/branch/1.4/kukit/forms.js Sun Mar 16 12:45:33 2008
@@ -186,6 +186,9 @@
// First: update the field in case an editor is lurking
// in the background
this.fieldUpdateRegistry.doUpdate(element);
+ if (element.disabled) {
+ return null;
+ }
// Collect the data
if (element.selectedIndex != undefined) {
// handle single selects first
From gotcha at codespeak.net Sun Mar 16 12:45:52 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sun, 16 Mar 2008 12:45:52 +0100 (CET)
Subject: [KSS-checkins] r52588 - in
kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/parameterfunction:
. selenium_tests
Message-ID: <20080316114552.61EDD16A155@codespeak.net>
Author: gotcha
Date: Sun Mar 16 12:45:52 2008
New Revision: 52588
Modified:
kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/parameterfunction/forms.kss
kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/parameterfunction/forms.pt
kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/parameterfunction/selenium_tests/pf_forms.html
Log:
disabled input values should not be submitted with the form
Modified: kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/parameterfunction/forms.kss
==============================================================================
--- kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/parameterfunction/forms.kss (original)
+++ kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/parameterfunction/forms.kss Sun Mar 16 12:45:52 2008
@@ -50,6 +50,15 @@
submitFullFormIntoRequest-kssSubmitForm: currentForm();
}
+#fullform-disabled:click {
+ action-client: setAttribute;
+ setAttribute-kssSelector: "#value1";
+ setAttribute-name: disabled;
+ setAttribute-value: true;
+ action-server: submitFullFormIntoRequest;
+ submitFullFormIntoRequest-kssSubmitForm: currentForm();
+}
+
#fullform-named:click {
action-server: submitFullFormIntoRequest;
submitFullFormIntoRequest-kssSubmitForm: form(full2);
Modified: kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/parameterfunction/forms.pt
==============================================================================
--- kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/parameterfunction/forms.pt (original)
+++ kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/parameterfunction/forms.pt Sun Mar 16 12:45:52 2008
@@ -173,19 +173,16 @@
Click the button.
Click me !
+ Click me !
Modified: kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/parameterfunction/selenium_tests/pf_forms.html
==============================================================================
--- kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/parameterfunction/selenium_tests/pf_forms.html (original)
+++ kukit/kss.core/branch/1.4/kss/core/plugins/core/demo/parameterfunction/selenium_tests/pf_forms.html Sun Mar 16 12:45:52 2008
@@ -128,6 +128,27 @@
From gotcha at codespeak.net Sun Mar 16 12:54:31 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sun, 16 Mar 2008 12:54:31 +0100 (CET)
Subject: [KSS-checkins] r52589 - kukit/kss.buildout/branch/1.2
Message-ID: <20080316115431.A94DB16A127@codespeak.net>
Author: gotcha
Date: Sun Mar 16 12:54:29 2008
New Revision: 52589
Added:
kukit/kss.buildout/branch/1.2/
- copied from r52588, kukit/kss.buildout/trunk/
Log:
to ease maintenance of 1.2
From gotcha at codespeak.net Sun Mar 16 12:55:11 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sun, 16 Mar 2008 12:55:11 +0100 (CET)
Subject: [KSS-checkins] r52590 - kukit/kss.buildout/branch/1.4
Message-ID: <20080316115511.1ED4E16A12C@codespeak.net>
Author: gotcha
Date: Sun Mar 16 12:55:10 2008
New Revision: 52590
Added:
kukit/kss.buildout/branch/1.4/
- copied from r52589, kukit/kss.buildout/trunk/
Log:
to ease maintenance of 1.4
From gotcha at codespeak.net Sun Mar 16 12:56:28 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sun, 16 Mar 2008 12:56:28 +0100 (CET)
Subject: [KSS-checkins] r52591 - kukit/kss.buildout/branch/1.4/src
Message-ID: <20080316115628.6970116A127@codespeak.net>
Author: gotcha
Date: Sun Mar 16 12:56:27 2008
New Revision: 52591
Modified:
kukit/kss.buildout/branch/1.4/src/ (props changed)
kukit/kss.buildout/branch/1.4/src/EXTERNALS.txt
Log:
fix externals
Modified: kukit/kss.buildout/branch/1.4/src/EXTERNALS.txt
==============================================================================
--- kukit/kss.buildout/branch/1.4/src/EXTERNALS.txt (original)
+++ kukit/kss.buildout/branch/1.4/src/EXTERNALS.txt Sun Mar 16 12:56:27 2008
@@ -1,5 +1,5 @@
# created by: svn propset svn:externals -F ./EXTERNALS.TXT .
-kss.core https://codespeak.net/svn/kukit/kss.core/trunk
-kss.demo https://codespeak.net/svn/kukit/kss.demo/trunk
+kss.core https://codespeak.net/svn/kukit/kss.core/branch/1.4
+kss.demo https://codespeak.net/svn/kukit/kss.demo/branch/1.4
From gotcha at codespeak.net Sun Mar 16 13:01:37 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sun, 16 Mar 2008 13:01:37 +0100 (CET)
Subject: [KSS-checkins] r52592 - kukit/kss.buildout/branch/1.2/src
Message-ID: <20080316120137.89E3416A147@codespeak.net>
Author: gotcha
Date: Sun Mar 16 13:01:36 2008
New Revision: 52592
Modified:
kukit/kss.buildout/branch/1.2/src/ (props changed)
kukit/kss.buildout/branch/1.2/src/EXTERNALS.txt
Log:
fix externals
Modified: kukit/kss.buildout/branch/1.2/src/EXTERNALS.txt
==============================================================================
--- kukit/kss.buildout/branch/1.2/src/EXTERNALS.txt (original)
+++ kukit/kss.buildout/branch/1.2/src/EXTERNALS.txt Sun Mar 16 13:01:36 2008
@@ -1,5 +1,5 @@
# created by: svn propset svn:externals -F ./EXTERNALS.TXT .
-kss.core https://codespeak.net/svn/kukit/kss.core/trunk
-kss.demo https://codespeak.net/svn/kukit/kss.demo/trunk
+kss.core https://codespeak.net/svn/kukit/kss.core/branch/1.2
+kss.demo https://codespeak.net/svn/kukit/kss.demo/branch/1.2
From gotcha at codespeak.net Sun Mar 16 13:06:52 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sun, 16 Mar 2008 13:06:52 +0100 (CET)
Subject: [KSS-checkins] r52593 - kukit/kukit.js/branch/1.2/kukit
Message-ID: <20080316120652.E530E16A149@codespeak.net>
Author: gotcha
Date: Sun Mar 16 13:06:52 2008
New Revision: 52593
Modified:
kukit/kukit.js/branch/1.2/kukit/forms.js
Log:
backport fix:
disabled input values should not be submitted with the form
Modified: kukit/kukit.js/branch/1.2/kukit/forms.js
==============================================================================
--- kukit/kukit.js/branch/1.2/kukit/forms.js (original)
+++ kukit/kukit.js/branch/1.2/kukit/forms.js Sun Mar 16 13:06:52 2008
@@ -169,6 +169,9 @@
// First: update the field in case an editor is lurking
// in the background
kukit.fo.fieldUpdateRegistry.doUpdate(element);
+ if (element.disabled) {
+ return null;
+ }
// Collect the data
if (element.selectedIndex != undefined) {
// handle single selects first
From gotcha at codespeak.net Sun Mar 16 16:00:53 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sun, 16 Mar 2008 16:00:53 +0100 (CET)
Subject: [KSS-checkins] r52602 - kukit/kukit.js/trunk/doc
Message-ID: <20080316150053.5B5C116A07D@codespeak.net>
Author: gotcha
Date: Sun Mar 16 16:00:49 2008
New Revision: 52602
Modified:
kukit/kukit.js/trunk/doc/HISTORY.txt
Log:
should not forget to update
Modified: kukit/kukit.js/trunk/doc/HISTORY.txt
==============================================================================
--- kukit/kukit.js/trunk/doc/HISTORY.txt (original)
+++ kukit/kukit.js/trunk/doc/HISTORY.txt Sun Mar 16 16:00:49 2008
@@ -6,6 +6,9 @@
- ...
+ - disabled input values should not be submitted with the form
+ [gotcha]
+
- Updated base2-dom-fp.js with newest version.
This fixes breakage on FireFox 3.
[ree]
From gotcha at codespeak.net Sun Mar 16 16:02:12 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sun, 16 Mar 2008 16:02:12 +0100 (CET)
Subject: [KSS-checkins] r52603 - kukit/kukit.js/branch/1.2/doc
Message-ID: <20080316150212.3621916A07D@codespeak.net>
Author: gotcha
Date: Sun Mar 16 16:02:10 2008
New Revision: 52603
Modified:
kukit/kukit.js/branch/1.2/doc/HISTORY.txt
Log:
should not forget to update
Modified: kukit/kukit.js/branch/1.2/doc/HISTORY.txt
==============================================================================
--- kukit/kukit.js/branch/1.2/doc/HISTORY.txt (original)
+++ kukit/kukit.js/branch/1.2/doc/HISTORY.txt Sun Mar 16 16:02:10 2008
@@ -5,6 +5,9 @@
kukit.js - 1.2dev Unreleased
- ...
+
+ - disabled input values should not be submitted with the form
+ [gotcha]
kukit.js - 1.2.4 Released 2007-12-06
From gotcha at codespeak.net Sun Mar 16 16:03:17 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sun, 16 Mar 2008 16:03:17 +0100 (CET)
Subject: [KSS-checkins] r52604 - kukit/kukit.js/branch/1.4/doc
Message-ID: <20080316150317.8AC7D16A07D@codespeak.net>
Author: gotcha
Date: Sun Mar 16 16:03:16 2008
New Revision: 52604
Modified:
kukit/kukit.js/branch/1.4/doc/HISTORY.txt
Log:
should not forget to update
Modified: kukit/kukit.js/branch/1.4/doc/HISTORY.txt
==============================================================================
--- kukit/kukit.js/branch/1.4/doc/HISTORY.txt (original)
+++ kukit/kukit.js/branch/1.4/doc/HISTORY.txt Sun Mar 16 16:03:16 2008
@@ -6,6 +6,9 @@
- ...
+ - disabled input values should not be submitted with the form
+ [gotcha]
+
- Updated base2-dom-fp.js with newest version.
This fixes breakage on FireFox 3.
[ree]
From kukit-checkins at codespeak.net Sun Mar 16 20:50:48 2008
From: kukit-checkins at codespeak.net (kukit-checkins at codespeak.net)
Date: Sun, 16 Mar 2008 20:50:48 +0100 (CET)
Subject: [KSS-checkins] Men's Health id 818660
Message-ID: <20080316094953.2835.qmail@chello089076050246.chello.pl>
Canadian Doctor Elliot Smith Best Price On Net March 71% OFF!
http://www.google.com/pagead/iclk?sa=l&ai=doamu&num=49606&adurl=http://vnwq.landbasic.com?jdssdf
From kukit-checkins at codespeak.net Tue Mar 25 13:52:44 2008
From: kukit-checkins at codespeak.net (kukit-checkins at codespeak.net)
Date: Tue, 25 Mar 2008 13:52:44 +0100 (CET)
Subject: [KSS-checkins] MedHelp id 0968478
Message-ID: <20080325165150.7447.qmail@bbcache-103.singnet.com.sg>
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kukit-checkins/attachments/20080325/b81608b7/attachment.htm
From reebalazs at codespeak.net Tue Mar 25 16:24:10 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Tue, 25 Mar 2008 16:24:10 +0100 (CET)
Subject: [KSS-checkins] r52918 - kukit/kss.concatresource/tag/1.4-rc1
Message-ID: <20080325152410.66AA2168417@codespeak.net>
Author: reebalazs
Date: Tue Mar 25 16:24:10 2008
New Revision: 52918
Added:
kukit/kss.concatresource/tag/1.4-rc1/
- copied from r52917, kukit/kss.concatresource/branch/1.4/
Log:
Tag for release
From reebalazs at codespeak.net Tue Mar 25 16:27:15 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Tue, 25 Mar 2008 16:27:15 +0100 (CET)
Subject: [KSS-checkins] r52920 - in kukit/kss.concatresource/tag/1.4-rc1: .
docs kss/concatresource
Message-ID: <20080325152715.B5080168417@codespeak.net>
Author: reebalazs
Date: Tue Mar 25 16:27:15 2008
New Revision: 52920
Removed:
kukit/kss.concatresource/tag/1.4-rc1/setup.cfg
Modified:
kukit/kss.concatresource/tag/1.4-rc1/docs/HISTORY.txt
kukit/kss.concatresource/tag/1.4-rc1/kss/concatresource/version.txt
kukit/kss.concatresource/tag/1.4-rc1/setup.py
Log:
Set release
Modified: kukit/kss.concatresource/tag/1.4-rc1/docs/HISTORY.txt
==============================================================================
--- kukit/kss.concatresource/tag/1.4-rc1/docs/HISTORY.txt (original)
+++ kukit/kss.concatresource/tag/1.4-rc1/docs/HISTORY.txt Tue Mar 25 16:27:15 2008
@@ -2,9 +2,10 @@
(name of developer listed in brackets)
-kss.concatresource - 1.4dev Unreleased
+kss.concatresource - 1.4-rc1 Released 2008-03-25
- - ...
+ - Prepare for release
+ [ree]
kss.concatresource - 1.4-alpha1 Released 2008-03-09
Modified: kukit/kss.concatresource/tag/1.4-rc1/kss/concatresource/version.txt
==============================================================================
--- kukit/kss.concatresource/tag/1.4-rc1/kss/concatresource/version.txt (original)
+++ kukit/kss.concatresource/tag/1.4-rc1/kss/concatresource/version.txt Tue Mar 25 16:27:15 2008
@@ -1 +1 @@
-1.4dev Unreleased
+1.4-rc1 Released 2008-03-25
Deleted: /kukit/kss.concatresource/tag/1.4-rc1/setup.cfg
==============================================================================
--- /kukit/kss.concatresource/tag/1.4-rc1/setup.cfg Tue Mar 25 16:27:15 2008
+++ (empty file)
@@ -1,3 +0,0 @@
-[egg_info]
-tag_build = dev
-tag_svn_revision = true
Modified: kukit/kss.concatresource/tag/1.4-rc1/setup.py
==============================================================================
--- kukit/kss.concatresource/tag/1.4-rc1/setup.py (original)
+++ kukit/kss.concatresource/tag/1.4-rc1/setup.py Tue Mar 25 16:27:15 2008
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages
-version = '1.4'
+version = '1.4-rc1'
setup(name='concatresource',
version=version,
From reebalazs at codespeak.net Tue Mar 25 16:27:45 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Tue, 25 Mar 2008 16:27:45 +0100 (CET)
Subject: [KSS-checkins] r52921 - kukit/kss.concatresource/branch/1.4/docs
Message-ID: <20080325152745.85F95168419@codespeak.net>
Author: reebalazs
Date: Tue Mar 25 16:27:45 2008
New Revision: 52921
Modified:
kukit/kss.concatresource/branch/1.4/docs/HISTORY.txt
Log:
Adjust history
Modified: kukit/kss.concatresource/branch/1.4/docs/HISTORY.txt
==============================================================================
--- kukit/kss.concatresource/branch/1.4/docs/HISTORY.txt (original)
+++ kukit/kss.concatresource/branch/1.4/docs/HISTORY.txt Tue Mar 25 16:27:45 2008
@@ -6,6 +6,11 @@
- ...
+kss.concatresource - 1.4-rc1 Released 2008-03-25
+
+ - Prepare for release
+ [ree]
+
kss.concatresource - 1.4-alpha1 Released 2008-03-09
- Prepare for release
From reebalazs at codespeak.net Tue Mar 25 16:28:26 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Tue, 25 Mar 2008 16:28:26 +0100 (CET)
Subject: [KSS-checkins] r52922 - kukit/kukit.js/tag/1.4-rc1
Message-ID: <20080325152826.0E9A3168419@codespeak.net>
Author: reebalazs
Date: Tue Mar 25 16:28:25 2008
New Revision: 52922
Added:
kukit/kukit.js/tag/1.4-rc1/
- copied from r52921, kukit/kukit.js/branch/1.4/
Log:
Tag for release
From reebalazs at codespeak.net Tue Mar 25 16:31:08 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Tue, 25 Mar 2008 16:31:08 +0100 (CET)
Subject: [KSS-checkins] r52923 - in kukit/kukit.js/tag/1.4-rc1: . doc
Message-ID: <20080325153108.3A46B168417@codespeak.net>
Author: reebalazs
Date: Tue Mar 25 16:31:07 2008
New Revision: 52923
Modified:
kukit/kukit.js/tag/1.4-rc1/doc/HISTORY.txt
kukit/kukit.js/tag/1.4-rc1/version.txt
Log:
Set release
Modified: kukit/kukit.js/tag/1.4-rc1/doc/HISTORY.txt
==============================================================================
--- kukit/kukit.js/tag/1.4-rc1/doc/HISTORY.txt (original)
+++ kukit/kukit.js/tag/1.4-rc1/doc/HISTORY.txt Tue Mar 25 16:31:07 2008
@@ -2,9 +2,7 @@
(name of developer listed in brackets)
-kukit.js - 1.4dev Unreleased
-
- - ...
+kukit.js - 1.4-rc1 Released 2008-03-25
- disabled input values should not be submitted with the form
[gotcha]
Modified: kukit/kukit.js/tag/1.4-rc1/version.txt
==============================================================================
--- kukit/kukit.js/tag/1.4-rc1/version.txt (original)
+++ kukit/kukit.js/tag/1.4-rc1/version.txt Tue Mar 25 16:31:07 2008
@@ -1 +1 @@
-1.4dev unreleased
+1.4-rc1 Released 2008-03-25
From reebalazs at codespeak.net Tue Mar 25 16:31:55 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Tue, 25 Mar 2008 16:31:55 +0100 (CET)
Subject: [KSS-checkins] r52924 - kukit/kukit.js/branch/1.4/doc
Message-ID: <20080325153155.2BABB168419@codespeak.net>
Author: reebalazs
Date: Tue Mar 25 16:31:54 2008
New Revision: 52924
Modified:
kukit/kukit.js/branch/1.4/doc/HISTORY.txt
Log:
Adjust history
Modified: kukit/kukit.js/branch/1.4/doc/HISTORY.txt
==============================================================================
--- kukit/kukit.js/branch/1.4/doc/HISTORY.txt (original)
+++ kukit/kukit.js/branch/1.4/doc/HISTORY.txt Tue Mar 25 16:31:54 2008
@@ -5,6 +5,8 @@
kukit.js - 1.4dev Unreleased
- ...
+
+kukit.js - 1.4-rc1 Released 2008-03-25
- disabled input values should not be submitted with the form
[gotcha]
From reebalazs at codespeak.net Tue Mar 25 16:32:46 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Tue, 25 Mar 2008 16:32:46 +0100 (CET)
Subject: [KSS-checkins] r52925 - kukit/kss.core/tag/1.4-rc1
Message-ID: <20080325153246.7798E168417@codespeak.net>
Author: reebalazs
Date: Tue Mar 25 16:32:46 2008
New Revision: 52925
Added:
kukit/kss.core/tag/1.4-rc1/
- copied from r52924, kukit/kss.core/branch/1.4/
Log:
Tag for release
From reebalazs at codespeak.net Tue Mar 25 16:48:06 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Tue, 25 Mar 2008 16:48:06 +0100 (CET)
Subject: [KSS-checkins] r52926 - in kukit/kss.core/tag/1.4-rc1: . docs
kss/core kss/core/pluginregistry
Message-ID: <20080325154806.269511683DE@codespeak.net>
Author: reebalazs
Date: Tue Mar 25 16:48:05 2008
New Revision: 52926
Removed:
kukit/kss.core/tag/1.4-rc1/setup.cfg
Modified:
kukit/kss.core/tag/1.4-rc1/docs/HISTORY.txt
kukit/kss.core/tag/1.4-rc1/kss/core/ (props changed)
kukit/kss.core/tag/1.4-rc1/kss/core/EXTERNALS.TXT
kukit/kss.core/tag/1.4-rc1/kss/core/pluginregistry/ (props changed)
kukit/kss.core/tag/1.4-rc1/kss/core/pluginregistry/EXTERNALS.TXT
kukit/kss.core/tag/1.4-rc1/kss/core/version.txt
kukit/kss.core/tag/1.4-rc1/setup.py
Log:
Set release
Modified: kukit/kss.core/tag/1.4-rc1/docs/HISTORY.txt
==============================================================================
--- kukit/kss.core/tag/1.4-rc1/docs/HISTORY.txt (original)
+++ kukit/kss.core/tag/1.4-rc1/docs/HISTORY.txt Tue Mar 25 16:48:05 2008
@@ -2,9 +2,10 @@
(name of developer listed in brackets)
-kss.core - 1.4dev Unreleased
+kss.core - 1.4-rc1 Released 2008-03-25
- - ...
+ - disabled input values should not be submitted with the form
+ [gotcha]
- Updated base2-don-fp.js with newest version.
This fixes breakage on FireFox 3.
Modified: kukit/kss.core/tag/1.4-rc1/kss/core/EXTERNALS.TXT
==============================================================================
--- kukit/kss.core/tag/1.4-rc1/kss/core/EXTERNALS.TXT (original)
+++ kukit/kss.core/tag/1.4-rc1/kss/core/EXTERNALS.TXT Tue Mar 25 16:48:05 2008
@@ -5,4 +5,4 @@
# You can update your working dir by:
# svn propset svn:externals -F EXTERNALS.TXT .
#
-kukit http://codespeak.net/svn/kukit/kukit.js/branch/1.4/
+kukit http://codespeak.net/svn/kukit/kukit.js/trunk/1.4-rc1/
Modified: kukit/kss.core/tag/1.4-rc1/kss/core/pluginregistry/EXTERNALS.TXT
==============================================================================
--- kukit/kss.core/tag/1.4-rc1/kss/core/pluginregistry/EXTERNALS.TXT (original)
+++ kukit/kss.core/tag/1.4-rc1/kss/core/pluginregistry/EXTERNALS.TXT Tue Mar 25 16:48:05 2008
@@ -7,4 +7,4 @@
#
# concatresource is now included like as batteries
-_concatresource https://codespeak.net/svn/kukit/kss.concatresource/branch/1.4/kss/concatresource
+_concatresource https://codespeak.net/svn/kukit/kss.concatresource/tag/1.4-rc1/kss/concatresource
Modified: kukit/kss.core/tag/1.4-rc1/kss/core/version.txt
==============================================================================
--- kukit/kss.core/tag/1.4-rc1/kss/core/version.txt (original)
+++ kukit/kss.core/tag/1.4-rc1/kss/core/version.txt Tue Mar 25 16:48:05 2008
@@ -1 +1 @@
-1.4dev unreleased
+1.4-rc1 Released 2008-03-25
Deleted: /kukit/kss.core/tag/1.4-rc1/setup.cfg
==============================================================================
--- /kukit/kss.core/tag/1.4-rc1/setup.cfg Tue Mar 25 16:48:05 2008
+++ (empty file)
@@ -1,3 +0,0 @@
-[egg_info]
-tag_build = dev
-tag_svn_revision = true
Modified: kukit/kss.core/tag/1.4-rc1/setup.py
==============================================================================
--- kukit/kss.core/tag/1.4-rc1/setup.py (original)
+++ kukit/kss.core/tag/1.4-rc1/setup.py Tue Mar 25 16:48:05 2008
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import sys, os
-version = '1.4'
+version = '1.4-rc1'
setup(name='kss.core',
version=version,
From reebalazs at codespeak.net Tue Mar 25 16:48:58 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Tue, 25 Mar 2008 16:48:58 +0100 (CET)
Subject: [KSS-checkins] r52927 - kukit/kss.core/tag/1.4-rc1/kss/core
Message-ID: <20080325154858.3E7CD1683DE@codespeak.net>
Author: reebalazs
Date: Tue Mar 25 16:48:57 2008
New Revision: 52927
Modified:
kukit/kss.core/tag/1.4-rc1/kss/core/ (props changed)
kukit/kss.core/tag/1.4-rc1/kss/core/EXTERNALS.TXT
Log:
Set release (fix external)
Modified: kukit/kss.core/tag/1.4-rc1/kss/core/EXTERNALS.TXT
==============================================================================
--- kukit/kss.core/tag/1.4-rc1/kss/core/EXTERNALS.TXT (original)
+++ kukit/kss.core/tag/1.4-rc1/kss/core/EXTERNALS.TXT Tue Mar 25 16:48:57 2008
@@ -5,4 +5,4 @@
# You can update your working dir by:
# svn propset svn:externals -F EXTERNALS.TXT .
#
-kukit http://codespeak.net/svn/kukit/kukit.js/trunk/1.4-rc1/
+kukit http://codespeak.net/svn/kukit/kukit.js/tag/1.4-rc1/
From reebalazs at codespeak.net Tue Mar 25 16:52:07 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Tue, 25 Mar 2008 16:52:07 +0100 (CET)
Subject: [KSS-checkins] r52928 - kukit/kss.demo/tag/1.4-rc1
Message-ID: <20080325155207.5F9C516802E@codespeak.net>
Author: reebalazs
Date: Tue Mar 25 16:52:06 2008
New Revision: 52928
Added:
kukit/kss.demo/tag/1.4-rc1/
- copied from r52927, kukit/kss.demo/branch/1.4/
Log:
Tag for release
From reebalazs at codespeak.net Tue Mar 25 16:54:26 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Tue, 25 Mar 2008 16:54:26 +0100 (CET)
Subject: [KSS-checkins] r52929 - kukit/kss.core/branch/1.4/docs
Message-ID: <20080325155426.DC5ED1683DE@codespeak.net>
Author: reebalazs
Date: Tue Mar 25 16:54:24 2008
New Revision: 52929
Modified:
kukit/kss.core/branch/1.4/docs/HISTORY.txt
Log:
Adjust history
Modified: kukit/kss.core/branch/1.4/docs/HISTORY.txt
==============================================================================
--- kukit/kss.core/branch/1.4/docs/HISTORY.txt (original)
+++ kukit/kss.core/branch/1.4/docs/HISTORY.txt Tue Mar 25 16:54:24 2008
@@ -6,6 +6,11 @@
- ...
+kss.core - 1.4-rc1 Released 2008-03-25
+
+ - disabled input values should not be submitted with the form
+ [gotcha]
+
- Updated base2-don-fp.js with newest version.
This fixes breakage on FireFox 3.
[ree]
From reebalazs at codespeak.net Tue Mar 25 17:00:39 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Tue, 25 Mar 2008 17:00:39 +0100 (CET)
Subject: [KSS-checkins] r52930 - in kukit/kss.demo/tag/1.4-rc1: . docs
kss/demo
Message-ID: <20080325160039.B03771683F8@codespeak.net>
Author: reebalazs
Date: Tue Mar 25 17:00:39 2008
New Revision: 52930
Removed:
kukit/kss.demo/tag/1.4-rc1/setup.cfg
Modified:
kukit/kss.demo/tag/1.4-rc1/docs/HISTORY.txt
kukit/kss.demo/tag/1.4-rc1/kss/demo/version.txt
kukit/kss.demo/tag/1.4-rc1/setup.py
Log:
Set release
Modified: kukit/kss.demo/tag/1.4-rc1/docs/HISTORY.txt
==============================================================================
--- kukit/kss.demo/tag/1.4-rc1/docs/HISTORY.txt (original)
+++ kukit/kss.demo/tag/1.4-rc1/docs/HISTORY.txt Tue Mar 25 17:00:39 2008
@@ -2,9 +2,10 @@
(name of developer listed in brackets)
-kss.demo - 1.4dev Unreleased
+kss.demo - 1.4-rc1 Released 2008-03-25
- - ...
+ - Prepare for release
+ [ree]
kss.demo - 1.4-alpha1 Released 2008-03-09
Modified: kukit/kss.demo/tag/1.4-rc1/kss/demo/version.txt
==============================================================================
--- kukit/kss.demo/tag/1.4-rc1/kss/demo/version.txt (original)
+++ kukit/kss.demo/tag/1.4-rc1/kss/demo/version.txt Tue Mar 25 17:00:39 2008
@@ -1 +1 @@
-1.4dev Unreleased
+1.4-rc1 Released 2008-03-25
Deleted: /kukit/kss.demo/tag/1.4-rc1/setup.cfg
==============================================================================
--- /kukit/kss.demo/tag/1.4-rc1/setup.cfg Tue Mar 25 17:00:39 2008
+++ (empty file)
@@ -1,3 +0,0 @@
-[egg_info]
-tag_build = dev
-tag_svn_revision = true
Modified: kukit/kss.demo/tag/1.4-rc1/setup.py
==============================================================================
--- kukit/kss.demo/tag/1.4-rc1/setup.py (original)
+++ kukit/kss.demo/tag/1.4-rc1/setup.py Tue Mar 25 17:00:39 2008
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import sys, os
-version = '1.4'
+version = '1.4-rc1'
setup(name='kss.demo',
version=version,
@@ -27,12 +27,11 @@
install_requires=[
# -*- Extra requirements: -*-
'setuptools',
- 'kss.core>=dev',
+ 'kss.core==1.4-rc1',
],
entry_points="""
# -*- Entry points: -*-
""",
dependency_links=[
- 'https://codespeak.net/svn/kukit/kss.core/branch/1.4#egg=kss.core-dev',
],
)
From reebalazs at codespeak.net Tue Mar 25 17:03:19 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Tue, 25 Mar 2008 17:03:19 +0100 (CET)
Subject: [KSS-checkins] r52931 - kukit/kss.demo/branch/1.4/docs
Message-ID: <20080325160319.12DB61683DE@codespeak.net>
Author: reebalazs
Date: Tue Mar 25 17:03:18 2008
New Revision: 52931
Modified:
kukit/kss.demo/branch/1.4/docs/HISTORY.txt
Log:
Adjust history
Modified: kukit/kss.demo/branch/1.4/docs/HISTORY.txt
==============================================================================
--- kukit/kss.demo/branch/1.4/docs/HISTORY.txt (original)
+++ kukit/kss.demo/branch/1.4/docs/HISTORY.txt Tue Mar 25 17:03:18 2008
@@ -6,6 +6,11 @@
- ...
+kss.demo - 1.4-rc1 Released 2008-03-25
+
+ - Prepare for release
+ [ree]
+
kss.demo - 1.4-alpha1 Released 2008-03-09
- Use develui.css (style is inline with kssproject.org).
From kukit-checkins at codespeak.net Tue Mar 25 18:48:53 2008
From: kukit-checkins at codespeak.net (VIAGRA ® Official Site)
Date: Tue, 25 Mar 2008 18:48:53 +0100 (CET)
Subject: [KSS-checkins] MedHelp id 036661
Message-ID: <20080325074800.18211.qmail@drt145.neoplus.adsl.tpnet.pl>
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kukit-checkins/attachments/20080325/38cf8afa/attachment.htm
From reebalazs at codespeak.net Wed Mar 26 14:45:57 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Wed, 26 Mar 2008 14:45:57 +0100 (CET)
Subject: [KSS-checkins] r52958 - kukit/kss.demo/branch/1.4-kss-test
Message-ID: <20080326134557.28164169E93@codespeak.net>
Author: reebalazs
Date: Wed Mar 26 14:45:55 2008
New Revision: 52958
Added:
kukit/kss.demo/branch/1.4-kss-test/
- copied from r52957, kukit/kss.demo/branch/1.4/
Log:
Branching off for Sorrento sprint and psps
From witsch at codespeak.net Thu Mar 27 23:17:18 2008
From: witsch at codespeak.net (witsch at codespeak.net)
Date: Thu, 27 Mar 2008 23:17:18 +0100 (CET)
Subject: [KSS-checkins] r53026 - kukit/kss.demo/branch/1.4
Message-ID: <20080327221718.5F04F169F8F@codespeak.net>
Author: witsch
Date: Thu Mar 27 23:17:17 2008
New Revision: 53026
Modified:
kukit/kss.demo/branch/1.4/ (props changed)
Log:
ignore the egg info
From reebalazs at codespeak.net Fri Mar 28 11:03:12 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Fri, 28 Mar 2008 11:03:12 +0100 (CET)
Subject: [KSS-checkins] r53043 - in
kukit/kss.demo/branch/1.4-kss-test/kss/demo: . browser
selenium_utils
Message-ID: <20080328100312.13EF4169FB1@codespeak.net>
Author: reebalazs
Date: Fri Mar 28 11:03:11 2008
New Revision: 53043
Modified:
kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/registry.py
kukit/kss.demo/branch/1.4-kss-test/kss/demo/interfaces.py
kukit/kss.demo/branch/1.4-kss-test/kss/demo/registry.py
kukit/kss.demo/branch/1.4-kss-test/kss/demo/resource.py
kukit/kss.demo/branch/1.4-kss-test/kss/demo/selenium_utils/builder.py
Log:
Progress on selenium test resources improvement
Modified: kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/registry.py
==============================================================================
--- kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/registry.py (original)
+++ kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/registry.py Fri Mar 28 11:03:11 2008
@@ -101,7 +101,8 @@
"""Return the html resource, whose absolute filename is given,"""
# First of all, let's check if this is one of our file.
# (Refuse otherwise - we don't want access to all files on the server.)
- if filename not in self.selenium_test_filenames:
+ registry = getUtility(IKSSDemoRegistry)
+ if filename not in registry.all_registered_filenames:
raise Exception, "Nonexistent resource"
# Return the file's content.
self.request.response.setHeader('Content-type', 'text/html;charset=utf-8')
Modified: kukit/kss.demo/branch/1.4-kss-test/kss/demo/interfaces.py
==============================================================================
--- kukit/kss.demo/branch/1.4-kss-test/kss/demo/interfaces.py (original)
+++ kukit/kss.demo/branch/1.4-kss-test/kss/demo/interfaces.py Fri Mar 28 11:03:11 2008
@@ -2,6 +2,7 @@
from zope.schema import (
TextLine,
List,
+ Object,
)
class ISimpleContent(Interface):
@@ -42,13 +43,51 @@
required=True,
)
-class IKSSSeleniumTestDirectory(Interface):
- """Represents an actual selenium test directory"""
+class IKSSSeleniumTestLayer(Interface):
+ """Represents a selenium test layer"""
- test_directory = TextLine(
- title=u"test directory",
- description=u'Relative directory path, contains *.html selenium tests',
- required=False,
+class IKSSSeleniumTestCaseCollection(Interface):
+ """Abstract interface representing a set of testcases"""
+
+ def get_filenames(plugin=None, test_root_dir=None):
+ """Return the list of absolute filenames in this collection
+ Each of this files are a .html format selenium test
+
+ Either of plugin and test_root_dir must e specified.
+ They are used to acquire the absolute path of the file
+ which is acquired from the plugin resource's definition
+ place or can be overwritten explicitely by test_root_dir.
+ """
+
+class IKSSSeleniumTestSuite(Interface):
+ """Represents an actual selenium test suite"""
+
+ tests = Object(IKSSSeleniumTestCaseCollection,
+ title = u'Test case collection',
+ description = u'A test case defines an ordered collection of test cases.',
+ required = True,
+ )
+
+ component = TextLine(
+ title = u'Component name',
+ description = u'Import identifier of the component that defines this suite.',
+ required = False,
+ default = u'',
+ )
+
+ application = TextLine(
+ title = u'Application name',
+ description = u'Freeform identifier of the application that this suite tests.'
+ u'It is suggested but not obligatory to use dotted names for this.',
+ required = False,
+ default = u'',
+ )
+
+ layer = Object(IKSSSeleniumTestLayer,
+ title = u"Test layer",
+ description = u'The test layer specifies the setup and teardown .'
+ u'It is suggested but not obligatory to use dotted names for this.',
+ required = False,
)
# --
@@ -68,10 +107,13 @@
class IKSSSeleniumTestResource(Interface):
"""An utility that a demo needs to register"""
- # list of IKSSSeleniumTestDir
- selenium_tests = List(
- title=u"selenium tests",
- description=u'The list of selenium test directories contained in this plugin',
+ # XXX in the "legacy" way, we had KSSSeleniumTestDirectories in the list.
+ # In the new way, and this is what this schema specifies now, we must have
+ # a test suite specification, which may consists of a directory.
+ # Currently, the interface accepts the legacy specification.
+ selenium_tests = Object(IKSSSeleniumTestSuite,
+ title=u"Selenium tests",
+ description=u'The selenium test cases contained in this plugin',
required=True,
)
Modified: kukit/kss.demo/branch/1.4-kss-test/kss/demo/registry.py
==============================================================================
--- kukit/kss.demo/branch/1.4-kss-test/kss/demo/registry.py (original)
+++ kukit/kss.demo/branch/1.4-kss-test/kss/demo/registry.py Fri Mar 28 11:03:11 2008
@@ -10,13 +10,14 @@
IKSSSeleniumTestResource,
IKSSDemoRegistrationEvent,
IKSSDemoRegistryEvent,
+ IKSSSeleniumTestSuite
)
+from resource import KSSSeleniumTestSuite
from zope.component.interfaces import (
IUtilityRegistration,
IRegistered,
IUnregistered,
)
-from kss.demo.selenium_utils.builder import getSeleniumTestsFromSuite
# --
# Registry implementation for use with Zope
@@ -46,8 +47,10 @@
site.registerHandler(self.registerEarlierDemos)
# registry for selenium tests
self.selenium_tests = []
- site.registerHandler(self.registerSeleniumTestsFromPlugin)
- site.registerHandler(self.unregisterSeleniumTestsFromPlugin)
+ self.test_suites = []
+ self.all_registered_filenames = []
+ site.registerHandler(self.registerSeleniumTestSuitesFromPlugin)
+ site.registerHandler(self.unregisterSeleniumTestSuitesFromPlugin)
# ... the rest of setup will be done from registerEarlierDemos
@adapter(IKSSDemoRegistry, IUtilityRegistration, IRegistered, IKSSDemoRegistryEvent)
@@ -63,8 +66,9 @@
for name, plugin in site.getUtilitiesFor(IKSSDemoResource):
for demo in plugin.demos:
self.registerDemo(demo)
- for test_filename in self._getSeleniumTestsFromPlugin(plugin):
- self.registerSeleniumTestFile(test_filename)
+ test_suites = self._convertLegacySeleniumTestSuitesFromPlugin(plugin)
+ for test_suite in test_suites:
+ self.registerSeleniumTestSuite(test_suite)
@adapter(IKSSDemoResource, IUtilityRegistration, IRegistered, IKSSDemoRegistrationEvent)
def registerDemosFromPlugin(self, plugin, registration=None, event=None, new_event=None):
@@ -129,38 +133,54 @@
# --
@staticmethod
- def _getSeleniumTestsFromPlugin(plugin):
- test_filenames = []
- for selenium_test_suite in plugin.selenium_tests:
- filenames = getSeleniumTestsFromSuite(plugin, selenium_test_suite)
- test_filenames.extend(filenames)
- return test_filenames
+ def _convertLegacySeleniumTestSuitesFromPlugin(plugin):
+ # XXX This is only needed because in the "legacy" way, we had test
+ # directories. Now we always have test suites. So when we encounter
+ # a directory, we wrap it as a test suite.
+ test_suites = []
+ for test_suite in plugin.selenium_tests:
+ if not IKSSSeleniumTestSuite.providedBy(test_suite):
+ # legacy way, need to wrap it to be a suite
+ test_suite = KSSSeleniumTestSuite(tests=test_suite)
+ test_suites.append(test_suite)
+ return test_suites
@adapter(IKSSSeleniumTestResource, IUtilityRegistration, IRegistered, IKSSDemoRegistrationEvent)
- def registerSeleniumTestsFromPlugin(self, plugin, registration=None, event=None, new_event=None):
- """Add a demo collection to the registry.
+ def registerSeleniumTestSuitesFromPlugin(self, plugin, registration=None, event=None, new_event=None):
+ """Add a list of test suites to the registry.
"""
- test_filenames = self._getSeleniumTestsFromPlugin(plugin)
- for test_filename in test_filenames:
- self.registerSeleniumTestFile(test_filename)
+ test_suites = self._convertLegacySeleniumTestSuitesFromPlugin(plugin)
+ for test_suite in test_suites:
+ self.registerSeleniumTestSuite(test_suite)
@adapter(IKSSSeleniumTestResource, IUtilityRegistration, IUnregistered, IKSSDemoRegistrationEvent)
- def unregisterSeleniumTestsFromPlugin(self, plugin, registration=None, event=None, new_event=None):
- """Remove a demo collection from the registry.
+ def unregisterSeleniumTestSuitesFromPlugin(self, plugin, registration=None, event=None, new_event=None):
+ """Remove a list of test suites from the registry.
"""
- for test_filename in self._getSeleniumTestsFromPlugin(plugin):
- self.registerSeleniumTestFile(test_filename)
-
- def registerSeleniumTestFile(self, test_filename):
- """Register a selenium test by absolute filename
- """
- if test_filename in self.selenium_tests:
- raise Exception, 'The selenium test for %s has already been registered. Cannot add.' % (test_filename, )
- self.selenium_tests.append(test_filename)
+ test_suites = self._convertLegacySeleniumTestSuitesFromPlugin(plugin)
+ for test_suite in test_suites:
+ self.unregisterSeleniumTestSuite(test_suite)
+
+ def registerSeleniumTestSuite(self, test_suite):
+ """Register a selenium suite."""
+ # Register the suite in different registries.
+ self.test_suites.append(test_suite)
+ # Check if any of the filenames are registered elsewhere.
+ # This also assures by the way, that suites cannot be duplicated.
+ # The filenames are also used for
+ test_filenames = test_suite.tests.get_filenames()
+ for test_filename in test_filenames:
+ if test_filename in self.selenium_tests:
+ raise Exception, 'The selenium test file for %s has already been registered. Cannot add.' % (test_filename, )
+ self.selenium_tests.append(test_filename)
+ # All registered filenames are used to protect the resource
+ # and prevent a malicious attempt to serve something we should not.
+ self.all_registered_filenames.append(test_filename)
+ # XXX TODO need different other registries for lookup of categories.
- def unregisterSeleniumTestFile(self, test_filename):
- """Unregister the given selenium test."""
+ def unregisterSeleniumTestSuite(self, test_suite):
+ """Unregister the given selenium suite."""
try:
- del self.selenium_tests[test_filename]
+ self.test_suites.remove(test_suite)
except KeyError:
- raise Exception, 'The selenium test for %s is yet unregistered. Cannot remove.' % (test_filename, )
+ raise Exception, 'The selenium test suite %s for is yet unregistered. Cannot remove.' % (test_suite )
Modified: kukit/kss.demo/branch/1.4-kss-test/kss/demo/resource.py
==============================================================================
--- kukit/kss.demo/branch/1.4-kss-test/kss/demo/resource.py (original)
+++ kukit/kss.demo/branch/1.4-kss-test/kss/demo/resource.py Fri Mar 28 11:03:11 2008
@@ -1,8 +1,12 @@
from zope.interface import implements
from interfaces import (
IKSSDemo,
- IKSSSeleniumTestDirectory,
+ IKSSSeleniumTestCaseCollection,
+ IKSSSeleniumTestSuite,
)
+import itertools
+import sys, os.path
+from kss.demo.selenium_utils.builder import getRootDirOfModule
# --
# Reference implementations for the described elements
@@ -24,16 +28,100 @@
def __getitem__(self, key):
return getattr(self, key)
-class KSSSeleniumTestDirectory(object):
+class KSSSeleniumTestSuite(object):
+ """Represents a single selenium test case,
+ specified by its filename.
+ """
+ implements(IKSSSeleniumTestSuite)
+
+ # convenience access for page templates
+ __allow_access_to_unprotected_subobjects__ = 1
+
+ tests = ()
+ component = u''
+ application = u''
+ layer = None
+
+ def __init__(self, tests=None, component=u'', application=u'', layer=None):
+ if tests is not None:
+ self.tests = tests
+ if component:
+ self.component = component
+ if application:
+ self.application = application
+ if layer is not None:
+ self.layer = layer
+
+# --
+# IKSSSeleniumTestCaseCollection implementations
+# --
+
+class KSSSeleniumTestCaseCollectionBase(object):
+ "Abstract base class to help collection implementation"
+
+ def find_test_root_dir(self, plugin=None, test_root_dir=None):
+ # XXX This must be called directly from the __init__ of the class
+ # and it is able to find out the directory where the class
+ # was defined from.
+ #
+ # Zope CA magic used to find where the class is defined from
+ frame = sys._getframe(2)
+ locals = frame.f_locals
+ # Try to make sure we were called from a class def
+ if (locals is frame.f_globals) or ('__module__' not in locals):
+ raise TypeError("classProvides can be used only from a class definition.")
+ # store it
+ self.test_root_dir = getRootDirOfModule(locals['__module__'])
+
+ def get_absolute_path(self, filename):
+ "Returns the absolute path of the filename based on the test root directory."
+ return os.path.join(self.test_root_dir, filename)
+
+class KSSSeleniumTestCase(KSSSeleniumTestCaseCollectionBase):
+ """Represents a single selenium test case,
+ specified by its filename.
+ """
+ implements(IKSSSeleniumTestCaseCollection)
+
+ def __init__(self, test_filename):
+ self.find_test_root_dir()
+ self.test_filename = test_filename
+
+ def get_filenames(self):
+ test_filename = self.get_absolute_path(self.test_filename)
+ return [test_filename]
+
+class KSSSeleniumTestDirectory(KSSSeleniumTestCaseCollectionBase):
"""Represents a selenium test directory.
+ It contains a set of tests.
"""
- implements(IKSSSeleniumTestDirectory)
+ implements(IKSSSeleniumTestCaseCollection)
+
def __init__(self, test_directory):
+ self.find_test_root_dir()
self.test_directory = test_directory
- # convenience access for page templates
- __allow_access_to_unprotected_subobjects__ = 1
- def __getitem__(self, key):
- return getattr(self, key)
+ def get_filenames(self):
+ test_filenames = []
+ test_root_dir = self.get_absolute_path(self.test_directory)
+ for test_filename in os.listdir(test_root_dir):
+ if test_filename.lower().endswith('.html') or \
+ test_filename.endswith('.htm'):
+ test_filenames.append((test_filename, os.path.join(test_root_dir, test_filename)))
+ # sort the testfilenames
+ test_filenames.sort()
+ # return only the absolute filenames
+ test_filenames = (filename[1] for filename in test_filenames)
+ return test_filenames
+
+class KSSSeleniumTestCaseList(KSSSeleniumTestCaseCollectionBase):
+ """Recursively collects a list of collectiors.
+ """
+ implements(IKSSSeleniumTestCaseCollection)
+ def __init__(self, *cases):
+ self.find_test_root_dir()
+ self.cases = cases
+ def get_filenames(self):
+ return itertools.chain(*[case.get_filenames() for case in self.cases])
Modified: kukit/kss.demo/branch/1.4-kss-test/kss/demo/selenium_utils/builder.py
==============================================================================
--- kukit/kss.demo/branch/1.4-kss-test/kss/demo/selenium_utils/builder.py (original)
+++ kukit/kss.demo/branch/1.4-kss-test/kss/demo/selenium_utils/builder.py Fri Mar 28 11:03:11 2008
@@ -16,27 +16,6 @@
def getRootDirOfInstance(obj):
return getRootDirOfClass(obj.__class__)
-def getSeleniumTestsFromSuite(owner_instance, suite):
- """Get absolute filenames of all tests from the suite.
- Suite contains the directory that we need to find.
- owner_instance is used for the directory finding,
- the suite's directory is traversed relative from that.
- """
- test_filenames = []
- # The owner instance is only used to traverse the sute directory
- # relative from it.
- root_dir = getRootDirOfInstance(owner_instance)
- tests_root_dir = os.path.join(root_dir, suite.test_directory)
- for test_filename in os.listdir(tests_root_dir):
- if test_filename.lower().endswith('.html') or \
- test_filename.endswith('.htm'):
- test_filenames.append((test_filename, os.path.join(tests_root_dir, test_filename)))
- # sort the testfilenames
- test_filenames.sort()
- # return only the absolute filenames
- test_filenames = [filename[1] for filename in test_filenames]
- return test_filenames
-
template = Template(textwrap.dedent('''\
from seleniumtestcase import SeleniumTestCase
import unittest, time
@@ -69,8 +48,6 @@
arguments.append("self.getVar('%s')"%matched.group('varname'))
return 'self.%s(%s)' % (command, ', '.join(arguments))
-
-
def cookSeleniumTests(filenames):
"""Cook selenium tests
"""
From reebalazs at codespeak.net Fri Mar 28 19:05:50 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Fri, 28 Mar 2008 19:05:50 +0100 (CET)
Subject: [KSS-checkins] r53060 - in
kukit/kss.demo/branch/1.4-kss-test/kss/demo: . browser
Message-ID: <20080328180550.EE3FC169FCB@codespeak.net>
Author: reebalazs
Date: Fri Mar 28 19:05:49 2008
New Revision: 53060
Modified:
kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/registry.py
kukit/kss.demo/branch/1.4-kss-test/kss/demo/interfaces.py
kukit/kss.demo/branch/1.4-kss-test/kss/demo/registry.py
kukit/kss.demo/branch/1.4-kss-test/kss/demo/resource.py
Log:
Progress with extending selenium test registry
Modified: kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/registry.py
==============================================================================
--- kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/registry.py (original)
+++ kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/registry.py Fri Mar 28 19:05:49 2008
@@ -14,6 +14,10 @@
class KSSDemoRegistryView(BrowserView):
+ # --
+ # handling the demos
+ # --
+
def getSortedDemos(self):
"""Get demos"""
registry = getUtility(IKSSDemoRegistry)
@@ -56,9 +60,32 @@
group.append(demo)
return demo_groups
+ # --
+ # handling the selenium tests
+ # --
+
+ def getSeleniumTests(self):
+ """Get selenium tests annotated with title and href."""
+ registry = getUtility(IKSSDemoRegistry)
+ results = []
+ for suite in registry.test_suites:
+ relative_urls = suite.get_relative_urls()
+ for relative_url in relative_urls:
+ results.append(dict(
+ href = relative_url,
+ title = self._url_to_title(relative_url),
+ ))
+ return results
+
@staticmethod
- def _filename_to_title(filename):
+ def _url_to_title(url):
"""Automatic conversion of filename to readable title"""
+ # we use the url's end after the last /, @ or *
+ split_here = max(url.rfind('/'), url.rfind('*'), url.rfind('+'))
+ if split_here != -1:
+ filename = url[split_here:]
+ else:
+ filename = url
if filename.lower().endswith('.html'):
filename = filename[:-5]
elif filename.lower().endswith('.htm'):
@@ -73,40 +100,16 @@
result = ' '.join([word.capitalize() for word in words])
return result
- @staticmethod
- def _filename_to_href(filename):
- """Automatic conversion of filename to publication href"""
- return "@@resource?filename=%s" % (filename, )
-
- def getSeleniumTests(self):
- """Get selenium tests annotated with title and href."""
- return [dict(
- href = self._filename_to_href(filename),
- title=self._filename_to_title(filename),
- )
- for filename in self.selenium_test_filenames]
-
- @property
- def selenium_test_filenames(self):
- """A cached representation of all filenames."""
- try:
- return self._cooked_selenium_test_filenames
- except AttributeError:
- registry = getUtility(IKSSDemoRegistry)
- self._cooked_selenium_test_filenames = filenames = \
- registry.selenium_tests
- return filenames
-
- def getSeleniumTestResource(self, filename):
+ def getSeleniumTestResource(self, path):
"""Return the html resource, whose absolute filename is given,"""
# First of all, let's check if this is one of our file.
# (Refuse otherwise - we don't want access to all files on the server.)
registry = getUtility(IKSSDemoRegistry)
- if filename not in registry.all_registered_filenames:
+ if path not in registry.all_registered_paths:
raise Exception, "Nonexistent resource"
# Return the file's content.
self.request.response.setHeader('Content-type', 'text/html;charset=utf-8')
- return file(filename).read()
+ return file(path).read()
def getZuiteHomePage(self, path):
"""Redirects to the Zuite home page, Zuite object is found from path."""
Modified: kukit/kss.demo/branch/1.4-kss-test/kss/demo/interfaces.py
==============================================================================
--- kukit/kss.demo/branch/1.4-kss-test/kss/demo/interfaces.py (original)
+++ kukit/kss.demo/branch/1.4-kss-test/kss/demo/interfaces.py Fri Mar 28 19:05:49 2008
@@ -49,17 +49,21 @@
class IKSSSeleniumTestCaseCollection(Interface):
"""Abstract interface representing a set of testcases"""
- def get_filenames(plugin=None, test_root_dir=None):
- """Return the list of absolute filenames in this collection
- Each of this files are a .html format selenium test
-
- Either of plugin and test_root_dir must e specified.
- They are used to acquire the absolute path of the file
- which is acquired from the plugin resource's definition
- place or can be overwritten explicitely by test_root_dir.
+ def get_relative_urls():
+ """Return the list of relative urls in this collection
+ Each of theses urls will serve an .html format selenium
+ test case.
"""
-class IKSSSeleniumTestSuite(Interface):
+ def get_testcase_paths():
+ """Return the list of absolute testcase paths that this collection
+ uses.
+ This will be used in the @@resource?filename=.... view, to protect
+ serving anything else then in this list.
+ But, get_relative_urls will be used to create the test suite.
+ """
+
+class IKSSSeleniumTestSuite(IKSSSeleniumTestCaseCollection):
"""Represents an actual selenium test suite"""
tests = Object(IKSSSeleniumTestCaseCollection,
Modified: kukit/kss.demo/branch/1.4-kss-test/kss/demo/registry.py
==============================================================================
--- kukit/kss.demo/branch/1.4-kss-test/kss/demo/registry.py (original)
+++ kukit/kss.demo/branch/1.4-kss-test/kss/demo/registry.py Fri Mar 28 19:05:49 2008
@@ -46,9 +46,8 @@
site.registerHandler(self.unregisterDemosFromPlugin)
site.registerHandler(self.registerEarlierDemos)
# registry for selenium tests
- self.selenium_tests = []
self.test_suites = []
- self.all_registered_filenames = []
+ self.all_registered_paths = []
site.registerHandler(self.registerSeleniumTestSuitesFromPlugin)
site.registerHandler(self.unregisterSeleniumTestSuitesFromPlugin)
# ... the rest of setup will be done from registerEarlierDemos
@@ -165,17 +164,7 @@
"""Register a selenium suite."""
# Register the suite in different registries.
self.test_suites.append(test_suite)
- # Check if any of the filenames are registered elsewhere.
- # This also assures by the way, that suites cannot be duplicated.
- # The filenames are also used for
- test_filenames = test_suite.tests.get_filenames()
- for test_filename in test_filenames:
- if test_filename in self.selenium_tests:
- raise Exception, 'The selenium test file for %s has already been registered. Cannot add.' % (test_filename, )
- self.selenium_tests.append(test_filename)
- # All registered filenames are used to protect the resource
- # and prevent a malicious attempt to serve something we should not.
- self.all_registered_filenames.append(test_filename)
+ self.all_registered_paths.extend(test_suite.tests.get_testcase_paths())
# XXX TODO need different other registries for lookup of categories.
def unregisterSeleniumTestSuite(self, test_suite):
Modified: kukit/kss.demo/branch/1.4-kss-test/kss/demo/resource.py
==============================================================================
--- kukit/kss.demo/branch/1.4-kss-test/kss/demo/resource.py (original)
+++ kukit/kss.demo/branch/1.4-kss-test/kss/demo/resource.py Fri Mar 28 19:05:49 2008
@@ -28,30 +28,6 @@
def __getitem__(self, key):
return getattr(self, key)
-class KSSSeleniumTestSuite(object):
- """Represents a single selenium test case,
- specified by its filename.
- """
- implements(IKSSSeleniumTestSuite)
-
- # convenience access for page templates
- __allow_access_to_unprotected_subobjects__ = 1
-
- tests = ()
- component = u''
- application = u''
- layer = None
-
- def __init__(self, tests=None, component=u'', application=u'', layer=None):
- if tests is not None:
- self.tests = tests
- if component:
- self.component = component
- if application:
- self.application = application
- if layer is not None:
- self.layer = layer
-
# --
# IKSSSeleniumTestCaseCollection implementations
# --
@@ -73,10 +49,13 @@
# store it
self.test_root_dir = getRootDirOfModule(locals['__module__'])
- def get_absolute_path(self, filename):
+ def find_absolute_path(self, filename):
"Returns the absolute path of the filename based on the test root directory."
return os.path.join(self.test_root_dir, filename)
+ def make_relative_urls_from_paths(self, paths):
+ return ('@@resource?path=%s' % (path, ) for path in paths )
+
class KSSSeleniumTestCase(KSSSeleniumTestCaseCollectionBase):
"""Represents a single selenium test case,
specified by its filename.
@@ -87,10 +66,13 @@
self.find_test_root_dir()
self.test_filename = test_filename
- def get_filenames(self):
- test_filename = self.get_absolute_path(self.test_filename)
+ def get_testcase_paths(self):
+ test_filename = self.find_absolute_path(self.test_filename)
return [test_filename]
+ def get_relative_urls(self):
+ return self.make_relative_urls_from_paths(self.get_testcase_paths())
+
class KSSSeleniumTestDirectory(KSSSeleniumTestCaseCollectionBase):
"""Represents a selenium test directory.
It contains a set of tests.
@@ -101,9 +83,9 @@
self.find_test_root_dir()
self.test_directory = test_directory
- def get_filenames(self):
+ def get_testcase_paths(self):
test_filenames = []
- test_root_dir = self.get_absolute_path(self.test_directory)
+ test_root_dir = self.find_absolute_path(self.test_directory)
for test_filename in os.listdir(test_root_dir):
if test_filename.lower().endswith('.html') or \
test_filename.endswith('.htm'):
@@ -114,6 +96,9 @@
test_filenames = (filename[1] for filename in test_filenames)
return test_filenames
+ def get_relative_urls(self):
+ return self.make_relative_urls_from_paths(self.get_testcase_paths())
+
class KSSSeleniumTestCaseList(KSSSeleniumTestCaseCollectionBase):
"""Recursively collects a list of collectiors.
"""
@@ -123,5 +108,66 @@
self.find_test_root_dir()
self.cases = cases
- def get_filenames(self):
- return itertools.chain(*[case.get_filenames() for case in self.cases])
+ def get_testcase_paths(self):
+ return itertools.chain(*[case.get_testcase_paths() for case in self.cases])
+
+ def get_relative_urls(self):
+ return itertools.chain(*[case.get_relative_urls() for case in self.cases])
+
+class KSSSeleniumEmptyTestCase(KSSSeleniumTestCaseCollectionBase):
+ """An empty test case."""
+ implements(IKSSSeleniumTestCaseCollection)
+
+ def get_testcase_paths(self):
+ return ()
+
+ def get_relative_urls(self):
+ return ()
+
+# --
+# The Suite itself is a collection, but provides a way to use layers with setup and
+# tesrdown from the registry.
+# --
+
+class KSSSeleniumTestLayerBase(object):
+ setup = KSSSeleniumEmptyTestCase()
+ teardown = KSSSeleniumEmptyTestCase()
+
+class KSSSeleniumTestSuite(object):
+ """Represents a single selenium test case,
+ specified by its filename.
+ """
+ implements(IKSSSeleniumTestSuite)
+
+ # convenience access for page templates
+ __allow_access_to_unprotected_subobjects__ = 1
+
+ tests = ()
+ component = u''
+ application = u''
+ # default is an empty layer.
+ layer = KSSSeleniumTestLayerBase
+
+ def __init__(self, tests=None, component=u'', application=u'', layer=None):
+ if tests is not None:
+ self.tests = tests
+ if component:
+ self.component = component
+ if application:
+ self.application = application
+ if layer is not None:
+ self.layer = layer
+
+ def get_testcase_paths(self):
+ return itertools.chain(
+ self.layer.setup.get_testcase_paths(),
+ self.tests.get_testcase_paths(),
+ self.layer.teardown.get_testcase_paths()
+ )
+
+ def get_relative_urls(self):
+ return itertools.chain(
+ self.layer.setup.get_relative_urls(),
+ self.tests.get_relative_urls(),
+ self.layer.teardown.get_relative_urls()
+ )
From reebalazs at codespeak.net Sat Mar 29 00:00:22 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Sat, 29 Mar 2008 00:00:22 +0100 (CET)
Subject: [KSS-checkins] r53069 - in
kukit/kss.demo/branch/1.4-kss-test/kss/demo: . browser
Message-ID: <20080328230022.E992B169FAF@codespeak.net>
Author: reebalazs
Date: Sat Mar 29 00:00:20 2008
New Revision: 53069
Added:
kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/kss-selenium-create-sandbox-test.pt (contents, props changed)
kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/kss-selenium-create-sandbox-ui.pt (contents, props changed)
kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/setupbase.py (contents, props changed)
Modified:
kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/configure.zcml
kukit/kss.demo/branch/1.4-kss-test/kss/demo/resource.py
Log:
Continue demo extension with porting over the templates we put into plone.app.kss
Modified: kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/configure.zcml
==============================================================================
--- kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/configure.zcml (original)
+++ kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/configure.zcml Sat Mar 29 00:00:20 2008
@@ -114,5 +114,23 @@
/>
+
+
+
+
+
+
Added: kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/kss-selenium-create-sandbox-test.pt
==============================================================================
--- (empty file)
+++ kukit/kss.demo/branch/1.4-kss-test/kss/demo/browser/kss-selenium-create-sandbox-test.pt Sat Mar 29 00:00:20 2008
@@ -0,0 +1,43 @@
+
+
+
+