This repository has been archived by the owner. It is now read-only.
middleware usages
Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
config
public
tmp
README.rdoc

README.rdoc

rackup examples

Target version of Rack

  • c81542e28aa715ca209186f5c58b96f373b44fcf (git)

  • 0.1 (rackup command)

What is this?

Just write rackup examples.

Run rackup examples

Rackup examples are in the 'config/' directory. And some applications are in the 'app/' directory.

e.g.

[TERM:A] $ cd /path/to/this/clone/directory
[TERM:A] $ rackup config/basic.ru

[TERM:B] $ curl -v http://user:pass@localhost:9292/

setup rack-rack-contrib

commit: 43a508f7bdf59c3d1aee2856d71f815ae2056cf1

$ git clone git://github.com/rack/rack-contrib.git
$ cd rack-contrib
$ (edit rack-contrib.gemspec)
$ git diff
diff --git a/rack-contrib.gemspec b/rack-contrib.gemspec
index 1ed83ba..ea38027 100644
--- a/rack-contrib.gemspec
+++ b/rack-contrib.gemspec
@@ -62,7 +62,7 @@ Gem::Specification.new do |s|

   s.has_rdoc = true
   s.homepage = "http://github.com/rack/rack-contrib/"
-  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "rack-contrib", "--main", "README"]
+  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "rack-contrib", "--main", "README.rdoc"]
   s.require_paths = %w[lib]
   s.rubygems_version = '1.1.1'
 end
$ sudo rake install

*NOTE: Some middlewares are not included in gem.*

Middlewares and Utilities (official)

*NOTE: These category names are unofficial.*

Authentication

  • Rack::Auth::Basic

  • Rack::Auth::Digest

  • Rack::Auth::OpenID

Filter

  • Rack::Cascade

  • Rack::Chunked

  • Rack::ConditionalGet

  • Rack::ContentLength

  • Rack::ContentType

  • Rack::Deflater

  • Rack::ForwardRequest

  • Rack::Head

  • Rack::MethodOverride

  • Rack::Recursive

Serving static contents

  • Rack::Directory

  • Rack::File

  • Rack::Static

Session

  • Rack::Session::Cookie

  • Rack::Session::Memcache

  • Rack::Session::Pool

System

  • Rack::CommonLogger

  • Rack::Lint

  • Rack::Reloader

  • Rack::ShowExceptions

  • Rack::ShowStatus

  • Rack::URLMap

Utilities (Not middleware)

No samples. See official documentation.

  • Rack::Mime

  • Rack::Utils

  • Rack::Utils::Context

  • Rack::Utils::HeaderHash

  • Rack::Utils::Multipart

Middlewares (rack-contrib)

*NOTE: These middlewares are listed at <github.com/rack/rack-contrib/tree/master>.*

  • Rack::Etag

  • Rack::JSONP

  • Rack::LighttpdScriptNameFix (no example)

  • Rack::Locale (no example)

  • Rack::MailExceptions

  • Rack::NestedParams

  • Rack::PostBodyContentTypeParser

  • Rack::ProcTitle

  • Rack::Profiler

  • Rack::Sendfile

  • Rack::Signals

  • Rack::TimeZone

  • Rack::Evil

  • Rack::Callbacks

  • Rack::Config

  • Rack::NotFound

  • Rack::CSSHTTPRequest (no example)

  • Rack::Deflect (no example)

  • Rack::ResponseCache (no example)

  • Rack::RelativeRedirect

References

Rack

<rack.rubyforge.org/>

Rack RDoc

<rack.rubyforge.org/doc/>

Rack on GitHub

<github.com/rack/rack/tree/master>

rack-contrib on GitHub

<github.com/rack/rack-contrib/tree/master>