rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / code / Atom feed
* rack 1.2.2 release =>  Rack::Server.new(:app => app).start
@ 2010-08-25 16:24 Stephen Bannasch
  2010-08-28 18:41 ` Jeremy Hinegardner
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Bannasch @ 2010-08-25 16:24 UTC (permalink / raw)
  To: rack-devel

Is a rack 1.2.2 release likely to happen soon?

I'd like to be able to use Rack::Server by passing in an app instead of specifying a config.ru.

I just fixed it by hackingmy rack-1.2.1 gem locally and then saw this commit on July 12:

   http://github.com/rack/rack/commit/c73b474525bace3f059a130b15413abd4d917086
   Rack::Server should accept :app and override :config.

I want to be able to do things like this:

   jnlp_app = Rack::Builder.new do
     map "/" do
       use Rack::Jnlp
       run Rack::Directory.new(PUBLIC_DIR)
     end
   end

   Rack::Server.new(:app => jnlp_app, :Port => 4321, :server => 'webrick').start

Which I can now on my machine or if I update to the tip of the master branch.

I'd just like it to be easier to deploy the code on the server or share with other people.

In the meantime I'm using this form:

   Rack::Handler::WEBrick.run(jnlp_app, :Port => 4321)

But starting the server that way doesn't respond to ctrl-c ... see: http://github.com/rack/rack/issues/issue/35

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

* Re: rack 1.2.2 release =>  Rack::Server.new(:app => app).start
  2010-08-25 16:24 rack 1.2.2 release => Rack::Server.new(:app => app).start Stephen Bannasch
@ 2010-08-28 18:41 ` Jeremy Hinegardner
  2010-09-25 16:45   ` trans
  0 siblings, 1 reply; 4+ messages in thread
From: Jeremy Hinegardner @ 2010-08-28 18:41 UTC (permalink / raw)
  To: rack-devel

Hi all,

I too would like to use Rack::Server by passing in an app.
For the moment I'm working around it with:

    server = ::Rack::Server.new( options )
    server.instance_variable_set('@app', options[:app] )
    server.start

enjoy,

-jeremy


On Wed, Aug 25, 2010 at 12:24:44PM -0400, Stephen Bannasch wrote:
> Is a rack 1.2.2 release likely to happen soon?
>
> I'd like to be able to use Rack::Server by passing in an app instead of 
> specifying a config.ru.
>
> I just fixed it by hackingmy rack-1.2.1 gem locally and then saw this 
> commit on July 12:
>
>   
> http://github.com/rack/rack/commit/c73b474525bace3f059a130b15413abd4d917086
>   Rack::Server should accept :app and override :config.
>
> I want to be able to do things like this:
>
>   jnlp_app = Rack::Builder.new do
>     map "/" do
>       use Rack::Jnlp
>       run Rack::Directory.new(PUBLIC_DIR)
>     end
>   end
>
>   Rack::Server.new(:app => jnlp_app, :Port => 4321, :server => 
> 'webrick').start
>
> Which I can now on my machine or if I update to the tip of the master 
> branch.
>
> I'd just like it to be easier to deploy the code on the server or share 
> with other people.
>
> In the meantime I'm using this form:
>
>   Rack::Handler::WEBrick.run(jnlp_app, :Port => 4321)
>
> But starting the server that way doesn't respond to ctrl-c ... see: 
> http://github.com/rack/rack/issues/issue/35
>

-- 
========================================================================
 Jeremy Hinegardner                              jeremy@hinegardner.org 

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

* Re: rack 1.2.2 release => Rack::Server.new(:app => app).start
  2010-08-28 18:41 ` Jeremy Hinegardner
@ 2010-09-25 16:45   ` trans
  2010-09-26 19:18     ` James Tucker
  0 siblings, 1 reply; 4+ messages in thread
From: trans @ 2010-09-25 16:45 UTC (permalink / raw)
  To: Rack Development



On Aug 28, 2:41 pm, Jeremy Hinegardner <jer...@hinegardner.org> wrote:
> Hi all,
>
> I too would like to use Rack::Server by passing in an app.
> For the moment I'm working around it with:
>
>     server = ::Rack::Server.new( options )
>     server.instance_variable_set('@app', options[:app] )
>     server.start

And how do you build `app` ?

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

* Re: rack 1.2.2 release => Rack::Server.new(:app => app).start
  2010-09-25 16:45   ` trans
@ 2010-09-26 19:18     ` James Tucker
  0 siblings, 0 replies; 4+ messages in thread
From: James Tucker @ 2010-09-26 19:18 UTC (permalink / raw)
  To: rack-devel


On 25 Sep 2010, at 13:45, trans wrote:

> 
> 
> On Aug 28, 2:41 pm, Jeremy Hinegardner <jer...@hinegardner.org> wrote:
>> Hi all,
>> 
>> I too would like to use Rack::Server by passing in an app.
>> For the moment I'm working around it with:
>> 
>>     server = ::Rack::Server.new( options )
>>     server.instance_variable_set('@app', options[:app] )
>>     server.start
> 
> And how do you build `app` ?

It's anything that response to #call with an env and returns a rack response style tuple [status, headers, body].

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

end of thread, other threads:[~2010-09-26 19:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-25 16:24 rack 1.2.2 release => Rack::Server.new(:app => app).start Stephen Bannasch
2010-08-28 18:41 ` Jeremy Hinegardner
2010-09-25 16:45   ` trans
2010-09-26 19:18     ` James Tucker

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/rack.git

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).