[Checkins] SVN: megrok.resource/trunk/ Removed specific ILibrary interface and now use the one from hurry.resource
Vincent Fretin
vincent.fretin at gmail.com
Sat Jul 3 16:21:11 EDT 2010
Log message for revision 114152:
Removed specific ILibrary interface and now use the one from hurry.resource
so the ILibraryUrl adapter found is the same for megrok.resource.Library and
hurry.resource.Library. You need hurry.zoperesource 0.5 to have hashed
resource for hurry.resource.Library instances.
Changed:
U megrok.resource/trunk/docs/HISTORY.txt
U megrok.resource/trunk/src/megrok/resource/__init__.py
U megrok.resource/trunk/src/megrok/resource/interfaces.py
U megrok.resource/trunk/src/megrok/resource/url.py
-=-
Modified: megrok.resource/trunk/docs/HISTORY.txt
===================================================================
--- megrok.resource/trunk/docs/HISTORY.txt 2010-07-03 20:12:25 UTC (rev 114151)
+++ megrok.resource/trunk/docs/HISTORY.txt 2010-07-03 20:21:11 UTC (rev 114152)
@@ -1,10 +1,13 @@
Changelog
=========
-0.4.2 (unreleased)
-------------------
+0.5 (unreleased)
+----------------
-* ...
+* Removed specific ILibrary interface and now use the one from hurry.resource
+ so the ILibraryUrl adapter found is the same for megrok.resource.Library and
+ hurry.resource.Library. You need hurry.zoperesource 0.5 to have hashed
+ resource for hurry.resource.Library instances.
0.4.1 (2010-02-19)
------------------
Modified: megrok.resource/trunk/src/megrok/resource/__init__.py
===================================================================
--- megrok.resource/trunk/src/megrok/resource/__init__.py 2010-07-03 20:12:25 UTC (rev 114151)
+++ megrok.resource/trunk/src/megrok/resource/__init__.py 2010-07-03 20:21:11 UTC (rev 114152)
@@ -1,8 +1,9 @@
from grokcore.view import path
from grokcore.component import name
from hurry.resource import ResourceInclusion, GroupInclusion, mode
+from hurry.resource.interfaces import ILibrary
from megrok.resource.directives import include, use_hash, resource
from megrok.resource.components import Library, ResourceLibrary
-from megrok.resource.interfaces import IResourcesIncluder, ILibrary
+from megrok.resource.interfaces import IResourcesIncluder
from megrok.resource.utils import component_includes
Modified: megrok.resource/trunk/src/megrok/resource/interfaces.py
===================================================================
--- megrok.resource/trunk/src/megrok/resource/interfaces.py 2010-07-03 20:12:25 UTC (rev 114151)
+++ megrok.resource/trunk/src/megrok/resource/interfaces.py 2010-07-03 20:21:11 UTC (rev 114152)
@@ -6,9 +6,3 @@
class IResourcesIncluder(Interface):
"""A publishable component that can include resources.
"""
-
-
-class ILibrary(Interface):
- """A library, including resources.
- """
- name = Attribute("The name of the library needed for URL computations")
Modified: megrok.resource/trunk/src/megrok/resource/url.py
===================================================================
--- megrok.resource/trunk/src/megrok/resource/url.py 2010-07-03 20:12:25 UTC (rev 114151)
+++ megrok.resource/trunk/src/megrok/resource/url.py 2010-07-03 20:21:11 UTC (rev 114152)
@@ -7,13 +7,13 @@
from zope.site.hooks import getSite
from zope.traversing.browser.absoluteurl import absoluteURL
-from hurry.resource.interfaces import ILibraryUrl
+from hurry.resource.interfaces import ILibrary, ILibraryUrl
from hurry.zoperesource.zopesupport import getRequest
from z3c.hashedresource.interfaces import IResourceContentsHash
+ at grok.adapter(ILibrary)
@grok.implementer(ILibraryUrl)
- at grok.adapter(megrok.resource.ILibrary)
def library_url(library):
request = getRequest()
use_hash = megrok.resource.use_hash.bind().get(library)
More information about the checkins
mailing list