From hannosch at codespeak.net Sun Dec 19 20:12:02 2010 From: hannosch at codespeak.net (hannosch at codespeak.net) Date: Sun, 19 Dec 2010 20:12:02 +0100 (CET) Subject: [KSS-checkins] r80088 - in kukit/kss.core/trunk: . kss/core Message-ID: <20101219191202.13064282B8B@codespeak.net> Author: hannosch Date: Sun Dec 19 20:12:01 2010 New Revision: 80088 Modified: kukit/kss.core/trunk/CHANGES.txt kukit/kss.core/trunk/kss/core/BeautifulSoup.py Log: Fixed an undefined ``__str__`` in `kss.core.BeautifulSoup.NavigableString.` This closes http://dev.plone.org/old/plone/ticket/11365. Modified: kukit/kss.core/trunk/CHANGES.txt ============================================================================== --- kukit/kss.core/trunk/CHANGES.txt (original) +++ kukit/kss.core/trunk/CHANGES.txt Sun Dec 19 20:12:01 2010 @@ -4,8 +4,9 @@ 1.6.1 (unreleased) ------------------ -- Nothing changed yet. - +- Fixed an undefined ``__str__`` in `kss.core.BeautifulSoup.NavigableString.` + This closes http://dev.plone.org/old/plone/ticket/11365. + [dukebody, hannosch] 1.6.0 (2010-07-05) ------------------ Modified: kukit/kss.core/trunk/kss/core/BeautifulSoup.py ============================================================================== --- kukit/kss.core/trunk/kss/core/BeautifulSoup.py (original) +++ kukit/kss.core/trunk/kss/core/BeautifulSoup.py Sun Dec 19 20:12:01 2010 @@ -364,7 +364,7 @@ raise AttributeError, "'%s' object has no attribute '%s'" % (self.__class__.__name__, attr) def __unicode__(self): - return __str__(self, None) + return self def __str__(self, encoding=DEFAULT_OUTPUT_ENCODING): if encoding: From gotcha at codespeak.net Tue Dec 28 00:17:50 2010 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Tue, 28 Dec 2010 00:17:50 +0100 (CET) Subject: [KSS-checkins] r80110 - in kukit/kss.buildout/trunk: . src Message-ID: <20101227231750.47867282BDF@codespeak.net> Author: gotcha Date: Tue Dec 28 00:17:47 2010 New Revision: 80110 Removed: kukit/kss.buildout/trunk/dotests.py kukit/kss.buildout/trunk/dotests_win.py kukit/kss.buildout/trunk/src/ kukit/kss.buildout/trunk/tests Modified: kukit/kss.buildout/trunk/ (props changed) kukit/kss.buildout/trunk/buildout.cfg Log: cleanup Modified: kukit/kss.buildout/trunk/buildout.cfg ============================================================================== --- kukit/kss.buildout/trunk/buildout.cfg (original) +++ kukit/kss.buildout/trunk/buildout.cfg Tue Dec 28 00:17:47 2010 @@ -1,45 +1,31 @@ [buildout] -extends = http://dist.plone.org/release/4.0/versions.cfg +extends = http://dist.plone.org/release/4.0.2/versions.cfg parts = instance - extraproducts - ksspy - -develop = - src/kss.core - src/kss.demo - -eggs=elementtree + zopepy +versions = versions +extensions = mr.developer +sources-dir = devel +auto-checkout = * + +[sources] +kss.core = svn https://codespeak.net/svn/kukit/kss.core/trunk +kss.demo = svn https://codespeak.net/svn/kukit/kss.demo/trunk [versions] plone.recipe.alltests = 1.2 -[extraproducts] -recipe = infrae.subversion -urls = - svn://svn.zope.org/repos/main/Zelenium/trunk Zelenium - [instance] recipe = plone.recipe.zope2instance user = admin:admin -debug-mode = on eggs = Zope2 - kss.core kss.demo - elementtree zcml = - kss.core-meta - kss.core - kss.demo-meta kss.demo -products = - ${buildout:directory}/parts/extraproducts -[ksspy] +[zopepy] recipe = zc.recipe.egg -eggs = - ${instance:eggs} - elementtree -interpreter = ksspy -scripts = ksspy +eggs = ${instance:eggs} +interpreter = zopepy +scripts = zopepy Deleted: /kukit/kss.buildout/trunk/dotests.py ============================================================================== --- /kukit/kss.buildout/trunk/dotests.py Tue Dec 28 00:17:47 2010 +++ (empty file) @@ -1,68 +0,0 @@ -import os, signal, sys -import subprocess - -java = sys.argv[1] -seleniumbrowser = sys.argv[2] -here = os.getcwd() - -#start seleniumRC server -seleniumjar = os.path.join(here, 'parts', 'seleniumrc', 'selenium-server.jar') -javapid = subprocess.Popen([java, '-jar', seleniumjar]).pid - -#start zope -zope = os.path.join(here, 'bin', 'instance') -subprocess.call([zope, 'start']) - -#wait for zope instance to come up -from time import sleep -testcmd = "wget -O- http://localhost:8080" -while subprocess.call(testcmd.split()): - sleep(1) - -#setup simple content instance -testcmd = "wget -O- http://localhost:8080/demo" -exitcode = subprocess.call(testcmd.split()) -if exitcode <> 0: - print "add" - setupcmd = """wget -O- --http-user=admin --http-password=admin --post-data add_input_name=demo&UPDATE_SUBMIT=Add http://localhost:8080/+/AddSimpleContent.html""" - exitcode = subprocess.call(setupcmd.split()) - -#create selenium tests -kssdemotests = os.path.join(here, 'src', 'kss.demo', 'kss', 'demo', 'tests') -python = sys.executable -creationDir = os.path.join(kssdemotests, 'selenium_tests') -creationScript = os.path.join(creationDir, 'createpythontests.py') -command = " ".join([python, creationScript]) -os.chdir(creationDir) -exitcode = subprocess.call(command.split()) -print "creation exit code", exitcode -os.chdir(here) - -#start tests -env = { - 'SELENIUMBROWSER': seleniumbrowser, - 'PYTHON': python, -} -zope_test = os.path.join(here, 'tests') -command = [zope_test, '--package-path', kssdemotests, 'kss.demo.tests', - '--test-file-pattern=^seltest', '--tests-pattern=selenium_tests'] - -testrunner = subprocess.Popen(command, - env=env, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - stdin=subprocess.PIPE, - ) -testrunner.wait() -print testrunner.stdout.read() -print testrunner.stderr.read() -test_exit = testrunner.returncode - -#stop seleniumRC server -os.kill(javapid, signal.SIGKILL) - -#stop zope -subprocess.call([zope, 'stop']) - -print "Exit code", test_exit -sys.exit(test_exit) Deleted: /kukit/kss.buildout/trunk/dotests_win.py ============================================================================== --- /kukit/kss.buildout/trunk/dotests_win.py Tue Dec 28 00:17:47 2010 +++ (empty file) @@ -1,129 +0,0 @@ -import os, signal, sys -from time import sleep -from win32process import CreateProcess -from win32process import GetExitCodeProcess -from win32process import TerminateProcess -from win32process import STARTUPINFO -from win32con import CREATE_NO_WINDOW -from win32con import CREATE_NEW_PROCESS_GROUP -from win32con import DETACHED_PROCESS -import subprocess - -def startProcess(app, commandline): - print commandline - print - process, thread, processid, threadid = CreateProcess(app, commandline, - None, None, True, - CREATE_NO_WINDOW+DETACHED_PROCESS, - None, None, STARTUPINFO()) - return process - -def getExitCode(process): - while True: - sleep(1) - exit = GetExitCodeProcess(process) - if exit <> 259: - return exit -def main(): - runner = Runner() - sys.exit(runner.process()) - -class Runner: - def __init__(self): - self.java = sys.argv[1] - self.seleniumbrowser = sys.argv[2] - self.here = os.getcwd() - self.wget = "c:\\cygwin\\bin\\wget.exe" - self.cmd = "cmd.exe" - self.zope = os.path.join(self.here, 'bin', 'instance.exe') - self.instancehome = os.path.join(self.here, 'parts', 'instance') - - def process(self): - self.startSeleniumRC() - self.startZope() - self.waitForZope() - self.setupKSSDemoInstance() - self.createSeleniumTests() - testExit = self.runTests() - self.stopZope() - self.stopSeleniumRC() - return testExit - - def startSeleniumRC(self): - seleniumjar = os.path.join('parts', 'seleniumrc', 'selenium-server.jar') - command = " ".join([self.java, '-jar', seleniumjar]) - self.javaprocess = startProcess(self.java, command) - - def startZope(self): - command = " ".join([self.zope, 'fg']) - process = startProcess(self.zope, command) - - def waitForZope(self): - command = " ".join([self.wget, "-O-", "http://localhost:8080"]) - exitcode = 1 - count = 0 - while exitcode or count > 60: - count +=1 - exitcode = subprocess.call(command) - sleep(1) - if exitcode == 0: - print "Zope started" - - def setupKSSDemoInstance(self): - command = " ".join([self.wget, "-O-", "http://localhost:8080/demo"]) - exitcode = subprocess.call(command) - if exitcode == 0: - print "demo exists" - if exitcode <> 0: - print "setup demo" - command = " ".join([self.wget, "-O-", - "--http-user=admin", "--http-password=admin", - "--post-data", "add_input_name=demo&UPDATE_SUBMIT=Add", - "http://localhost:8080/+/AddSimpleContent.html"]) - exitcode = subprocess.call(command) - if exitcode == 0: - print "demo instantiated" - - def stopZope(self): - command = " ".join([self.wget, "-O-", - "--http-user=admin", "--http-password=admin", - "http://localhost:8080/Control_Panel/manage_shutdown"]) - exitcode = subprocess.call(command) - if exitcode == 0: - print "zope shutting down" - - def createSeleniumTests(self): - kssdemotests = os.path.join(self.here, 'src', 'kss.demo', 'kss', 'demo', 'tests') - ksspy = os.path.join(self.here, 'bin', 'ksspy') - creationDir = os.path.join(kssdemotests, 'selenium_tests') - creationScript = os.path.join(creationDir, 'createpythontests.py') - command = " ".join([ksspy, creationScript]) - os.chdir(creationDir) - exitcode = subprocess.call(command.split()) - print "creation exit code", exitcode - os.chdir(self.here) - - def runTests(self): - environ = os.environ - environ['SELENIUMBROWSER'] = self.seleniumbrowser - testsPath = os.path.join(self.here, 'src', 'kss.demo', 'kss', 'demo', 'tests') - zope_test = os.path.join(self.here, 'parts', 'instance', 'bin', 'test.bat') - command = " ".join([zope_test, "test", - '--package-path', testsPath, - 'kss.demo.tests', '--test-file-pattern=^seltest', - '--tests-pattern=selenium_tests']) - print command - dummy = subprocess.call(command, env=environ) - exitcodefile = os.path.join(self.instancehome, 'testsexitcode.err') - if '"0"' in open(exitcodefile).read(): - exitcode = 0 - else: - exitcode = 1 - - print 'tests exitcode', exitcode - return exitcode - - def stopSeleniumRC(self): - TerminateProcess(self.javaprocess, 0) - -main() Deleted: /kukit/kss.buildout/trunk/tests ============================================================================== --- /kukit/kss.buildout/trunk/tests Tue Dec 28 00:17:47 2010 +++ (empty file) @@ -1,15 +0,0 @@ -#!/bin/bash -HERE=`pwd` -ZOPE_HOME="$HERE/parts/zope2" -INSTANCE_HOME="$HEREUsers/parts/instance" -CONFIG_FILE="$HERE/parts/instance/etc/zope.conf" -SOFTWARE_HOME="$HERE/parts/zope2/lib/python" -PYTHONPATH="$SOFTWARE_HOME:$HERE/kss.selenium/src/kss.core:$HERE/eggs/setuptools-0.6c5-py2.4.egg:$HERE/src/kss.demo:$PYTHONPATH" -export PYTHONPATH INSTANCE_HOME SOFTWARE_HOME - -ZOPETEST="$ZOPE_HOME/test.py" -if exec "$PYTHON" "$ZOPETEST" --config-file "$CONFIG_FILE" "$@"; then - exit 0 - fi - -exit 127 From gotcha at codespeak.net Tue Dec 28 00:18:32 2010 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Tue, 28 Dec 2010 00:18:32 +0100 (CET) Subject: [KSS-checkins] r80111 - kukit/kss.core/trunk/kss/core Message-ID: <20101227231832.EEA74282BDF@codespeak.net> Author: gotcha Date: Tue Dec 28 00:18:31 2010 New Revision: 80111 Modified: kukit/kss.core/trunk/kss/core/configure.zcml Log: include meta.zcml Modified: kukit/kss.core/trunk/kss/core/configure.zcml ============================================================================== --- kukit/kss.core/trunk/kss/core/configure.zcml (original) +++ kukit/kss.core/trunk/kss/core/configure.zcml Tue Dec 28 00:18:31 2010 @@ -3,6 +3,8 @@ xmlns:zcml="http://namespaces.zope.org/zcml" xmlns:five="http://namespaces.zope.org/five"> + + From gotcha at codespeak.net Tue Dec 28 00:25:12 2010 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Tue, 28 Dec 2010 00:25:12 +0100 (CET) Subject: [KSS-checkins] r80112 - kukit/kss.buildout/trunk Message-ID: <20101227232512.5397B282BDF@codespeak.net> Author: gotcha Date: Tue Dec 28 00:25:10 2010 New Revision: 80112 Modified: kukit/kss.buildout/trunk/ (props changed) kukit/kss.buildout/trunk/buildout.cfg Log: move back to src Modified: kukit/kss.buildout/trunk/buildout.cfg ============================================================================== --- kukit/kss.buildout/trunk/buildout.cfg (original) +++ kukit/kss.buildout/trunk/buildout.cfg Tue Dec 28 00:25:10 2010 @@ -5,7 +5,6 @@ zopepy versions = versions extensions = mr.developer -sources-dir = devel auto-checkout = * [sources] From gotcha at codespeak.net Tue Dec 28 00:32:38 2010 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Tue, 28 Dec 2010 00:32:38 +0100 (CET) Subject: [KSS-checkins] r80113 - kukit/kss.core/trunk/kss/core/pluginregistry Message-ID: <20101227233238.D1BD7282BDF@codespeak.net> Author: gotcha Date: Tue Dec 28 00:32:37 2010 New Revision: 80113 Modified: kukit/kss.core/trunk/kss/core/pluginregistry/ (props changed) Log: remove externals From gotcha at codespeak.net Tue Dec 28 00:33:01 2010 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Tue, 28 Dec 2010 00:33:01 +0100 (CET) Subject: [KSS-checkins] r80114 - kukit/kss.core/trunk/kss/core/pluginregistry/_concatresource Message-ID: <20101227233301.A4221282BDF@codespeak.net> Author: gotcha Date: Tue Dec 28 00:33:00 2010 New Revision: 80114 Added: kukit/kss.core/trunk/kss/core/pluginregistry/_concatresource/ - copied from r80113, kukit/kss.concatresource/trunk/kss/concatresource/ Log: copy code from external From gotcha at codespeak.net Tue Dec 28 00:47:40 2010 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Tue, 28 Dec 2010 00:47:40 +0100 (CET) Subject: [KSS-checkins] r80115 - in kukit/kss.js: . trunk Message-ID: <20101227234740.55B5E282BDF@codespeak.net> Author: gotcha Date: Tue Dec 28 00:47:38 2010 New Revision: 80115 Added: kukit/kss.js/ kukit/kss.js/trunk/ Log: prepare From gotcha at codespeak.net Tue Dec 28 00:50:06 2010 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Tue, 28 Dec 2010 00:50:06 +0100 (CET) Subject: [KSS-checkins] r80116 - in kukit/kss.js/trunk: . docs src src/kss src/kss/js Message-ID: <20101227235006.B6DBA282BDF@codespeak.net> Author: gotcha Date: Tue Dec 28 00:50:05 2010 New Revision: 80116 Added: kukit/kss.js/trunk/README.txt kukit/kss.js/trunk/docs/ kukit/kss.js/trunk/docs/HISTORY.txt kukit/kss.js/trunk/setup.py kukit/kss.js/trunk/src/ (props changed) kukit/kss.js/trunk/src/kss/ kukit/kss.js/trunk/src/kss/__init__.py kukit/kss.js/trunk/src/kss/js/ kukit/kss.js/trunk/src/kss/js/__init__.py Log: skeleton Added: kukit/kss.js/trunk/README.txt ============================================================================== --- (empty file) +++ kukit/kss.js/trunk/README.txt Tue Dec 28 00:50:05 2010 @@ -0,0 +1,6 @@ +Introduction +============ + + + +This product may contain traces of nuts. Added: kukit/kss.js/trunk/docs/HISTORY.txt ============================================================================== --- (empty file) +++ kukit/kss.js/trunk/docs/HISTORY.txt Tue Dec 28 00:50:05 2010 @@ -0,0 +1,7 @@ +Changelog +========= + +1.0dev (unreleased) +------------------- + +- Initial release Added: kukit/kss.js/trunk/setup.py ============================================================================== --- (empty file) +++ kukit/kss.js/trunk/setup.py Tue Dec 28 00:50:05 2010 @@ -0,0 +1,33 @@ +from setuptools import setup, find_packages +import os + +version = '1.0' + +setup(name='kss.js', + version=version, + description="Javascript for KSS", + long_description=open("README.txt").read() + "\n" + + open(os.path.join("docs", "HISTORY.txt")).read(), + # Get more strings from + # http://pypi.python.org/pypi?%3Aaction=list_classifiers + classifiers=[ + "Programming Language :: Python", + ], + keywords='', + author='', + author_email='', + url='http://svn.plone.org/svn/collective/', + license='GPL', + packages=find_packages('src'), + package_dir={'': 'src'}, + namespace_packages=['kss'], + include_package_data=True, + zip_safe=False, + install_requires=[ + 'setuptools', + # -*- Extra requirements: -*- + ], + entry_points=""" + # -*- Entry points: -*- + """, + ) Added: kukit/kss.js/trunk/src/kss/__init__.py ============================================================================== --- (empty file) +++ kukit/kss.js/trunk/src/kss/__init__.py Tue Dec 28 00:50:05 2010 @@ -0,0 +1,6 @@ +# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages +try: + __import__('pkg_resources').declare_namespace(__name__) +except ImportError: + from pkgutil import extend_path + __path__ = extend_path(__path__, __name__) Added: kukit/kss.js/trunk/src/kss/js/__init__.py ============================================================================== From gotcha at codespeak.net Tue Dec 28 00:52:41 2010 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Tue, 28 Dec 2010 00:52:41 +0100 (CET) Subject: [KSS-checkins] r80117 - kukit/kss.js/trunk/src/kss/js/kukit Message-ID: <20101227235241.89C60282BDF@codespeak.net> Author: gotcha Date: Tue Dec 28 00:52:40 2010 New Revision: 80117 Added: kukit/kss.js/trunk/src/kss/js/kukit/ - copied from r80116, kukit/kukit.js/trunk/ Log: insert in own egg From gotcha at codespeak.net Tue Dec 28 00:56:05 2010 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Tue, 28 Dec 2010 00:56:05 +0100 (CET) Subject: [KSS-checkins] r80118 - kukit/kss.js/trunk/src/kss/js Message-ID: <20101227235605.66D4A282BDF@codespeak.net> Author: gotcha Date: Tue Dec 28 00:56:04 2010 New Revision: 80118 Added: kukit/kss.js/trunk/src/kss/js/concatresource.zcml - copied unchanged from r80117, kukit/kss.core/trunk/kss/core/concatresource.zcml Log: move concatresource.zcml From gotcha at codespeak.net Tue Dec 28 01:14:53 2010 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Tue, 28 Dec 2010 01:14:53 +0100 (CET) Subject: [KSS-checkins] r80119 - kukit/kss.js/trunk/src/kss/js Message-ID: <20101228001453.9B408282BDF@codespeak.net> Author: gotcha Date: Tue Dec 28 01:14:52 2010 New Revision: 80119 Added: kukit/kss.js/trunk/src/kss/js/ecmaview.py - copied unchanged from r80118, kukit/kss.core/trunk/kss/core/tests/ecmaview.py Log: move to allow imports From gotcha at codespeak.net Tue Dec 28 01:20:33 2010 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Tue, 28 Dec 2010 01:20:33 +0100 (CET) Subject: [KSS-checkins] r80120 - kukit/kss.js/trunk/src/kss/js Message-ID: <20101228002033.DB4E6282BDF@codespeak.net> Author: gotcha Date: Tue Dec 28 01:20:32 2010 New Revision: 80120 Added: kukit/kss.js/trunk/src/kss/js/configure.zcml Modified: kukit/kss.js/trunk/src/kss/js/ecmaview.py Log: add ecmaview Added: kukit/kss.js/trunk/src/kss/js/configure.zcml ============================================================================== --- (empty file) +++ kukit/kss.js/trunk/src/kss/js/configure.zcml Tue Dec 28 01:20:32 2010 @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modified: kukit/kss.js/trunk/src/kss/js/ecmaview.py ============================================================================== --- kukit/kss.js/trunk/src/kss/js/ecmaview.py (original) +++ kukit/kss.js/trunk/src/kss/js/ecmaview.py Tue Dec 28 01:20:32 2010 @@ -44,7 +44,7 @@ class ViewFile(object): '''A wrapper for file resources that can be used in a view - + Similar to ViewPageTemplate in usage. (We only use the FileResource here, no distinction on content types like in the resourceDirectory code.) @@ -52,7 +52,7 @@ def __init__(self, name, path): # Create the resource with cache control most proper for debugging. - self.resource_factory = ConcatResourceFactory([path], name, + self.resource_factory = ConcatResourceFactory([path], name, compress_level='none', caching='memory', lmt_check_period=0.0, checker=checker) self.name = name @@ -71,20 +71,20 @@ class EcmaView(BrowserView): '''Kukit test view - + This allows the runner.html to be used on this view. This provides the tests run with the compiled kukit.js - resource, in the same way as they would be run + resource, in the same way as they would be run in production with kss. ''' implements(IBrowserPublisher) - _testdir = absolute_dir('../kukit/tests') + _testdir = absolute_dir('kukit/tests') + + _runner = ViewPageTemplateFile('kukit/tests/runner.html', content_type='text/html; charset=utf-8') - _runner = ViewPageTemplateFile('../kukit/tests/runner.html', content_type='text/html; charset=utf-8') - # The next is only necessary on Zope (<=) 2.9, # provides a docstring to the method def _runner_proxy(self, *arg, **kw): From gotcha at codespeak.net Tue Dec 28 01:21:12 2010 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Tue, 28 Dec 2010 01:21:12 +0100 (CET) Subject: [KSS-checkins] r80121 - in kukit/kss.core/trunk: . kss/core kss/core/tests Message-ID: <20101228002112.CD7AA282BDF@codespeak.net> Author: gotcha Date: Tue Dec 28 01:21:11 2010 New Revision: 80121 Removed: kukit/kss.core/trunk/kss/core/concatresource.zcml kukit/kss.core/trunk/kss/core/tests/configure-online.zcml kukit/kss.core/trunk/kss/core/tests/ecmaview.py Modified: kukit/kss.core/trunk/kss/core/ (props changed) kukit/kss.core/trunk/kss/core/configure.zcml kukit/kss.core/trunk/setup.py Log: move javascript to kss.js Deleted: /kukit/kss.core/trunk/kss/core/concatresource.zcml ============================================================================== --- /kukit/kss.core/trunk/kss/core/concatresource.zcml Tue Dec 28 01:21:11 2010 +++ (empty file) @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - Modified: kukit/kss.core/trunk/kss/core/configure.zcml ============================================================================== --- kukit/kss.core/trunk/kss/core/configure.zcml (original) +++ kukit/kss.core/trunk/kss/core/configure.zcml Tue Dec 28 01:21:11 2010 @@ -7,54 +7,11 @@ - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deleted: /kukit/kss.core/trunk/kss/core/tests/ecmaview.py ============================================================================== --- /kukit/kss.core/trunk/kss/core/tests/ecmaview.py Tue Dec 28 01:21:11 2010 +++ (empty file) @@ -1,142 +0,0 @@ -# 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. - -try: - from Products.Five import BrowserView -except ImportError: - from zope.app.publisher.browser import BrowserView - -from zope.interface import implements -from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile -import os.path -from zope.publisher.interfaces.browser import IBrowserPublisher -from zope.publisher.interfaces import NotFound - -# Oh well... file resource has different import locations in zope and five, -# the factories take different parameters order, -# plus these are not "entirely clean" as far as caching is concerned... -# Instead, use the resources implemented from concatresource: -# this is version free and has properly implemented cache control. -from kss.core.pluginregistry._concatresource.resource import ConcatResourceFactory - -_marker = object() - -# z3 only -from zope.security.checker import CheckerPublic, NamesChecker -allowed_names = ('GET', 'HEAD', 'publishTraverse', 'browserDefault', - 'request', '__call__') -permission = CheckerPublic -checker = NamesChecker(allowed_names, permission) - -class ViewFile(object): - '''A wrapper for file resources that can be used in a view - - Similar to ViewPageTemplate in usage. - (We only use the FileResource here, no distinction on content types - like in the resourceDirectory code.) - ''' - - def __init__(self, name, path): - # Create the resource with cache control most proper for debugging. - self.resource_factory = ConcatResourceFactory([path], name, - compress_level='none', caching='memory', lmt_check_period=0.0, - checker=checker) - self.name = name - - def __get__(self, obj, cls=None): - 'The view wants a method only.' - request = obj.request - resource = self.resource_factory(request) - resource.__parent__ = obj - resource.__name__ = self.name - return resource - -def absolute_dir(path): - here = os.path.split(globals()['__file__'])[0] - return os.path.abspath(os.path.join(here, path)) - -class EcmaView(BrowserView): - '''Kukit test view - - This allows the runner.html to be used on this view. - - This provides the tests run with the compiled kukit.js - resource, in the same way as they would be run - in production with kss. - ''' - - implements(IBrowserPublisher) - - _testdir = absolute_dir('../kukit/tests') - - _runner = ViewPageTemplateFile('../kukit/tests/runner.html', content_type='text/html; charset=utf-8') - - # The next is only necessary on Zope (<=) 2.9, - # provides a docstring to the method - def _runner_proxy(self, *arg, **kw): - 'Publishable method' - return self._runner(*arg, **kw) - - def publishTraverse(self, request, name): - '''See interface IBrowserPublisher''' - return self.get(name) - - def browserDefault(self, request): - '''See interface IBrowserPublisher''' - return self, () - - def __getitem__(self, name): - res = self.get(name, None) - if res is None: - raise KeyError(name) - return res - - def get(self, name, default=_marker): - # runner.html is compiled as a pagetemplate - if name == 'runner.html': - # XXX For Zope2.9 we need this. - if not hasattr(self.request, 'debug'): - self.request.debug = None - # proxy is used to make it publishable, on Zope <= 2.9 - return self._runner_proxy - - # We store them on the view on demand. - # Is it there yet? - if name[0] != '_': - try: - return getattr(self, name) - except AttributeError: - pass - - # See the file we need - path = os.path.join(self._testdir, name) - if os.path.isfile(path): - # Ok, this is a file. Cook it. - resource = ViewFile(name, path) - setattr(self.__class__, name, resource) - # important: return accessed *from* the view. - return getattr(self, name) - - # Not found. - if default is _marker: - raise NotFound(None, name) - return default - - def __call__(self): - 'By default we redirect to runner.html.' - # on Zope3, the url is of zope.publisher.http.URLGetter class, so we must stringify it - return self.request.response.redirect(str(self.request.URL) + '/runner.html') Modified: kukit/kss.core/trunk/setup.py ============================================================================== --- kukit/kss.core/trunk/setup.py (original) +++ kukit/kss.core/trunk/setup.py Tue Dec 28 01:21:11 2010 @@ -25,7 +25,7 @@ setup(name='kss.core', version=version, description="KSS (Kinetic Style Sheets) core framework", - long_description = long_description, + long_description=long_description, classifiers=[ "Framework :: Zope2", "Framework :: Zope3", @@ -65,5 +65,6 @@ # 'Acquisition', # 'DateTime', # 'Zope2', + 'kss.js', ], ) From gotcha at codespeak.net Tue Dec 28 01:24:46 2010 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Tue, 28 Dec 2010 01:24:46 +0100 (CET) Subject: [KSS-checkins] r80122 - kukit/kss.core/branch/kss.js Message-ID: <20101228002446.97484282BDF@codespeak.net> Author: gotcha Date: Tue Dec 28 01:24:45 2010 New Revision: 80122 Added: kukit/kss.core/branch/kss.js/ - copied from r80121, kukit/kss.core/trunk/ Log: should have branched From gotcha at codespeak.net Tue Dec 28 01:28:01 2010 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Tue, 28 Dec 2010 01:28:01 +0100 (CET) Subject: [KSS-checkins] r80123 - in kukit/kss.core/trunk: . kss/core kss/core/tests Message-ID: <20101228002801.2F7A4282BDF@codespeak.net> Author: gotcha Date: Tue Dec 28 01:27:59 2010 New Revision: 80123 Added: kukit/kss.core/trunk/kss/core/concatresource.zcml - copied unchanged from r80120, kukit/kss.core/trunk/kss/core/concatresource.zcml kukit/kss.core/trunk/kss/core/tests/configure-online.zcml - copied unchanged from r80120, kukit/kss.core/trunk/kss/core/tests/configure-online.zcml kukit/kss.core/trunk/kss/core/tests/ecmaview.py - copied unchanged from r80120, kukit/kss.core/trunk/kss/core/tests/ecmaview.py Modified: kukit/kss.core/trunk/kss/core/ (props changed) kukit/kss.core/trunk/kss/core/configure.zcml kukit/kss.core/trunk/setup.py Log: revert change made on trunk Modified: kukit/kss.core/trunk/kss/core/configure.zcml ============================================================================== --- kukit/kss.core/trunk/kss/core/configure.zcml (original) +++ kukit/kss.core/trunk/kss/core/configure.zcml Tue Dec 28 01:27:59 2010 @@ -7,11 +7,54 @@ - + + + + + + + + + + + + + + + + + + + + + + + + Author: gotcha Date: Tue Dec 28 01:30:51 2010 New Revision: 80124 Modified: kukit/kss.core/branch/kss.js/setup.py Log: js code was moved to kss.js Modified: kukit/kss.core/branch/kss.js/setup.py ============================================================================== --- kukit/kss.core/branch/kss.js/setup.py (original) +++ kukit/kss.core/branch/kss.js/setup.py Tue Dec 28 01:30:51 2010 @@ -17,8 +17,6 @@ + '\n' + read('CHANGES.txt') + '\n' + - read('kss/core/kukit/CHANGES.txt') - + '\n' + 'Download\n' + '========\n') From gotcha at codespeak.net Tue Dec 28 01:32:20 2010 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Tue, 28 Dec 2010 01:32:20 +0100 (CET) Subject: [KSS-checkins] r80125 - kukit/kss.buildout/trunk Message-ID: <20101228003220.7E3EA282BDF@codespeak.net> Author: gotcha Date: Tue Dec 28 01:32:19 2010 New Revision: 80125 Modified: kukit/kss.buildout/trunk/buildout.cfg Log: move code to kss.js Modified: kukit/kss.buildout/trunk/buildout.cfg ============================================================================== --- kukit/kss.buildout/trunk/buildout.cfg (original) +++ kukit/kss.buildout/trunk/buildout.cfg Tue Dec 28 01:32:19 2010 @@ -8,8 +8,9 @@ auto-checkout = * [sources] -kss.core = svn https://codespeak.net/svn/kukit/kss.core/trunk +kss.core = svn https://codespeak.net/svn/kukit/kss.core/branch/kss.js kss.demo = svn https://codespeak.net/svn/kukit/kss.demo/trunk +kss.js = svn https://codespeak.net/svn/kukit/kss.js/trunk [versions] plone.recipe.alltests = 1.2