sphinx 0.9.9.2117 → 0.9.10
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -3
- data/README.rdoc +18 -213
- data/Rakefile +15 -24
- data/VERSION.yml +1 -2
- data/install.rb +5 -0
- data/lib/sphinx/client.rb +893 -2089
- data/lib/sphinx/request.rb +11 -82
- data/lib/sphinx/response.rb +0 -2
- data/lib/sphinx.rb +5 -50
- data/spec/client_response_spec.rb +40 -33
- data/spec/client_spec.rb +471 -669
- data/spec/fixtures/ranking_sph04.php +9 -0
- data/spec/fixtures/sphinxapi.php +69 -54
- data/spec/sphinx/sphinx-id64.conf +1 -1
- data/spec/sphinx/sphinx.conf +1 -1
- data/spec/sphinx/sphinx_test.sql +2 -4
- data/sphinx.gemspec +8 -13
- data/sphinx.yml.tpl +3 -0
- data/tasks/sphinx.rake +75 -0
- metadata +6 -11
- data/lib/sphinx/buffered_io.rb +0 -26
- data/lib/sphinx/constants.rb +0 -179
- data/lib/sphinx/indifferent_access.rb +0 -152
- data/lib/sphinx/server.rb +0 -170
- data/lib/sphinx/timeout.rb +0 -31
- data/spec/client_validations_spec.rb +0 -859
- data/spec/spec_helper.rb +0 -24
data/spec/spec_helper.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../init'
|
2
|
-
|
3
|
-
# Helper exception class to omit real dialogue between client and server
|
4
|
-
class SphinxSpecError < StandardError; end
|
5
|
-
|
6
|
-
# Runs PHP fixture to get request dump
|
7
|
-
def sphinx_fixture(name)
|
8
|
-
`php #{File.dirname(__FILE__)}/fixtures/#{name}.php`
|
9
|
-
end
|
10
|
-
|
11
|
-
def sphinx_create_client
|
12
|
-
@sphinx = Sphinx::Client.new
|
13
|
-
@sock = mock('SocketMock')
|
14
|
-
|
15
|
-
servers = @sphinx.instance_variable_get(:@servers)
|
16
|
-
servers.first.stub(:get_socket => @sock, :free_socket => nil)
|
17
|
-
@sphinx.stub!(:parse_response).and_raise(SphinxSpecError)
|
18
|
-
return @sphinx
|
19
|
-
end
|
20
|
-
|
21
|
-
def sphinx_safe_call
|
22
|
-
yield
|
23
|
-
rescue SphinxSpecError
|
24
|
-
end
|