From c04abbaa6366771db7434dea32f4f5b747fda1dc Mon Sep 17 00:00:00 2001 From: Cesar Carruitero Date: Thu, 8 Nov 2012 16:04:20 -0500 Subject: fix bugs in rails_on_rack [ci-skip] --- guides/source/rails_on_rack.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guides/source/rails_on_rack.md') diff --git a/guides/source/rails_on_rack.md b/guides/source/rails_on_rack.md index ba96c0c0a9..d423d15cc3 100644 --- a/guides/source/rails_on_rack.md +++ b/guides/source/rails_on_rack.md @@ -15,7 +15,7 @@ WARNING: This guide assumes a working knowledge of Rack protocol and Rack concep Introduction to Rack -------------------- -bq. Rack provides a minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses in the simplest way possible, it unifies and distills the API for web servers, web frameworks, and software in between (the so-called middleware) into a single method call. +Rack provides a minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses in the simplest way possible, it unifies and distills the API for web servers, web frameworks, and software in between (the so-called middleware) into a single method call. - [Rack API Documentation](http://rack.rubyforge.org/doc/) @@ -101,7 +101,7 @@ Action Dispatcher Middleware Stack Many of Action Dispatchers's internal components are implemented as Rack middlewares. `Rails::Application` uses `ActionDispatch::MiddlewareStack` to combine various internal and external middlewares to form a complete Rails Rack application. -NOTE: `ActionDispatch::MiddlewareStack` is Rails' equivalent of `Rack::Builder`, but built for better flexibility and more features to meet Rails' requirements. +NOTE: `ActionDispatch::MiddlewareStack` is Rails equivalent of `Rack::Builder`, but built for better flexibility and more features to meet Rails' requirements. ### Inspecting Middleware Stack -- cgit v1.2.3 From 3ad89fced21d896a70a8bffb5e6e2146ff36135d Mon Sep 17 00:00:00 2001 From: Agis Anastasopoulos Date: Fri, 16 Nov 2012 12:54:25 +0200 Subject: Remove unnecessary whitespace --- guides/source/rails_on_rack.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/rails_on_rack.md') diff --git a/guides/source/rails_on_rack.md b/guides/source/rails_on_rack.md index d423d15cc3..b55fd2c6ca 100644 --- a/guides/source/rails_on_rack.md +++ b/guides/source/rails_on_rack.md @@ -58,7 +58,7 @@ Here's how it loads the middlewares: ```ruby def middleware middlewares = [] - middlewares << [Rails::Rack::Debugger] if options[:debugger] + middlewares << [Rails::Rack::Debugger] if options[:debugger] middlewares << [::Rack::ContentLength] Hash.new(middlewares) end -- cgit v1.2.3 From 8be3a1a9a4f3c9ba66a320bfa3fa9cbc53ca7fd5 Mon Sep 17 00:00:00 2001 From: Agis Anastasopoulos Date: Fri, 16 Nov 2012 14:48:17 +0200 Subject: Update the middleware stack to reflect the current Rails output Specifically, remove `ActionDispatch::Head` in favor of `Rack::Head`. --- guides/source/rails_on_rack.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guides/source/rails_on_rack.md') diff --git a/guides/source/rails_on_rack.md b/guides/source/rails_on_rack.md index b55fd2c6ca..afd1638ed9 100644 --- a/guides/source/rails_on_rack.md +++ b/guides/source/rails_on_rack.md @@ -132,11 +132,11 @@ use ActionDispatch::Cookies use ActionDispatch::Session::CookieStore use ActionDispatch::Flash use ActionDispatch::ParamsParser -use ActionDispatch::Head +use Rack::Head use Rack::ConditionalGet use Rack::ETag use ActionDispatch::BestStandardsSupport -run ApplicationName::Application.routes +run MyApp::Application.routes ``` Purpose of each of this middlewares is explained in the [Internal Middlewares](#internal-middleware-stack) section. -- cgit v1.2.3