[Checkins] SVN: hurry.yui/trunk/ Compatibility for hurry.resource 0.10 and later.

Martijn Faassen faassen at startifact.com
Sat Jul 24 09:20:53 EDT 2010


Log message for revision 114997:
  Compatibility for hurry.resource 0.10 and later.
  

Changed:
  U   hurry.yui/trunk/CHANGES.txt
  U   hurry.yui/trunk/setup.py
  U   hurry.yui/trunk/src/hurry/yui/basic.txt
  U   hurry.yui/trunk/src/hurry/yui/depend.py

-=-
Modified: hurry.yui/trunk/CHANGES.txt
===================================================================
--- hurry.yui/trunk/CHANGES.txt	2010-07-24 13:18:52 UTC (rev 114996)
+++ hurry.yui/trunk/CHANGES.txt	2010-07-24 13:20:53 UTC (rev 114997)
@@ -4,7 +4,7 @@
 2.7.0.1 (unreleased)
 ====================
 
-* ...
+* Compatibility with hurry.resource 0.10 and up.
 
 2.7.0 (2009-09-07) (YUI version 2.7.0)
 ======================================

Modified: hurry.yui/trunk/setup.py
===================================================================
--- hurry.yui/trunk/setup.py	2010-07-24 13:18:52 UTC (rev 114996)
+++ hurry.yui/trunk/setup.py	2010-07-24 13:20:53 UTC (rev 114997)
@@ -32,7 +32,7 @@
     zip_safe=False,
     install_requires=[
         'setuptools',
-        'hurry.resource > 0.2',
+        'hurry.resource > 0.9',
         'simplejson',
         ],
     entry_points= {

Modified: hurry.yui/trunk/src/hurry/yui/basic.txt
===================================================================
--- hurry.yui/trunk/src/hurry/yui/basic.txt	2010-07-24 13:18:52 UTC (rev 114996)
+++ hurry.yui/trunk/src/hurry/yui/basic.txt	2010-07-24 13:20:53 UTC (rev 114997)
@@ -6,18 +6,13 @@
 Let's set up a way to render URLs; typically the framework has already
 done this::
 
-  >>> def get_library_url(library):
-  ...    return 'http://localhost/static/%s' % (
-  ...      library.name)
-  >>> from hurry.resource import Library
-  >>> from hurry.resource.interfaces import ILibraryUrl
-  >>> from zope import component
-  >>> component.provideAdapter(
-  ...     factory=get_library_url, 
-  ...     adapts=(Library,),
-  ...     provides=ILibraryUrl)
+  >>> class Plugin(object):
+  ...   def get_library_url(self, library):
+  ...     return 'http://localhost/static/%s' % (
+  ...       library.name)
+  >>> from hurry.resource import register_plugin
+  >>> register_plugin(Plugin())
 
-
 Let's check the YUI structure by picking out a resource in it::
 
   >>> from hurry import yui

Modified: hurry.yui/trunk/src/hurry/yui/depend.py
===================================================================
--- hurry.yui/trunk/src/hurry/yui/depend.py	2010-07-24 13:18:52 UTC (rev 114996)
+++ hurry.yui/trunk/src/hurry/yui/depend.py	2010-07-24 13:20:53 UTC (rev 114997)
@@ -15,7 +15,7 @@
     return convert_to_inclusions(d)
 
 def convert_to_inclusions(d):
-    yui = Library('yui')
+    yui = Library('yui', 'yui-build')
     inclusion_map = {}
     for name, value in d.items():
         name = normalize_name(name)



More information about the checkins mailing list