lib/riddle/0.9.9/configuration/searchd.rb in riddle-1.3.3 vs lib/riddle/0.9.9/configuration/searchd.rb in riddle-1.4.0

- old
+ new

@@ -3,19 +3,23 @@ class Searchd def valid? set_listen clear_deprecated - !( @listen.nil? || @pid_file.nil? ) + !( @listen.nil? || @listen.empty? || @pid_file.nil? ) end private def set_listen - return unless @listen.nil? + return unless @listen.nil? || @listen.empty? - @listen = @port.to_s if @port && @address.nil? - @listen = "#{@address}:#{@port}" if @address && @port + @listen = [] + @listen << @port.to_s if @port + @listen << "9306:mysql41" if @mysql41.is_a?(TrueClass) + @listen << "#{@mysql41}:mysql41" if @mysql41.is_a?(Fixnum) + + @listen.each { |l| l.insert(0, "#{@address}:") } if @address end def clear_deprecated return if @listen.nil? \ No newline at end of file