WebDAV plugin for Mephisto
May 5th, 2007
I’ve put together a WebDAV plugin for mephisto the rails blogging engine which runs this site which adds 2 webdav controllers using RailsDAV.
1. Theme DAV Controller – Allows a standard file mount of the mephisto themes directory protected by a BASIC authentication requiring you to log in as an admin user. This means you can edit the life themes from your favourite editor. All general file functions such as move, copy, delete and make folder should all be good.
2. Asset DAV Controller – Allows uploading and downloading of Mephisto assets through the file system mounting. This is a great example of using RailsDAV with attachment_fu which i’ll go into greater detail about in a later post. It’s worth noting that if you upload images, the resized versions thumb and tiny are also then available for download. You can’t create new directories but you can delete assets.
For now installing the mephisto_dav plugin has the following pre-reqs:
- Using Edge Mephisto
- Using Edge Rails
- Latest version of RailsDAV plugin installed.
So installation is a matter of running the following in your mephisto rails directory:
ruby script/plugin install http://svn.liverail.net/svn/plugins/railsdav
ruby script/plugin install http://svn.liverail.net/svn/plugins/mephisto_dav
Then after starting your server you can connect your favourite WebDAV client (such as Finder on Mac OS X) to http://server/theme_dav or http://server/asset_dav
UPDATE: I realise that the comments havn’t been working on liverail and the railsdav lighthouse project was shut. Both should be working now.
July 12th, 2007 at 01:59 AM
Howdy Stuart -
I’ve been meaning to try railsdav out for a while – and well it’s now time!
Any thoughts/suggestions for implementing ical over railsdav?
thanx. Jodi
December 1st, 2007 at 01:45 AM
Any recommendations on a webdav client library for ruby/rails? I can’t find anything, and I need my rails app to talk to an existing webdav repository.
Thanks in advance.
January 7th, 2008 at 06:58 PM
With Rails 2.0, ActionController now has an ACCEPTED_HTTP_METHODS constant which does not include ‘propfind’ which RailsDav uses. A quick fix for this is to add this to your environment.rb (or appropriate initializer).
ActionController::ACCEPTED_HTTP_METHODS = Set.new(%w( get head put post delete options propfind ))
This may not be the best way to fix it, but it worked for me. Should be straightforward to add to the plugin.
January 7th, 2008 at 08:05 PM
Actually…
ActionController::ACCEPTED_HTTP_METHODS.add(‘propfind’)
Is better to use.
September 24th, 2008 at 07:30 AM
GOOD!
October 3rd, 2008 at 08:14 PM
Wouldn’t you need a few others HTTP methods defined by webdav like: %w( lock unlock propfind proppatch mkcol copy move ) ?