Skip to content

Commit

Permalink
Updating Riddle.
Browse files Browse the repository at this point in the history
  • Loading branch information
pat committed Dec 10, 2009
1 parent ee2a171 commit 8de0a76
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions vendor/riddle/lib/riddle/client.rb
Expand Up @@ -132,7 +132,7 @@ def initialize(server=nil, port=nil)
Riddle.version_warning

@server = server || "localhost"
@port = port || 3312
@port = port || 9312
@socket = nil

reset
Expand Down Expand Up @@ -474,9 +474,10 @@ def close_socket
# Connects to the Sphinx daemon, and yields a socket to use. The socket is
# closed at the end of the block.
def connect(&block)
unless @socket.nil?
if @socket && !@socket.closed?
yield @socket
else
@socket = nil
open_socket
begin
yield @socket
Expand Down
2 changes: 0 additions & 2 deletions vendor/riddle/lib/riddle/configuration.rb
Expand Up @@ -18,8 +18,6 @@ class ConfigurationError < StandardError #:nodoc:
attr_accessor :indexer

def initialize
Riddle.version_warning

@indexer = Riddle::Configuration::Indexer.new
@searchd = Riddle::Configuration::Searchd.new
@indexes = []
Expand Down
3 changes: 2 additions & 1 deletion vendor/riddle/lib/riddle/controller.rb
Expand Up @@ -18,11 +18,12 @@ def sphinx_version
end

def index(*indexes)
options = indexes.last.is_a?(Hash) ? indexes.pop : {}
indexes << '--all' if indexes.empty?

cmd = "#{indexer} --config #{@path} #{indexes.join(' ')}"
cmd << " --rotate" if running?
`#{cmd}`
options[:verbose] ? system(cmd) : `#{cmd}`
end

def start
Expand Down

0 comments on commit 8de0a76

Please sign in to comment.