Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Merge branch 'release/1.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanrite committed Jan 28, 2012
2 parents 0f4a0bb + 9e8d945 commit 89126cb
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 23 deletions.
34 changes: 25 additions & 9 deletions README.md
Expand Up @@ -2,24 +2,40 @@

If you don't know what DAV4Rack is, check out the gem by Chris Roberts: <https://github.com/chrisroberts/dav4rack/>

### How does this work?
### Walkthrough

Clone the repo off Github, run `bundle install && rake db:migrate && rails s`
#### Set It Up Locally

With a web browser, goto `localhost:3000` (its just a regular rails app)
Clone the repo off Github and run `bundle install && rake db:migrate && rails s`

Create an account (or many) using the link above. This creates a user account using a pretty vanilla install of Devise. For each account you create, a folder will be created automatically in **/Users/brite/src/example/public/system/userfiles**
It will start up like a regular rails application.

You can then connect to this folder with WebDAV at: **webdav.lvh.me:3000**
With a web browser, goto `localhost:3000` and you should see the welcome page!

*(if you don't know what *.lvh.me is, its just a CNAME to localhost, makes working with subdomains on your local machine easier)*
#### Setting Up User Accounts

You should now have per-user chrooted WebDAV folders authenticated with Devise!
The Welcome Page has links to Login and Sign Up. These are simple links provided by Devise.

Create an account (or many) using the Create Account link.

This creates a user account using a pretty vanilla install of Devise (with the exception of using usernames instead of email).

For each account you create, a folder will be created automatically in **Rails.root/public/system/userfiles**, this is where we will store the per-user subdirectories they will access over WebDAV.

#### Connectingn with WebDAV

If you have created an account, you should be able to connect to it via WebDAV.

Boot up your WebDAV client (Apple Finder, Cyberduck, Cadaver, etc.) and visit: <webdav.lvh.me:3000>

Ff you don't know what *.lvh.me is, its just a CNAME to localhost, makes working with subdomains on your local machine easier. In this example we've constrained WebDAV to only work on the webdav subdomain, but you can change this in `routes.rb` if you desire.

Enter the username and password for a user account you have previously registered and you should get a chrooted DAV folder!

### More help?

A brief walkthough is available: <https://github.com/chrisroberts/dav4rack/wiki/Advanced-Rails-3-Tutorial---Custom-Resource,-Devise,-and-User-Specific-Routing>
There is a step-by-step walkthough available: <https://github.com/chrisroberts/dav4rack/wiki/Advanced-Rails-3-Tutorial---Custom-Resource,-Devise,-and-User-Specific-Routing>

Question or comments can be posted on github: <https://github.com/bryanrite/dav4rack-example-devise-subdirectories>

Version: 1.0.1
Version: 1.0.2
17 changes: 3 additions & 14 deletions app/views/home/index.html.erb
Expand Up @@ -7,18 +7,7 @@
<p><%= link_to 'Create Account', new_user_registration_path %></p>
<% end %>

<h2>Welcome to the DAV4Rack Rails Example using Devise and Per-User Subdomains!</h2>
<p>If you don't know what DAV4Rack is, check out the gem by Chris Roberts: <%= link_to 'https://github.com/chrisroberts/dav4rack/', 'https://github.com/chrisroberts/dav4rack/' %>
<h3>How does this work?</h3>
<p>Simply create an account (or many) using the link above. For each account you create, a folder will be created in <strong><%= File.join(Rails.root, 'public', 'system', 'userfiles') %></strong></p>
<p>You can then connect to this folder with WebDAV at: <strong>webdav.lvh.me:3000</strong></p>
<p><em>(if you don't know what *.lvh.me is, its just a CNAME to localhost, makes working with subdomains on your local machine easier)</em></p>
<h2>Welcome to the DAV4Rack Rails Sample Application using Devise and Per-User Subdirectories!</h2>

<p>You should now have per-user chrooted WebDAV folders authenticated with Devise!</p>

<h3>More help?</h3>
<p>A brief walkthough is available <%= link_to 'here', 'https://github.com/chrisroberts/dav4rack/wiki/Advanced-Rails-3-Tutorial---Custom-Resource,-Devise,-and-User-Specific-Routing' %></p>

<p>Question or comments can be posted: <%= link_to 'on github.', 'https://github.com/bryanrite/dav4rack-example-devise-subdirectories' %></p>

<p><em>-<%= link_to 'Bryan Rite', 'http://www.bryanrite.com' %></em></p>
<p>The <%= link_to 'README file', 'https://github.com/bryanrite/dav4rack-example-devise-subdirectories/blob/master/README.md' %> has the most up-to-date instructions on how to get this sample app running and what it can do.</p>

0 comments on commit 89126cb

Please sign in to comment.