RackDAV - Web Authoring for Rack

RackDAV is a Ruby gem that allows you to use the WebDAV protocol to edit and manage files over HTTP. It comes with its own file backend, but you can also create your own backend by subclassing RackDAV::Resource.

Quickstart

To install the gem, run gem install rack_dav.

To quickly test out RackDAV, copy the config.ru file from this repository and run bundle exec rackup. This will start a web server on a default port that you can connect to without any authentication.

Rack Handler

To use RackDAV in your own rack application, include the following in your config.ru file:

require 'rubygems'
require 'rack_dav'

use Rack::CommonLogger

run RackDAV::Handler.new(:root => '/path/to/docs')

Implementing your own WebDAV resource

If you want to create your own WebDAV resource, you will need to subclass RackDAV::Resource and implement the following methods:

Note that it is possible that a resource object may be instantiated for a resource that does not yet exist.

For more examples and inspiration, you can look at the FileResource implementation.