webmachine-ruby icon indicating copy to clipboard operation
webmachine-ruby copied to clipboard

Reel adapter passing wrong arguments to HTTP supervise

Open saturnflyer opened this issue 7 years ago • 2 comments

The code for the reel adapter sends multiple arguments to the ::Reel::Server::HTTP.supervise method: https://github.com/webmachine/webmachine-ruby/blob/c5a556c1628ed384b2b96bee79aeb0a954fbd016/lib/webmachine/adapters/reel.rb#L34

The celluloid-supervision gem expects a single hash argument def supervise(config={}, &block): https://github.com/celluloid/celluloid-supervision/blob/357dcdb4702ab0ed6ba391f884317fc7798b9fd5/lib/celluloid/supervision/supervise.rb#L10

Changing the arguments to be just the @options hash ends up raising an error in the celluloid-supervision Configuration valid? method.

I'm brand new to using these projects so I'm still digging in. Either this is a bug or I'm doing something wrong. I'll add more details to this issue as I figure them out but if anyone can point me in the right direction, I'd love the help.

saturnflyer avatar Nov 16 '17 22:11 saturnflyer

I'm not sure this answer is 100% accurate but in previous versions, ::supervise would pass through its arguments to #initialize, meaning the argument order is more like this: https://github.com/celluloid/reel/blob/master/lib/reel/server/http.rb#L12

Maybe @tarcieri or @rgarner will know better.

seancribbs avatar Nov 17 '17 04:11 seancribbs

I believe the latest supervise API takes a single args: option you should use to pass through the actual arguments

tarcieri avatar Nov 23 '17 20:11 tarcieri

Reel has been removed in the most recent release, closing.

seancribbs avatar Feb 18 '24 19:02 seancribbs