Permalink
Browse files

Update doco readme, summary and description

  • Loading branch information...
nicksieger committed Mar 16, 2012
1 parent 7332928 commit c8f647f6ea700eed54c24cfb7c954de47c34c498
Showing with 17 additions and 21 deletions.
  1. +15 −19 README.md
  2. +2 −2 rack-chain.gemspec
View
@@ -1,29 +1,25 @@
# Rack::Chain
-TODO: Write a gem description
+Rack::Chain uses fibers to minimize stack depth in Rack applications.
-## Installation
+A Rack application assembled with Rack::Chain runs each middleware
+`#call` in a separate fiber, thereby avoiding deep stacks.
-Add this line to your application's Gemfile:
+The name "chain" comes from `javax.servlet.FilterChain`, which is the
+equivalent pattern to Rack middleware in the Java Servlet API.
- gem 'rack-chain'
-
-And then execute:
-
- $ bundle
-
-Or install it yourself as:
-
- $ gem install rack-chain
+Until the Rack API morphs into a before/after pattern which would
+allow decomposing the request pipeline into a flat sequence of
+function applications over a request and a response, these kinds of
+cheeky gyrations may be necessary.
## Usage
-TODO: Write usage instructions here
+To use Rack::Chain with existing Rack applications, place the
+following lines in your `config.ru`:
-## Contributing
+```ruby
+require 'rack/chain'
+extend Rack::Chain::Linker
+```
-1. Fork it
-2. Create your feature branch (`git checkout -b my-new-feature`)
-3. Commit your changes (`git commit -am 'Added some feature'`)
-4. Push to the branch (`git push origin my-new-feature`)
-5. Create new Pull Request
View
@@ -4,8 +4,8 @@ require File.expand_path('../lib/rack-chain/version', __FILE__)
Gem::Specification.new do |gem|
gem.authors = ["Nick Sieger"]
gem.email = ["nick@nicksieger.com"]
- gem.description = %q{rack-chain builds a Rack application that runs each middleware in its own fiber to minimize stack depth. }
- gem.summary = %q{rack-chain uses fibers to minimize stack depth in Rack applications.}
+ gem.description = %q{Rack::Chain builds a Rack application that runs each middleware in its own fiber to minimize stack depth. }
+ gem.summary = %q{Rack::Chain uses fibers to minimize stack depth in Rack applications.}
gem.homepage = "https://github.com/nicksieger/rack-chain"
gem.files = `git ls-files`.split($\)

0 comments on commit c8f647f

Please sign in to comment.