poliqarpr 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/changelog.txt +3 -0
- data/lib/poliqarpr/client.rb +5 -2
- data/poliqarpr.gemspec +1 -1
- data/spec/client.rb +7 -0
- metadata +2 -2
data/changelog.txt
CHANGED
data/lib/poliqarpr/client.rb
CHANGED
@@ -394,7 +394,7 @@ module Poliqarp
|
|
394
394
|
# and the answer is sent to the handler. In this case
|
395
395
|
# the result returned by make_query should be IGNORED!
|
396
396
|
def make_query(query, should_wait=false,&handler)
|
397
|
-
if @last_query != query
|
397
|
+
if @last_query != query || @last_buffer_size != config.buffer_size
|
398
398
|
if @last_query != nil
|
399
399
|
begin
|
400
400
|
talk("CANCEL")
|
@@ -404,8 +404,11 @@ module Poliqarp
|
|
404
404
|
# this is ok - there might be no job running
|
405
405
|
end
|
406
406
|
end
|
407
|
+
if @last_query != query
|
408
|
+
talk("MAKE-QUERY #{query}")
|
409
|
+
end
|
407
410
|
@last_query = query
|
408
|
-
|
411
|
+
@last_buffer_size = config.buffer_size
|
409
412
|
start_waiting if should_wait
|
410
413
|
run_query
|
411
414
|
result = talk("RUN-QUERY #{config.buffer_size}", :async, &handler)
|
data/poliqarpr.gemspec
CHANGED
data/spec/client.rb
CHANGED
@@ -72,6 +72,13 @@ describe Poliqarp::Client do
|
|
72
72
|
@client.find("a").size.should == 5010
|
73
73
|
end
|
74
74
|
|
75
|
+
it "should run a new query if the buffer was resized, even if the last query is the same" do
|
76
|
+
@client.config.buffer_size = 100
|
77
|
+
@client.find("a",:index => 1)
|
78
|
+
@client.config.buffer_size = 200
|
79
|
+
@client.find("a", :index => 150)
|
80
|
+
end
|
81
|
+
|
75
82
|
it "should allow to set and get the right context size" do
|
76
83
|
@client.config.right_context_size = 5
|
77
84
|
@client.config.right_context_size.should == 5
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: poliqarpr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.10
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Aleksander Pohl
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-12 00:00:00 +01:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|