From 427878a7a692997d2be7dcfe8051673ec8ec7ba6 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Mon, 28 Jun 2010 16:26:46 -0400 Subject: [PATCH] Update RouteFS for the new syntax in Routes 1.9. --- routefs/dictfs.py | 2 +- routefs/examples/homefs.py | 4 ++-- routefs/examples/pyhesiodfs.py | 6 +++--- setup.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/routefs/dictfs.py b/routefs/dictfs.py index 25904b1..9226c70 100644 --- a/routefs/dictfs.py +++ b/routefs/dictfs.py @@ -31,7 +31,7 @@ class DictFS(routefs.RouteFS): def make_map(self): m = Mapper() - m.connect('*path', controller='handler') + m.connect('/{path:.*}', controller='handler') return m diff --git a/routefs/examples/homefs.py b/routefs/examples/homefs.py index a832c39..16c7bda 100755 --- a/routefs/examples/homefs.py +++ b/routefs/examples/homefs.py @@ -24,8 +24,8 @@ class HomeFS(routefs.RouteFS): def make_map(self): m = Mapper() - m.connect('', controller='getList') - m.connect(':action', controller='getUser') + m.connect('/', controller='getList') + m.connect('/{action}', controller='getUser') return m def getUser(self, action, **kwargs): diff --git a/routefs/examples/pyhesiodfs.py b/routefs/examples/pyhesiodfs.py index 2a9bfb0..b3daa84 100755 --- a/routefs/examples/pyhesiodfs.py +++ b/routefs/examples/pyhesiodfs.py @@ -17,9 +17,9 @@ class PyHesiodFS(routefs.RouteFS): def make_map(self): m = Mapper() - m.connect('', controller='getList') - m.connect('README.txt', controller='getReadme') - m.connect(':action', controller='getLocker') + m.connect('/', controller='getList') + m.connect('/README.txt', controller='getReadme') + m.connect('/{action}', controller='getLocker') return m def getLocker(self, action, **kwargs): diff --git a/setup.py b/setup.py index 6012ddf..3e437c7 100755 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setup( url="http://github.com/ebroder/python-routefs/wikis", license="MPL, GPL", packages=find_packages(), - install_requires=['fuse_python>=0.2a', 'Routes>=1.7'], + install_requires=['fuse_python>=0.2a', 'Routes>=1.9'], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Plugins', -- 1.7.9.5