pat / riddle

Ruby Client API for Sphinx
MIT License
136 stars 67 forks source link

Listen configuration cannot be set #39

Closed ngan closed 12 years ago

ngan commented 13 years ago

In lib/riddle/0.9.9/configuration/searchd.rb#L13,

def set_listen
   return unless @listen.nil? || @listen.empty?
   ...
end

This means that I cannot set listen to specific port. e.g.: config/sphinx.yml: listen: 9312

The reason I'd want to specify a specific port is for this: https://github.com/freelancing-god/thinking-sphinx/issues/277

I think we should check if @listen is an array before calling #empty? on it...

ngan commented 13 years ago

@freelancing-god what are your thoughts on this Pat? I'd be happy to provide a patch.

pat commented 12 years ago

Sorry for not getting back to you sooner... What happens if you specify listen as an array in config/sphinx.yml?

listen:
  - 9312
ngan commented 12 years ago

It works! But still, that just looks strange.

pat commented 12 years ago

Well, you're welcome to patch - I think it's best to ensure we end up with Arrays internally.

ngan commented 12 years ago

Patch is in #40. Closing this one out. I really which there was a way to turn an issue into a pull request...