rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
* Rack::Backstage
@ 2009-02-19 23:56 Harry Vangberg
  2009-04-06 11:35 ` Rack::Backstage Yehuda Katz
  0 siblings, 1 reply; 3+ messages in thread
From: Harry Vangberg @ 2009-02-19 23:56 UTC (permalink / raw
  To: Rack Development


I needed some easy way to show a maintenance page while doing stuff,
and I can't be bothered with mod_rewrite and heaps of documentation,
so this piece of (stupidly named) middleware checks wether a given
file exists, and if it does that is served for all requests, otherwise
the request is just passed on down the chain.

use Rack::Backstage('tmp/maintenance.html')

It's here: http://github.com/ichverstehe/rack-contrib/commit/d3610732b8a37a1e97befdb75bfd3824767a9bf9

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Rack::Backstage
  2009-02-19 23:56 Rack::Backstage Harry Vangberg
@ 2009-04-06 11:35 ` Yehuda Katz
  2009-04-06 20:05   ` Rack::Backstage Scytrin dai Kinthra
  0 siblings, 1 reply; 3+ messages in thread
From: Yehuda Katz @ 2009-04-06 11:35 UTC (permalink / raw
  To: rack-devel

[-- Attachment #1: Type: text/plain, Size: 748 bytes --]

Isn't the most common reason for such a middleware caused by restarting a
Rails process. If so, wouldn't this middleware be shut off?

-- Yehuda

2009/2/19 Harry Vangberg <ichverstehe@gmail.com>

>
> I needed some easy way to show a maintenance page while doing stuff,
> and I can't be bothered with mod_rewrite and heaps of documentation,
> so this piece of (stupidly named) middleware checks wether a given
> file exists, and if it does that is served for all requests, otherwise
> the request is just passed on down the chain.
>
> use Rack::Backstage('tmp/maintenance.html')
>
> It's here:
> http://github.com/ichverstehe/rack-contrib/commit/d3610732b8a37a1e97befdb75bfd3824767a9bf9




-- 
Yehuda Katz
Developer | Engine Yard
(ph) 718.877.1325

[-- Attachment #2: Type: text/html, Size: 1215 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Rack::Backstage
  2009-04-06 11:35 ` Rack::Backstage Yehuda Katz
@ 2009-04-06 20:05   ` Scytrin dai Kinthra
  0 siblings, 0 replies; 3+ messages in thread
From: Scytrin dai Kinthra @ 2009-04-06 20:05 UTC (permalink / raw
  To: rack-devel


Sounds like a basic, present if cached, otherwise generate. Which IMO
is better handled by the http server.
Alternately a Rack::Cascade with a Rack::File should work.

On Mon, Apr 6, 2009 at 04:35, Yehuda Katz <wycats@gmail.com> wrote:
> Isn't the most common reason for such a middleware caused by restarting a
> Rails process. If so, wouldn't this middleware be shut off?
>
> -- Yehuda
>
> 2009/2/19 Harry Vangberg <ichverstehe@gmail.com>
>>
>> I needed some easy way to show a maintenance page while doing stuff,
>> and I can't be bothered with mod_rewrite and heaps of documentation,
>> so this piece of (stupidly named) middleware checks wether a given
>> file exists, and if it does that is served for all requests, otherwise
>> the request is just passed on down the chain.
>>
>> use Rack::Backstage('tmp/maintenance.html')
>>
>> It's here:
>> http://github.com/ichverstehe/rack-contrib/commit/d3610732b8a37a1e97befdb75bfd3824767a9bf9
>
>
> --
> Yehuda Katz
> Developer | Engine Yard
> (ph) 718.877.1325
>



-- 
stadik.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-06 20:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-19 23:56 Rack::Backstage Harry Vangberg
2009-04-06 11:35 ` Rack::Backstage Yehuda Katz
2009-04-06 20:05   ` Rack::Backstage Scytrin dai Kinthra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).