Giter VIP home page Giter VIP logo

railsdav's Introduction

Railsdav (WebDAV for Ruby On Rails)
===================================

Important note: This interim commit is in no way release-quality. It mainly exists in order for me to test that I have git installed correctly! Kieran

Railsdav is a plugin which allows for custom WebDAV controllers to be added to a Ruby On Rails application to expose functionality as filesystems to WebDAV clients such as Mac OS X Finder, Windows Network Places, Dreamweaver etc.

ktopping's enhancements include:
 * Locking - there is a partially complete framework for acquiring/releasing locks, allowing applications to specify their own "Lock Factory" for creating, checking & releasing locks. Two example implementations exist:
    * ActiveRecordLockFactory: Implements locks via an ActiveRecord class. See example class below, "WebdavLock".
    * FileSystemLockFactory: Implements locks via native filesystem locks.
   The locking implementation allows a wider number of clients to connect to the webdav server, and it allows them to perform a greater set of functionality.
 * ActiveRecord webdav implementation. Addition of an "acts_as_active_record_webdav" method which stores resources in a database table of your choice, via an ActiveRecord class of your choice.

Storing resources via ActiveRecord, and implementing locks via ActiveRecord means that this plugin can run on platforms without a writable filesystem. One obvious example being Heroku.

Railsdav requires the following gems in addition to rails

* unicode (gem install unicode)
* shared-mime-info (gem install unicode)
# mimetypes (gem install mime-types)

Railsdav was created by Stuart Eccles (http://www.liverail.net/). I'd like to thank the following people for assisting with Railsdav

*   Albert Ramstedt who contributed bug fixes for a variety of code issues and helped with re-structuring the plugin
*   Alex MacCaw
*   Fabien Franzen

TODO: Document this!
Resource storage model:

 create_table :webdavs do |t|
    t.string   :path
    t.binary   :data
    t.integer  :size, :null => false
    t.boolean  :is_directory, :null => false
    t.timestamps
 end

 add_index :webdavs, [:path], :unique => true

Lock model

 create_table :webdav_locks do |t|
    t.string   :path
    t.string   :token
    t.timestamps
 end
 add_index :webdav_locks, [:path], :unique => true

railsdav's People

Contributors

jagthedrummer avatar mjankowski avatar stueccles avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.