README.rdoc in rewritten-0.0.1 vs README.rdoc in rewritten-0.0.2

- old
+ new

@@ -1,24 +1,34 @@ = Rewritten Rewritten is a lookup-based rewriting engine that rewrites requested -URLs on the fly. The URL manipulations depend on a translations found in +URLs on the fly. The URL manipulations depend on translations found in a redis database. -If a matching translation is found, the result is either a redirection -to another translation or a modification of path and request parameters. -If there is no matching translation, the request is left unmodified. +If a matching translation is found, the result of a request is either a +redirection or a modification of path and request parameters. For URLs +without translation entries the request is left unmodified. Rewritten takes larges parts from the Resque codebase (which rocks). The gem is compromised of four parts: 1. A Ruby library for creating, modifying and querying translations 2. A Sinatra app for displaying and managing translations 3. A Rack app for rewriting and redirecting request (Rack::Rewritten::Url) -4. A Rack app for substituting URLs in HTML pages with their current translation (Rack::Rewritten:Html) +4. A Rack app for substituting URLs in HTML pages with their current translation (Rack::Rewritten::Html) 5. A Rack app for recording successful request (Rack::Rewritten::Record) + +== New Relic Notice + +There seem to be unresolved issues when Rack::Rewritten::Html is used +in conjunction with the New Relic gem (being a rack app as well). +Unfortunately the only workaround so far is either disabling New Relic +or Rack::Rewritten::Html (pointers in the right debugging direction or +pull requests are welcome). + + == Overview The Rewritten library allows you to create new URL translations and then query for the current "trade language" of an URL. @@ -31,22 +41,29 @@ Rewritten.remove_translation('/apple-computer/newton', '/products/4e4d3c6a1d41c811e8000009') == Usage in your Rack stack +To take full advantage of the engine you would use both, the URL and +HTML, rack apps as follows: + use Rack::Rewritten::Url use Rack::Rewritten::Html run Your::App +This way the URL rewriting and generation is stays decoupled from your +app. For a Rails app, for instance, you wouldn't need to mess with your +<tt>routes.rb</tt> or path helpers when dealing with custom URLs. + == The Front End Rewritten comes with a Sinatra-based front end for dislaying and -managing your URL translations (in the familiar Resque design). +managing your URL translations (in the familiar Resque layout). +[IMAGE] -[PICTURE] === Standalone Running Rewritten as a gem in standalone mode is easy: @@ -63,10 +80,11 @@ run Rack::URLMap.new \ "/" => Your::App.new, "/resque" => Rewritten::Server.new -Check examples/demo/config.ru for a functional example (including HTTP basic auth). +Check lib/test.ru for a functional example. +