isaiah / jubilee

A rack server built upon vert.x
http://isaiah.github.io/jubilee
MIT License
327 stars 18 forks source link

Support :Port as string #9

Closed iconara closed 10 years ago

iconara commented 10 years ago

This patch fixes an issue with running rackup --port 3333. For some reason rackup doesn't convert the argument to an int before passing it to the handler, and currently Jubilee's RubyServer expects this option to be numeric.

An example:

% cd spec/apps/rack/basic
% ruby -I ../../../../lib -S rackup -s jubilee --port 3333
TypeError: can't convert String into Integer
  initialize at org/jruby/jubilee/RubyServer.java:69
  initialize at /Users/theo/Documents/Code/jubilee/lib/jubilee/server.rb:9
         run at /Users/theo/Documents/Code/jubilee/lib/rack/handler/jubilee.rb:24
       start at /Users/theo/.rvm/gems/jruby-1.7.8@jubilee/gems/rack-1.5.2/lib/rack/server.rb:264
       start at /Users/theo/.rvm/gems/jruby-1.7.8@jubilee/gems/rack-1.5.2/lib/rack/server.rb:141
      (root) at /Users/theo/.rvm/gems/jruby-1.7.8@jubilee/gems/rack-1.5.2/bin/rackup:4
        load at org/jruby/RubyKernel.java:1103
      (root) at /Users/theo/.rvm/gems/jruby-1.7.8@jubilee/bin/rackup:23

But with this patch it starts nicely.

Thanks for Jubilee, I like it a lot. I hope I can help out along the way.

isaiah commented 10 years ago

And welcome on board :+1: