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

koshigoe/rackup_examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

middleware usages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages