aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/rack
Commit message (Collapse)AuthorAgeFilesLines
* Diverge Metal implementation from Rack::Cascade since we want the last app ↵Joshua Peek2008-12-192-44/+22
| | | | to return its headers and body if the status is a 404.
* Cheaper metal cascadeJeremy Kemper2008-12-182-10/+51
|
* Rename Rails::Rack::Logger -> LogTailer. Speed up log mtime checks.Jeremy Kemper2008-12-182-28/+35
|
* Cheaper log tail time comparisonJeremy Kemper2008-12-181-3/+3
|
* Make generated Metal bits a pure rack endpoint application (not middleware)Joshua Peek2008-12-171-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of calling super to pass the request on, return a 404. The modified app looks like this: # app/metal/poller.rb class Poller def self.call(env) if env["PATH_INFO"] =~ /^\/poller/ [200, {"Content-Type" => "text/html"}, "Hello, World!"] else [404, {"Content-Type" => "text/html"}, "Not Found"] end end end But you aren't locked in to just Rails: # app/metal/api.rb require 'sinatra' Sinatra::Application.default_options.merge!(:run => false, :env => :production) Api = Sinatra.application unless defined? Api get '/interesting/new/ideas' do 'Hello Sinatra!' end
* Introduce Rails MetalJoshua Peek2008-12-161-0/+21
| | | | | | | | | | | | | | | | | | | # app/metal/poller.rb class Poller < Rails::Rack::Metal def call(env) if env["PATH_INFO"] =~ /^\/poller/ [200, {"Content-Type" => "application/json"}, Message.recent.to_json] else super end end end * There is a generator to help you get started `script/generate metal poller` * Also, metal bits can be ran standalone with rackup `rackup app/metal/poller.rb`
* Require rack/utils explicitlyJeremy Kemper2008-12-031-0/+2
|
* Move debugger into middlewareJoshua Peek2008-11-251-0/+21
|
* Added rack logger middleware that tails the environment logJoshua Peek2008-08-191-0/+28
|
* Added Rack middleware to handle static files.Joshua Peek2008-06-011-0/+35