[Checkins] SVN: zope.fanstatic/trunk/ Rename hurry.resource to fanstatic.
Jan-Jaap Driessen
jdriessen at thehealthagency.com
Fri Nov 26 10:42:34 EST 2010
Log message for revision 118605:
Rename hurry.resource to fanstatic.
Changed:
U zope.fanstatic/trunk/buildout.cfg
U zope.fanstatic/trunk/src/zope/fanstatic/README.txt
U zope.fanstatic/trunk/src/zope/fanstatic/configure.zcml
U zope.fanstatic/trunk/src/zope/fanstatic/interfaces.py
U zope.fanstatic/trunk/src/zope/fanstatic/meta.zcml
U zope.fanstatic/trunk/src/zope/fanstatic/tests/ftesting.zcml
U zope.fanstatic/trunk/src/zope/fanstatic/tests/tests.py
U zope.fanstatic/trunk/src/zope/fanstatic/zcml.py
U zope.fanstatic/trunk/src/zope/fanstatic/zopesupport.py
-=-
Modified: zope.fanstatic/trunk/buildout.cfg
===================================================================
--- zope.fanstatic/trunk/buildout.cfg 2010-11-26 15:34:07 UTC (rev 118604)
+++ zope.fanstatic/trunk/buildout.cfg 2010-11-26 15:42:33 UTC (rev 118605)
@@ -15,4 +15,4 @@
[test]
recipe = zc.recipe.testrunner
-eggs = hurry.zoperesource[test]
+eggs = zope.fanstatic[test]
Modified: zope.fanstatic/trunk/src/zope/fanstatic/README.txt
===================================================================
--- zope.fanstatic/trunk/src/zope/fanstatic/README.txt 2010-11-26 15:34:07 UTC (rev 118604)
+++ zope.fanstatic/trunk/src/zope/fanstatic/README.txt 2010-11-26 15:42:33 UTC (rev 118605)
@@ -1,7 +1,7 @@
-Zope integration for hurry.resource
-***********************************
+Zope integration for fanstatic
+******************************
-This package provides Zope integration for hurry.resource. This means
+This package provides Zope integration for fanstatic. This means
it's taking care of two things:
* provide access to the needed resources in the WSGI environment
@@ -22,7 +22,7 @@
>>> from zope.app.wsgi.testlayer import Browser
>>> browser = Browser()
>>> browser.handleErrors = False
- >>> browser.open('http://localhost/hurry.zoperesource.test_single')
+ >>> browser.open('http://localhost/zope.fanstatic.test_single')
>>> print browser.contents
<html>
<head>
@@ -37,7 +37,7 @@
If a resource happens to need another resource, this resource is also
automatically included::
- >>> browser.open('http://localhost/hurry.zoperesource.test_multiple')
+ >>> browser.open('http://localhost/zope.fanstatic.test_multiple')
>>> print browser.contents
<html>
<head>
@@ -53,7 +53,7 @@
Let's force all javascript resources to be forced to be included at
the bottom now, just before the ``</body>`` tag::
- >>> browser.open('http://localhost/hurry.zoperesource.test_bottom')
+ >>> browser.open('http://localhost/zope.fanstatic.test_bottom')
>>> print browser.contents
<html>
<head>
@@ -67,10 +67,10 @@
In-template resources
---------------------
-Hurry.zoperesource provides support for rendering resource publisher
+zope.fanstatic provides support for rendering resource publisher
aware URLs to in-template resources::
- >>> browser.open('http://localhost/hurry.zoperesource.test_inline_resource')
+ >>> browser.open('http://localhost/zope.fanstatic.test_inline_resource')
>>> print browser.contents
<html>
<head>
Modified: zope.fanstatic/trunk/src/zope/fanstatic/configure.zcml
===================================================================
--- zope.fanstatic/trunk/src/zope/fanstatic/configure.zcml 2010-11-26 15:34:07 UTC (rev 118604)
+++ zope.fanstatic/trunk/src/zope/fanstatic/configure.zcml 2010-11-26 15:42:33 UTC (rev 118605)
@@ -1,15 +1,15 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:grok="http://namespaces.zope.org/grok"
- xmlns:hzr="http://namespaces.zope.org/hzr">
+ xmlns:zf="http://namespaces.zope.org/zf">
<include package="z3c.autoinclude" file="meta.zcml" />
<includeDependencies package="." />
- <include package="hurry.zoperesource" file="meta.zcml" />
+ <include package="zope.fanstatic" file="meta.zcml" />
- <hzr:setupHurryZopeResource />
+ <zf:setupZopeFanstatic />
<subscriber handler=".zopesupport.set_base_url_on_needed_inclusions" />
Modified: zope.fanstatic/trunk/src/zope/fanstatic/interfaces.py
===================================================================
--- zope.fanstatic/trunk/src/zope/fanstatic/interfaces.py 2010-11-26 15:34:07 UTC (rev 118604)
+++ zope.fanstatic/trunk/src/zope/fanstatic/interfaces.py 2010-11-26 15:42:33 UTC (rev 118605)
@@ -1,6 +1,6 @@
from zope.interface import Interface
-class ISetupHurryZopeResource(Interface):
+class ISetupZopeFanstatic(Interface):
pass
Modified: zope.fanstatic/trunk/src/zope/fanstatic/meta.zcml
===================================================================
--- zope.fanstatic/trunk/src/zope/fanstatic/meta.zcml 2010-11-26 15:34:07 UTC (rev 118604)
+++ zope.fanstatic/trunk/src/zope/fanstatic/meta.zcml 2010-11-26 15:42:33 UTC (rev 118605)
@@ -1,9 +1,9 @@
<configure xmlns:meta="http://namespaces.zope.org/meta">
- <meta:directives namespace="http://namespaces.zope.org/hzr">
+ <meta:directives namespace="http://namespaces.zope.org/zf">
<meta:directive
- name="setupHurryZopeResource"
- schema=".interfaces.ISetupHurryZopeResource"
+ name="setupZopeFanstatic"
+ schema=".interfaces.ISetupZopeFanstatic"
handler=".zcml.action_setup" />
</meta:directives>
Modified: zope.fanstatic/trunk/src/zope/fanstatic/tests/ftesting.zcml
===================================================================
--- zope.fanstatic/trunk/src/zope/fanstatic/tests/ftesting.zcml 2010-11-26 15:34:07 UTC (rev 118604)
+++ zope.fanstatic/trunk/src/zope/fanstatic/tests/ftesting.zcml 2010-11-26 15:42:33 UTC (rev 118605)
@@ -2,7 +2,7 @@
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
i18n_domain="zope"
- package="hurry.zoperesource.tests">
+ package="zope.fanstatic.tests">
<!-- set up enough of Zope to run the tests -->
@@ -19,6 +19,7 @@
<include package="zope.container" />
<include package="zope.principalregistry" />
<include package="zope.site" />
+ <include package="zope.security" />
<include package="zope.traversing.browser" />
<!-- principals -->
@@ -43,13 +44,13 @@
principal="zope.Everybody"
/>
- <include package="hurry.zoperesource"/>
+ <include package="zope.fanstatic"/>
<!-- some pages to use in the tests -->
<browser:page
for="zope.interface.Interface"
- name="hurry.zoperesource.test_single"
+ name="zope.fanstatic.test_single"
permission="zope.Public"
template="test_single.pt"
class=".view.TestSingle"
@@ -57,7 +58,7 @@
<browser:page
for="zope.interface.Interface"
- name="hurry.zoperesource.test_multiple"
+ name="zope.fanstatic.test_multiple"
permission="zope.Public"
template="test_multiple.pt"
class=".view.TestMultiple"
@@ -65,7 +66,7 @@
<browser:page
for="zope.interface.Interface"
- name="hurry.zoperesource.test_bottom"
+ name="zope.fanstatic.test_bottom"
permission="zope.Public"
template="test_bottom.pt"
class=".view.TestBottom"
@@ -73,7 +74,7 @@
<browser:page
for="zope.interface.Interface"
- name="hurry.zoperesource.test_inline_resource"
+ name="zope.fanstatic.test_inline_resource"
permission="zope.Public"
template="test_inline_resource.pt"
class=".view.TestInlineResource"
Modified: zope.fanstatic/trunk/src/zope/fanstatic/tests/tests.py
===================================================================
--- zope.fanstatic/trunk/src/zope/fanstatic/tests/tests.py 2010-11-26 15:34:07 UTC (rev 118604)
+++ zope.fanstatic/trunk/src/zope/fanstatic/tests/tests.py 2010-11-26 15:42:33 UTC (rev 118605)
@@ -8,14 +8,14 @@
from fanstatic import InjectMiddleware
-from hurry.zoperesource.zcml import create_factory
-from hurry.zoperesource.tests.view import foo
-import hurry.zoperesource.tests
+from zope.fanstatic.zcml import create_factory
+from zope.fanstatic.tests.view import foo
+import zope.fanstatic.tests
-class HurryResourceBrowserLayer(BrowserLayer):
+class ZopeFanstaticBrowserLayer(BrowserLayer):
def testSetUp(self):
- super(HurryResourceBrowserLayer, self).testSetUp()
+ super(ZopeFanstaticBrowserLayer, self).testSetUp()
# Because it is difficult to dynamically register a
# entry_point in tests, we do the setup by hand:
resource_factory = create_factory(foo)
@@ -29,5 +29,5 @@
readme = doctest.DocFileSuite(
'../README.txt',
optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS)
- readme.layer = HurryResourceBrowserLayer(hurry.zoperesource.tests)
+ readme.layer = ZopeFanstaticBrowserLayer(zope.fanstatic.tests)
return unittest.TestSuite([readme])
Modified: zope.fanstatic/trunk/src/zope/fanstatic/zcml.py
===================================================================
--- zope.fanstatic/trunk/src/zope/fanstatic/zcml.py 2010-11-26 15:34:07 UTC (rev 118604)
+++ zope.fanstatic/trunk/src/zope/fanstatic/zcml.py 2010-11-26 15:42:33 UTC (rev 118605)
@@ -4,11 +4,11 @@
import fanstatic
-from hurry.zoperesource.zopesupport import HurryResource
+from zope.fanstatic.zopesupport import ZopeFanstaticResource
def create_factory(library):
def factory(request):
- return HurryResource(request, library)
+ return ZopeFanstaticResource(request, library)
return factory
def action_setup(_context):
Modified: zope.fanstatic/trunk/src/zope/fanstatic/zopesupport.py
===================================================================
--- zope.fanstatic/trunk/src/zope/fanstatic/zopesupport.py 2010-11-26 15:34:07 UTC (rev 118604)
+++ zope.fanstatic/trunk/src/zope/fanstatic/zopesupport.py 2010-11-26 15:42:33 UTC (rev 118605)
@@ -13,7 +13,7 @@
if not needed.base_url:
needed.base_url = absoluteURL(None, event.request)
-class HurryResource(object):
+class ZopeFanstaticResource(object):
# Hack to get ++resource++foo/bar/baz.jpg paths working in Zope
# Pagetemplates.
@@ -29,7 +29,7 @@
name = '%s/%s' % (self.name, name)
# XXX check whether the request resource actually exists and
# warn if not.
- return HurryResource(self.request, self.library, name=name)
+ return ZopeFanstaticResource(self.request, self.library, name=name)
def __str__(self):
needed = fanstatic.get_current_needed_inclusions()
More information about the checkins
mailing list