celluloid / reel-rack

UNMAINTAINED: See celluloid/celluloid#779
https://celluloid.io
MIT License
51 stars 24 forks source link

Fix addr and port params #11

Open a0s opened 10 years ago

a0s commented 10 years ago

Fix not working -a/--addr param. Also fix complexity of many similar symbols as :port, :Port, :host, :Host

a0s commented 10 years ago

Hm, travis get strange error "no host given", but locally it all without error

$ bundle exec reel-rack online_api_v2.ru
20.03.2014 18:05:58 loading with RUBY 'ruby 1.9.3p545 (2014-02-24 revision 45159) [x86_64-darwin13.1.0]'
A Reel good HTTP server! (Codename "Garbo")
Listening on http://localhost:3000
^CInterrupt received... shutting down
Terminating task: type=:call, meta={:method_name=>:run}, status=:iowait
That's all, folks!
Terminating 4 actors...
$ bundle exec reel-rack -a 192.168.1.22 online_api_v2.ru
20.03.2014 18:06:07 loading with RUBY 'ruby 1.9.3p545 (2014-02-24 revision 45159) [x86_64-darwin13.1.0]'
A Reel good HTTP server! (Codename "Garbo")
Listening on http://192.168.1.22:3000
^CInterrupt received... shutting down
Terminating task: type=:call, meta={:method_name=>:run}, status=:iowait
That's all, folks!
Terminating 4 actors...
$ bundle exec reel-rack -p 3003 online_api_v2.ru
20.03.2014 18:06:16 loading with RUBY 'ruby 1.9.3p545 (2014-02-24 revision 45159) [x86_64-darwin13.1.0]'
A Reel good HTTP server! (Codename "Garbo")
Listening on http://localhost:3003
^CInterrupt received... shutting down
Terminating task: type=:call, meta={:method_name=>:run}, status=:iowait
That's all, folks!
Terminating 4 actors...
$ bundle exec reel-rack -a 192.168.1.22 -p 3003 online_api_v2.ru
20.03.2014 18:12:21 loading with RUBY 'ruby 1.9.3p545 (2014-02-24 revision 45159) [x86_64-darwin13.1.0]'
A Reel good HTTP server! (Codename "Garbo")
Listening on http://192.168.1.22:3003
^CInterrupt received... shutting down
Terminating task: type=:call, meta={:method_name=>:run}, status=:iowait
That's all, folks!
Terminating 4 actors...
tarcieri commented 10 years ago

:Host and :Port are that way intentionally as this is the Rack standard (which I believe came from WEBRick). See this PR: https://github.com/celluloid/reel-rack/pull/6

Test failures look unrelated.

Can you change :Host and :Port back, then I'll merge this?