Sha256: 7fc811dd0c2b75b5e2c3333c84d507d3e7a95ee3791425450edad43c09f541bf

Contents?: true

Size: 586 Bytes

Versions: 5

Compression:

Stored size: 586 Bytes

Contents

$:.unshift( "../lib" )
require 'capcode'
require 'capcode/render/webdav'

module Capcode
  
  # Render file from /Users/greg/temp !!!
  class WebDav < Route '/temp'
    def get
      http_authentication( :type => :digest, :realm => "My WebDAV Directory !!!" ) { 
        {"greg" => "toto"}
      }
      render :webdav => "/Users/greg"
    end
    
    def method_missing(id, *a, &b)
      get
    end
  end  
  
  class Index < Route '/'
    def get
      render "WebDav server acces : <a href='#{URL(Capcode::WebDav)}'>#{URL(Capcode::WebDav)}</a>"
    end
  end
  
end

Capcode.run( )

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
Capcode-0.8.9 examples/auth-webdav.rb
Capcode-0.8.8 examples/auth-webdav.rb
Capcode-0.8.7 examples/auth-webdav.rb
Capcode-0.8.6 examples/auth-webdav.rb
Capcode-0.8.5 examples/auth-webdav.rb