Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Flesh out README a bit; rename to README.rdoc

  • Loading branch information...
commit 3560ac04491a37cd13a887906120f8bd48f9a687 1 parent ea74434
@rtomayko rtomayko authored
Showing with 61 additions and 16 deletions.
  1. +0 −12 README
  2. +57 −0 README.rdoc
  3. +2 −2 Rakefile
  4. +2 −2 rack-contrib.gemspec
View
12 README
@@ -1,12 +0,0 @@
-= Contributed Rack Middleware and Utilities
-
-This package includes a variety of components for Rack, a Ruby web server
-interface.
-
-http://github.com/rtomayko/rack-contrib
-
-== Links
-
-Rack:: <http://rack.rubyforge.org/>
-Rack's Rubyforge project:: <http://rubyforge.org/projects/rack>
-rack-devel mailing list:: <http://groups.google.com/group/rack-devel>
View
57 README.rdoc
@@ -0,0 +1,57 @@
+= Contributed Rack Middleware and Utilities
+
+This package includes a variety of add-on components for Rack, a Ruby web server
+interface:
+
+* Rack::ContentLength - Automatically sets the Content-Length header on
+ all String bodies.
+* Rack::ETag - Automatically sets the ETag header on all String bodies.
+* Rack::JSONP - Adds JSON-P support by stripping out the callback param
+ and padding the response with the appropriate callback format.
+* Rack::LighttpdScriptNameFix - Fixes how lighttpd sets the SCRIPT_NAME
+ and PATH_INFO variables in certain configurations.
+* Rack::Locale - Detects the client locale using the Accept-Language request
+ header and sets a rack.locale variable in the environment.
+* Rack::MailExceptions - Rescues exceptions raised from the app and
+ sends a useful email with the exception, stacktrace, and contents of the
+ environment.
+* Rack::PostBodyContentTypeParser - Adds support for JSON request bodies. The
+ Rack parameter hash is populated by deserializing the JSON data provided in
+ the request body when the Content-Type is application/json.
+* Rack::Profiler - Uses ruby-prof to measure request time.
+* Rack::Sendfile - Enables X-Sendfile support for bodies that can be served
+ from file.
+* Rack::TimeZone - Detects the clients timezone using JavaScript and sets
+ a variable in Rack's environment with the offset from UTC.
+
+=== Use
+
+Git is the quickest way to the rack-contrib sources:
+
+ git clone git://github.com/rtomayko/rack-contrib.git
+
+Gems are currently available from GitHub clones:
+
+ gem install rtomayko-rack-contrib --source=http://gems.github.com/
+
+Requiring 'rack/contrib' will add autoloads to the Rack modules for all of the
+components included. The following example shows what a simple rackup
+(+config.ru+) file might look like:
+
+ require 'rack'
+ require 'rack/contrib'
+
+ use Rack::Profiler if ENV['RACK_ENV'] == 'development'
+
+ use Rack::ETag
+ use Rack::ContentLength
+ use Rack::MailExceptions
+
+ run theapp
+
+=== Links
+
+rack-contrib on GitHub:: <http://github.com/rtomayko/rack-contrib>
+Rack:: <http://rack.rubyforge.org/>
+Rack On GitHub:: <http://github.org/chneukirchen/rack>
+rack-devel mailing list:: <http://groups.google.com/group/rack-devel>
View
4 Rakefile
@@ -27,7 +27,7 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
'--title' << 'Rack Contrib Documentation' <<
'--charset' << 'utf-8'
rdoc.rdoc_dir = "doc"
- rdoc.rdoc_files.include 'README'
+ rdoc.rdoc_files.include 'README.rdoc'
rdoc.rdoc_files.include 'RDOX'
rdoc.rdoc_files.include('lib/rack/*.rb')
rdoc.rdoc_files.include('lib/rack/*/*.rb')
@@ -66,7 +66,7 @@ end
# GEMSPEC ===================================================================
-file 'rack-contrib.gemspec' => FileList['{lib,test}/**','Rakefile', 'README'] do |f|
+file 'rack-contrib.gemspec' => FileList['{lib,test}/**','Rakefile', 'README.rdoc'] do |f|
# read spec file and split out manifest section
spec = File.read(f.name)
parts = spec.split(" # = MANIFEST =\n")
View
4 rack-contrib.gemspec
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
# = MANIFEST =
s.files = %w[
COPYING
- README
+ README.rdoc
Rakefile
lib/rack/content_length.rb
lib/rack/contrib.rb
@@ -43,7 +43,7 @@ Gem::Specification.new do |s|
s.test_files = s.files.select {|path| path =~ /^test\/spec_.*\.rb/}
- s.extra_rdoc_files = %w[README COPYING RDOX]
+ s.extra_rdoc_files = %w[README.rdoc COPYING]
s.add_dependency 'rack', '~> 0.4'
s.add_dependency 'tmail', '>= 1.2'
s.add_dependency 'json', '>= 1.1'
Please sign in to comment.
Something went wrong with that request. Please try again.